OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-102
Example 1 in TAL—Updating a Remote File (in
Nowait Mode)
1792 ! diagnostic message and error ID for each diagnostic !
1793 ! message element, discards the association, and the !
1794 ! program exits normally. Additional application- !
1795 ! specific error handling or recovery could be !
1796 ! implemented if required by an application. !
1797 ! !
1798 ! Input: None !
1799 ! !
1800 ! Output: Error messages to the terminal !
1801 ! !
1802 !---------------------------------------------------------------------!
1803
1804 PROC check_action_diag;
1805
1806 BEGIN
1807
1808 INT i; ! index into diagnostic array !
1809
1810 !----------------------------------------------------------------!
1811 ! Check the action result for failure and display diagnostic !
1812 ! messages. !
1813 !----------------------------------------------------------------!
1814
1815 IF ( action_result = ZFTM^VAL^ACTION^FAILURE ) THEN
1816 BEGIN
1817 !--------------------------------------------------------------!
1818 ! Display the number of diagnostic messages received. !
1819 !--------------------------------------------------------------!
1820
1821 tempbuf ':=' "Following is a list of " -> @text_ptr;
1822 text_len := @text_ptr - @tempbuf;
1823 width := DNUMOUT ( tempbuf[text_len]
1824 , $DBL ( diag.zdiagcount )
1825 , BASE );
1826 tempbuf[text_len + width] ':=' " diagnostic elements -" -> @text_ptr;
1827 text_len := @text_ptr - @tempbuf;
1828 CALL WRITE ( termnum, outbuf, text_len );
1829
1830 !--------------------------------------------------------------!