/ᑍ FUNCTION : This function calls the exit programs that ᑍ/
/ᑍ were retrieved from the registration facility ᑍ/
/ᑍ repository. ᑍ/
/ᑍ ᑍ/
/ᑍ INPUT: Information retrieved ᑍ/
/ᑍ ᑍ/
/ᑍ OUTPUT: NONE ᑍ/
/ᑍ ᑍ/
/ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ/
void Call_Exit_Program(char ᑍrcv_var)
{
int num_exit_pgms,
i;
char exit_pgm_name[1],
exit_pgm_lib[1],
info_for_exit_pgm[1],
ᑍrcv_ptr;
volatile int rsl_ok;
Pgm_OS ᑍexit_pgm_ptr;
/ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ/
/ᑍ Save the number of exit programs returned and set the pointer ᑍ/
/ᑍ to point to the first exit program entry. ᑍ/
/ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ/
rcv_ptr=rcv_var;
num_exit_pgms=((Qus_EXTI2_t ᑍ)rcv_ptr)→Number_Programs_Returned;
rcv_ptr += ((Qus_EXTI2_t ᑍ)rcv_ptr)→Offset_Program_Entry;
rsl_ok=1;
for (i=; i<num_exit_pgms; i++)
{
memcpy(exit_pgm_name,
((Qus_EXTI2_Entry_t ᑍ)rcv_ptr)→Program_Name,1);
memcpy(exit_pgm_lib,
((Qus_EXTI2_Entry_t ᑍ)rcv_ptr)→Program_Library,1);
/ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ/
/ᑍ Resolve to the exit program. If an error occurs on the ᑍ/
/ᑍ resolve operation to the library, the rsl_ok indicator is ᑍ/
/ᑍ set to failed in the RSL_PGM_HDLR exception handler. ᑍ/
/ᑍ The rslvsp MI instruction signals all errors to this ᑍ/
/ᑍ program; therefore, enable the exception handler to capture ᑍ/
/ᑍ any errors that may occur. ᑍ/
/ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ/
#pragma exception_handler (RSLVSP_PGM_HDLR,rsl_ok,,_C2_MH_ESCAPE)
exit_pgm_ptr=((Pgm_OS ᑍ)rslvsp(_Program,
exit_pgm_name,
exit_pgm_lib,
_AUTH_POINTER));
#pragma disable_handler
/ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ/
/ᑍ If the resolve operation is successful, call the exit ᑍ/
/ᑍ program. If not, move on to the next exit program. ᑍ/
/ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ/
if (rsl_ok)
{
Chapter 4. Common Information across APIs—Advanced (ILE) Example 4-15