Retrieve PDG Profile (RTVPDGPRF)

The Retrieve Print Descriptor Group Profile (RTVPDGPRF) command is used in a CL program or REXX procedure to retrieve one or more of the print descriptor group profile values associated with a user profile. The values are returned in the specified CL variables for the desired user.

Restrictions:

  1. The program must have *OBJOPR authority to the command.
  2. The program must have *READ authority to the user's profile.

Parameters

Keyword Description Choices Notes
USER User profile Name, *CURRENT Required, Positional 1
RTNUSER CL var for RTNUSER Character value Optional
PDG CL var for PDG Character value Optional
PDGLIB CL var for PDGLIB Character value Optional
PRTD CL var for PRTD Character value Optional

User profile (USER)

Specifies the user profile name to be checked for its print descriptor group (PDG) profile.

The possible values are:

*CURRENT
Checks the user profile of the user of the current job.
user-name
Specify the user profile to check.

CL var for RTNUSER (RTNUSER)

In control language (CL) programs, specifies the name of the 10-character variable used to get the name of the user profile for which information is requested.

CL var for PDG (PDG)

In control language (CL) programs, specifies the name of the 10-character variable used to get the PDG profile of the user for which information is requested.

CL var for PDGLIB (PDGLIB)

In control language (CL) programs, specifies the name of the 10-character variable used to get the library of the PDG profile of the user for which information is requested.

CL var for PRTD (PRTD)

In control language (CL) programs, specifies the name of the 256-character variable used to get the print descriptor name from the PDG profile of the user for which information is requested.

Examples

Assume a user with *OBJMGT authority entered the following command:

CHGUSRPRF   USER(JWONG)  PDG(*LIBL/TAXFORMS)  PRTD(FORM_C1)

Also assume the program with *OBJMGT authority contains the following commands and declarations:

DCL   VAR(&USER)      TYPE(*CHAR)  LEN(10)
DCL   VAR(&GROUP)     TYPE(*CHAR)  LEN(10)
DCL   VAR(&LIBRARY)   TYPE(*CHAR)  LEN(10)
DCL   VAR(&DESCRIPT)  TYPE(*CHAR)  LEN(256)
RTVPDGPRF   USER(JWONG)  RTNUSER(&USER)  PDG(&GROUP)  PDGLIB(&LIBRARY)
            PRTD(&DESCRIPT)

When the above program is called, the following values are returned:

&USER      'JWONG     '
&GROUP     'TAXFORMS  '
&LIBRARY   'TAXLIB    '
&DESCRIPT  'FORM_C1 ... '

Note: The value returned in variable &DESCRIPT is FORM_C1 followed by 249 blanks.

Error messages

*ESCAPE Messages

CPF2204
User profile &1 not found.
CPF2217
Not authorized to user profile &1.
CPF2247
Internal security object not available. Reason code &1.