OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-208
Example 2 in TAL—Moving a File Between Two
Remote Systems (in Wait Mode)
1831 CALL WRITE ( termnum, outbuf, text_len );
1832
1833 tempbuf ':=' " ERROR SUBCODE # " -> @text_ptr;
1834 IF ( original_error_info.zerror.zerror^subcode < 0) THEN
1835 BEGIN
1836 original_error_info.zerror.zerror^subcode
1837 := -original_error_info.zerror.zerror^subcode;
1838 text_ptr ':=' "-" -> @text_ptr;
1839 END;
1840 @text_ptr := @text_ptr
1841 + DNUMOUT ( text_ptr
1842 , $DBL ( original_error_info.zerror.zerror^subcode )
1843 , BASE );
1844 text_len := @text_ptr - @tempbuf;
1845 CALL WRITE ( termnum, outbuf, text_len );
1846
1847 !------------------------------------------------------------------!
1848 ! Perform error handling, depending on the status value returned. !
1849 ! Additional application-specific error handling or recovery could !
1850 ! be implemented depending on application requirements. !
1851 !------------------------------------------------------------------!
1852
1853 CASE status OF
1854 BEGIN
1855
1856 ZAPS^VAL^STATUS^NO^RETRY,
1857 ZAPS^VAL^STATUS^RETRY^LATER ->
1858 BEGIN
1859
1860 !--------------------------------------------------------------!
1861 ! The status indicates an error was detected. This !
1862 ! application aborts both associations and exits the program. !
1863 !--------------------------------------------------------------!
1864
1865 CALL abort_discard;
1866
1867 CALL STOP;
1868
1869 END;