IBM Version 4 Dvarrec Nbrrecs, Recs, Dvoffset, Doverlays Binary, Depgmdtasz, Inz%Sizeepgmdta

Models: Version 4

1 505
Download 505 pages 30.92 Kb
Page 337
Image 337

D\

 

 

 

D\ Miscellaneous data

 

 

D\

 

 

 

DVARREC

DS

 

 

D NBR_RECS

 

9B ð

 

D RECS

 

1ððð

 

DV_OFFSET

S

9 ð

INZ(1)

D\

 

 

 

DOVERLAYS

DS

 

 

D BINARY

 

9B ð

 

D BINARY_C

 

4

OVERLAY(BINARY)

D\

 

 

 

DEPNTNAME

S

INZ('EXAMPLE_EXIT_POINT')

DEPGM

S

INZ('EXAMPLEPGMEXAMPLELIB')

DEPGMDTA

S

25

INZ('EXAMPLE EXIT PROGRAM DATA')

DEPGMDTA_SZ

S

9B ð

INZ(%SIZE(EPGMDTA))

C\

 

 

 

C\ Beginning of mainline C\

C\ Register the exit point with the registration facility￿. If the C\ registration of the exit point is successful, add an exi￿t

C\ program to the exit point. C\

C\ Initialize the error code parameter. To signal exceptions to C\ this program by the API, you need to set the bytes provide￿d C\ field of the error code to zero. Because this program has

C\ exceptions sent back through the error code parameter, i￿t sets C\ the bytes provided field to the number of bytes it gives￿ the

C\ API for the parameter.

 

C\

 

 

C

EVAL

QUSBPRV = %SIZE(QUSEC)

C\

 

 

C\ Set the exit point controls. Each control field is passed to C\ the API using a variable length record. Each record must

C\ start on a 4-byte boundary. C\

C\ Set the total number of controls that are being specifie￿d on C\ the call. This program lets the API take the default for the C\ controls that are not specified.

C\

 

 

C

EVAL

NBR_RECS = 2

C\

 

 

C\ Set the values for the two

controls that are specified:

C\

Maximum number of exit programs = 1ð

C\

Exit point description =

'EXIT POINT EXAMPLE'

C\

 

 

C

EVAL

QUSCK = 3

C

EVAL

QUSLD = 4

C

EVAL

BINARY = 1ð

C

EVAL

%SUBST(RECS:V_OFFSET+12) = BINARY_C

C

EXSR

CALC_VOFF

C

EVAL

QUSCK = 8

C

EVAL

QUSLD = 5ð

C

EVAL

%SUBST(RECS:V_OFFSET+12:5ð) = 'EXIT +

C

 

POINT EXAMPLE'

C

EXSR

CALC_VOFF

C\

C\ Call the API to register the exit point.

Appendix B. Original Examples in Additional BLanguages-59

Page 337
Image 337
IBM Version 4 manual Dvarrec Nbrrecs, Recs, Dvoffset, Doverlays Binary, Depgmdtasz, Inz%Sizeepgmdta, Eval Nbrrecs =