IBM Version 4 manual Exit Program Attribute Keys, Key Type Field

Models: Version 4

1 505
Download 505 pages 30.92 Kb
Page 94
Image 94

Type

Field

 

 

 

 

 

BINARY(4)

Length of variable-length record

 

 

 

 

 

BINARY(4)

Exit

program attribute key

 

 

 

 

 

BINARY(4)

Length

of data

 

 

 

 

 

CHAR(*)

Data

 

 

 

 

 

The number of

variable-length records.3/ is fieldthe first 4 bytes, and this f

tells the API how many variable-length records have been specified. The

defined .4/in are repeated

(contiguously)

immediately

following the

number

variable-length records for

each

record

that

is sent to the API. The

each variable-length record

by

using the length of variable-length recor

to the next record, up

to

and

including

the

number

of records

specif

The variable-length record structures are defined in the qus.h header C-language header file is included by the qusrgfa1.h header file). T variable-length record is defined as:

typedef _Packed struct Qus_Vlen_Rec_4 {

int

Length_Vlen_Record;

int

Control_Key;

 

int

Length_Data;

 

/\char

Data[];\/

/\ Varying length field \/

} Qus_Vlen_Rec_4_t;

Because the data field is a varying-length field, it needs to be d structure.

Exit Program Attribute Keys

The Add Exit Program API has several exit program attributes that can following table shows the valid exit program attribute keys for the ke the variable-length record.

 

Key

 

 

Type

 

 

Field

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1

 

 

CHAR(27)

 

 

Qualified

message

file name and message identifier for exi

 

 

 

 

 

 

 

program

description

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2

 

 

CHAR(50)

 

 

Exit

program

text

description

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3

 

 

BINARY(4)

 

Exit

program

data

CCSID

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

4

 

 

CHAR(1)

 

 

Replace

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

This

example

specifies

only

two

attribute keys (replace_rec and CCSID_

 

and

lets the

remaining

attribute

keys be set by the

API

to

the

de

 

working

with variable-length

structures, each

variable-length record

must

s

 

4-byte

boundary

alignment. (The 4-byte boundary alignment

requirement

is

 

true

 

for the registration facility APIs, not all keyed

APIs.)

The

 

follow

 

ture

 

becomes

the exit

program

attributes

parameter on

the

call

to

th

 

Program

API:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

typedef struct {

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

int

 

 

 

num_rec;

 

 

 

 

 

 

 

 

 

 

 

 

Qus_Vlen_Rec_4_t replace_rec;

 

 

 

 

 

 

 

 

 

 

 

 

char

 

 

 

replace;

 

 

 

 

 

 

 

 

 

 

 

 

char

 

 

 

Reserved[3];

 

 

 

 

 

 

 

4-4System API Programming

V4R1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Page 94
Image 94
IBM Version 4 manual Exit Program Attribute Keys, Key Type Field