Non-XPLINK and XPLINK under the z/OS UNIX shell
Steps for compiling, binding, and running the example program using UNIX commands
Before you begin: Put the source in the z/OS® UNIX file system and ensure that the Language Environment® runtime libraries SCEERUN and SCEERUN2, and the z/OS XL C compiler are in the STEPLIB, LPALST, or LNKLST concatenation.
Perform the following steps to compile, bind, and run the example program using z/OS UNIX commands:
- From the z/OS shell, type the following:
cp "//'cbc.sccnsam(ccnuaam)'" ccnuaam.c cp "//'cbc.sccnsam(ccnuaan)'" ccnuaan.h
_______________________________________________________________
- Compile and bind:
c89 -o ctof ccnuaam.c -- or, for XPLINK -- c89 -o ctof -Wc,xplink -Wl,xplink ccnuaam.c
_______________________________________________________________
- Run the program:
./ctof
Example: When a message appears asking you to enter a Celsius temperature, enter, for example, 25.
Result: The load module displays the following output: 25.00 Celsius is 77.00 Fahrenheit
_______________________________________________________________