/\ Remove an exit program from the exit point and then dereg￿ister \/ /\ the exit point. It is not necessary to remove exit programs \/ /\ from an exit point before deregistering the exit point. It is \/

/\ done here only for illustration purposes.\/ /\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/

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

/\ Initialize the error code parameter. To

have exceptions

\/

/\ signaled to this program by the API, set

the

bytes provide￿d

\/

/\ field of the code to zero. This program

has

exceptions sent

\/

/\ through the error code parameter; therefore,

the bytes

\/

/\ provided field is set to the number of bytes

that this pro￿gram \/

/\ gives the API for the parameter.

 

 

\/

/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/ error_code.ec_fields.Bytes_Provided=sizeof(error_code_str￿uct);

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

/\ Call the API to remove the exit program.\/ /\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/ QusRemoveExitProgram("EXAMPLE_EXIT_POINT ",

"EXMPð1ðð", pgm_num, &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 REMOVE EXIT PROGRAM FAILED WITH EXCEPT￿ION: %.7s", error_code.ec_fields.Exception_Id);

exit(1);

}

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

/\

If the call to

remove the exit program is successful,

\/

/\

deregister the

exit point.

\/

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

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

/\ Call the API to add the exit program.\/ /\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/ QusDeregisterExitPoint("EXAMPLE_EXIT_POINT ",

"EXMPð1ðð", &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 DEREGISTER EXIT POINT FAILED WITH EXCE￿PTION: %.7s",

4-20System API Programming V4R1

Page 110
Image 110
IBM Version 4 manual 20System API Programming V4R1