CICS translator actions for COBOL programs
These notes describe specific translator action that is taken when the COBOL3 option is used. Processing with the COBOL2 option is the same in all respects, except for declarations of temporary variables.
Literals intervening in blank lines
Blank lines can appear anywhere in a COBOL source program. A blank line contains nothing but spaces between columns 7 and 72 inclusive.If blank lines occur within literals in a COBOL source program, the translator eliminates them from the translated output but includes them in the translated listing.
Lower case characters
Lower case characters can occur anywhere in any COBOL word, including user-defined names, system names, and reserved words. The translator listing and output preserve the case of COBOL text as entered.
- Translator options
- EXEC CICS® commands, both for keywords and for arguments to keywords
- CBL and PROCESS statements
- Compiler directives such as EJECT and SKIP1
The translator does not translate lower case text into upper case. Some names in COBOL text, for example file names and transaction IDs, must match with externally defined names. Such names must always be entered in the same case as the external definition.
If you specify the LINKAGE translator option, or allow it to default, a mixed-case version of the EIB structure (DFHEIBLC) is inserted into the LINKAGE SECTION.
Sequence numbers containing any character
In a COBOL source program, the sequence number field can contain any character in the computer's character set. The sequence number fields need not be in any order and need not be unique.
REPLACE statement
COBOL programs can include the REPLACE statement, which allows the replacement of identified text by defined substitution text. The text to be replaced and inserted can be pseudo-text, an identifier, a literal, or a COBOL word. REPLACE statements are processed after COPY statements.
If you process your COBOL source statements with the CICS-supplied translator, the translator accepts REPLACE statements but does not translate text between pseudo-text delimiters, with the exception of CICS built-in functions (DFHRESP and DFHVALUE), which are translated wherever they occur. CICS commands should not be placed between pseudo-text delimiters.
If you use the integrated translator, the translator accepts REPLACE statements and does translate text between pseudo-text delimiters. CICS commands can be placed between pseudo-text delimiters.
Reference modification
data-name (leftmost-character-position:)
data-name (leftmost-character-position: length)
data-name can be subscripted or qualified or both. eftmost-character-position and length can be arithmetic expressions. For more information about reference modification, qualification and subscripting, see the Enterprise COBOL for z/OS Language Reference.
The translator accepts reference modification wherever the name of a character variable is permitted in a COBOL program or in an EXEC CICS command.
LENGTH OF (reference modification)
This
is rejected by the compiler.
Global variables
The GLOBAL clause is supported. A variable defined with the GLOBAL clause in a top-level program (see Nested COBOL programs ) can be referred to in any of its nested programs, whether directly or indirectly contained.
The translator accepts the GLOBAL keyword.
Comma and semicolon as delimiters
A separator comma is a comma followed by a space. A separator semicolon is a semicolon followed by a space. A separator comma or a separator semicolon can be used as a separator wherever a space alone can be used.
IDENTIFICATION; DIVISION
The translator does not support the use of the separator comma and separator semicolon as delimiters in EXEC CICS commands. The only acceptable word delimiter in an EXEC CICS command continues to be a space.
Symbolic character definition
Symbolic characters can be defined in the SPECIAL-NAMES paragraph after the ALPHABET clause. A symbolic character is a program-defined word that represents a 1-character figurative constant.
The translator accepts the use of symbolic characters as specified in the standard.