Sign in

docs RPG Reference

Appendix A. RPG IV Restrictions

Appendix A. RPG IV Restrictions

FunctionRestriction
Array/table input record length for compile timeMaximum length is 100
Character field lengthThe maximum length for a fixed-length character field is 16773104. The maximum length for a variable-length character field is 16773100.
Graphic or UCS-2 field lengthThe maximum length for a fixed-length graphic or UCS-2 field is 8386552. The maximum length for a variable-length graphic or UCS-2 field is 8386550.
Control fields (position 63 and 64 of input specifications) lengthMaximum length is 256
Named data structure lengthMaximum of 16773104
Unnamed data structure lengthMaximum of 16773104
Data structure occurrences (number of)Maximum of 16773104 per data structure; the maximum total size is 16773104.
Levels of nesting for nested data structure subfieldsMaximum of 198 for a global data structure and 197 for a data structure defined in a subprocedure.
Edit WordMaximum length of 115
Elements in an array/table (DIM keyword on the definition specifications)Maximum of 16773104 per array; the maximum total size is 16773104.
Levels of nesting in structured groupsMaximum of 100
Levels of nesting in expressionsMaximum of 100
Look-aheadCan be specified only once for a file. Can be specified only for primary and secondary files.
Named Constant or LiteralMaximum length of 16380 characters for a character or hexadecimal literal, 16379 DBCS characters for a graphic literal, 8190 UCS-2 characters for a UCS-2 literal, and 63 digits with 63 decimal positions for a numeric literal.
Overflow indicatorOnly 1 unique overflow indicator can be specified per printer file.
Parameters to programsMaximum of 255
Parameters to proceduresMaximum of 399
Primary file (P in position 18 of file description specifications)Maximum of 1 per program
Global printer file (defined in the main source section)Maximum of 8 per program.
Printing lines per pageMinimum of 2; maximum of 255
Program status data structureOnly 1 allowed per program.
Record address file (R in position 18 of file description specifications)Only 1 allowed per program.
Record length for a fileMaximum length is 99999 1
Structured groups (see levels of nesting)
Storage allocationMaximum length is 16776704 2
Symbolic namesMaximum length is 4096
Note: 1. Any device record size restraints override this value. 2. The practical maximum is normally much less.