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.

You can specify your choices in the following ways:
  • 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.

Translator options can appear in any order, separated by one or more blanks, or by a comma. If you specify them on the language statement for options, they must appear in parentheses following the XOPTS parameter, because other options are ignored by the translator and passed through to the compiler. The following COBOL example shows both translator and compiler options being passed together:
CBL LIB XOPTS(QUOTE SPACE(2))
The following examples show translator options being passed alone:
#pragma XOPTS(FLAG(W) SOURCE);
* PROCESS XOPTS(FLAG(W) SOURCE);
*ASM XOPTS(NOPROLOG NOEPILOG)
If you use the PARM operand of the EXEC job control statement to specify options, the XOPTS keyword is unnecessary, because the only options permitted here are translator options. However, you can use XOPTS, with or without its associated parentheses. If you use XOPTS with parentheses, be sure to enclose all of the translator options. For example, the following forms are valid:
PARM=(op1 op2 .. opn)
PARM=(XOPTS op1 op2 .. opn)
PARM=XOPTS(op1 op2 .. opn)
The following form is not valid:
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.

Notes:
  1. 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.
  2. Translator and assembler options must not coexist on the same *PROCESS statement.
  3. *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 and EJECT. Both *PROCESS and *ASM statements can be included, in any order.
  4. *PROCESS statements containing only translator options contain information for the translator only and are not passed to the assembler.
  5. *PROCESS statements containing assembler options are placed in the translated program.