MOVE 1ð24 TO SPACE-SIZE.

CALL "QUSCRTUS" USING SPACE-NAME, EXT-ATTR, SPACE-SIZE, SPACE-INIT, SPACE-AUT, SPACE-TEXT, SPACE-REPLACE, QUS-EC, SPACE-DOMAIN.

\

\Check for errors on QUSCRTUS

IF BYTES-AVAILABLE OF QUS-EC > ð

MOVE "QUSCRTUS" TO API-NAME, PERFORM API-ERROR-FOUND.

\

\Change the User Space so that it is extendable

CALL "QUSCUSAT" USING LIBRARY-NAME, SPACE-NAME,

CHG-US-ATTR, QUS-EC.

\

\Check for errors on QUSCUSAT

IF BYTES-AVAILABLE OF QUS-EC > ð

MOVE "QUSCUSAT" TO API-NAME, PERFORM API-ERROR-FOUND.

\

\Get a resolved pointer to the User Space

CALL "QUSPTRUS" USING SPACE-NAME, SPACE-POINTER, QUS-EC.

\Check for errors on QUSPTRUS

\

IF BYTES-AVAILABLE OF QUS-EC > ð

MOVE "QUSPTRAT" TO API-NAME, PERFORM API-ERROR-FOUND.

\

\If no errors, then call QDBRTVFD passing the address of th￿e

\User Space as the receiver variable. To accomplish this,

\assign the address of QDB-QDBFH to SPACE-POINTER and then￿

\pass QDB-QDBFH.

\

SET ADDRESS OF QDB-QDBFH TO SPACE-POINTER.

\

MOVE 167767ð4 TO SPACE-SIZE. MOVE "FILDð1ðð" TO FORMAT-NAME-1.

\

CALL "QDBRTVFD" USING QDB-QDBFH, SPACE-SIZE, FILE-USED, FORMAT-NAME-1, FILE-NAME,

FORMAT-NAME-PARM, OVERRIDES, SYSTEM OF MISC, FORMAT-1, QUS-EC.

\

\Check for errors on QDBRTVFD

IF BYTES-AVAILABLE OF QUS-EC > ð

MOVE "QDBRTVFD" TO API-NAME, PERFORM API-ERROR-FOUND.

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

API-ERROR-FOUND.

\

\Log any error encountered, and exit the program

DISPLAY API-NAME.

B-154System API Programming V4R1

Page 432
Image 432
IBM Version 4 manual Call Qusptrus Using SPACE-NAME, SPACE-POINTER, QUS-EC, SET Address of QDB-QDBFH to SPACE-POINTER