When coding the PROCEDURE DIVISION, the following requirements
must be met:
- To return control to DFSORT, you must use the GOBACK statement.
- In the USING option of the PROCEDURE DIVISION header, you must
specify each 01-level name in the LINKAGE
SECTION. You must specify each name in order up to the last one you
plan to use even when you do not use all the 01-level names preceding
the header.
Examples:
For the FLR example,
Figure 1,
you would code:
PROCEDURE DIVISION USING RECORD-FLAGS, LEAVING-REC,
RETURN-REC, OUTPUT-REC, UNUSED1, UNUSED2,
UNUSED3, UNUSED4, EXITAREA-LEN, EXITAREA.
For
the VLR example,
Figure 2, you would code:
PROCEDURE DIVISION USING RECORD-FLAGS, LEAVING-REC,
RETURN-REC, OUTPUT-REC, UNUSED1,
LEAVING-REC-LEN, RETURN-REC-LEN,
OUTPUT-REC-LEN, EXITAREA-LEN, EXITAREA.