RTVUSRPRF (Retrieve User Profile)

RTVUSRPRF Command syntax diagram

 

Purpose

The Retrieve User Profile (RTVUSRPRF) command is used in a CL program or REXX procedure to retrieve one or more of the values stored and associated with a user. The values are returned in the specified variables for the desired user.

The CL prompt for this command lists the minimum length for the variables next to the appropriate parameters to be retrieved. A single digit is shown for character variables. Two digits are shown for decimal variables, where the first digit indicates the minimum variable length, and the second digit indicates the minimum number of decimal positions.

Restriction: *READ authority is required for the user specified on the USRPRF parameter.

 

Optional Parameters

USRPRF
Specifies the name of the user whose information is being retrieved. If a variable is specified, it must be 10 characters long and contain a user name or the value *CURRENT.

*CURRENT: The user profile that is currently running is used.

user-name: Specify the name of the user whose information is being retrieved.

RTNUSRPRF
Specifies the name of a variable used to contain the name of the user profile whose information is retrieved. In CL programs, the variable has a length of 10 characters. If *CURRENT is specified on the USRPRF parameter, the value returned is the user profile name of the currently running profile. If a name is specified, that name is returned for this parameter.

SPCAUT
Specifies the name of a variable used to retrieve the list of user special authorities. In CL programs, the variable has a length of 100 characters. The format returned is a list of up to 10 special authority entries, with each entry 10 characters long. If there are fewer than 10 special authorities in the list, the remaining entries are padded on the right with blanks. If the user has no special authorities, the first entry contains the value of *NONE followed by blanks.

The special authority list is returned in the following format:

Entry-1

   Special authority CHAR(10)

Entry-2

   Special authority CHAR(10)
    .
    .
    .

Entry-10

   Special authority CHAR(10)
MAXSTG
Specifies the name of a variable used to retrieve the maximum amount of auxiliary storage space that can be assigned to store permanent objects owned by the specified user. The value returned is either an 11-digit value or a value of -1 if it is *NOMAX. The variable must be an 11-digit value with zero decimal positions (11 0). For additional information on this parameter, see the Create User Profile (CRTUSRPRF) command.

STGUSED
Specifies the name of a variable that is used to retrieve the amount of auxiliary storage currently being used to store permanent objects owned by the specified user profile. In CL programs, the variable has a length of (15 0) characters. The value is returned in kilobytes (1 kilobyte (KB) equals 1024 bytes).

PTYLMT
Specifies the name of a variable used to retrieve the highest scheduling priority the user is allowed to have for each job submitted to the system. In CL programs, the variable has a length of 1 character. This value controls the job processing priority that any job running under this user can have. This means that values specified in the JOBPTY and OUTPTY parameters of any job command cannot exceed the PTYLMT value specified for the user under which the job is run. The scheduling priority can have a value ranging from 0 through 9, where 0 is the highest priority and 9 is the lowest priority.

INLPGM
Specifies the name of a variable used to retrieve the name of the initial program that starts when the specified user signs on the system. In CL programs, the variable has a length of 10 characters. If no initial program name is associated with the specified user, the value returned in the CL variable is *NONE. For more information on this parameter, see the Create User Profile (CRTUSRPRF) command.

INLPGMLIB
Specifies the name of a variable used to retrieve the name of the library that contains the initial program associated with the specified user. In CL programs, the variable has a length of 10 characters. If no initial program is associated with the specified user, blanks are returned in the variable.

JOBD
Specifies the name of a variable used to retrieve the name of the job description associated with the specified user. In CL programs, the variable has a length of 10 characters.

JOBDLIB
Specifies the name of a variable used to retrieve the name of the library that contains the job description associated with the specified user. In CL programs, the variable has a length of 10 characters.

GRPPRF
Specifies the name of a variable used to retrieve the name of the group profile. In CL programs, the variable has a length of 10 characters. If no group profile exists for the specified user profile, a value of *NONE is returned in the variable. For more information on this parameter, see the CRTUSRPRF (Create User Profile) command.

OWNER
Specifies the name of a variable used to retrieve the special value of *USRPRF or *GRPPRF. In CL programs, the variable has a length of 10 characters. This parameter indicates the owner of newly-created objects. This is either the specified user or the user's group profile. If no group profile exists for the specified user profile, the value returned in the variable is *USRPRF.

