Display Program Adopt (DSPPGMADP)

Where allowed to run: All environments (*ALL)
Threadsafe: No
Parameters
Examples
Error messages

The Display Programs that Adopt (DSPPGMADP) command displays the objects that adopt the special and private authorities of the specified user profile. This is a convenient way to check security exposure due to program adoption.

Restrictions:

Top


 

Parameters

Keyword Description Choices Notes
USRPRF User profile Name Required, Positional 1
OBJTYPE Object type Single values: *ALL
Other values (up to 3 repetitions): *PGM, *SQLPKG, *SRVPGM
Optional, Positional 2
OUTPUT Output *, *PRINT, *OUTFILE Optional
OUTFILE File to receive output Qualified object name Optional
Qualifier 1: File to receive output Name
Qualifier 2: Library Name, *LIBL, *CURLIB
OUTMBR Output member options Element list Optional
Element 1: Member to receive output Name, *FIRST
Element 2: Replace or add records *REPLACE, *ADD

Top

 

User profile (USRPRF)

Specifies the user profile whose authorities are adopted.

This is a required parameter.

name

Specify the name of a user profile. Objects will be checked to see if they adopt special and private authorities from this user profile.

Top

 

Object type (OBJTYPE)

Specifies the types of objects to be shown.

Single values

*ALL

All objects that adopt the user profile specified on the User profile (USRPRF) parameter are shown.

Other values (up to 3 repetitions)

*PGM

Only programs that adopt the specified user profile are shown.

*SQLPKG

Only Structured Query Language (SQL) packages that adopt the specified user profile are shown.

*SRVPGM

Only service programs that adopt the specified user profile are shown.

Top

 

Output (OUTPUT)

Specifies whether the output from the command is displayed at the requesting work station or printed with the job's spooled output.

*

The output is displayed (if requested by an interactive job) or printed with the job's spooled output (if requested by a batch job).

*PRINT

The output is printed with the job's spooled output.

*OUTFILE

The output is directed to the database file specified for the File to receive output (OUTFILE) parameter.

Top

 

File to receive output (OUTFILE)

Specifies the database file to which the output of the command is directed. If the file does not exist, this command creates a database file in the specified library. If the file is created, the public authority for the file is the same as the create authority specified for the library in which the file is created. Use the Display Library Description (DSPLIBD) command to show the library's create authority.

Qualifier 1: File to receive output

name

Specify the name of the database file to which the command output is directed.

Qualifier 2: Library

*LIBL

The library list is used to locate the file. If the file is not found, one is created in the current library. If no current library exists, the file will be created in the QGPL library.

*CURLIB

The current library for the thread is used to locate the file. If no library is specified as the current library for the thread, the QGPL library is used.

name

Specify the name of the library to be searched.

If a new file is created, system file QADPGMAD in system library QSYS with a format name of QSYPGMAD is used as a model.

Top

 

Output member options (OUTMBR)

Specifies the name of the database file member that receives the output of the command.

Element 1: Member to receive output

*FIRST

The first member in the file receives the output. If OUTMBR(*FIRST) is specified and the member does not exist, the system creates a member with the name of the file specified for the File to receive output (OUTFILE) parameter. If the member already exists, you have the option to add new records to the end of the existing member or clear the member and then add the new records.

name

Specify the name of the file member that receives the output. If it does not exist, the system creates it.

Element 2: Replace or add records

*REPLACE

The system clears the existing member and adds the new records.

*ADD

The system adds the new records to the end of the existing records.

Top


 

Examples

 DSPPGMADP   USRPRF(ABC)  OUTPUT(*PRINT)

This command prints a list of the objects that adopt the special and private authorities of user profile ABC.

Top


 

Error messages

*ESCAPE Messages

CPF2204

User profile &1 not found.

CPF2213

Not able to allocate user profile &1.

CPF2217

Not authorized to user profile &1.

CPF9845

Error occurred while opening file &1.

CPF9846

Error while processing file &1 in library &2.

CPF9850

Override of printer file &1 not allowed.

CPF9860

Error occurred during output file processing.

Top