Retrieve Cleanup (RTVCLNUP)

The Retrieve Cleanup (RTVCLNUP) command retrieves a cleanup operation value for use in a CL or REXX program. The value is returned (copied) to the specified CL variable in the program.

Parameters

Keyword Description Choices Notes
ALWCLNUP CL var for ALWCLNUP (4) Character value Optional
STRTIME CL var for STRTIME (10) Character value Optional
USRMSG CL var for USRMSG (5) Character value Optional
SYSMSG CL var for SYSMSG (5) Character value Optional
CRITSYSMSG CL var for CRITSYSMSG (5) Character value Optional
SYSPRT CL var for SYSPRT (5) Character value Optional
SYSLOG CL var for SYSLOG (5) Character value Optional
JOBQ CL var for JOBQ name (10) Character value Optional
JOBQLIB CL var for JOBQ library (10) Character value Optional
RUNPTY CL var for RUNPTY (2 0) Decimal number Optional
JRNRCVSIZ CL var for JRNRCVSIZ (7 0) Decimal number Optional
CALITM CL var for CALITM (5) Character value Optional

CL var for ALWCLNUP (4) (ALWCLNUP)

Specifies the name of the CL variable that receives the allow cleanup value. The variable named has a minimum length of 4 characters. A '*YES' is returned if the cleanup operation is allowed to run. Otherwise, an '*NO' is returned.

CL var for STRTIME (10) (STRTIME)

Specifies the name of the CL variable that receives the time cleanup starts each day. The variable named has a minimum length of 10 characters. A special value of '*NONE' or '*SCDPWROFF,' or the start time is returned.

CL var for USRMSG (5) (USRMSG)

Specifies the name of the CL variable that receives the value for cleaning up user messages on user profile message queues. The variable named has a minimum length of 5 characters. The special value *KEEP or the number of days user messages are kept before they are deleted is returned.

CL var for SYSMSG (5) (SYSMSG)

Specifies the name of the CL variable that receives the value for cleaning up messages on the QSYSOPR message queue and on work station message queues. The variable named has a minimum length of 5 characters. The special value *KEEP or the number of days system messages are kept before they are deleted is returned.

CL var for CRITSYSMSG (5) (CRITSYSMSG)

Specifies the name of the CL variable that receives the value for cleaning up messages on the QSYSMSG message queue. The variable named has a minimum length of 5 characters. The special value *KEEP or the number of days critical system messages are kept before they are deleted is returned.

CL var for SYSPRT (5) (SYSPRT)

Specifies the name of the CL variable that receives the value for cleaning up job logs and other system output. The variable named has a minimum length of 5 characters. The special value *KEEP or the number of days job logs are kept before they are deleted is returned.

CL var for SYSLOG (5) (SYSLOG)

Specifies the name of the CL variable that receives the value for cleaning up system journals, history files, problem log files, alert database, and program temporary fixes. The variable named has a minimum length of 5 characters. The special value *KEEP or the number of days system journals and system logs are kept before they are deleted is returned.

CL var for JOBQ name (10) (JOBQ)

Specifies the name of the CL variable that receives the name of the job queue to which the cleanup batch jobs are submitted. The variable named has a minimum length of 10 characters. The name of the job queue under which cleanup batch jobs are run is returned.

CL var for JOBQ library (10) (JOBQLIB)

Specifies the name of the CL variable that receives the library name of the job queue to which the cleanup batch jobs are submitted. The variable named has a minimum length of 10 characters.

CL var for RUNPTY (2 0) (RUNPTY)

Specifies the name of the CL variable that receives the 2-digit value, ranging from 1 through 99, that is the run (or processing) priority for routing steps that are part of the job. For additional information on run priority, refer to this parameter description in the CHGJOB (Change Job) command. The variable must be a 2-digit decimal variable specified with no decimal positions.

CL var for JRNRCVSIZ (7 0) (JRNRCVSIZ)

Specifies the name of the CL variable that receives the value for the journal receiver size ranging from 1 through 1,919,999 (KB). When the size of the space for the journal receiver is larger than the size specified by this value, Operational Assistant (OA) automatic cleanup function will detach it. The variable must be an 7-digit decimal variable specified with no decimal positions.

CL var for CALITM (5) (CALITM)

In V5R1 and later releases, this parameter is not supported.

Examples

Example 1: Retrieving Number of Days Messages are Kept

DCL   VAR(&UMSGDAYS)  TYPE(*CHAR)  LEN(5)
RTVCLNUP   USRMSG(&UMSGDAYS)

These commands retrieve the number of days that user messages are kept before being deleted.

Example 2: Retrieving Time Cleanup Operation Starts

DCL   VAR(&CLNUPTIME)  TYPE(CHAR)  LEN(10)
RTVCLNUP   STRTIME(&CLNUPTIME)

These commands retrieve the time that the cleanup operation starts.

Example 3: Retrieving Run Priority

DCL   VAR(&RPTY)  TYPE(*DEC)  LEN(2 0)
RTVCLNUP  RUNPTY(&RPTY)

This command retrieves the run priority for the cleanup job. The run priority number is copied into the CL variable &RPTY. The variable must be a 2-digit decimal variable with no decimal positions.

Example 4: Retrieving Journal Receiver Size

DCL   VAR(&JRNSIZ) TYPE(*DEC)  LEN(7 0)
RTVCLNUP  JRNRCVSIZ(&JRNSIZ)

This command retrieves the journal receiver size for the cleanup job. The journal receiver size is copied into the CL variable &JRNSIZ. The variable must be a 7-digit decimal variable with no decimal positions.

Error messages

*ESCAPE Messages

CPF1E2B
Power scheduler and cleanup options not found.
CPF1E33
Cleanup options or power schedule in use by another user.
CPF1E99
Unexpected error occurred.