OSI/FTAM Programming Guide

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Guide528612-001
5-80
Writing a File: TAL Programming Example
1480 ! !
1481 ! Name: check_status !
1482 ! !
1483 ! Description: The check_status procedure checks the status returned !
1484 ! from an FTAM or APS procedure call. It checks for !
1485 ! NORETRY, RETRYLATER, and DISCARD. It displays !
1486 ! a message,discards the association, and exits the !
1487 ! program !
1488 !--------------------------------------------------------------------!
1489
1490 PROC check_status;
1491
1492 BEGIN
1493
1494 INT event_code;
1495
1496 !-----------------------------------------------------------------!
1497 ! Get the error code and error subcode values. !
1498 !-----------------------------------------------------------------!
1499
1500 error := APS_STATUS_ ( cepi
1501 , event_code
1502 , ! device_name !
1503 , error_code
1504 , error_subcode
1505 , ! service_id !
1506 , ! diagnostic_buffer !
1507 , original_error_info );
1508
1509 IF ( error <> ZAPS^ERR^OK ) THEN
1510 CALL check_error;
1511
1512 !-----------------------------------------------------------------!
1513 ! Perform error handling, depending on the status value returned. !
1514 ! Additional application-specific error handling or recovery could!
1515 ! be implemented depending on application requirements. !
1516 !-----------------------------------------------------------------!
1517
1518 CASE status OF