Under z/OS® batch

Copy the IBM-supplied sample program and header file into your data set. For example, if your user prefix is PETE, store the sample program (CCNUAAM) in PETE.TEST.C(CTOF) and the header file in PETE.TESTHDR.H(CCNUAAN). You can use the IBM-supplied cataloged procedure EDCCBG to compile, bind, and run the example program as follows:

Figure 1. JCL to compile, bind, and run the example program using the EDCCBG procedure
//DOCLG       EXEC   PROC=EDCCBG,INFILE='PETE.TEST.C(CTOF)',
//            CPARM='LSEARCH(''''PETE.TESTHDR.+'''')'
//GO.SYSIN    DD DATA,DLM=@@
19
@@

In Figure 1, the LSEARCH statement describes where to find the user include files. The system header files will be searched in the data sets specified on the SEARCH compiler option, which defaults to CEE.SCEEH.+. The GO.SYSIN statement indicates that the input that follows it is given for the execution of the program.

XPLINK under z/OS batch

Figure 2 shows the JCL for building with XPLINK.