Change Cleanup (CHGCLNUP)
Where allowed to run: All environments (*ALL) Threadsafe: No |
Parameters Examples Error messages |
The Change Cleanup (CHGCLNUP) command allows you to specify cleanup options controlling which objects on the system are to be deleted automatically. The cleanup options control the following:
- whether the cleanup operation is allowed
- when the cleanup operation is run each day
- which objects are cleaned up
Refer to the following parameter descriptions for a list of the objects that are cleaned up.
- User messages (USRMSG)
- System and workstation msgs (SYSMSG)
- Critical system messages (CRITSYSMSG)
- Job logs and system output (SYSPRT)
- System journals and logs (SYSLOG)
If cleanup is active when this command is used, the new values may or may not be used, depending on how far along the cleanup is. If cleanup is not active when this command is entered, the new values specified for this command are used the next time cleanup is started with the Start Cleanup (STRCLNUP) command or as described in the Basic system operations topic collection in the IBM i Information Center at http://www.ibm.com/systems/i/infocenter/.
Restriction: You must have all object (*ALLOBJ), security administrator (*SECADM), and job control (*JOBCTL) special authorities to use this command.
Top |
Parameters
Keyword | Description | Choices | Notes |
---|---|---|---|
ALWCLNUP | Allow cleanup | *SAME, *YES, *NO | Optional |
STRTIME | Time cleanup starts each day | Time, *SAME, *SCDPWROFF, *NONE | Optional |
USRMSG | Number of days to keep | Element list | Optional |
Element 1: User messages | 1-366, *SAME, *KEEP | ||
SYSMSG | System and workstation msgs | 1-366, *SAME, *KEEP | Optional |
CRITSYSMSG | Critical system messages | 1-366, *SAME, *KEEP | Optional |
SYSPRT | Job logs and system output | 1-366, *SAME, *KEEP | Optional |
SYSLOG | System journals and logs | 1-366, *SAME, *KEEP | Optional |
JOBQ | Job queue | Single values: *SAME Other values: Qualified object name |
Optional |
Qualifier 1: Job queue | Name | ||
Qualifier 2: Library | Name, *LIBL, *CURLIB | ||
JRNRCVSIZ | Journal receiver size | 1-1000000000, *SAME, *KEEP | Optional |
CALITM | Office calendar items | 1-366, *SAME, *KEEP | Optional |
RUNPTY | Run priority | 1-99, *SAME | Optional |
Top |
Allow cleanup (ALWCLNUP)
Specifies whether the cleanup operation can be run on the system. If ALWCLNUP(*YES) is specified, cleanup can be started with the Start Cleanup (STRCLNUP) command or as described in the Basic system operations topic collection in the IBM i Information Center at http://www.ibm.com/systems/i/infocenter/. Also, if ALWCLNUP(*YES) is specified, you can change the cleanup operation by retrieving the program QEZUSRCLNP with the Retrieve CL Source (RTVCLSRC) command, changing the source, and compiling the CL program with the Create CL Program (CRTCLPGM) command.
- *SAME
- The existing value does not change. The initial value is *NO, but is set to *YES during a scratch install.
- *YES
- Cleanup can be run on this system.
- *NO
- Cleanup cannot be run on this system.
Top |
Time cleanup starts each day (STRTIME)
Specifies the time the cleanup operation starts each day.
- *SAME
- The time of day does not change. The initial value is 220000.
- *SCDPWROFF
- The cleanup starts at the time of the scheduled power off. The power off takes place when the cleanup finishes, whether or not the cleanup was successfully completed.
- *NONE
- No cleanup start time is scheduled. The cleanup batch jobs are not submitted.
- time
- Specify the time of day when daily cleanup starts in the hhmmss format, where hh = hours, mm = minutes, and ss = seconds.
The time can be specified with or without a time separator:
- Without a time separator, specify a string of 4 or 6 digits (hhmm or hhmmss) where hh = hours, mm = minutes, and ss = seconds.
- With a time separator, specify a string of 5 or 8 digits where the time separator specified for your job is used to separate the hours, minutes, and seconds. If you enter this command from the command line, the string must be enclosed in apostrophes. If a time separator other than the separator specified for your job is used, this command will fail.
Top |
User messages (USRMSG)
Specifies whether messages on the user profile message queues are cleaned up. This function deletes messages on the user message queues that have remained on the system longer than the number of days specified.
- *SAME
- The number of days does not change. The initial value is 7 days.
- *KEEP
- Messages are not deleted; they are kept.
- 1-366
- Specify the number of days messages are kept before they are deleted.
Top |
System and workstation msgs (SYSMSG)
Specifies whether messages on the QSYSOPR message queue and on work station message queues are cleaned up. The cleanup function deletes messages on the QSYSOPR message queue and the work station message queues that have remained on the system longer than the number of days specified.
- *SAME
- The number of days does not change. The initial value is 4 days.
- *KEEP
- Messages are not deleted; they are kept.
- 1-366
- Specify the number of days to keep messages before they are deleted.
Top |
Critical system messages (CRITSYSMSG)
Specifies whether the cleanup function deletes messages on the QSYSMSG message queue (if it exists) that have remained on the system longer than the number of days specified.
- *SAME
- The number of days does not change. The initial value is to not delete any messages (*KEEP).
- *KEEP
- Messages are not deleted; they are kept.
- 1-366
- Specify the number of days to keep messages before they are deleted.
Top |
Job logs and system output (SYSPRT)
Specifies whether job logs and other system output are cleaned up.
To prevent this output from being mixed with the user's output, the output queue of the printer file for job logs (QPJOBLOG) is changed to QUSRSYS/QEZJOBLOG to receive the job log. The output queue of printer files QPSRVDMP, QPPGMDMP, and QPBASDMP is changed to QUSRSYS/QEZDEBUG. All entries in QEZJOBLOG and QEZDEBUG that are older than the number of days specified on this parameter are deleted. This also removes pending job logs for jobs that completed more than the specified number of days ago.
If the cleanup operation is ended, the output queues named QEZJOBLOG and QEZDEBUG will continue to be used for job logs, service dumps, and program dumps.
- *SAME
- The number of days does not change. The initial value is 7 days.
- *KEEP
- Job logs and other system output are not deleted; they are kept.
- 1-366
- Specify the number of days to keep job logs and other system output before they are deleted. This affects pending job logs as well as spooled job logs.
Top |
System journals and logs (SYSLOG)
Specifies that system journals, history files, problem log files, and the alert database are cleaned up (deleted).
Journal receivers that are cleaned up:
Journal receivers that are used for one of the following system journals and are older than the number of days specified on this parameter are deleted.
- QAOSDIAJRN
- Journal for DIA files
- QDSNX
- Journal for DSNX logs
- QSNADS
- Journal for SNADS files
- QSXJRN
- Journal for problem databases
- QPFRADJ
- Journal for performance adjustment data
- QACGJRN
- Journal for job accounting data
- QX400
- OSI Message Services
- QCQJMJRN
- Journal for Managed System Services
- QO1JRN
- Journal for Application Enabler OFC files
- ADJRNL0
- Journal for application program driver files
- QSNMP
- Journal for SNMP
- QLYJRN
- Journal for Application Development Manager Transactions
- QLYPRJLOG
- Journal for project logs
- QMAJRN
- Journal for work order requests
- QZMF
- Journal for QMSF job
- QASOSCFG
- Journal for SOCKS configuration file.
- QSZRAIR
- Journal for Registered Application Information Repository.
- QLZALOG
- Journal for license management.
Note: The journal receiver for job accounting (QACGJRN) is cleaned up only if Operational Assistant creates the journal.
History files that are cleaned up:
History files that meet both the following conditions are deleted:
- History files that are older than the number of days specified on this parameter.
- History files named QSYS/QHST*.
Problem log files and entries that are cleaned up:
Problem log entries older than the number of days specified on this parameter are deleted. The Delete Problem (DLTPRB) command is run to delete the problem log entries. When the DLTPRB command is run, the number of days specified on this parameter is used for the Days (DAYS) parameter of the DLTPRB command.
Note: If the number of days specified on this parameter is less than the number of days specified for the system value QPRBHLDITV (Problem Log Hold Interval), the value for QPRBHLDITV is used for problem log cleanup.
In addition to the problem log entries being deleted, the following problem log files in the QUSRSYS library are reorganized:
Note: The following files are in library QUSRSYS.
QASXCALL QASXFRU QASXNOTE QASXPROB QASXPTF QASXYMP QASXEVT
Alert database entries that are cleaned up:
Alert database entries older than the number of days specified on this parameter are deleted. The Delete Alert (DLTALR) command is run to delete the alert database entries. When the DLTALR command is run, the number of days specified on this parameter is used for the Days (DAYS) parameter of the DLTALR command.
In addition to the alert database entries being deleted, the file QUSRSYS/QAALERT is reorganized.
Program temporary fixes (PTFs) that are cleaned up:
- PTF save files and cover letters for previous releases are deleted if library QSMU does not exist on the system. If library QSMU exists on the system, no PTF save files and cover letters are cleaned up.
- Temporary objects with the following names are deleted:
- QPZA000000 through QPZA999999
- QPZR000000 through QPZR999999
- QPZ1* and QPZ2* exit programs
- QAPZ* physical files in library QUSRSYS are reorganized to remove deleted records.
- For each PTF group, levels that exceed the PTFGRPLVL service attribute are deleted (lowest levels are deleted).
- Delete PTF groups for releases older than the current OS (only deleted if status is "Not applicable").
- *SAME
- The number of days does not change. The initial value is 30 days.
- *KEEP
- System journals and system logs are not deleted.
- 1-366
- Specify the number of days to keep system journals and system logs before they are deleted.
Top |
Job queue (JOBQ)
Specifies the name and library of the job queue to which the cleanup batch jobs are submitted.
Single values
- *SAME
- The job queue does not change. The initial value is *LIBL/QCTL.
Qualifier 1: Job queue
- name
- Specify the name of the job queue to which cleanup batch jobs are submitted.
Qualifier 2: Library
- *LIBL
- All libraries in the job's library list are searched until the first match is found.
- *CURLIB
- The current library for the job is used to locate the job queue. If no library is specified as the current library for the job, QGPL is used.
- name
- Specify the name of the library where the job queue is located.
Top |
Journal receiver size (JRNRCVSIZ)
Specifies a number of kilobytes (KB) of storage. Each 1000 KB specifies 1,024,000 bytes of storage space. 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.
OA also automatically detaches receivers that are older than the number of days you have specified for the System journals and logs (SYSLOG) parameter.
Journal receivers are deleted only after they have been detached longer than the number of days specified for the SYSLOG parameter.
- *SAME
- The journal receiver size does not change. The initial value is 5000 KB.
- 1-1919999
- Specify a journal receiver size in kilobytes (KB) of storage. If this value is exceeded when OA automatic cleanup is run, the journal receiver will be detached.
Top |
Top |
Run priority (RUNPTY)
Specifies the run priority for the job. Run priority is a value ranging from 1 (highest priority) through 99 (lowest priority), that represents the importance of the job when it competes with other jobs for machine resources. This value represents the relative (not absolute) importance of the job. For example, a routing step with a run priority of 25 is not twice as important as one with a run priority of 50.
- *SAME
- The run priority does not change. The initial value is 55.
- 1-99
- Specify the run priority that the routing step uses.
Top |
Examples
Example 1: Keeping User Messages During Cleanup
CHGCLNUP ALWCLNUP(*YES) USRMSG(*KEEP) STRTIME(0700)
This command changes the cleanup options so that user messages are kept and not deleted when cleanup is performed. This command sets cleanup start time at 7:00 A.M.
Example 2: Cleanup of System Journals and System Logs
CHGCLNUP ALWCLNUP(*YES) SYSMSG(10) SYSLOG(3)
This command changes the cleanup options so that system messages are kept for ten days, and system journals and system logs are kept for three days, before being deleted.
Example 3: Changing Run Priority of Cleanup Job.
CHGCLNUP RUNPTY(50)
This command changes the run priority to 50.
Example 4: Changing Journal Receiver Size
CHGCLNUP JRNRCVSIZ(6000)
This changes the journal receiver size limit to 6000 KB of storage, (6144000 bytes).
Top |
Error messages
*ESCAPE Messages
- CPF1E2A
- Unexpected error in QSYSSCD job.
- CPF1E2B
- Power scheduler and cleanup options not found.
- CPF1E3C
- Job queue &2/&1 not found.
- CPF1E3D
- Library &1 for JOBQ parameter not found.
- CPF1E32
- Not authorized to change cleanup options.
- CPF1E33
- Cleanup options or power schedule in use by another user.
- CPF1E99
- Unexpected error occurred.
Top |