Retrieve User Profile (RTVUSRPRF)

Where allowed to run: Compiled CL program or interpreted REXX (*BPGM *IPGM *BREXX *IREXX)
Threadsafe: No
Parameters
Examples
Error messages

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

The parameter prompt text lists the minimum length for the variables next to the appropriate parameters you want to retrieve. For character variables, a single number is shown. For decimal variables, two numbers are shown. The first number indicates the minimum variable length and the second number indicates the minimum number of decimal positions.

Restrictions:

Top

Parameters

Keyword Description Choices Notes
USRPRF User profile Name, *CURRENT Optional, Positional 1
RTNUSRPRF CL var for RTNUSRPRF (10) Character value Optional
SPCAUT CL var for SPCAUT (100) Character value Optional
MAXSTG CL var for MAXSTG (11 0) Decimal number Optional
STGUSED CL var for STGUSED (15 0) Decimal number Optional
PTYLMT CL var for PTYLMT (1) Character value Optional
INLPGM CL var for INLPGM (10) Character value Optional
INLPGMLIB CL var for INLPGMLIB (10) Character value Optional
JOBD CL var for JOBD (10) Character value Optional
JOBDLIB CL var for JOBDLIB (10) Character value Optional
GRPPRF CL var for GRPPRF (10) Character value Optional
OWNER CL var for OWNER (10) Character value Optional
GRPAUT CL var for GRPAUT (10) Character value Optional
ACGCDE CL var for ACGCDE (15) Character value Optional
MSGQ CL var for MSGQ (10) Character value Optional
MSGQLIB CL var for MSGQLIB (10) Character value Optional
OUTQ CL var for OUTQ (10) Character value Optional
OUTQLIB CL var for OUTQLIB (10) Character value Optional
TEXT CL var for TEXT (50) Character value Optional
PWDCHGDAT CL var for PWDCHGDAT (6) Character value Optional
USRCLS CL var for USRCLS (10) Character value Optional
ASTLVL CL var for ASTLVL (10) Character value Optional
SPCENV CL var for SPCENV (10) Character value Optional
CURLIB CL var for CURLIB (10) Character value Optional
INLMNU CL var for INLMNU (10) Character value Optional
INLMNULIB CL var for INLMNULIB (10) Character value Optional
LMTCPB CL var for LMTCPB (10) Character value Optional
DLVRY CL var for DLVRY (10) Character value Optional
SEV CL var for SEV (2 0) Decimal number Optional
PRTDEV CL var for PRTDEV (10) Character value Optional
ATNPGM CL var for ATNPGM (10) Character value Optional
ATNPGMLIB CL var for ATNPGMLIB (10) Character value Optional
USROPT CL var for USROPT (240) Character value Optional
DSPSGNINF CL var for DSPSGNINF (7) Character value Optional
PWDEXPITV CL var for PWDEXPITV (5 0) Decimal number Optional
PWDEXP CL var for PWDEXP (4) Character value Optional
STATUS CL var for STATUS (10) Character value Optional
PRVSIGN CL var for PRVSIGN (13) Character value Optional
NOTVLDSIGN CL var for NOTVLDSIGN (11 0) Decimal number Optional
LMTDEVSSN CL var for LMTDEVSSN (7) Character value Optional
KBDBUF CL var for KBDBUF (10) Character value Optional
LANGID CL var for LANGID (10) Character value Optional
CNTRYID CL var for CNTRYID (10) Character value Optional
CCSID CL var for CCSID (5 0) Decimal number Optional
SRTSEQ CL var for SRTSEQ (10) Character value Optional
SRTSEQLIB CL var for SRTSEQLIB (10) Character value Optional
OBJAUD CL var for OBJAUD (10) Character value Optional
AUDLVL CL var for AUDLVL (640) Character value Optional
GRPAUTTYP CL var for GRPAUTTYP (10) Character value Optional
SUPGRPPRF CL var for SUPGRPPRF (150) Character value Optional
UID CL var for UID (10 0) Decimal number Optional
GID CL var for GID (10 0) Decimal number Optional
SETJOBATR CL var for SETJOBATR (160) Character value Optional
CHRIDCTL CL var for CHRIDCTL (10) Character value Optional
LCLPWDMGT CL var for LCLPWDMGT (10) Character value Optional
Top

