Display User Profile (DSPUSRPRF)

The Display User Profile (DSPUSRPRF) command displays the contents of a user profile. The user profile contains the user's operational limits for system resources. This includes the names of the objects, commands, and devices that the user has specific authority to use and the names of the objects that the user owns, and that the user is the primary group for.

Objects owned by the user profile are not shown on the *CMDAUT, *DEVAUT, *OBJAUT, or *OBJPGP displays.

This command does not show the password, nor does it show information about objects authorized for public use. The document password is not shown on the *BASIC display or on any CL command output. Any user on the system can be authorized to use the DSPUSRPRF command, but the requesting user must have read (*READ) authority for the user profile being displayed.

The DSPUSRPRF function may be a long-running function, depending upon the number of objects the user profile owns and is authorized to use.

Restrictions: The user name can be specified as USRPRF(*ALL) or USRPRF(generic-name) only when TYPE(*BASIC) and OUTPUT(*OUTFILE) are specified.

Parameters

Keyword Description Choices Notes
USRPRF User profile Generic name, name, *ALL Required, Positional 1
TYPE Type of information *BASIC, *ALL, *CMDAUT, *DEVAUT, *GRPMBR, *OBJAUT, *OBJOWN, *OBJPGP 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

User profile (USRPRF)

Specifies the user profiles to be displayed.

This is a required parameter.

*ALL
All user profiles are shown.
generic-name
Specify the generic name of the user profiles to be shown. A generic name is a character string that contains one or more characters followed by an asterisk (*). If a generic name is specified, all user profiles that have names with the same prefix as the generic name are shown.
name
Specify the name of the user profile to be shown.

Note: *ALL or a generic name can only be specified when TYPE(*BASIC) and OUTPUT(*OUTFILE) are specified.

Type of information (TYPE)

Specifies the types of information that can be displayed. All, or one, of the following can be displayed:

*BASIC
All parameters as defined in the user profile, are displayed.
*ALL
All of the information in the user profile is displayed.
*CMDAUT
Displays the control language commands to which the user has specific authority.
*DEVAUT
Displays the system devices to which the user has specific authority.
*OBJAUT
Displays the names of the objects (except those authorized for public use) to which the user has specific authority, the user's authority for those objects, and the object types.
*OBJOWN
Displays the total number of objects this user owns, the object names, the object types, and the libraries in which the objects reside. Also indicates if the object is an authority holder.
*OBJPGP
Displays the total number of objects the user is the primary group for, the object names, the type, the library the object resides in, and the primary group authority. Also indicates if the object is an authority holder.
*GRPMBR
Displays the members of a group. This display is available only if the user profile being displayed is a group profile.

Output (OUTPUT)

Specifies where the output from the command is sent.

*
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.

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.

Note: If a new file is created and *BASIC is specified on the Type of information (TYPE) TYPE parameter, the system uses QADSPUPB in QSYS with a format name QSYDSUPB as a model.

If a new file is created and *OBJAUT is specified on the TYPE parameter, the system uses QADSPUPA in QSYS with a format name QSYDSUPA as a model.

If a new file is created and *OBJOWN is specified on the TYPE parameter, the system uses QADSPUPO in QSYS with a format name QSYDSUPO as a model.

If a new file is created and *OBJPGP is specified on the TYPE parameter, the system uses QADSPUPG in QSYS with a format name QSYDSUPG as a model.

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.

Examples

Example 1: Displaying Basic Information

DSPUSRPRF   USRPRF(THSMITH)

This command shows the basic portion of the user profile named THSMITH because TYPE(*BASIC) is assumed. The commands, devices, and objects that the user is authorized to use are not displayed. Because OUTPUT(*) is also assumed, the operational information is either displayed or printed, depending on where the command is submitted.

Example 2: Printing a List of Objects

DSPUSRPRF   USRPRF(RTJOHNSON)  TYPE(*OBJOWN)  OUTPUT(*PRINT)

This command causes the list of objects that are owned by the user named RTJOHNSON to be printed. The list contains the object names, object types, and the names of the libraries where the objects are located.

Error messages

*ESCAPE Messages

CPF22DF
Unable to process request for user profile &1.
CPF22D8
Use of generic user profile name not correct.
CPF22D9
No user profiles of specified name exist.
CPF22EB
Unable to process request for user profile &1.
CPF2204
User profile &1 not found.
CPF2213
Not able to allocate user profile &1.
CPF2217
Not authorized to user profile &1.
CPF2257
User profile &1 not a group profile.
CPF9860
Error occurred during output file processing.