Allowable comparisons for the IF command (COBOL)
The following table shows the allowable comparisons for the z/OS® Debugger
IF
command. A description of the codes follows the table.
For Enterprise COBOL for z/OS Version 5, z/OS Debugger supports all the same comparisons that are supported in the COBOL language, so the following table does not apply. See the Enterprise COBOL for z/OS Language Reference for more information.
OPERAND | GR | AL | AN | ED | BI | NE | ANE | NDI |
NN
DI |
ID | IN | IDI | PTR | @ | IF | EF | D1 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Group (GR) | NN | NN | NN | NN | NN | NN | NN | NN10 | NN | NN | NN | NN | |||||
Alphabetic (AL) | NN | NN | NN | ||||||||||||||
Alpha numeric (AN)8 | NN | NN | NN | ||||||||||||||
External Decimal (ED)8 | NN | NU | |||||||||||||||
Binary | NN | NU | NU4 | ||||||||||||||
Numeric Edited (NE) | NN | NN | |||||||||||||||
Alphanumeric Edited (ANE) | NN | NN | NN | ||||||||||||||
FIGCON ZERO7 | NN | NU | NU | NN | NU | NU | NU | ||||||||||
FIGCON1,7 | NN | NN | NN | NN | NN9 | NU | |||||||||||
National Data Item (NDI) | NN10 | NN | NN | NN | NN | ||||||||||||
National Numeric Data Item (NNDI) | NN | ||||||||||||||||
Numeric Literal7 | NN | NU | NU | NN | NU | NU4 | NU | NU | |||||||||
Alphanumeric Literal2,7 | NN | NN3 | NN | NN | NN | NN | |||||||||||
Alphanumeric hex literal11 | NN | NN | NN | NN | NN | ||||||||||||
Internal Decimal (ID)8 | NN | NU | |||||||||||||||
Index Name (IN) | NN | NU4 | IO4 | NU | |||||||||||||
Index Data Item (IDI) | NN | NU | IV | ||||||||||||||
Pointer Data Item (PTR) | NU5 | NU5 | |||||||||||||||
Address of (@) | NU5 | NU5 | |||||||||||||||
Floating Point Literal7 | X | NU | NU | ||||||||||||||
Internal Floating Point (IF) | NN | NU | NU | ||||||||||||||
External Floating Point (EF) | NN | NU | NU | ||||||||||||||
DBCS data item (D1) | NN | ||||||||||||||||
DBCS Literal7 | NN | ||||||||||||||||
Address hex Literal6 | NU5 | NU5 | |||||||||||||||
National Literal | NN10 | NN | |||||||||||||||
National Hex Literal12 | NN10 | NN |
Notes:
FIGCON
includes all figurative constants exceptZERO
andALL
.- A alphanumeric literal must be enclosed in quotation marks (") or apostrophes ('). A quotation mark or apostrophe embedded in the string must be followed by another quotation mark or apostrophe when it is used as the opening delimiter.
- Must contain only alphabetic characters.
- Index name converted to subscript value before compare.
- Only comparison for equal and not equal can be made.
- Must be hexadecimal characters only, delimited by either quotation marks (") or apostrophes (') and preceded by H.
- Constants and literals can also be compared against constants and literals of the same type.
- Comparisons using windowed date fields are not supported.
- The figurative constants
HIGH-VALUES
andLOW-VALUES
are not allowed in comparisons with national data items. - Conversion of internal format is not done before the comparison.
- Must be hexadecimal characters only, delimited by either quotation marks (") or apostrophes (') and preceded by X.
- Must be hexadecimal characters only, delimited by either quotation marks (") or apostrophes (') and preceded by NX.
Allowable comparisons are comparisons as described in IBM® OS Full American National Standard COBOL for the following:
- NN
- Nonnumeric operands
- NU
- Numeric operands
- IO
- Two index names
- IV
- Index data items
- X
- High potential for user error
Refer to the following topics for more information related to the material discussed in this topic.
- Related references
- IBM OS Full American National Standard COBOL