RTVUSRPRF( user_name => '*CURRENT', info_detail => '*ALL' | '*ALLSIMPLE')
The Retrieve User Profile (RTVUSRPRF) User Defined Table Function returns one row with the specified User Profile Description. The information returned is similar to the QSYRUSRI API with format USRI0300.
The User Profile whose information is to be returned. In addition to a user profile, the special value '*CURRENT' may be specified or the SQL Registers: USER, CURRENT_USER, or SYSTEM_USER may be specified.
Specifies the level of detail returned. When *ALLSIMPLE is specified, only the User Profile Status, Last Signon, and Password related information is returned.
select home_dir, group_Profile, curlib, initial_program, initial_program_library INTO :homeDir, :group, :curlib, :inlpgm, :inlpgmLib FROM TABLE( iQuery.RTVUSRPRF( 'RON' )) usr;
|| Data Type
||The name of the object whose description is
||TIMESTAMP||The library name of the object returned (as
specified on the UDTF itself.
||INT||The object type of the object.
||VARCHAR(10)||The *ENABLED or *DISABLED status of the User
||VARCHAR(10)||If the User Profile has no password
associated with it, this column contains *NOPWD otherwise it
||SMALLINT||The frequency of how often password change is required. (in RPG IV, this is an int(5) value)|
||TIMESTAMP||The The date/time the password was last
||The Date on which the password expires.
||The Number of days until the password
expires. (in RPG IV, this is an int(5) value)
||*YES if the password will expire, otherwise
||*YES if the User is shown the previously signon information when they sign onto the system, otherwise *NO.|
||The class assigned to the User Profile. Valid
entries include: *USER, *PGMR, *SYSOPR, *SECADM, and *SECOFR
||The list of special authorities assigned to
the User Profile, including: *ALLOBJ *SECADM *JOBCTL *SPLCTL
*SAVSYS *SERVICE *AUDIT *IOSYSCFG
||The User Profile of the Owner of this User
||VARCHAR(10)||The Group Profile assigned to this User
||VARCHAR(10)||The Authority assigned to the Group Profile
when this user creates an object. Valid entries include:
*NONE, *ALL, *CHANGE, *USE, and *EXCLUDE
||If the User Profile is assigned any
additional group profiles ("Supplemental Groups) the number
of them are returned to this column.
||VARCHAR(165)||If the SUP_GROUP_COUNT is > 0, this column
contains each of the supplemental group profiles. Each Group
Profile occupies 11 bytes so that the list is
||VARCHAR(10)||The User Interface Assistance level for the
User Profile. Valid entries are: *INTERMED, *ADVANCED, and
*BASIC. If *SYSVAL is returned, the the System Value QASTLVL
|CURLIB||VARCHAR(10)||The name of the library that is assigned as the Current Library (*CURLIB) when the user starts a job on the system. If the is no *CURLIB assigned to this User Profile the value *CRTDFT is returned which typically refers to QGPL as the current library.|
||VARCHAR(10)||The name of the initial menu shown tot he
user after signon. If this column returns *SIGNOFF then no
Menu is assigned to the User profile and interactive jobs
will sign off after the initial program runs.
||VARCHAR(10)||The library where the Initial Menu exists. If
the Initial Menu is *SIGNOFF this column returns blanks.
||VARCHAR(10)||The name of the initial program to run when
the User Profile starts a job an interactive job the
system. If no initial program is assigned to the User
Profile this column returns *NONE.
||The library name where the initial program
exists. If the Initial Program is *NONE, then this column
|TEXT_DESCRIPTION||VARCHAR(50)||The text description associated with User
||The Limit Capabilities flag for the User
Profile, then this column returns *YES, When it is not set,
this column returns *NO. When partial limited capabilities
is specified, this column returns *PARTIAL
||The maximum number of 5250 sessions the User
Profile can activate at one time. *YES means the User is
limited to 1 device. *NO means the user is not limited. In
addition, a value of *SYSVAL means the system value
QLMTDEVSSN controls this attribute. In addition, numeric
values (returned as text/character) of 0 thru 9 may be
||The type-ahead buffer property for 5250 jobs
the User Profile starts. *SYSVAL means use the value in the
QKBDBUF System value. *YES means the type-ahead is enabled,
*NO means type-ahead is disabled, and *TYPEAHEAD means the
type ahead is on except for the Attn (Attention) key.
||The maximum storage the user is permitted to own. In RPG IV this is an INT(20) value. Note that a -1 value is returned when *NOMAX is intended. The actual *NOMAX value returned is X' 7FFFFFFFFFFFFFFF'. The numerical value for *NOMAX is: 9223372036854775807|
||The amount of storage the User Profile
currently owns. Note: There is a nice little macro in SQL
iQuery that generates a pie chart that can be viewed or
emailed. To run it, use this command: RUNiQRY
||The highest scheduling priority allowed for
the User Profile. Valid results are 0 to 9. In this context,
the lower the number, the higher the priority.
||The Job Description associated with the
User's Interactive Jobs.
||The library for the Job Description. If there
is no job description, this column returns blanks, but can
also contain *LIBL if that were specified for the job
||VARCHAR(15)||The accounting code associated with the User
||VARCHAR(10)||The Message Queue associated with the user's
|MSGQ_LIBRARY||VARCHAR(10)||The name of the library for the Message
||The delivery for the user's message quque
*NOTIFY, *BREAK, etc.
||SMALLINT||The lowest message severity level that
triggers a break or notification message for the message
queue associated with the User Profile.
||VARCHAR(10)||The Output Queue assigned to jobs the user
||VARCHAR(10)||The output queue library name.
||VARCHAR(10)||The name of the print device.
||VARCHAR(10)||The legacy compatibility flag for the old
System/36 ("S36E") environment. Virtually all users have
*NONE or *SYSVAL for this column which can typically be
||VARCHAR(10)||The name of a program to run when the User
presses the Attn (Attention) key on interactive jobs. This
is normally marked "esc" on modern keyboards.
||VARCHAR(10)||The Attention key program's library name.
|LANGUAGE_ID||VARCHAR(10)||The Language ID for this User. The Language
ID is typically 3-character in length, however *SYSVAL can
be returned indicating that the QLANGID system value is
||VARCHAR(10)||The Country Code assigned to the User. The
Country Code is typically 2-characters, however *SYSVAL can
be returned indicating that the QCNTRYID system value is
|CCSID||INT||The CCSID associated with the User Profile.
When this column returns -2, it means the system value
QCCSID is used.
||VARCHAR(96)||The User custom options. Values include
*CLKWD, *EXPERT, *HLPFULL (full screen helP) *STSMSG,
*NOSTSMSG, *ROLLKEY, *PRTMSG.
|SORT_SEQ_TABLE||VARCHAR(10)||The Sort Sequence table object used to
compare string/text values. Special values that may be
returned include: *HEX, *LANGIDUNQ, *LANGIDSHR, or *SYSVAL
to indicate that sort sequence is derived from the QSRTSEQ
|SORT_SEQ_TABLE_LIBRARY||VARCHAR(10)||The Source Sequence library.
|OBJECT_AUDITING||VARCHAR(10)||The object auditing setting. Valid results include: *NONE, *CHANGE, *ALL, *NOTAVL. The value *NOTAVL is returned if the User running the RTVUSRPRF UDTF does NOT have *ALLOBJ or *AUDIT special authority.|
||VARCHAR(64)||The action audit values for this user profile. The user running the RTVUSRPRF UDTF must have *ALLOBJ or *AUDIT special authority to retrieve this value.|
||VARCHAR(10)||The type of authority assigned to the Group
Profile for objects that the User Profile creates. The valid
results include: *PRIVATE which means the Group Profile is
assigned specific/private authority to the object, while
*PGP means the Group Profile is the primary group for the
objects created by the user profile.
|USER_ID||INT||The internal ID for the User Profile.
|GROUP_ID||INT||The internal ID for the User Profile when it
is also a Group Profile.
||If this User Profile is a Group Profile, *YES
is returned, otherwise *NO is returned.
||If Local Password Management is used for this
User Profile, *YES is returned, otherwise *NO is returned.
||Controls when a User Profile is blocked from
changing their password. *NONE means they can always change
it. *SYSVAL means the System Value QPWDCHGBLK is used to
control this setting. Otherwise a numeric value (as text) is
returned with a value of 0 to 99 to indicate the number of
hours the user has to wait between password changes.
||If User Entitlement is require for feature
code 5052 this column returns *YES, otherwise it returns
||The number of days before the User Profile
expires and the USRPRF_EXPIRATION_ACTION is performed. This
column returns 1 to 366 or if the user profile does not
expire, this column contains 0.
||The date/time this User Profile expires or
NULL if it never expires. This date is calculated by the
||When the User Profile expires, the action to
be taken is returned to this column. Valid results include:
*NONE (nothing will happen, the User Profile will not
expire) *DISABLE (the user profile will have its USER_STATUS
changed to *DISABLED) or *DELETE (the system will attempt to
delete the user profile).
||The Home directory for the User Profile. The
first 1024 bytes of this directory are returned.
||The Locale (pronounced LO-Cal) that contains
the location settings for the User Profile.
||VARCHAR(7)||Normally this column should be blank. If it
contains a valid CPF message ID it represents the error
returned when the UDTF called one of the low-level