"EXAMPLE_EXIT_POINT ", "EXMPð1ðð", exit_pgm_num, &sel_criteria, &error_code);

/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/

/\ If an exception occurs, the

API

returns

the exception in t￿he

\/

/\ error code

parameter. The bytes available

field is set

to

\/

/\

zero if no

exception occurs

and

nonzero

if

an exception

d￿oes

\/

/\

occur.

 

 

 

 

 

 

\/

/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/ if (error_code.ec_fields.Bytes_Available != ð)

{

printf("ATTEMPT TO RETRIEVE INFORMATION FAILED WITH EXCE￿PTION: %.7s", error_code.ec_fields.Exception_Id);

exit(1);

}

/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/ /\ If the call to retrieve exit point information is succes￿sful, \/

/\ check to see if there are any exit programs to call.\/ /\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/ rcv_ptr=rcv_variable;

rcv_ptr += ((Qus_EXTIð1ðð_t \)rcv_ptr)->Offset_Exit_Point_Entry;

if (((Qus_EXTIð1ðð_Entry_t \)rcv_ptr)->Number_Exit_Programs != ð)

{

/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/

/\

Blank out

the continuation

handle to let the API know tha￿t

\/

/\

this is a

first attempt at

the retrieve operation.

\/

/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/ memset(continuation_hdl,' ',16);

/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/

/\ Call the API to retrieve the exit program information. \/ /\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/ QusRetrieveExitInformation(continuation_hdl,

&rcv_variable, len_rcv_variable, "EXTIð2ðð", "EXAMPLE_EXIT_POINT ", "EXMPð1ðð", exit_pgm_num, &sel_criteria, &error_code);

/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/

/\ Verify that the call to the API is successful.\/ /\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/ if (error_code.ec_fields.Bytes_Available != ð)

{

printf("ATTEMPT TO RETRIEVE EXIT PROGRAMS FAILED WITH EXC￿EPTION:\ %.7s", error_code.ec_fields.Exception_Id);

exit(1);

}

Chapter 4. Common Information across APIs—Advanced (ILE)4-17Example

Page 107
Image 107
IBM Version 4 manual Common Information across APIs-Advanced ILE4-17Example