C\

 

 

 

 

 

C\ Set Error Code structure to not use exceptions

 

C\

 

 

 

 

 

C

 

Z-ADD

16

QUSBPRV

 

C\

 

 

 

 

 

C\ Create a User Space for QDBRTVFD

 

 

C\

 

 

 

 

 

C

 

CALL

'QUSCRTUS'

 

 

C

 

PARM

 

SPC_NAME

 

C

 

PARM

\BLANKS

EXT_ATTR

C

 

PARM

1ð24

SPC_SIZE

 

C

 

PARM

 

SPC_INIT

 

C

 

PARM

'\CHANGE'

SPC_AUT

C

 

PARM

'QDBRTVFD'

SPC_TEXT

C

 

PARM

'\YES'

SPC_REPLAC

C

 

PARM

 

QUSEC

 

C

 

PARM

'\USER'

SPC_DOMAIN

C\

 

 

 

 

 

C\ Check for errors on QUSCRTUS

 

 

C\

 

 

 

 

 

C

QUSBAVL

IFGT

ð

 

 

C

 

MOVEL

'QUSCRTUS'

APINAM

C

 

EXSR

APIERR

 

 

C

 

END

 

 

 

C\

 

 

 

 

 

C\ Change the User Space so that it is extendable

 

C\

 

 

 

 

 

C

 

CALL

'QUSCUSAT'

 

 

C

 

PARM

 

LIB_NAME

 

C

 

PARM

 

SPC_NAME

 

C

 

PARM

 

CHG_ATTR

 

C

 

PARM

 

QUSEC

 

C\

 

 

 

 

 

C\ Check for errors on QUSCUSAT

 

 

C\

 

 

 

 

 

C

QUSBAVL

IFGT

ð

 

 

C

 

MOVEL

'QUSCUSAT'

APINAM

C

 

EXSR

APIERR

 

 

C

 

END

 

 

 

C\

 

 

 

 

 

C\ Get a resolved pointer to the User Space

 

 

C\

 

 

 

 

 

C

 

CALL

'QUSPTRUS'

 

 

C

 

PARM

 

SPC_NAME

 

C

 

PARM

 

SPCPTR

 

C

 

PARM

 

QUSEC

 

C\

 

 

 

 

 

C\ Check for errors on QUSPTRUS

 

 

C\

 

 

 

 

 

C

QUSBAVL

IFGT

ð

 

 

C

 

MOVEL

'QUSPTRUS'

APINAM

C

 

EXSR

APIERR

 

 

C

 

END

 

 

 

C\

 

 

 

 

 

C\ If no errors, then call QDBRTVFD passing

the address of t￿he

C\ User Space as the receiver

variable. As

Data Structure

 

C\ QDBQ25 is defined as BASED(SPCPTR) and SPCPTR is set to th￿e

C\ first byte of the User Space, simply passing QDBQ25 will￿ cause

B-164System API Programming V4R1

Page 442
Image 442
IBM Version 4 manual Call Quscrtus Parm Spcname \BLANKS Extattr, Spcsize Parm Spcinit \CHANGE Spcaut Qdbrtvfd Spctext