\

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

 

Page 384
Image 384
IBM Version 4 106, Move Qusptrus to APINAM, Perform Apierr, Display Apinam Display EXCEPTION-ID of QUS-EC. Perform Done