Figure 20 shows the flow of control in the DFHYxTzL cataloged procedures for C command-level programs.
There are translator, compiler, pre-linkage editor and linkage editor steps, each producing a listing and an intermediate file that is passed to the next step. C libraries are referenced in the compiler, pre linkage editor and linkage editor steps.
Before you can install any C programs, you must have installed the C library and compiler and generated CICS® support for C. (See the CICS Transaction Server for z/OS® Installation Guide.)
You can use the job control statements shown in Figure 21 to process C application programs. In the procedure name, x depends on whether your program is a CICS application program or an EXCI batch program. For the names of the CICS-supplied procedures, see Table 6.
//jobname JOB accounting info,name,MSGLEVEL=1
// EXEC PROC=DFHYxTzL 1
//TRN.SYSIN DD * 2
#pragma XOPTS(Translator options . . .) 3
.
C source statements
.
/*
//LKED.SYSIN DD * 4
NAME anyname(R)
/*
//
Notes for installing a C program:
1 Compiler options:
You can code compiler options by using the parameter override (PARM.C) in the EXEC statement that invokes the procedure, or on a ~pragma options directive.
2 If you have no input for the translator, you can specify DD DUMMY instead of DD *. However, if you specify DD DUMMY, also code a suitable DCB operand. (The translator does not supply all the data control block information for the SYSIN data set.)
3 Translator options: For information about the translator options you can include on the XOPTS statement, see Defining translator options .
4 If you are installing a program into either of the read-only DSAs, see Running application programs in the RDSAs for more details.
If you are installing a program that is to be used from the LPA, add the RENT and REFR options to the LNKPARM parameter on the call to the DFHYxTzL procedure. (See Running applications in the link pack area for more information.)
C language programs must be link-edited with AMODE(31), so the DFHYxTzL procedures specify AMODE(31) by default.
To use the procedures to invoke
the integrated translator for XL C, you can use the job control statements
shown in Figure 22:
//jobname JOB accounting info,name,MSGLEVEL=1
// EXEC DFHZITxL,PROGLIB=dsnname 1
//C.SYSIN DD *
.
. C source statements
.
//LKED.SYSIN DD *
NAME anyname(R)
//
1 Translator name:
Specify DFHZITDL for C programs without XPLINK or DFHZITFL for
C programs with XPLINK.
To use the procedures to invoke
the integrated translator for XL C++, you can use the job control statements
shown in Figure 23:
//jobname JOB accounting info,name,MSGLEVEL=1
// EXEC DFHZITxL,PROGLIB=dsnname 1
//CPP.SYSIN DD *
.
. C++ source statements
.
//LKED.SYSIN DD *
NAME anyname(R)
//
1 Translator name:
Specify DFHZITEL for C++ programs without XPLINK, or DFHZITGL
for C++ programs with XPLINK.
The translator may generate dfhexec or DFHEXEC. If both versions are present in your program, you will see error message IEW2456E. There are two ways to prevent this error.
//jobname JOB accounting info,name,MSGLEVEL=1
// EXEC PROC=DFHYxTzL
//TRN.SYSIN DD *
#pragma XOPTS(Translator options . . .)
.
C source statements
.
/*
//PLKED.SYSLIN DD *
RENAME dfhexec DFHEI1
//LKED.SYSLIN DD *
NAME anyname(R)
/*
//