OSI/FTAM Programming Guide
NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Guide—528612-001
5-81
Writing a File: TAL Programming Example
1519 BEGIN
1520
1521 ZAPS^VAL^STATUS^NO^RETRY,
1522 ZAPS^VAL^STATUS^RETRY^LATER,
1523 ZAPS^VAL^STATUS^DISCARD ->
1524 BEGIN
1525
1526 !--------------------------------------------------------------!
1527 ! The status indicates an error was detected. This application !
1528 ! discards the association and exits the program. !
1529 !--------------------------------------------------------------!
1530
1531 tempbuf ':=' "STATUS # " -> @text_ptr;
1532 IF (status < 0) THEN
1533 BEGIN
1534 status := -status;
1535 text_ptr ':=' "-" -> @text_ptr;
1536 END;
1537
1538 @text_ptr := @text_ptr + DNUMOUT ( text_ptr
1539 , $DBL ( status )
1540 , BASE );
1541 text_len := @text_ptr - @tempbuf;
1542 CALL WRITE ( termnum, outbuf, text_len );
1543
1544
1545 END;
1546
1547 OTHERWISE -> ! unknown status value !
1548
1549 tempbuf ':=' "STATUS - Unknown status" -> @text_ptr;
1550 text_len := @text_ptr - @tempbuf;
1551 CALL WRITE ( termnum, outbuf, text_len );
1552
1553 END;
1554
1555 !-----------------------------------------------------------------!
1556 ! Display the error code and subcode. !
1557 !-----------------------------------------------------------------!