CL Programming

Retrieving User Profile Attributes

Using the Retrieve User Profile Attributes (RTVUSRPRF) command, you can retrieve the attributes of a user profile (except for the password) and place their values in CL variables to control your applications. On this command, you can specify either the 10-character user profile name or *CURRENT.

You can also monitor for escape messages after running the RTVUSRPRF command. See the CL section of the Programming category in the iSeries Information Center for more information.

RTVUSRPRF Example

In the following CL procedure, a RTVUSRPRF command retrieves the name of the user who called the procedure and the name of a message queue to which to send messages for that user:

DCL  &USR  *CHAR  10
DCL  &USRMSGQ  *CHAR  10
DCL  &USRMSGQLIB  *CHAR  10
.
.
.
RTVUSRPRF  USRPRF(*CURRENT)  RTNUSRPRF(&USR)  +
           MGSQ(&USRMSGQ)  MSGQLIB(&USRMSGQLIB)

The following information is returned to the procedure:


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]