ᑍ
MOVE SPACES TO CONTIN-HDL.
PERFORM GETLST.
ᑍ
ᑍ Get a resolved pointer to the User Space for performance
ᑍ
CALL "QUSPTRUS" USING SPC-NAME, SPCPTR, QUS-EC.
ᑍ
ᑍ Check for errors on QUSPTRUS
ᑍ
IF BYTES-AVAILABLE OF QUS-EC >
MOVE "QUSPTRUS" TO APINAM,
PERFORM APIERR.
ᑍ
ᑍ If no error, then set addressability to User Space
ᑍ
SET ADDRESS OF QUS-GENERIC-HEADER-1 TO SPCPTR.
SET ADDRESS OF STRING-SPACE TO SPCPTR.
ᑍ
ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ
APIERR.
ᑍ
ᑍ Log any error encountered, and exit the program
ᑍ
DISPLAY APINAM.
DISPLAY EXCEPTION-ID OF QUS-EC.
PERFORM DONE.
ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ
DONE.
ᑍ
ᑍ Exit the program
ᑍ
WRITE LIST-LINE FROM END-LIST.
STOP RUN.
List Object API—ILE RPG Example
Refer to “List Object API—OPM RPG Example” on page 5-4 for the original
example.
Fᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ
Fᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ
Fᑍ
Fᑍ Program: List objects that adopt owner authority
Fᑍ
Fᑍ Language: ILE RPG
Fᑍ
Fᑍ Description: This program prints a report showing all objects
Fᑍ that adopt owner authority. The two parameters
Fᑍ passed to the program are the profile to be
Fᑍ checked and the type of objects to be listed.
Fᑍ The parameter values are the same as those
Fᑍ accepted by the QSYLOBJP API.
Fᑍ
Fᑍ APIs Used: QSYLOBJP - List Objects that Adopt Owner Authority
Fᑍ QUSCRTUS - Create User Space
Fᑍ QUSPTRUS - Retrieve Pointer to User Space
Fᑍ QUSROBJD - Retrieve Object Description
B-106 System API Programming V4R1