Previous Topic: Conditional Expressions in Indirect CommandsNext Topic: PL/I Variable Syntax


COBOL Variable Syntax

The general syntax for a COBOL variable in CA InterTest for CICS indirect commands is as follows:

[prog‑id:] data‑name [IN grp‑name][ ({sub‑name OR ind‑name OR number}[, ...]) ]

or

[prog‑id:] data‑name [OF grp‑name][ ({sub‑name OR ind‑name OR number}[, ...]) ]
prog‑id

Identifies the program‑ID of the program to which the variable belongs. If used, the prog‑id must immediately be followed by a colon (:). If omitted, the default is the main program's program‑ID.

data‑name

Indicates COBOL data item.

grp‑name

Identifies the COBOL identifier of a group item to which the data‑name belongs. This clause lets qualification of an identifier that displays in more than one group.

sub‑name

Specifies a COBOL identifier to use as a subscript. This identifier must follow all the COBOL rules for valid subscripts.

ind‑name

Indicates a COBOL index‑name.

number

Specifies a positive integer that is used as a valid subscript for a data‑name.

Note: OR is not part of the command syntax.

Examples:

The following are examples of valid COBOL data-names:

TOTAL-AMT
CUST-NO OF CUST-REC
MONTHLY-BAL (8) 
YEARLY-TOT (W-YR, 3, W-DEPT)
 SUBRTN1:ITEM-A
SUBRTN1:ITEM-B IN INP-REC(3, SUB-2, 4, SUB-3)