File Utility Program (FUP) Management Programming Manual

FUP Commands and Responses
File Utility Program (FUP) Management Programming Manual523322-001
3-37
LOADALTFILE Command
Example
Figure 3-3, TAL Example of a LOADALTFILE Procedure shows a TAL example of a
high-level integer procedure for the LOADALTFILE command.
Figure 3-3. TAL Example of a LOADALTFILE Procedure (page 1 of 2)
!----------------------------------------------------------
! LOADALTFILE is an example of a high-level procedure
! for the FUP LOADALTFILE command. This procedure assumes
! that the FUP process has already been started.
!
! This procedure returns 0 if successful, or an error
! number otherwise.
!----------------------------------------------------------
INT PROC LOADALTFILE (altno, prifile, maxrecs, scratch,
dslack, islack) VARIABLE;
! Parameter Declarations
INT altno; ! Alternate file number to load
INT .prifile; ! Primary file to read
FIXED maxrecs; ! Estimate of maximum number
of records
INT .scratch; ! Scratch file name
INT dslack; ! Data slack percentage
INT islack; ! Index slack percentage
BEGIN
! Global variables used
! STRUCT .EXT buffer (ZFUP^DDL^MSG^BUFFER^DEF);
! INT fup^file^number;
! Local Definitions
INT error,
spi^error;
INT .loadaltfile^par^def
[0: (ZFUP^MAP^PAR^LOADALTFILE^WLN-1)]
:= ZFUP^MAP^PAR^LOADALTFILE;