Operands
Detailed descriptions of these operands are presented in this section.
In addition to its actual data portion, certain operands can include an optional data-type. A data-type consists of a valid data-type code, optionally preceded by a length declaration. The following table shows the valid data-type codes. If a length is not specified with a data-type, then the default length is used.
For literal operands, the default length column in the following table does not apply. If the optional length declaration is not specified, the product will use the minimum number of bytes required to store the literal value.
Valid data-types used with operands
Data-type code | Data-type description | Min/max length | Default length |
---|---|---|---|
C | Fixed-length character string | 1-32767 | 1 |
F | Signed fixed-point binary 1 | 1-16 | 4 |
P | Packed decimal | 1-16 | 4 |
Z | Zoned decimal 1 | 1-31 | 8 |
X | Unsigned fixed-point binary | 1-16 | 1 |
|
To better identify the different data types as they relate to a COBOL or PL/I program, use the following table to examine the length and comparable data-types to operands.
Programming language data-type equivalents
COBOL | Fast Path/EP expression language | PL/I |
---|---|---|
PIC X(4) | 4C | Char (4) |
PIC S9999 Comp | 2F | Fixed Bin (15) |
PIC S99999 Comp 3 | 3P | Fixed Dec (5) |
PIC 999 PIC 999V99 | 3Z 5.2Z | PIC ‘999’ PIC ‘999V99’ |
PIC 9999 Comp | 2X | Fixed Bin (15) |
Comments
Log in or register to comment.