OSI/FTAM Programming Guide
NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Guide—528612-001
5-39
Reading a File: C Programming Example
1398 if ( error != ZAPS_ERR_OK )
1399 check_error ();
1400
1401 /******************************************************************/
1402 /* Perform error handling, depending on the status value */
1403 /* returned. Additional application-specific error handling or */
1404 /* recovery could be implemented depending on application */
1405 /* requirements. */
1406 /******************************************************************/
1407 switch ( status )
1408 {
1409
1410 case ZAPS_VAL_STATUS_NO_RETRY:
1411 case ZAPS_VAL_STATUS_RETRY_LATER:
1412 case ZAPS_VAL_STATUS_DISCARD:
1413 {
1414
1415 /***************************************************************/
1416 /* The status indicates an error was detected. This */
1417 /* application discards the association and exits the program. */
1418 /***************************************************************/
1419
1420 printf ( "STATUS : %d\n", status );
1421 break;
1422
1423 }
1424
1425 default: /* unknown status value */
1426
1427 printf ( "STATUS - Unknown status\n" );
1428 break;
1429
1430 }
1431
1432 /******************************************************************/
1433 /* Display the error code and subcode also. */
1434 /******************************************************************/
1435
1436 printf ( "ERROR : %d\n", error_code );