OSI/FTAM Programming Guide
NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Guide—528612-001
5-77
Writing a File: TAL Programming Example
1363 ?PAGE "CHECK_STATE"
1364 !--------------------------------------------------------------------!
1365 ! !
1366 ! Name: check_state !
1367 ! !
1368 ! Description: The following procedure is called when an FTM !
1369 ! confirm procedure returns a bad state_result. The !
1370 ! procedure displays an error message and calls !
1371 ! check_diag for diagnostic messages. !
1372 ! !
1373 !--------------------------------------------------------------------!
1374
1375 PROC check_state;
1376
1377 BEGIN
1378
1379 !-----------------------------------------------------------------!
1380 ! Display the invalid state-result error message. !
1381 !-----------------------------------------------------------------!
1382
1383 tempbuf ':=' "BAD STATE # " -> @text_ptr;
1384 @text_ptr := @text_ptr + DNUMOUT ( text_ptr
1385 , $DBL ( state_result )
1386 , BASE );
1387 text_len := @text_ptr - @tempbuf;
1388 CALL WRITE ( termnum, outbuf, text_len );
1389 CALL check_diag;
1390
1391 END; --- check_state ---
1392
1393
1394 ?PAGE "CHECK_DIAG"
1395 !--------------------------------------------------------------------!
1396 ! !
1397 ! Name: check_diag !
1398 ! !
1399 ! Description: The check_diag procedure displays !
1400 ! the diagnostic message type and error ID for each !
1401 ! diagnostic message element, discards the association, !