OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-95
Example 1 in TAL—Updating a Remote File (in
Nowait Mode)
1519 !--------------------------------------------------------------------!
1520 ! !
1521 ! Name: check_status !
1522 ! !
1523 ! Description: The following procedure checks status returned from !
1524 ! a previous FTAM procedure call. It checks for !
1525 ! NORETRY, RETRYLATER, or DISCARD. If status is OK, !
1526 ! it returns to the main program; otherwise, it !
1527 ! displays a message and aborts or discards the !
1528 ! association. !
1529 ! !
1530 ! Input: None !
1531 ! !
1532 ! Output: Error message to the terminal !
1533 ! !
1534 !--------------------------------------------------------------------!
1535
1536 PROC check_status;
1537
1538 BEGIN
1539
1540 !----------------------------------------------------------------!
1541 ! Check for a valid status. !
1542 !----------------------------------------------------------------!
1543
1544 IF ( status = ZAPS^VAL^STATUS^OK ) THEN
1545 BEGIN
1546 RETURN;
1547 END;
1548
1549 !----------------------------------------------------------------!
1550 ! Get the error-code and error-subcode values if the status is !
1551 ! not OK. !
1552 !----------------------------------------------------------------!
1553
1554 error := APS_STATUS_ ( cepi
1555 , ! event_code !
1556 , ! device_name !
1557 , error_code