OSI/FTAM Programming Guide
NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Guide—528612-001
5-38
Reading a File: C Programming Example
1359 APS_DISCARD_ ( cepi );
1360 printf ( "Association discarded\n" );
1361 exit (EXIT_SUCCESS);
1362
1363 } /* check_diag */
1364
1365
1366 #pragma PAGE "CHECK_STATUS"
1367 /********************************************************************/
1368 /* */
1369 /* Name: check_status */
1370 /* */
1371 /* Description: The check_status procedure checks the status */
1372 /* returned by an FTAM or APS procedure call. It */
1373 /* checks for NORETRY, RETRYLATER, and DISCARD. */
1374 /* */
1375 /* The routine displays a message, discards the */
1376 /* association, and exits the program. */
1377 /* */
1378 /********************************************************************/
1379
1380 void check_status ()
1381
1382 {
1383
1384 /******************************************************************/
1385 /* Get the error code and error subcode values. */
1386 /******************************************************************/
1387
1388 error = APS_STATUS_ ( cepi
1389 , /* event_code */
1390 , /* device_name */
1391 , (int *) &error_code
1392 , (int *) &error_subcode
1393 , /* service_id */
1394 , /* diagnostic_buffer */
1395 , (int *) &original_error_info );
1396
1397










