Appendix A. RPG IV Restrictions

Function Restriction
Array/table input record length for compile time Maximum length is 100
Character field length The 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 length The 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) length Maximum length is 256
Named data structure length Maximum of 16773104
Unnamed data structure length Maximum of 16773104
Data structure occurrences (number of) Maximum of 16773104 per data structure; the maximum total size is 16773104.
Edit Word Maximum 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 groups Maximum of 100
Levels of nesting in expressions Maximum of 100
Look-ahead Can be specified only once for a file. Can be specified only for primary and secondary files.
Named Constant or Literal Maximum 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 indicator Only 1 unique overflow indicator can be specified per printer file.
Parameters to programs Maximum of 255
Parameters to procedures Maximum of 399
Primary file (P in position 18 of file description specifications) Maximum of 1 per program
Printer file (PRINTER in positions 36 through 42 of file description specifications) Maximum of 8 per program.
Printing lines per page Minimum of 2; maximum of 255
Program status data structure Only 1 allowed per program.
Record address file (R in position 18 of file description specifications) Only 1 allowed per program.
Record length for a file Maximum length is 99999 1
Structured groups (see levels of nesting)
Storage allocation Maximum length is 16776704 2
Symbolic names Maximum length is 4096
Notes:
  1. Any device record size restraints override this value.
  2. The practical maximum is normally much less.


[ Top of Page | Previous Page | Next Page | Contents | Index ]