MOVE 124 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 the
ᑍ 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 1677674 TO SPACE-SIZE.
MOVE "FILD1" 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-154 System API Programming V4R1