Version 4.2.6
 —  Utilities  —

Invoking and Terminating SYSMAIN

This section describes how to invoke and terminate the SYSMAIN utility online, in batch or by using an Application Programming Interface.

This section covers the following topics:


Invoking SYSMAIN Online or Batch

The following instructions describe the methods of invoking the SYSMAIN utility by using a direct command (online or batch) or menu functions.

Start of instruction set To invoke SYSMAIN online

Start of instruction setTo invoke SYSMAIN in batch

Top of page

Invoking SYSMAIN with Appl. Programming Interface

MAINUSER is an Application Programming Interface (API) that can be used to perform SYSMAIN functions directly from any user-written object (for example, from a subroutine, program or subprogram) without going through the normal steps of invoking SYSMAIN.

Upon completion of processing of the SYSMAIN functions, the utility is terminated and control is returned to the program, subprogram or subroutine from which the request was issued.

MAINUSER is supplied as a cataloged object of the type subprogram in the system library SYSMAIN. MAINUSER can be used in either online or batch mode.

Note:
MAINUSER must not be located in a user library. You must therefore copy it to the library SYSTEM on the system file FNAT or FUSER or to any SYS-prefixed library which is the steplib for the application.

Invoking MAINUSER

MAINUSER is invoked with the CALLNAT statement and its relevant parameters (see also CALLNAT in the Natural Statements documentation). MAINUSER must not be invoked from within the library SYSMAIN.

Start of instruction set To invoke MAINUSER

Top of page

Terminating SYSMAIN

Start of instruction set To terminate SYSMAIN

Important:
Do not terminate the SYSMAIN utility with the terminal command %%, because the environment may not be reset correctly.

Top of page