Using a CICS translator
A language translator reads your source program and creates a new one. Most normal language statements remain unchanged, but CICS® commands are translated into CALL statements of the form required by the language in which you are coding.
The calls invoke CICS-provided
EXEC
interface modules, which
are later link-edited into your load module, and these in turn invoke
the requested services at execution time.
You can control the translation process by specifying translator options. See Defining translator options.
-
List them as suboptions of the XOPTS option on the statement that
the compiler (assembler) provides for specifying options.
Table 1. Statement provided for each language Language Statement COBOL CBL COBOL PROCESS C #pragma C++ #pragma PL/I * PROCESS Assembler *ASM or *PROCESS 1 -
List your options in the PARM operand of the EXEC job control
statement for the translate step.
Most installations use catalogued procedures to translate, compile (assemble) and link CICS programs, and therefore you specify this PARM field in the EXEC job control statement that invokes the procedure.
For example, if the name of the procedure for COBOL programs is DFHYITVL, and the name of the translate step in the procedure is TRN, the following example statement sets translator options for a COBOL program:// EXEC DFHYITVL,PARM.TRN=(VBREF,QUOTE,SPACE(2),NOCBLCARD)
If you use one method to specify an option and use the other method to specify the same option, or an option that conflicts, the specifications in the language statement override those in the EXEC statement. Similarly, if you specify multiple values for a single option or options that conflict on either type of statement, the last setting takes precedence. Except for COBOL programs, these statements must precede each source program; there is no way to batch the processing of multiple programs in other languages.
CBL LIB XOPTS(QUOTE SPACE(2))
#pragma XOPTS(FLAG(W) SOURCE);
* PROCESS XOPTS(FLAG(W) SOURCE);
*ASM XOPTS(NOPROLOG NOEPILOG)
PARM=(op1 op2 .. opn)
PARM=(XOPTS op1 op2 .. opn)
PARM=XOPTS(op1 op2 .. opn)
PARM=(XOPTS(op1 op2) opn)
For compatibility with previous releases, the keyword CICS can be used as an alternative to XOPTS, except when you are translating batch EXEC DLI programs. Remember, if you alter the default margins for C or C++ #pragma card processing using the PARM operand, the sequence margins should be altered too. You can do this using the NOSEQUENCE option.
- For assembler language programs, *ASM statements contain translator options only. They are treated as comments by the assembler. *PROCESS statements can contain translator or assembler options for the High Level assembler, HLASM.
- Translator and assembler options must not coexist on the same *PROCESS statement.
-
*PROCESS and *ASM statements must be at the beginning of the input
and no assembler statements must appear before them. This includes
comments and statements such as
PRINT ON
andEJECT
. Both *PROCESS and *ASM statements can be included, in any order. - *PROCESS statements containing only translator options contain information for the translator only and are not passed to the assembler.
- *PROCESS statements containing assembler options are placed in the translated program.