Sign in

docs RPG Reference

Coding a Prerun-Time Array

Coding a Prerun-Time Array

In addition to the essential array specifications, you can also code the following specifications or keywords for prerun-time arrays.

On the definition specifications, you can specify

  • The name of the file with the array input data, using the FROMFILE keyword.
  • The name of a file to which the array is written at the end of the program, using the TOFILE keyword.
  • The number of elements per input record, using the PERRCD keyword.
  • The external format of numeric array data using the EXTFMT keyword.
  • An alternating format using the ALT keyword.

Note: The integer or unsigned format cannot be specified for arrays defined with more than ten digits.

On the file-description specifications, you can specify a T in position 18 for the file with the array input data.