File Utility Program (FUP) Management Programming Manual

ORSERV Commands and Responses
File Utility Program (FUP) Management Programming Manual523322-001
5-10
Example
rate, ! Percentage of execution time for reload
min^dslack, ! Data slack minimum
max^dslack, ! Data slack maximum
min^islack, ! Index slack minimum
max^islack, ! Index slack maximum
deallocate; ! Deallocates extents beyond EOF
! ---------------------------------------------------------
BEGIN
! Global variables used are:
! STRUCT .buffer (ZORS^DDL^MSG^BUFFER^DEF);
! STRUCT .ORSERV^ssid (ZSPI^DDL^SSID^DEF);
! INT ORSERV^file^number,
! error, spi^error;
! LITERAL parameter^error = 99;
! ---------------------------------------------------------
! Local definitions.
! ---------------------------------------------------------
INT .onlinereload^par^def
[ 0 : (ZORS^MAP^PAR^ONLINERELOAD^WLN-1) ]
:= ZORS^MAP^PAR^ONLINERELOAD;
STRUCT .params (ZORS^DDL^PAR^ONLINERELOAD^DEF);
! ---------------------------------------------------------
! Check for the required parameters.
! ---------------------------------------------------------
IF NOT $PARAM (target^file^name) THEN
RETURN parameter^error;
! ---------------------------------------------------------
! Format the command buffer for the ONLINERELOAD command.
! ---------------------------------------------------------
ORSERV^ssid ':=' [ ZSPI^VAL^TANDEM,
ZSPI^SSN^ZORS,
ZSPI^VAL^VERSION ];
CALL SSINIT (buffer,
ZORS^VAL^BUFLEN,
ORSERV^ssid,
ZSPI^VAL^CMDHDR,
ZORS^CMD^ONLINERELOAD,
ZORS^OBJ^FILE);
! ---------------------------------------------------------
! Put the required file-name parameter into the buffer.
! ---------------------------------------------------------
CALL SSPUTTKN (buffer,
ZORS^TKN^FILE,
target^file^name);
! ---------------------------------------------------------
! Put the optional parameters into the buffer. First, call
! SSNULL to set the parameter structure to null values.
! ---------------------------------------------------------
IF $PARAM (new) OR $PARAM (rate) OR
$PARAM (min^dslack) OR $PARAM (max^dslack) OR
$PARAM (min^islack) OR $PARAM (max^islack) OR
$PARAM (deallocate) THEN
Figure 5-1. Example of the ONLINERELOAD Command (page 2 of 3)