/\ The SEPT is an array of system pointers that address IBM

\/

/\ programs in QSYS.

Within this array of pointers, some of the

\/

/\ offsets represent

fixed (upward compatible) assignments￿. All

\/

/\ OS/4ðð APIs, for instance,

are fixed at certain

offsets wit￿hin

\/

/\ the SEPT and you can call these APIs directly via the SEPT￿.

\/

/\ Calling APIs in this way avoids having to resolve to the A￿PI

\/

/\ (that is, performance is improved) and prevents

someone fr￿om

\/

/\ placing their version of the API earlier in the

library l￿ist

\/

/\ than the IBM-supplied API (that is, avoids

counterfeits).

\/

/\ All APIs, and their offsets, can be found in the source mem￿ber

\/

/\ QLIEPTI of file H

in the optionally installed QSYSINC li￿brary.

\/

/\ You should only use the SEPT for those programs

identifi￿ed in

\/

/\ member QLIEPTI.

The use of any other SEPT

offsets is NOT

\/

/\ supported.

 

 

 

 

\/

/\ Because the offset values in member QLIEPTI are

oriented￿ to the \/

/\ C language, they are assuming a base of ð.

Because MI arrays

\/

/\ use a default base of 1, we will declare the SEPT array wit￿h

\/

/\ an explicit base of ð. Because the array can grow over time

\/

/\ (and we don't necessarily want to have to change the upper

\/

/\ bound every release), we'll just define the array as having￿ 2

\/

/\ elements and use the OVRPGATR instruction later

in the p￿rogram

\/

/\ to instruct the translator

to ignore the array bounds wh￿en

\/

/\ referring to the array. For example, later we will use

\/

/\ SEPT(4267) to call the Send Nonprogram Message (QMHSNDM) AP￿I.

\/

DCL SYSPTR SEPT(ð:1)

BAS(SEPT@); /\ use Base

ð to

match QLIEPTI

\/

/\ Declare template for Materialize Context (MATCTX)

\/

DCL DD MATCTXOPTS CHAR(44);

 

 

 

 

DCL DD MATCTXCTL

CHAR( 2)

DEF(MATCTXOPTS)

POS(

1) INIT(X'ð5ðð');

DCL DD MATCTXSELCTL

CHAR(42)

DEF(MATCTXOPTS)

POS(

3);

 

/\ Declare Small Receiver for

initial MATCTX

 

 

\/

DCL DD S_RECEIVER CHAR(8) BDRY(16);

 

 

 

DCL DD S_BYTPRV

BIN( 4)

DEF(S_RECEIVER)

POS(

1) INIT(8);

 

DCL DD S_BYTAVL

BIN( 4)

DEF(S_RECEIVER)

POS(

5);

 

DCL SPCPTR S_RECEIVER@ INIT(S_RECEIVER);

 

 

 

/\ Declare Large Receiver Layout for second MATCTX

 

\/

DCL DD L_RECEIVER

CHAR(129) BAS(L_RECEIVER@);

 

 

DCL DD L_BYTPRV

BIN( 4)

DEF(L_RECEIVER)

POS(

1);

 

DCL DD L_BYTAVL

BIN( 4)

DEF(L_RECEIVER)

POS(

5);

 

DCL DD L_CONTEXT

CHAR(32)

DEF(L_RECEIVER)

POS(

9);

 

DCL DD L_OBJ_TYPE

CHAR( 1)

DEF(L_CONTEXT)

POS(

1);

 

DCL DD L_OBJ_STYPE

CHAR( 1)

DEF(L_CONTEXT)

POS(

2);

 

DCL DD L_OBJ_NAME

CHAR(3ð)

DEF(L_CONTEXT)

POS(

3);

 

DCL DD L_CTX_OPTS

CHAR( 4)

DEF(L_RECEIVER)

POS(41);

 

DCL DD L_RCV_OPTS

CHAR( 4)

DEF(L_RECEIVER)

POS(45);

 

DCL DD L_SPC_SIZ

BIN( 4)

DEF(L_RECEIVER)

POS(49);

 

DCL DD L_SPC_IVAL

CHAR( 1)

DEF(L_RECEIVER)

POS(53);

 

DCL DD L_PERF_CLS

CHAR( 4)

DEF(L_RECEIVER)

POS(54);

 

DCL DD \

CHAR( 7)

DEF(L_RECEIVER)

POS(58);

 

DCL DD \

CHAR(16)

DEF(L_RECEIVER)

POS(65);

 

DCL SYSPTR L_ACC_GROUP;

 

 

 

 

 

 

Chapter

7. Machine Interface

Programming7-33

Page 173
Image 173
IBM Version 4 DCL DD Matctxopts CHAR44 DCL DD Matctxctl, Pos, DCL DD Sreceiver CHAR8 BDRY16 DCL DD Sbytprv, DCL DD Sbytavl