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

typedef struct {

 

/\ Error code

\/

Qus_EC_t ec_fields;

 

 

char

exception_data[1ðð];

 

 

} error_code_struct;

 

 

typedef struct {

 

/\ Exit program attribute keys\/

int

 

num_rec;

 

 

Qus_Vlen_Rec_4_t replace_rec;

 

 

char

 

replace;

 

 

Qus_Vlen_Rec_4_t CCSID_rec;

.14/

 

int

 

CCSID;

 

 

Qus_Vlen_Rec_4_t desc_rec;

 

 

char

 

desc[5ð];

 

 

}addep_attributes; /\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/

/\

 

\/

/\

main

\/

/\

 

\/

/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/ int main()

{

error_code_struct error_code; addep_attributes attrib_keys;

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

/\ Initialize the error code parameter.\/ /\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/ error_code.ec_fields.Bytes_Provided=sizeof(error_code_str￿uct);

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

/\ Set

the

total

number of exit program

attributes that we a￿re

\/

/\

specifying on

the call.

We will let

the API take the default

\/

/\

for

the

attributes that

we are not specifying.

\/

/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/ attrib_keys.num_rec=3; /\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/

/\ Set the values for

the three attributes that we will be

\/

/\ specifying:

 

 

 

 

\/

/\

Replace exit

program

=

1

(CHAR(1) field)

\/

/\

Exit program

data CCSID =

37

(BIN(4) field)

\/

/\

Exit program

description='THIS IS A TEST EXIT PROGRAM'

\/

/\

 

 

 

 

(CHAR(5ð) field)

\/

/\

 

 

 

 

 

\/

/\ The structure for the exit program attributes defined ab￿ove is \/

/\ as follows:

 

\/

/\

 

 

\/

/\

typedef struct {

 

\/

/\

int

num_rec;

\/

/\

Qus_Vlen_Rec_4_t replace_rec;

\/

/\

char

replace;

\/

/\

Qus_Vlen_Rec_4_t CCSID_rec;

\/

/\

int

CCSID;

\/

/\

Qus_Vlen_Rec_4_t desc_rec;

\/

/\

char

desc[5ð];

\/

/\

} addep_attributes;

 

\/

 

 

Chapter

9. Common API Programming Errors 9-23

Page 229
Image 229
IBM Version 4 manual QusVlenRec4t descrec Char Desc5ð Addepattributes