OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-217
Example 2 in TAL—Moving a File Between Two
Remote Systems (in Wait Mode)
2182 FOR i := 0 TO diag.zdiagcount - 1 DO
2183 BEGIN
2184 tempbuf ':=' " Diagnostic Type: " -> @text_ptr;
2185 text_len := @text_ptr - @tempbuf;
2186 width := DNUMOUT ( tempbuf[text_len]
2187 , $DBL ( diag.zdiagelems[i].zdiagtype )
2188 , BASE );
2189 text_len := text_len + width;
2190 CALL WRITE ( termnum, outbuf, text_len );
2191
2192 tempbuf ':=' " Error ID: " -> @text_ptr;
2193 text_len := @text_ptr - @tempbuf;
2194 width := DNUMOUT ( tempbuf[text_len]
2195 , $DBL ( diag.zdiagelems[i].zerrorid )
2196 , BASE );
2197 text_len := text_len + width;
2198 CALL WRITE ( termnum, outbuf, text_len );
2199
2200 IF ( diag.zdiagelems[i].zfurtherdetailsispresent = ZAPS^VAL^PRESENT )
2201 THEN
2202 BEGIN
2203 tempbuf ':=' " Details: " -> @text_ptr;
2204 text_len := @text_ptr - @tempbuf;
2205 tempbuf[text_len] ':=' diag.zdiagelems[i].zfurtherdetails.zb
2206 FOR diag.zdiagelems[i].zfurtherdetails.zlen BYTES;
2207 text_len := text_len + diag.zdiagelems[i].zfurtherdetails.zlen;
2208 CALL WRITE ( termnum, outbuf, text_len );
2209 END;
2210
2211 END;
2212
2213 !---------------------------------------------------------------!
2214 ! Abort both associations and exit the program. !
2215 !---------------------------------------------------------------!
2216
2217 CALL abort_discard;
2218 tempbuf ':=' "Associations discarded" -> @text_ptr;
2219 text_len := @text_ptr - @tempbuf;
2220 CALL WRITE ( termnum, outbuf, text_len );