z/OS MVS Programming: Workload Management Services
Previous topic | Next topic | Contents | Index | Contact z/OS | Library | PDF


Compiling an ARM-instrumented Application

z/OS MVS Programming: Workload Management Services
SC34-2663-00

Compiling an ARM-instrumented Application

When compiling an ARM-instrumented application, the application should use #include "arm4.h" to include the ARM header file. As a result, the arm4.h header file library, SYS1.SIEAHDRV.H, must be included in the SEARCH/LSEARCH path.

Using the C/C++ Compiler in BATCH

Figure 15 shows sample JCL that illustrates the required options to compile an ARM-instrumented 31-bit XPLINK application in MVS™ batch.

Figure 15. Sample JCL for Compiling an ARM-instrumented Application in MVS Batch
/MYJOB jobcard
//*
//        JCLLIB ORDER=CBC.SCCNPRC
//*
//COMPILE EXEC CBCC,
//        CPARM='OPTF(DD:OPTIONS)',
//        INFILE='mysource(mymember)',
//        OUTFILE='myobjectdeck(mymember),DISP=SHR'
//COMPILE.OPTIONS DD *
  LSEARCH(//'SYS1.SIEAHDRV.+')
  SEARCH(//'SYS1.SIEAHDRV.+')
  LANGLVL(EXTENDED)
  XPLINK                      Non-XPLINK: omit, 64BIT: LP64
  SOURCE
  other options

For a 31-bit non-XPLINK application, omit XPLINK (third line from the bottom in the example).

For a 64-bit application, specify the LP64 option instead of XPLINK. (The LP64 option is supported by the z/OS® V1R6 or higher C/C++ compiler.)

Using the C/C++ Compiler under z/OS UNIX System Services

Run the c89 or c++ z/OS UNIX System Services shell command to compile your program and store the object. For C++ compiles add the -+ option. Table 15 shows examples of compiling under z/OS UNIX System Services in the various environments.

Table 15. Sample Commands for Compiling Applications under z/OS UNIX Systems Services
EnvironmentSample Command
31-bit XPLINK
c++ -c -o mymain.o -Wc,"DLL,XPLINK,LANGLVL(EXTENDED)" \
  -I//"'SYS1.SIEAHDRV.+'" mymain.c
31-bit non-XPLINK
c++ -c -o mymain.o -Wc,"DLL,LANGLVL(EXTENDED)" \
  -I//"'SYS1.SIEAHDRV.+'" mymain.c
64-bit
c++ -c -o mymain.o -Wc,"DLL,LP64,LANGLVL(EXTENDED)" \
  -I//"'SYS1.SIEAHDRV.+'" mymain.c

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014