I\ Varying length
I 17 1ðð QUSBNG
I\
I\ List Objects API Include
I\
I/COPY QSYSINC/QRPGSRC,QUSLOBJ
I\
I\ Qualified User Space Data Structure
I\
IUSERSP DS
I I 'APIUG1 ' 1 1ð USRSPC
I I 'QGPL ' 11 2ð SPCLIB
i\ Qualified Object Name Data Structure
IOBJECT DS
I I '\ALL ' 1 1ð OBJNAM
I I 'QGPL ' 11 2ð OBJLIB
I\
I\ Miscellaneous Data Structure
I\
I DS
I\ Set up parameters for the Create User Space API
I I 'TESTUSRSPC' 1 1ð EXTATR
I I X'ðð' 11 11 INTVAL
I 12 12 RSVD1
I I 256 B 13 16ðINTSIZ
I I '\USE ' 17 26 PUBAUT
I I 'TEXT DESCRIPTION - 27 76 TEXT
I 'FOR USER SPACE -
I 'CALLED APIUG1 '
I I '\YES ' 77 87 REPLAC
I\ Set up parameters for the List Objects API
I I 'OBJLð1ðð' 88 95 FORMAT
I I '\ALL ' 96 1ð5 OBJTYP
I 1ð6 1ð8 RSVD2
I\ Set up parameters for the Retrieve User Space API
I I 1 B 1ð9 112ðSTRPOS
I I 192 B 113 116ðLENDTA
I B 117 12ððCOUNT
C\
C\ Create a user space called APIUG1 in library QGPL.
C\
C Z-ADD1ðð QUSBNB
C CALL 'QUSCRTUS'
C PARM USERSP
C PARM EXTATR
C PARM INTSIZ
C PARM INTVAL
C PARM PUBAUT
C PARM TEXT
C PARM REPLAC
C PARM QUSBN
C\ See if any errors were returned in the error code parameter.
C EXSR ERRCOD
C\
C\ Get a list of all objects in the QGPL library.
C\
C CALL 'QUSLOBJ'
C PARM USERSP
Chapter 9. Common API Programming Errors 9-29