Restrictions on input and output procedures
Several restrictions apply to each input or output procedure
called by SORT
and to each output procedure called
by MERGE
.
Observe these restrictions:
- The procedure must not contain any
SORT
orMERGE
statements. - You can use
ALTER
,GO TO
, andPERFORM
statements in the procedure to refer to procedure-names outside the input or output procedure. However, control must return to the input or output procedure after aGO TO
orPERFORM
statement. - The remainder of the
PROCEDURE DIVISION
must not contain any transfers of control to points inside the input or output procedure (with the exception of the return of control from a declarative section). - In an input or output procedure, you can call a
program that follows standard linkage conventions. However, the called
program cannot issue a
SORT
orMERGE
statement. - During a
SORT
orMERGE
operation, theSD
data item is used. You must not use it in the output procedure before the firstRETURN
executes. If you move data into this record area before the firstRETURN
statement, the first record to be returned will be overwritten. - Language Environment® condition handling does not let user-written condition handlers be established in an input or output procedure.
related tasks
Coding the input procedure
Coding the output procedure
Language Environment Programming Guide (Preparing to link-edit and run)
Coding the input procedure
Coding the output procedure
Language Environment Programming Guide (Preparing to link-edit and run)