IBM Version 4 manual EXAMPLEPGMEXAMPLELIB, Example Exit Program Data, Language ILE C

Models: Version 4

1 505
Download 505 pages 30.92 Kb
Page 103
Image 103

"EXAMPLEPGMEXAMPLELIB", "EXAMPLE EXIT PROGRAM DATA", 25,

&attrib_keys, &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 ADD AN EXIT PROGRAM FAILED WITH EXCEPT￿ION: %.7s", error_code.ec_fields.Exception_Id);

exit(1);

}

 

 

 

 

 

 

 

 

 

 

} /\ End program \/

 

 

 

 

 

 

 

 

Retrieve Exit Point

and Exit

Program

Information—ILE

C

Example

 

 

The

following

program

retrieves information

about

exit

points and exit

then resolves

to each

exit

program

and

calls

the exit program.

The Retrieve Exit Information API returns a continuation handle when it

information to

return than what fits in the receiver

variable. For mor

about continuation handles, see “Continuation Handle” on

page 2-25.

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

/\

PROGRAM:

Retrieve Exit Point and Exit Program Information

\/

/\

 

 

 

 

 

 

 

 

 

\/

/\

LANGUAGE:

ILE C

 

 

 

 

 

 

 

\/

/\

 

 

 

 

 

 

 

 

 

\/

/\

DESCRIPTION:

This program retrieves exit point and exit

\/

/\

 

program information.

After retrieving the

\/

/\

 

exit point information, the program resolves to

\/

/\

 

each associated exit program and calls each exit

\/

/\

 

program.

 

 

 

 

 

 

\/

/\

 

 

 

 

 

 

 

 

 

\/

/\

APIs USED:

QusRetrieveExitInformation - Retrieve Exit

\/

/\

 

 

 

 

 

 

Information

 

\/

/\

 

 

 

 

 

 

 

 

 

\/

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

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

/\

 

Includes

 

 

 

 

 

\/

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

#include <stdio.h>

 

 

 

 

 

 

 

 

#include <signal.h>

 

 

 

 

 

 

 

 

#include <string.h>

 

 

 

 

 

 

 

 

#include <stdlib.h>

 

 

 

 

 

 

 

 

#include <except.h>

 

 

 

 

 

 

 

 

#include <qusrgfa2.h>

 

 

 

 

 

 

 

 

#include <qusec.h>

 

 

 

 

 

 

 

 

#include <qmhchgem.h>

 

 

 

 

 

 

 

 

 

 

Chapter

4.

Common

Information

across APIs—Advanced

(ILE)4-13Example

Page 103
Image 103
IBM Version 4 manual EXAMPLEPGMEXAMPLELIB, Example Exit Program Data, Language ILE C