GRPAUT
Specifies the name of a variable used to retrieve the authority granted to the group profile for newly-created objects. In CL programs, the variable has a length of 10 characters. The special value of *NONE, *CHANGE, *ALL, *USE, or *EXCLUDE is returned in the variable. If there is no group profile for the specified user, the special value of *NONE is returned. If the group profile is the owner of the objects created by the specified user, the special value returned is *NONE. For more information on this parameter, see the CRTUSRPRF (Create User Profile) command.

ACGCDE
Specifies the name of a variable used to retrieve the value of the job accounting code assigned to the specified user. In CL programs, the variable has a length of 15 characters. If no job accounting code exists for the user profile, blanks are returned to the user. More information on this parameter is in the Create User Profile (CRTUSRPRF) command description.

MSGQ
Specifies the name of the CL variable that receives the group message queue name. This must be a character variable with a minimum length of 10 characters. If the message queue name has fewer characters than the variable allows, the value is padded on the right with blanks.

MSGQLIB
Specifies the name of a variable used to retrieve the name of the library containing the message queue associated with the specified user. In CL programs, the variable has a length of 10 characters.

OUTQ
Specifies the name of a variable used to retrieve the name of the output queue associated with the specified user. In CL programs, the variable has a length of 10 characters. The special value *DEV or *WRKSTN is returned in the variable.

OUTQLIB
Specifies the name of a variable used to retrieve the name of the library containing the output queue associated with the specified user. In CL programs, the variable has a length of 10 characters. Blanks are returned if the current value for OUTQ is *DEV or *WRKSTN.

TEXT
Specifies the name of a variable used to retrieve the text description of the user profile. In CL programs, this should be a 50-character variable. If there is no text associated with the user profile, blanks are returned in the CL variable.

PWDCHGDAT
Specifies the name of a variable used to retrieve the date of the last time the password for the specified user was changed. In CL programs, the variable has a length of 6 characters. The date is returned in the form YYMMDD. If the user does not have a password change date, blanks are returned.

USRCLS
Specifies the name of a variable used to retrieve the user class for the specified user. In CL programs, the variable has a length of 10 characters. The special value of *USER, *SYSOPR, *PGMR, *SECADM, or *SECOFR is returned in the variable.

ASTLVL
Specifies the assistance-level. The special value of *SYSVAL, *BASIC, *INTERMED, or *ADVANCED is returned as the variable.

SPCENV
Specifies the name of a variable for the starting environment for the specified user. In CL programs, the variable has a length of 10 characters. The special value of *SYSVAL, *NONE, or *S36 is returned in the variable.

CURLIB
Specifies the name of the variable used to retrieve the name of the job's default library for the specified user. In CL programs, the variable has a length of 10 characters. A value of *CRTDFT is returned in the variable if no current library exists for this user.

INLMNU
Specifies the name of a variable used to retrieve the name of the user's first menu when the specified user signs on the system. In CL programs, the variable has a length of 10 characters. For more information on this parameter, see the CRTUSRPRF (Create User Profile) command.

INLMNULIB
Specifies the name of the variable used to retrieve the library name containing the initial menu. In CL programs, the variable has a length of 10 characters.

LMTCPB
Specifies the name of a variable used to retrieve the value for the limits to which users can change their user profiles and run commands. In CL programs, the variable has a length of 10 characters. The special value of *NO, *YES, or *PARTIAL is returned in the variable.

DLVRY
Specifies the name of a variable used to retrieve the message control delivery value for the specified user profile. In CL programs, the variable has a length of 10 characters. The special value of *NOTIFY, *BREAK, *HOLD, or *DFT is returned in the variable.

SEV
Specifies the name of a variable used to retrieve the message control severity level for the specified user. In CL programs, the variable has a length of (2 0) characters.

PRTDEV
Specifies the name of a variable used to retrieve the name of the printer device for the specified user. In CL programs, the variable has a length of 10 characters. A value of *SYSVAL is returned if the printer device name is from the system value QPRTDEV. A value of *WRKSTN is returned if the printer device name is from the printer device assigned to the user's work station.

ATNPGM
Specifies the name of a variable used to retrieve the name of the ATTN key handling program for the specified user. In CL programs, the variable has a length of 10 characters. A value of *SYSVAL or *NONE is returned.