User profile (USRPRF)

Specifies the user profile whose information you want to retrieve. If a variable is specified, it must be 10 characters in length and contain a user name or the value *CURRENT.

*CURRENT
The user profile that is currently running is used.
name
Specify the name of the user profile whose information you want to retrieve.
Top

CL var for RTNUSRPRF (10) (RTNUSRPRF)

Specifies the name of a variable that is used to retrieve the name of the user profile. In CL programs, this should be a 10-character variable. If *CURRENT is specified for the User profile (USRPRF) parameter, the value returned is the currently running user profile name. If a name is specified, that name is returned for this parameter.

Top

CL var for SPCAUT (100) (SPCAUT)

Specifies the name of a variable that is used to retrieve the list of special authorities the user has. In CL programs, this should be a 100-character variable. The format returned is a list of up to 10 entries. Each entry is 10 characters in length and each entry contains a special authority. 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.

Top

CL var for MAXSTG (11 0) (MAXSTG)

Specifies the name of a variable that is used to retrieve the maximum amount of auxiliary storage that can be assigned to store permanent objects owned by the specified user. In CL programs, this should be a decimal variable length of (11 0). 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 no decimal positions.

Top

CL var for STGUSED (15 0) (STGUSED)

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

Top

CL var for PTYLMT (1) (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.

Top

CL var for INLPGM (10) (INLPGM)

Specifies the name of a variable that is used to retrieve the name of the initial program that starts when the specified user signs on to the system. In CL programs, this should be a 10-character variable. If no initial program name is associated with the specified user, the value returned in the variable is *NONE.

Top

CL var for INLPGMLIB (10) (INLPGMLIB)

Specifies the name of a variable that is used to retrieve the name of the library that contains the initial program associated with the specified user. In CL programs, this should be a 10-character variable. If there is no initial program associated with the specified user, blanks are returned in the variable.

Top

CL var for JOBD (10) (JOBD)

The name of a variable that is used to retrieve the name of the job description associated with the specified user. In CL programs, this should be a 10-character variable.

Top

CL var for JOBDLIB (10) (JOBDLIB)

Specifies the name of a variable that is used to retrieve the name of the library that contains the job description associated with the specified user. In CL programs, this should be a 10-character variable.

Top

CL var for GRPPRF (10) (GRPPRF)

Specifies the name of a variable that is used to retrieve the name of the group profile. In CL programs, this should be a 10-character variable. If no group profile exists for the specified user profile, a value of *NONE is returned in the variable.

Top

CL var for OWNER (10) (OWNER)

Specifies the name of a variable that is used to retrieve the special value of *USRPRF or *GRPPRF. This parameter The owner of newly created objects. This is either the specified user or the user's group profile. In CL programs, this should be a 10-character variable. If no group profile exists for the specified user profile, the value returned in the variable is *USRPRF.

Top

CL var for GRPAUT (10) (GRPAUT)

Specifies the name of a variable used to retrieve the authority granted to the group profile for newly-created objects. 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, or if the group profile is the owner of the objects the specified user creates, the special value returned is *NONE. In CL programs, this should be a 10-character variable.

Top

CL var for ACGCDE (15) (ACGCDE)

The name of a variable that is used to retrieve the value of the accounting code assigned to the specified user. In CL programs, this should be a 15-character variable. If no accounting code exists for the user profile, blanks are returned.

Top

CL var for MSGQ (10) (MSGQ)

The name of a variable that is used to retrieve the name of the message queue associated with the specified user. In CL programs, this should be a 10-character variable.

Top

CL var for MSGQLIB (10) (MSGQLIB)

Specifies the name of a variable that is used to retrieve the name of the library that contains the message queue associated with the specified user. In CL programs, this should be a 10-character variable.

Top

CL var for OUTQ (10) (OUTQ)

Specifies the name of a variable that is used to retrieve the name of the output queue associated with the specified user. In CL programs, this should be a 10-character variable. The special value *DEV or *WRKSTN is returned in the variable.

Top

CL var for OUTQLIB (10) (OUTQLIB)

Specifies the name of a variable that is used to retrieve the name of the library that contains the output queue associated with the specified user. In CL programs, this should be a 10-character variable. Blanks are returned if the current value for the Output queue (OUTQ) parameter is *DEV or *WRKSTN.

Top

CL var for TEXT (50) (TEXT)

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

Top

CL var for PWDCHGDAT (6) (PWDCHGDAT)

Specifies the name of a variable that is used to retrieve the date when the password for the specified user was last changed. The date is returned in the form YYMMDD. In CL programs, this should be a 6-character variable. If the user does not have a date, blanks are returned.

Top

CL var for USRCLS (10) (USRCLS)

Specifies the name of a variable that is used to retrieve the user class for the specified user. A special value of *USER, *SYSOPR, *PGMR, *SECADM, or *SECOFR is returned in the variable. In CL programs, this should be a 10-character variable.

Top

CL var for ASTLVL (10) (ASTLVL)

Specifies the name of a variable that is used to retrieve the assistance level for the specified user. A special value of *SYSVAL, *BASIC, *INTERMED, or *ADVANCED is returned in the variable. In CL programs, this should be a 10-character variable.

Top

CL var for SPCENV (10) (SPCENV)

Specifies the name of a variable that is the starting environment for the specified user. A special value of *SYSVAL, *NONE, or *S36 is returned in the variable. In CL programs, this should be a 10-character variable.

Top

CL var for CURLIB (10) (CURLIB)

The name of the variable that is used to retrieve the name of the job's default library for the specified user. A value of *CRTDFT is returned in the variable if no current library exists for this user. In CL programs, this should be a 10-character variable.

Top

CL var for INLMNU (10) (INLMNU)

Specifies the name of a variable that is used to retrieve the name of the initial menu that is shown when the specified user signs on to the system. In CL programs, this should be a 10-character variable.

Top

CL var for INLMNULIB (10) (INLMNULIB)

The name of the variable that is used to retrieve the library name that contains the initial menu. In CL programs, this should be a 10-character variable.

Top

CL var for LMTCPB (10) (LMTCPB)

Specifies the name of a variable that is used to retrieve the values for the limits to which users can change their user profiles and run commands. In CL programs, this should be a 10-character variable. A special value of *NO, *YES, or *PARTIAL is returned in the variable.

Top

CL var for DLVRY (10) (DLVRY)

Specifies the name of a variable that is used to retrieve the message control delivery value for the specified user profile. In CL programs, this should be a 10-character variable. The special value of *NOTIFY, *BREAK, *HOLD, or *DFT is returned in the variable.

Top

CL var for SEV (2 0) (SEV)

Specifies the name of a variable that is used to retrieve the message control severity level for the specified user. In CL programs this should be a variable length of (2 0).

Top

CL var for PRTDEV (10) (PRTDEV)

Specifies the name of a variable that is used to retrieve the name of the printer device for the specified user. In CL programs, this should be a 10-character variable. 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.

Top

CL var for ATNPGM (10) (ATNPGM)

Specifies the name of a variable that is used to retrieve the name of the Attention key handling program for the specified user. In CL programs, the variable has a length of 10 characters. A value of *SYSVAL if the attention key handling program is from system value QATNPGM. A value of *NONE is returned if no Attention key handling program was specified for this user.

Top

CL var for ATNPGMLIB (10) (ATNPGMLIB)

Specifies the name of a variable that is used to retrieve the name of the Attention key handling program library for the specified user. In CL programs, this should be a 10-character variable. If *NONE is the current value for the Attention program (ATNPGM) parameter, blanks are returned in the variable.

Top

CL var for USROPT (240) (USROPT)

Specifies the name of a variable that is used to retrieve the list of values for user options for the specified user. In CL programs, this should be a 240-character variable. The special value of *NONE or a list of values is returned in the variable.

Top

CL var for DSPSGNINF (7) (DSPSGNINF)

Specifies the name of a variable that is used to retrieve the sign-on information display indicator for the specified user. In CL programs, this should be a 7-character variable. The special value of *SYSVAL, *YES, or *NO is returned in the variable. If *SYSVAL is returned, the display sign-on information indicator is from the system value QDSPSGNINF.

Top

CL var for PWDEXPITV (5 0) (PWDEXPITV)

Specifies the name of a variable that is 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 number ranging from 1 through 366, 0 if it is *SYSVAL, or -1 if it is *NOMAX. If 0 is returned (*SYSVAL), then the password expiration interval is from the system value QPWDEXPITV.

Top

CL var for PWDEXP (4) (PWDEXP)

Specifies the name of a variable that is used to retrieve the password expired indicator for the specified user. In CL programs, this should be a 4-character variable. The special value of *YES or *NO is returned in the variable.

Top

CL var for STATUS (10) (STATUS)

The name of a variable that is used to retrieve the status of the specified user profile. In CL programs, this should be a 10-character variable. The special value of *ENABLED or *DISABLED is returned in the variable.

Top

CL var for PRVSIGN (13) (PRVSIGN)

Specifies the name of a variable that is used to retrieve the previous sign-on date and time for the specified user. The date and time are returned in the form CYYMMDDHHMMSS. In CL programs, this should be a 13-character variable. If the user has not signed on previously, blanks are returned.

Top

CL var for NOTVLDSIGN (11 0) (NOTVLDSIGN)

Specifies the name of a variable that is 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.

Top

CL var for LMTDEVSSN (7) (LMTDEVSSN)

Specifies the name of a variable that is used to retrieve the limit device sessions indicator for the specified user. The special value of *SYSVAL, *YES, or *NO is returned in the CL variable. If *SYSVAL is returned, the limit device sessions indicator is from the system value QLMTDEVSSN. In CL programs, this should be a 7-character variable.

Top

CL var for KBDBUF (10) (KBDBUF)

Specifies the name of a variable that is used to retrieve the keyboard buffering value for the specified user. The special value of *SYSVAL, *NO, *TYPEAHEAD, or *YES is returned in the CL variable. If *SYSVAL is returned, the keyboard buffering value is the same as the system value QKBDBUF. In CL programs, this should be a 10-character variable.

Top

CL var for LANGID (10) (LANGID)

Specifies the name of a variable that is used to retrieve the language identifier for the specified user. The special value *SYSVAL or the language identifier is returned in the variable. If *SYSVAL is returned, the language identifier for the user is determined by the QLANGID system value. In CL programs, this should be a 10-character variable.

Top

CL var for CNTRYID (10) (CNTRYID)

Specifies the name of a variable that is used to retrieve the country or region identifier for the specified user. The special value *SYSVAL or the country or region identifier is returned in the variable. If *SYSVAL is returned, the country or region identifier for the user is determined by the QCNTRYID system value. In CL programs, this should be a 10-character variable.

Top

CL var for CCSID (5 0) (CCSID)

Specifies the name of a variable that is used to retrieve the coded character set identifier (CCSID) for the specified user. A 5-digit value is returned or, if the system value QCCSID is used to determine the CCSID for the user, a value of -2 is returned. In CL programs, this should be a decimal variable length of (5 0).

Top

CL var for SRTSEQ (10) (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.

Top

CL var for SRTSEQLIB (10) (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.

Top

CL var for OBJAUD (10) (OBJAUD)

The name of a 10-character variable that is 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 the user of this command does not have either *ALLOBJ or *AUDIT special authority, *NOTAVL is returned. When less than 10 characters are returned, the variable is padded on the right with blanks.

Top

CL var for AUDLVL (640) (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. If the user of this command does not have either *ALLOBJ or *AUDIT special authority, the first entry contains the value *NOTAVL followed by blanks.

Top

CL var for GRPAUTTYP (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.

Top

CL var for SUPGRPPRF (150) (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)

Top

CL var for UID (10 0) (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).

Top

CL var for GID (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 is *NONE. The variable must be a 10-digit value with no decimal positions.

Top

CL var for SETJOBATR (160) (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.

Top

Character identifier control (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 value of *DEVD, *JOBCCSID, or *SYSVAL is returned in the variable. If *SYSVAL is returned, the CHRID control for the user is determined by the QCHRIDCTL system value.

Top

CL var for LCLPWDMGT (10) (LCLPWDMGT)

Specifies the name of a variable used to retrieve local password management for the specified user. In CL programs, this variable should have a length of 10 characters. The special value of *YES or *NO is returned in the variable.

Top

Examples

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

If the SMITH user profile is created using 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)

This command retrieves the user profile information for the job's current user profile and returns the information into the following CL program variables:

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

Top

Error messages

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