You could try using CPYTOSTMF instead of CPYTOIMPF.
CPYTOIMPF/CPYFRMIMPF uses the underlying DB2 engine. IBM, starting in V5R3, got fussy
about getting your CCSID correct. In previous releases I think IBM used
to do a CPYTOSTMF then a CPYTOIMPF. Breaking it down
into two tasks is another perversion that has shown some success. However
getting the CCSID right is best bet. It’s when you do things like
creating a temporary file in QTEMP that some utilities requires not to be
externally defined (CRTPF … RCDLEN(###) type of file) that makes it
Hope this helps…
Thanks. I also tried making the To File a 1 field, length = 1000 char field. The command then worked with the exception that there were still double quotes at the beginning and end of each record. LWK.
<i>I also tried making the To File a 1 field, length = 1000 char field. The command then worked with the exception that there were still double quotes at the beginning and end of each record.</i>
When the TOFILE is a database file, it is correct to have it defined with a single non-numeric field. But the quotes indicate either that you had quotes already in your FROMFILE or that you specified parameters incorrectly. Quotes are not going to be removed from the FROMFILE records by CPYTOIMPF.
To get answers about a problem, please show the actual commands that demonstrate the problem.