ᑍ SET UP TO ACCEPT EXCEPTIONS
C Z-ADDᑍZEROS QUSBNB
ᑍ
ᑍ CREATE THE SPACE TO HOLD THE DATA
C CALL 'QUSCRTUS'
C PARM SPCNAM
C PARM 'EXT_ATTR'EXTATR 1
C PARM SIZ
C PARM INTVAL
C PARM 'ᑍALL 'PUBAUT 1
C PARM 'TEXT DSC'TXTDSC 5
C PARM 'ᑍYES 'REPLAC 1
C PARM QUSBN
ᑍ
ᑍ CALL THE API TO LIST THE ACTIVE JOBS
C CALL 'QUSLJOB'
C PARM SPCNAM
C PARM 'JOBL1'FORMAT 8
C PARM JOBNAM
C PARM 'ᑍACTIVE 'STAT 1
C PARM QUSBN
ᑍ
ᑍ RETRIEVE INFORMATION ABOUT THE USER SPACE AND ITS CONTENTS
C Z-ADD1 START
C Z-ADD14 LENDTA
C CALL 'QUSRTVUS'
C PARM SPCNAM
C PARM START
C PARM LENDTA
C PARM QUSBP
C PARM QUSBN
ᑍ
ᑍ RETRIEVE THE FIRST LIST ENTRY BASED ON THE LIST ENTRY OFFSET
ᑍ FOUND IN THE SPACE HEADER
C QUSBPQ ADD 1 START
C Z-ADD52 LENDTA
C Z-ADD1 X 9
C X DOWLEQUSBPS
C CALL 'QUSRTVUS'
C PARM SPCNAM
C PARM START
C PARM LENDTA
C PARM QUSDD
C PARM QUSBN
ᑍ
ᑍ RETRIEVE THE NEXT LIST ENTRY (SPECIFYING LIST ENTRY LENGTH
ᑍ RETRIEVED FROM THE SPACE HEADER)
C ADD QUSBPT START 11
ᑍ
ᑍ DISPLAY THE INFORMATION RETURNED
C MOVELQUSDD RECVR 52
C DSPLY RECVR
C ADD 1 X
C END
ᑍ
ᑍ DELETE THE SPACE THAT HELD THE DATA
C CALL 'QUSDLTUS'
C PARM SPCNAM
C PARM QUSBN
ᑍᑍ
C SETON LR
Chapter 9. Common API Programming Errors
9-17