Mark end of non-S procedure file
Component: | SYSFILE |
Functional area: | Procedures |
Domain: | PROCEDURE |
Privileges: | STD-PROCESSING |
Function
The END-PROCEDURE command must appear as the last record in a non-S procedure file. It terminates execution of the procedure and causes processing to return to the point of interruption in the calling procedure - if there was one; otherwise it causes a return to primary command input (the terminal in interactive mode, ENTER file in batch mode). The system files, including TASKLIB, are given the allocations in force at the time of interruption. A file that was assigned by means of ASSIGN-SYSLST in the procedure is closed with END-PROCEDURE.
The END-PROCEDURE command may be used in procedure files only and therefore does not appear in the menu.
Format
END-PROCEDURE |
Return codes
(SC2) | SC1 | Maincode | Meaning |
---|---|---|---|
0 | CMD0001 | Command executed | |
2 | 0 | SSM2039 | Error on closing output system file; the SYSOUT message contains the DMS error code as an insert |
64 | SSM1013 | No procedure has been called |
Notes
Commands in procedure files:
If an error in the command sequence activates the spin-off mechanism, processing branches to the next of the following commands:
END-PROCEDURE, LOGOFF, EXIT-JOB, SET-JOB-STEP, CANCEL-PROCEDURE or EXIT-PROCEDURE.The effect of an END-PROCEDURE command in ESCAPE mode is described under the HOLD-PROCEDURE command (figure "Nesting of ESCAPE levels" in section "HOLD-PROCEDURE").
If a procedure is called in ESCAPE mode, the following message is issued when control is returned:
TASK IS IN ESCAPE-MODE AT LEVEL NUMBER i
where i = number of the procedure level to which processing has returned. When primary command input is reached (level 0), this message is not issued.
Examples
See the BEGIN-PROCEDURE, CANCEL-PROCEDURE, HOLD-PROCEDURE and RESUME-PROCEDURE commands.