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 16INTSIZ
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 'OBJL1' 88 95 FORMAT
I I 'ᑍALL ' 96 15 OBJTYP
I 16 18 RSVD2
Iᑍ Set up parameters for the Retrieve User Space API
I I 1 B 19 112STRPOS
I I 192 B 113 116LENDTA
I B 117 12COUNT
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