MARENADM can be run in either interactive or batch mode.
MARENADM expects to receive all statements from the system file SYSDTA. SYSDTA is assigned to the terminal during interactive operation, and to the ENTER file during batch operation.
If MARENADM is to be invoked in a procedure, the system file SYSDTA must be assigned with //ASSIGN-SYSDTA TO=*SYSCMD
.
Error handling in procedures and batch jobs
Information on the progress of a MARENADM request is stored in task switches in procedures and batch jobs. MAREN sets the task switches during execution or when execution has been concluded.
Task switch 30 is set if MARENADM has executed a statement with a warning. Warnings are issued, for example, if an attempt is made to delete an catalog entry which does not exist in the MAREN catalog.
Task switch 31 is set if MARENADM aborts or fails to execute a statement because of an error. This happens, for example, when an attempt is made to output an catalog entry which does not exist in the MAREN catalog, or when no suitable free tape is available for reservation.
The BS2000 command SET-JOB-STEP resets task switches 16-31.
If MARENADM rejects a statement because of a syntax error, or if the statement is aborted or not executed due to a processing error, the spin off is triggered.