OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-49
Example 1 in C—Updating a Remote File (in Nowait
Mode)
1442 error = APS_STATUS_ ( cepi
1443 , /* event_code */
1444 , /* device_name */
1445 , &error_code
1446 , &error_subcode
1447 , /* service_id */
1448 , /* diagnostic_buffer */
1449 , (int *) &original_error_info );
1450
1451 check_error ();
1452
1453 /*******************************************************************/
1454 /* Display the status code, error code, and error subcode. */
1455 /*******************************************************************/
1456
1457 printf ("STATUS : %d ERROR CODE : %d ERROR SUBCODE : %d\n",
1458 status, error_code, error_subcode);
1459
1460 /*******************************************************************/
1461 /* Display the original error code and error subcode. */
1462 /*******************************************************************/
1463
1464 printf ("ORIGINAL ERROR INFO -\n");
1465 printf (" SERVICE ID : %d\n", original_error_info.zerror.zservice_id );
1466 printf (" ERROR CODE : %d\n", original_error_info.zerror.zerror_code );
1467 printf (" ERROR SUBCODE : %d\n",
1468 original_error_info.zerror.zerror_subcode );
1469
1470 if ( cepi == NOCEPI )
1471 return;
1472
1473 /*******************************************************************/
1474 /* Perform error handling, depending on the status value returned. */
1475 /* Additional application-specific error handling or recovery could*/
1476 /* be implemented, depending on application requirements. */
1477 /*******************************************************************/
1478
1479 switch (status)
1480 {