Troubleshooting
Problem
This document provides instructions for removing old jobs from the IBM® System i™ products without removing the spooled files associated with those jobs.
Resolving The Problem
This document provides instructions for removing old jobs from the IBM® System i™ products without removing the spooled files associated with those jobs.
Jobs that are in OUTQ status, or rather those jobs that have ended and that have associated spooled files, can be removed from the system by using the Change Job (CHGJOB) command with the Spooled file action (SPLFACN) parameter set to *DETACH.
First, use the Work with User Jobs (WRKUSRJOB) command on a particular user profile with the parameter Status of user jobs (STATUS) set to *OUTQ, so only those jobs that have ended and have associated spooled files will show up in the list. For example, use the following command:
WRKUSRJOB USER(QSECOFR) STATUS(*OUTQ)
Select Option 2 (Change) next to each job in the list that should be removed from the system. Press the Page Down key to continue typing 2 on other jobs if there are several screens of jobs in the list. After you have selected all of the jobs that should be removed, type SPLFACN(*DETACH) on the command line and then press the Enter key, for example:
| Work with User Jobs S1012345 12/08/06 12:18:05 Type options, press Enter. 2=Change 3=Hold 4=End 5=Work with 6=Release 7=Display message 8=Work with spooled files 13=Disconnect Opt Job User Type -----Status----- Function 2 AA QSECOFR BATCH OUTQ QPRTJOB QSECOFR PRINT OUTQ 2 QYRMJOBSEL QSECOFR BATCH OUTQ 2 QYRMJOBSEL QSECOFR BATCH OUTQ Bottom Parameters or command ===> SPLFACN(*DETACH) F3=Exit F4=Prompt F5=Refresh F9=Retrieve F11=Display schedule data F12=Cancel F17=Top F18=Bottom F21=Select assistance level |
The SPLFACN(*DETACH) parameter will be applied to every job in the list that has been selected with Option 2 (Change). The spooled files associated with those jobs will remain on the system, but they will no longer be associated with the job. Selecting Option 8 (Attributes) on the spooled file will still show the complete job name, but using the Work with Job (WRKJOB) command on that job name will fail with message CPF1070 - Job &3/&2/&1 not found.
Improving System Performance by IPLing the System
Detaching spooled files from a large number of jobs will improve system performance. However, the system must be IPLed to take full effect on the reduction in the number of jobs on the system.
Improving System Performance by Removing Jobs and their Associated Spooled Files
Reducing the number of spooled files on the system can also improve system performance. If a particular job is no longer needed and its spooled files are no longer needed as well, then it is better to end the job and delete the spooled files rather than just detaching the spooled files from that job. Use the End Job (ENDJOB) command or Option 4 (End) from the Work with User Jobs (WRKUSRJOB) command. Then set the Delete spooled files (SPLFILE) parameter to *YES. This procedure can also be done for several jobs at once by running WRKUSRJOB, typing Option 4 (End) next to several jobs and typing SPLFILE(*YES) on the command line.
Historical Number
435236828
Was this topic helpful?
Document Information
Modified date:
18 December 2019
UID
nas8N1014613