OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-206
Example 2 in TAL—Moving a File Between Two
Remote Systems (in Wait Mode)
1753 , ! diagnostic_buffer !
1754 , original_error_info );
1755
1756 CALL check_error;
1757
1758 !------------------------------------------------------------------!
1759 ! Display the status code. !
1760 !------------------------------------------------------------------!
1761
1762 tempbuf ':=' "STATUS # " -> @text_ptr;
1763 IF (status < 0) THEN
1764 BEGIN
1765 status := -status;
1766 text_ptr ':=' "-" -> @text_ptr;
1767 END;
1768
1769 @text_ptr := @text_ptr + DNUMOUT ( text_ptr
1770 , $DBL ( status )
1771 , BASE );
1772 text_len := @text_ptr - @tempbuf;
1773 CALL WRITE ( termnum, outbuf, text_len );
1774
1775 !------------------------------------------------------------------!
1776 ! Display the error code and subcode. !
1777 !------------------------------------------------------------------!
1778
1779 tempbuf ':=' "ERROR # " -> @text_ptr;
1780 IF (error_code < 0) THEN
1781 BEGIN
1782 error_code := -error_code;
1783 text_ptr ':=' "-" -> @text_ptr;
1784 END;
1785 @text_ptr := @text_ptr + DNUMOUT ( text_ptr
1786 , $DBL ( error_code )
1787 , BASE );
1788 text_len := @text_ptr - @tempbuf;
1789 CALL WRITE ( termnum, outbuf, text_len );
1790
1791 tempbuf ':=' "ERROR SUBCODE # " -> @text_ptr;