This document discusses an issue where the Copy Spooled File (CPYSPLF) command receives error message CPF3311, Copy request failed for file &6 in &7, is received because the physical file specified in the TOFILE parameter is not a DBCS file.
Resolving the problem
When using the Copy Spooled File (CPYSPLF) command, the error message CPF3311 - Copy request failed for file &6 in &7 is received. The Cause for message CPF3311 indicates that the copy request failed because the physical file specified in the TOFILE parameter is not a double-byte character set (DBCS) file.
This can occur when copying a spooled file that was generated using an externally described printer file, in other words a printer file generated using Data Description Specifications (DDS), with certain DDS keywords that allow for DBCS.
When this occurs, the resulting spooled file will have spooled file attributes that allow for DBCS. For example:
User specified DBCS data . . . . . . : Y
DBCS Capable . . . . . . . . . . . . : Y
DBCS extension characters . . . . . : Y
This issue can be resolved using one of the following options:
|o||Change the DDS specifications to not use DBCS data, including specifying text fields with a Data Type of A (character) instead of O (DBCS-Open), then recreate the printer file and generate a new spooled file, or|
|o||Use the Create Physical File (CRTPF) command with the User specified DBCS data (IGCDTA) parameter set to *YES to create a physical file that can accept DBCS data, for example:
CRTPF FILE(QGPL/CPYDBCS) RCDLEN(133) IGCDTA(*YES)
TEXT('Physical file for CPYSPLF with IGCDTA(*YES)')