File Utility Program (FUP) Management Programming Manual

FUP Programmatic Interface
File Utility Program (FUP) Management Programming Manual523322-001
2-6
Starting and Opening FUP (TAL Example)
!Create the FUP process and check for an error
!
error := PROCESS_LAUNCH_ ( PARAM_LIST, ERROR_DETAIL, OUTPUT_LIST:$LEN (
OUTPUT_LIST ), OUTPUT_LIST_LEN );
IF error THEN RETURN error;
!Open the process and check for an error
!
error := FILE_OPEN_ ( process^name:$LEN( process^name ),file^num );
IF error THEN RETURN error;
! Send the startup message to the process and check for an error
!
CALL WRITEX ( file^num, start^msg, $OFFSET(start^msg.txt) );
IF <> THEN RETURN io^error (file^num); ! io^error is a dummy
! error-handling proc
! Close the process and check for an error
!
error := FILE_CLOSE_ ( file^num );
IF error THEN RETURN error;
! Reopen the process for programming use
!
error := FILE_OPEN_ ( process^name:$LEN( process^name ), file^num );
IF error THEN RETURN error;
RETURN 0; ! Return with no errors
END; ! End of procedure
Figure 2-2. TAL Procedure to Start and Open a FUP Process (page 2 of 2)