ATNPGMLIB
Specifies the name of a variable used to retrieve the name of the library containing the ATTN key handling program for the specified user. In CL programs, the variable has a length of 10 characters. If *NONE is the current value of ATNPGM, blanks are returned in the variable.

USROPT
Specifies the name of a variable used to retrieve the list of user option values for the specified user. In CL programs, the variable has a length of 240 characters. The special value *NONE or a list of values is returned in the variable.

DSPSGNINF
Specifies the name of a variable used to retrieve the display sign-on information display indicator for the specified user. In CL programs, the variable has a length of 7 characters. The special value of *SYSVAL, *YES, or *NO is returned in the variable.

PWDEXPITV
Specifies the name of a variable used to retrieve the password expiration interval for the specified user. In CL programs, the variable specified must be packed (5 0) in length. The value returned is either a value ranging from 1 through 366, 0, if it is *SYSVAL, or -1 if it is *NOMAX.

PWDEXP
Specifies the name of a variable used to retrieve the password expired indicator for the specified user. In CL programs, the variable has a length of 4 characters. The special value of *YES or *NO is returned in the variable.

STATUS
Specifies the name of a variable used to retrieve the status of the specified user. In CL programs, the variable has a minimum length of 10 characters. The special value of *ENABLED or *DISABLED is returned.

PRVSIGN
Specifies the name of a variable used to retrieve the previous sign-on date and time for the specified user. In CL programs, the variable has a length of 13 characters. The date and time are returned in the form CYYMMDDHHMMSS. If the user does not have a previous sign-on date and time, blanks are returned.

NOTVLDSIGN
Specifies the name of a variable used to retrieve the number of sign-on attempts that were not valid for the specified user. In CL programs, the variable specified must be packed (11 0) in length.

LMTDEVSSN
Specifies the name of a variable used to retrieve the limit device sessions indicator for the specified user. In CL programs, the variable has a length of 7 characters. The special value of *SYSVAL, *YES, or *NO is returned in the variable.

KBDBUF
Specifies the name of a variable used to retrieve the keyboard buffering value for the specified user. In CL programs, the variable has a length of 10 characters. The special value of *SYSVAL, *NO, *TYPEAHEAD, or *YES is returned in the variable.

LANGID
Specifies the name of a variable that is used to retrieve the language identifier for the specified user. The value returned is either *SYSVAL or the 3-character language identifier. If *SYSVAL is returned, the language identifier for the user is determined by the QLANGID system value. In CL programs, the variable has a length of 10 characters.

CNTRYID
Specifies the name of a variable used to retrieve the country or region identifier for the specified user. The value returned is either *SYSVAL or the 2-character country or region identifier. If *SYSVAL is returned, the country or region identifier for the user is determined by the QCNTRYID system value. In CL programs, the variable has a length of 10 characters.

CCSID
Specifies the name of a variable used to retrieve the coded character set identifier (CCSID) for the specified user. The value returned is either a 5-digit value or a value of -2 if it is *SYSVAL. If *SYSVAL is returned, the CCSID for the user is determined by the QCCSID system value. In CL programs, this should be a decimal variable length of (5 0).

SRTSEQ
Specifies the name of a variable used to retrieve the sort sequence table for the specified user. The value returned is one of the following: *HEX, *LANGIDUNQ, *LANGIDSHR, *SYSVAL, or the 10-character table identifier. If *SYSVAL is returned, the table identifier for the user is determined by the QSRTSEQ system value.

SRTSEQLIB
Specifies the name of a variable used to retrieve the sort sequence table library for the specified user. The value returned is the 10-character library identifier. The variable is set to blanks unless a sort sequence table name is specified.

OBJAUD
Specifies the name of a 10-character variable used to retrieve the object auditing value for the specified user. The special value of *NONE, *CHANGE, or *ALL, as specified on the Change User Audit (CHGUSRAUD) command, is returned in the variable. When less than 10 characters are returned, the variable is padded on the right with blanks.

