Non-XPLINK and XPLINK under the z/OS UNIX shell
Steps for compiling, binding, and running the C++ example program using UNIX commands
Before you begin: Put the source in the z/OS® UNIX file
system. From the z/OS shell type:
cp "//'cbc.sccnsam(ccnubrc)'" ccnubrc.C
cp "//'cbc.sccnsam(ccnubrh)'" ccnubrh.h This example uses the
current working directory so make sure that you are in the directory
you want to use. Use the pwd command
to display the current working directory, the mkdir command
to create a new directory, and the cd command
to change directories.Ensure that the Language Environment® runtime libraries SCEERUN and SCEERUN2, the z/OS class library DLLs, and the z/OS XL C++ compiler are in the STEPLIB, dynamic LPA, or Link List concatenation.
Perform the following steps to compile, bind, and run the example program using z/OS UNIX commands:
- Compile and bind:
c++ -o bio ccnubrc.C -- or, for XPLINK -- c++ -o bio -Wc,xplink -Wl,xplink ccnubrc.CNote: You can use c++ to compile source that is stored in a data set._______________________________________________________________
- Run the program:
./bioExample: When you are asked to enter your birthdate, enter, for example, 1999/01/03.
Result: The following information displays:
Total Days : 1116 Physical : -0.136167 Emotional : -0.781831 Intellectual: -0.909632_______________________________________________________________