Thanks Linda. I have managed to work out everything I needed to know thus far but it is good to have it documented here.
The information contained in this email communication may be confidential. If you have received this email in error, please notify the sender by return email, delete this email and destroy any copy.
Any advice contained in this email has been prepared without taking into account your objectives, financial situation or needs. Before acting on any advice in this email, National Australia Bank Limited (NAB) recommends that you consider whether it is appropriate for your circumstances. If this email contains reference to any financial products, NAB recommends you consider the Product Disclosure Statement (PDS) or other disclosure document available from NAB, before making any decisions regarding any products.
If this email contains any promotional content that you do not wish to receive, please reply to the original sender and write "Don't email promotional material" in the subject.
Original Message:
Sent: 3/27/2023 10:17:00 AM
From: Linda Chui
Subject: RE: Documentation
hi,
All the documentation for that, including XL_CONFIG and how to set up the config file is in the z/OS XL C/C++ Users Guide in Chapter 25 (Compiler invocation using a customizable configuration file). A web link to the starting topic here: https://www.ibm.com/docs/en/zos/2.5.0?topic=guide-xlc-compiler-invocation-using-customizable-configuration-file
Hope this helps.
------------------------------
Linda Chui
Compilation Technology & Enterprise Products
IBM Canada
------------------------------
Original Message:
Sent: Sun March 26, 2023 06:33 PM
From: Jonathan Juler
Subject: Documentation
Hi Colin,
Thanks for the reply - I worked out eventually what I needed to do. I have indeed already cracked that nut, my issue was npm was not using my xlc.cfg file to work out where to get stuff. There is no option to tell npm to use a local xlc.cfg file but it does honour whatever you setup for normal C compiles. The system version of xlg.cfg is not configured properly (methinks no-one uses it or due to low confidence takes matters in their own hands like I am). I have some environment variables set like CFLAGS='-F xlc.cfg' and CXXFLAGS='-F xlc.cfg' which has helped with other attempts at C compilation but not this. Turns out there is another option called XL_CONFIG that I had to set for npm to work out that I wanted to use the local version then bingo we had an attempted compile.
Then I had to work out why it couldn't include the headers...again there are options in the xlc.cfg but I am no expert at this so it took me a while to work out which ones to use (cinc and cppinc). None of this is helped by the inconsistency in the naming standards for variables and parameters nor by the sprinkling of different bits of information throughout different manuals.
I finally got it to the point where it would at least attempt to compile the code and could now find the header files but now have a roadblock in the form of :
npm ERR! "../cppsrc/zrexx.cc", line 187.1: CCN5130 (S) "Napi::RegisterModule" is not declared.
The road goes ever on and down down from the door where it began...
Regards J
------------------------------
Jonathan Juler
Original Message:
Sent: Fri March 24, 2023 04:21 AM
From: Colin Paice
Subject: Documentation
I googled it and found
I copied /usr/lpp/cbclib/xlc/etc/xlc.cfg to my current working directory:
cp /usr/lpp/cbclib/xlc/etc/xlc.cfg myxlc.cfg
I modified the value of the steplib option in myxlc.cfg from none to
CBC.SCCNCMP.
Thereafter the command
xlc -F./xlc.cfg -o hw hw.c
worked
Make sure it points to your library
Colin
------------------------------
Colin Paice
Original Message:
Sent: Thu March 23, 2023 03:25 AM
From: Jonathan Juler
Subject: Documentation
Struggling to find the documentation on how to setup XL C/C++ under Unix System Services.
I am trying to install an npm package which keeps failing with
EDC5129I No such file or directory. (errno2=0x05940252)FSUM3221 xlc++: Cannot spawn program /usr/lpp/cbclib/xlc/exe/ccndrvr - EDC5142I Invalid seek. (errno2=0x054D0057).
The troubleshooting section refers me to the XL C/C++ doco which doesn't include an install guide so you would even know what to check for. I eventually found some documentation but it only covers the z/OS SMP/E setup and nothing to do with how to invoke it or set it up in USS.
------------------------------
Jonathan Juler
------------------------------