Troubleshooting
Problem
To begin, it's important to understand what spooled files are, and where they are stored. Spooled files are not objects, but are instead stored as members of physical files in the QSPL library. Depending on your level of system activity, and how quickly spooled files are created and deleted on your system, the spooled files are distributed to various physical files. The names of physical files begin with Q04079N or Q00512N. So when you look at an OUTQ, you are not seeing a list of objects, but instead you are seeing what are essentially pointers to members in one or more of these physical files.
Occasionally, one of these members, or an entire physical file, can become damaged. When that happens, the spooled file in that member, or all of the spooled files in that physical file, are lost. If the spooled file data for those spooled files has already been saved, then it can be restored after recovery. For information on saving and restoring spooled files, refer to Saving and Restoring Spooled Files.
| Caution: When experiencing issues with damaged files in the QSPL library it is highly recommended to discuss the issue with an IBM support representative before following the instructions in this document. These procedures should only be done by an experienced system administrator or operator. Failure to heed this warning could result in the wrong physical files being deleted. |
Symptom
- CPF4182: File <PrinterFileName> in library <LibraryName> member or device not opened.
Previous messages might include message. - CPF9845: Error occurred while opening file <PrinterFileName>.
- CPF2528: Job log not written to output queue because of CPF4182.
- CPF3207: Member not added. Errors occurred.
- CPF3213: Members for file <PhysicalFileName> more than maximum allowed.
- CPF5257: Failure for device or member *N file <PrinterFileName> in library <LibraryName>.
- CPF0937: Machine check not recoverable. Error code X'0000'.
- CPF4510: File <PrinterFileName> in library <LibraryName> member or device *N was not closed.
- RNQ1217: Error message <ErrorMessage> appeared during <OPEN or CLOSE> (C G D F)
- MCH3202: Permanent machine error <ErrorID>. Internal dump identifier (ID) <DumpID>.
- MCH3203: Function error <ErrorID> in machine instruction. Internal dump identifier (ID) <DumpID>.
- MCH1604: System object <PhysicalFileName><MemberName> damaged. Internal dump ID <DumpID>. Error class 2, device number X'00A0'.Note: The error class and device number may vary.
- CPF8118: Full damage on spooled file <PhysicalFileName>member <MemberName>.
- CPF9999: Function check. CPF8118 unmonitored by QSPRESET at statement *N, instruction X'019A'.Note: Instruction may vary.
- MCH3402: Tried to refer to all or part of an object that no longer exists.
- CPF3272: Damage ignored for file <PhysicalFileName> in QSPL.
Cause
Environment
Diagnosing The Problem
Resolving The Problem
| o | End and restart the job. The internal algorithm used to determine which physical file the spooled file data is stored in involves the job number. By ending and restarting the job, a different job number is assigned and a different, non-damaged physical file may be selected. |
| o | If the damaged member name is known, use the Remove Member (RMVM) command to remove the damaged member from the physical file: RMVM FILE(QSPL/Q04079Nxxx) MBR(member-name) |
| o | If the name of the damaged physical file in QSPL library is known, change the Maximum members parameter for the physical file to the current total number of members so the physical file cannot be used. Note: Setting the Maximum members (MAXMBRS) parameter should force the use of another physical file in QSPL library, but may result in jobs receiving message CPF3213: Members for file &1 more than maximum allowed, and CPF3207: Member not added. Errors occurred. DSPFD FILE(QSPL/Q04079Nxxx) TYPE(*MBRLIST) OUTPUT(*) Type B in the Control field and press <ENTER> Note the Total number of members value CHGPF FILE(QSPL/Q04079Nxxx) MAXMBRS(# of current members) |
| o | If the damaged physical file name starts with Q04079N, force the system to use the Q00512N physical files. CHGPRTF FILE(*ALL/*ALL) DFRWRT(*NO) SCHEDULE(*IMMED) By changing the printer files on the system to Defer write *NO and Spooled output schedule to *IMMED, the spooled file data will be stored in the physical files that begin with Q00512N. The 512 refers to the record size of the physical file, and a fixed portion of the record is used by system for record-keeping. Therefore, using a 512 record length is not quite as space-efficient as a 4079 record length; however, it will circumvent the issue until the damaged can be corrected. Note: Once the damage has been corrected, the printer files should be changed back to their default settings: CHGPRTF FILE(*ALL/*ALL) DFRWRT(*YES) SCHEDULE(*FILEEND) |
| o | **Use only as a last resort.** Reclaim all unused members in the physical files in QSPL library. This may reclaim some of the members that are causing the issue. WARNING: Performing this step can cause severe spooling performance delays as it removes all unused members from the physical files in QSPL library. Reusing members to store the spooled file data is much faster than having to create a new member. This option should only be considered if creating spooled files is more important than performance. RCLSPLSTG DAYS(*NONE) |
The final solution will involve deleting the physical file that is damaged. There is no way to fix the damage. All spooled files that happen to be stored in that physical file will be lost. There is no way to determine which spooled files are stored in the damaged physical file. If there are any important spooled files, they should be saved before performing these actions.
The first method of re-creating the damaged physical file is to delete the damaged database file in QSPL, end all of the writers, clean up the QSPL database, create a special data area called QSPLDTAARA, IPL the system, and then delete the QSPLDTAARA data area.
| 1. | Delete the damaged physical file: DLTF FILE(QSPL/Q04079Nxxx) Where Q04079Nxxx represents the name of the damaged physical file in the QSPL library. Note: This step is optional, and will need to be skipped, if the damaged QSPL physical file is not known. And as deleting the file will cause the loss of all spooled files stored in it, it is considered unnecessarily harmful if a recent save of spooled files has not been performed. |
| 2. | End all of the writers on the system, or end the QSPL subsystem. NOTE: Do one or the other, not both. ENDWTR WTR(*ALL) OPTION(*IMMED) -or- ENDSBS SBS(QSPL) OPTION(*IMMED) |
| 3. | Clean up the QSPL database by using the Start Spool Reclaim (STRSPLRCL) command for all output queues: STRSPLRCL OUTQ(*ALL) ASPGRP(*) |
| 4. | IPL the system with the QSPLDTAARA data area in place: Create the data area: CRTDTAARA DTAARA(QSPL/QSPLDTAARA) TYPE(*CHAR) LEN(3) VALUE(YYN) AUT(*ALL) IPL the system: PWRDWNSYS OPTION(*IMMED) RESTART(*YES) IPLSRC(B) After the IPL, delete the data area: DLTDTAARA DTAARA(QSPL/QSPLDTAARA) |
| 5. | If the temporary work around to change all printer files to use the Q00512Nxxx database files in QSPL, run the following command to return the printer files to the default setting. CHGPRTF FILE(*ALL/*ALL) DFRWRT(*YES) SCHEDULE(*FILEEND) |
Rebuilding the QSPL Library
| 1. | Put the system to restricted state: ENDSBS SBS(*ALL) OPTION(*CNTRLD) DELAY(600) |
| 2. | Rename the QSPL library to QSPL2: RNMOBJ OBJ(QSPL) OBJTYPE(*LIB) NEWOBJ(QSPL2) |
| 3. | Delete the QSPL2 library: DLTLIB LIB(QSPL2) |
| 4. | Change the IPL attributes to clear the job queues, output queues, and incomplete job logs and change the Spooled File Recovery to *REMOVE: CHGIPLA SPLFRCY(*REMOVE) CLRJOBQ(*YES) CLROUTQ(*YES) CLRINCJOB(*YES) |
| 5. | Immediately do a MANUAL IPL. When presented with the IPL Options screen, verify Clear job queues, Clear output queues, and Clear incomplete job logs is set to Y and Spooled File Recovery is *REMOVE. If not, change them accordingly. NOTE: After the IPL, change the IPL attributes back to Spooled File Recovery as *DETACH. |
| 6. | Once the IPL completes, QSPL library will have been rebuilt and there should not be any errors when generating spooled files. |
| 7. | Change the IPL attributes and printer files again to the initial settings: CHGIPLA SPLFRCY(*REMOVE) CHGPRTF FILE(*ALL/*ALL) DFRWRT(*YES) SCHEDULE(*FILEEND) |
Historical Number
16100118
Was this topic helpful?
Document Information
Modified date:
31 January 2026
UID
nas8N1019624