C PARM ᑍBLANKS SPC_TEXT 5
C PARM 'ᑍYES' SPC_REPLAC 1
C PARM QUSEC
C PARM 'ᑍUSER' SPC_DOMAIN 1
Cᑍ
Cᑍ Call QUSLSPL to get all spooled files for ᑍCURRENT user
Cᑍ
C CALL 'QUSLSPL' 3
C PARM SPC_NAME
C PARM 'SPLF2' FORMAT 8 4
C PARM 'ᑍCURRENT' USR_PRF 1
C PARM 'ᑍALL' OUTQ 2
C PARM 'ᑍALL' FORMTYP 1
C PARM 'ᑍALL' USRDTA 1
C PARM QUSEC
C PARM JOBNAM 26
C PARM KEYS 5
C PARM KEY# 6
Cᑍ
Cᑍ Get a resolved pointer to the User Space for performance
Cᑍ
C CALL 'QUSPTRUS' 9
C PARM SPC_NAME
C PARM SPCPTR
C PARM QUSEC
Cᑍ
Cᑍ If valid information was returned
Cᑍ
C QUSSRL IFEQ '1' 12
C QUSIS IFEQ 'C' 14
C QUSIS OREQ 'P'
Cᑍ
Cᑍ and list entries were found
Cᑍ
C QUSNBRLE IFGT 16
Cᑍ
Cᑍ set LSTPTR to the first byte of the User Space
Cᑍ
C EVAL LSTPTR = SPCPTR
Cᑍ
Cᑍ increment LSTPTR to the first List entry
Cᑍ
C EVAL LSTPTR = %ADDR(ARR(QUSOLD + 1)) 18
Cᑍ
Cᑍ and process all of the entries
Cᑍ
C DO QUSNBRLE 2
Cᑍ
Cᑍ set LSTPTR2 to the first variable length record for this entry
Cᑍ
C Z-ADD 5 X 9
C EVAL LSTPTR2 = %ADDR(ARR(X)) 22
C DO QUSNBRFR 23
Cᑍ
Cᑍ process the data based on key type
Cᑍ
C QUSKFFFR CASEQ 21 FILNAM 24
C QUSKFFFR CASEQ 211 PAGES
Appendix B. Original Examples in Additional Languages B-45