File Utility Program (FUP) Management Programming Manual

ORSERV Programmatic Interface
File Utility Program (FUP) Management Programming Manual523322-001
4-5
Starting and Opening ORSERV (TAL Example)
of the reload operation, use the STATUS command. The ORSERV process
stops after it completes the RELOAD.
STATUS and SUSPEND commands
The response buffer is returned, and stops after ORSERV executes a STATUS
or SUSPEND command.
Starting and Opening ORSERV (TAL Example)
Figure 4-2 shows an example of a TAL integer procedure that is used to start and open
an ORSERV process for programmatic use.
Note. ORSERV and the target file must be on the same system, or you receive an
error message (ZORS-ERR-WRONG-SERVER).
Figure 4-2. TAL Procedure to Start and Open ORSERV (page 1 of 2)
! ---------------------------------------------------------
! Procedure START^AND^OPEN^ORSERV starts a new ORSERV
! process and opens it for programmatic use. If an error
! occurs, the procedure calls an error-handling routine.
! ---------------------------------------------------------
PROC start^and^open^orserv;
BEGIN
INT .ORSERV^program^file^name [0:11] :=
["$SYSTEM SYSTEM ORSERV "];
! ---------------------------------------------------------
! Set the startup message ID to -1; ORSERV ignores the
! remaining fields in the startup message.
! ---------------------------------------------------------
startup^message.message^id := -1;
! ---------------------------------------------------------
! Call PROCESS_LAUNCH_ to create the ORSERV process. First,
! call CREATEPROCESSNAME to get the ORSERV process name.
! The ORSERV^process^name qualifier must be #ZSPI.
! ---------------------------------------------------------
ORSERV^process^name ':=' " ";
CALL CREATEPROCESSNAME (ORSERV^process^name);
CALL PROCESS_LAUNCH_ (ORSERV^program^file^name,
! priority !,
! memory^pages !,
! processor !,
! process^id !,
error,
ORSERV^process^name);
! Check for error; call error routine if error occurs.
IF error THEN CALL newprocess^error^handler (error);