Data Types
RPG supports the following data types.
Data type | Name | Length | Description |
---|---|---|---|
A |
Alphanumeric character | 1 to 32,766 bytes | Alphanumeric character |
B |
Binary numeric | 2 byte (16-bit) 4 bytes (32-bit) |
Signed binary integer |
D |
Date | 10 bytes | Date: year, month, day |
F |
Floating point numeric | 4 bytes (32-bit) 8 bytes (64-bit) |
Signed binary floating-point real |
G |
Graphic character | 1 to 32,766 bytes | 16-bit graphic character (DBCS or EGCS) |
I |
Integer numeric | 1 byte (8-bit) 2 bytes (16-bit) 4 bytes (32-bit) 8 bytes (64-bit) |
Signed binary integer |
U |
Integer numeric | 1 byte (8-bit) 2 bytes (16-bit) 4 bytes (32-bit) 8 bytes (64-bit) |
Unsigned binary integer |
P |
Packed decimal numeric | 1 to 30 digits, 2 digits per byte plus sign |
Signed fixed-point decimal number with integer and fraction digits |
S |
Zoned decimal numeric | 1 to 30 digits, 1 digit per byte |
Signed fixed-point decimal number with integer and fraction digits |
T |
Time | 6, 12, or 14 bytes | Time: hour, minute, second, microseconds |
Z |
Timestamp | 26 bytes | Date and time: year, month, day, hour, minute, second, microseconds |
Read more about this topic: IBM RPG
Famous quotes containing the words data and/or types:
“Mental health data from the 1950s on middle-aged women showed them to be a particularly distressed group, vulnerable to depression and feelings of uselessness. This isnt surprising. If society tells you that your main role is to be attractive to men and you are getting crows feet, and to be a mother to children and yours are leaving home, no wonder you are distressed.”
—Grace Baruch (20th century)
“Science is intimately integrated with the whole social structure and cultural tradition. They mutually support one otheronly in certain types of society can science flourish, and conversely without a continuous and healthy development and application of science such a society cannot function properly.”
—Talcott Parsons (19021979)