This example shows how to retrieve user profile information by using the Retrieve User Profile (RTVUSRPRF) command.
In the following CL procedure, a Retrieve User Profile(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: