Sign in

docs RPG Reference

Program Described

Program Described

For program described files, entries on input specifications are divided into the following categories:

  • Record identification entries (positions 7 through 46), which describe the input record and its relationship to other records in the file.

    Figure 1. Program Described Record Layout

    *.. 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ...+... 8 ...+... 9 ...+... 10
    IFilename++SqNORiPos1+NCCPos2+NCCPos3+NCC..................................Comments++++++++++++
    I.........And..RiPos1+NCCPos2+NCCPos3+NCC..................................Comments++++++++++++
  • Field description entries (positions 31 through 74), which describe the fields in the records. Each field is described on a separate line, below its corresponding record identification entry.

    Figure 2. Program Described Field Layout

    *.. 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ...+... 8 ...+... 9 ...+... 10
    I........................Fmt+SPFrom+To+++DcField+++++++++L1M1FrPlMnZr......Comments++++++++++++