DSPUSRPRF (Display User Profile)

DSPUSRPRF Command syntax diagram

 

Purpose

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

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

 

Required Parameters

USRPRF
Specifies the name of the user profile.

*ALL: All user profiles are displayed.

generic*-user-name: Specify the generic name of the user. A generic name is a character string of one or more characters followed by an asterisk (*); for example, ABC*. The asterisk substitutes for any valid characters. A generic name specifies all objects with names that begin with the generic prefix for which the user has authority. If an asterisk is not included with the generic (prefix) name, the system assumes it to be the complete object name. For more information on the use of generic names, refer to generic names.

user-name: Specify the name of the user profile to be displayed.

 

Optional Parameters

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

  • The basic portion of the user profile that describes the user
  • Commands for which the user profile has specific authority
  • Devices for which the user profile has specific authority
  • All objects (including commands and devices) for which the user has some specific authority and the authorities assigned with those objects
  • Objects that are owned by the user
  • Objects that the user is the primary group for.
  • Members of the group, if the user profile is a group profile

*BASIC: All parameters as defined in the user profile are displayed.

*ALL: All of the information in the user profile is displayed.

*CMDAUT: The control language (CL) commands, to which the user has specific authority, are displayed.

*DEVAUT: The system devices to which the user has specific authority are displayed.

*OBJAUT: The total number and the names of the objects to which the user has specific authority (except those authorized for public use), the user's authority for those objects, and the object types are displayed. Commands and devices are included if *OBJAUT is specified.

*OBJOWN: For each object owned by the user operating under the user profile, the total number of owned objects and the object names, the types, and the libraries in which the objects reside are displayed.

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

*GRPMBR: The members of a group are displayed. This display is available only if the user profile being displayed is a group profile.

OUTPUT
Specifies whether the output from the command is shown at the requesting workstation or printed with the job's spooled output. More information on this parameter is in Commonly used parameters.

*: Output requested by an interactive job is shown on the display. Output requested by a batch job is printed with the job's spooled output.

*PRINT: The output is printed with the job's spooled output.

*OUTFILE: The output is directed to the database file specified on the OUTFILE parameter.

OUTFILE
Specifies the qualified name of the database file to which the output of the display is directed. If the file does not exist, this command creates a database file in the specified library. If this function creates the file, the text reads 'Outfile for DSPUSRPRF', and the public authority is *EXCLUDE.

Note: If a new file is created and *BASIC is specified on the Type of information prompt (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 of information prompt (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 of information prompt (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 of information prompt (TYPE parameter) the system uses QADSPUPG in QSYS with a format name QSYDSUPG as a model.

The name of the database file can be qualified by one of the following library values:

*LIBL: All libraries in the job's library list are searched until the first match is found.

*CURLIB: The current library for the job is searched. If no library is specified as the current library for the job, the QGPL library is used.

library-name: Specify the name of the library to be searched.

database-file-name: Specify the name of the database file.

OUTMBR
Specifies the name of the database file member to which the output is directed.

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 on the OUTFILE parameter. If the member exists, the user can choose to either add records to the end of the existing member or to clear the existing records in the member and then add the new records.

member-name: Specify the file member that receives the output. If OUTMBR(member-name) is specified and the member does not exist, the system creates it.

Element 2: Operation to Perform on Member

*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 for DSPUSRPRF

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 for DSPUSRPRF

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