OSI/FTAM Programming Reference Manual
NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual—528611-001
G-216
Example 2 in TAL—Moving a File Between Two
Remote Systems (in Wait Mode)
2143 ! the diagnostic message type and error ID for each !
2144 ! diagnostic message element, calls abort_discard, and !
2145 ! ends the program. Additional application-specific !
2146 ! error handling or recovery could be implemented if !
2147 ! required by an application. !
2148 ! !
2149 ! Input: None !
2150 ! !
2151 ! Output: Error message to terminal !
2152 ! !
2153 !---------------------------------------------------------------------!
2154
2155 PROC check_action_diag;
2156
2157 BEGIN
2158
2159 INT i; ! index into diagnostic array !
2160
2161 !------------------------------------------------------------------!
2162 ! Check action_result for failure and display diagnostic !
2163 ! messages if action_result is a failure. !
2164 !------------------------------------------------------------------!
2165
2166 IF ( action_result = ZFTM^VAL^ACTION^FAILURE ) THEN
2167 BEGIN
2168 tempbuf ':=' "Following is a list of " -> @text_ptr;
2169 text_len := @text_ptr - @tempbuf;
2170 width := DNUMOUT ( tempbuf[text_len]
2171 , $DBL ( diag.zdiagcount )
2172 , BASE );
2173 tempbuf[text_len + width] ':=' " diagnostic elements -" -> @text_ptr;
2174 text_len := @text_ptr - @tempbuf;
2175 CALL WRITE ( termnum, outbuf, text_len );
2176
2177 !---------------------------------------------------------------!
2178 ! Display the diagnostic message type and error ID for each !
2179 ! diagnostic message. !
2180 !---------------------------------------------------------------!
2181