AUDLVL
Specifies the name of a variable used to retrieve the object auditing level for the specified user. In CL programs, the variable has a length of 640 characters. The format returned is a list of a maximum of 64 object auditing level entries, with each entry 10 characters long. If there are fewer than 64 object auditing level entries in the list, the remaining entries are padded on the right with blanks. If the user has no object auditing levels, the first entry contains the value of *NONE followed by blanks. If the user has object auditing levels, one or more of the following special values, as specified in the Change User Audit (CHGUSRAUD) command, is returned in the variable: *CMD, *CREATE, *DELETE, *JOBDTA, *OBJMGT, *OFCSRV, *PGMADP, *SAVRST, *SECURITY, *SERVICE, *SPLFDTA, or *SYSMGT.

The object auditing level list is returned in the following format:

Entry-1

   Object auditing level CHAR(10)

Entry-2

   Object auditing level CHAR(10)
    .
    .
    .

Entry-64

   Object auditing level CHAR(10)
GRPAUTTYP
Specifies the name of a variable used to retrieve the type of authority to be granted to the group profile for newly-created objects. In CL programs, the variable has a length of 10 characters. The special value of *PRIVATE or *PGP is returned in the variable.

SUPGRPPRF
Specifies the name of a variable used to retrieve the supplemental group profiles for the specified user. In CL programs, the variable has a length of 150 characters. The format returned is a list of up to 15 supplemental group profiles, with each entry 10 characters long. If there are fewer than 15 supplemental groups in the list, the remaining entries are padded on the right with blanks. If the user has no supplemental groups, the first entry contains the value of *NONE followed by blanks.

The supplemental group profiles are returned in the following format:

Entry-1

   Supplemental group profile CHAR(10)
Entry-2

   Supplemental group profile CHAR(10)
    .
    .
    .
Entry-15

   Supplemental group profile CHAR(10)
UID
Specifies the name of a variable used to retrieve the user ID number (uid) for the specified user. In CL programs, this should be a decimal variable length of 10 0.

GID
Specifies the name of a variable used to retrieve the group ID number (gid) for the specified user. In CL programs, this should be a decimal variable length of 10 0. The value returned is either a 10-digit value or a value of 0 if the gid number is *NONE. The variable must be a 10-digit value with no decimal positions.

SETJOBATR
Specifies the name of a variable used to retrieve the job attributes set from the LOCALE path name of the specified user. In CL programs, the variable has a length of 160 characters. The format returned is a list of up to 16 job attributes that are set, with each entry 10 characters long. If there are fewer than 16 attributes in the list, the remaining entries are padded on the right with blanks. If no attributes are set from the locale path name for the user, the first entry contains the value of *NONE followed by blanks.

CHRIDCTL
Specifies the name of a variable used to retrieve the character identifier control for the specified user. In CL programs, this variable should have a length of 10 characters. The special values of *DEVD, *JOBCCSID, or *SYSVAL are returned in the variable. If *SYSVAL is returned, the CHRID control for the user is determined by the QCHRIDCTL system value.

Example for RTVUSRPRF

CRTUSRPRF  USRPRF(SMITH)  SPCAUT(*SAVSYS *SECADM)
  MAXSTG(*NOMAX)  PTYLMT(4)  INLPGM(*NONE)
  MSGQ(QGPL/SMITHMQ)  OUTQ(QGPL/QSMITH)
  TEXT('John Smith User Profile')

The user specifies the above command.

When user Smith calls a CL program containing the following:

DCL     &UNAME      *CHAR 10
DCL     &URIGHT     *CHAR 100
DCL     &IPGM       *CHAR 10
DCL     &IPGMLB     *CHAR 10
DCL     &UMSGQ      *CHAR 10
DCL     &UMSQLB     *CHAR 10
DCL     &USED       *CHAR 10
RTVUSRPRF  USRPRF(*CURRENT)  STGUSED(&USED)
  RTNUSRPRF(&UNAME)  SPCAUT(&URIGHT)  INLPGM(&IPGM)
  INLPGMLIB(&IPGMLB)

The following values are returned:

 &UNAME      'SMITH      '
 &URIGHT    |'*SAVSYS   *SECADM   (       ) ...    |
            |____________100 characters____________|
 &IPGM       '*NONE      '
 &IPGMLB     '           '

Error messages for RTVUSRPRF

*ESCAPE Messages

CPF2203
User profile &1 not correct.
CPF2204
User profile &1 not found.
CPF2213
Not able to allocate user profile &1.
CPF2217
Not authorized to user profile &1.
CPF2225
Not able to allocate internal system object.
CPF8134
User profile &4 damaged.