Great idea, but it fails with the following msg:
CHGPF FILE(QTEMP/SQLTEMP4) CCSID(37)
Explicitly specified CCSIDs or file restrictions present.
File SQLTEMP4 in QTEMP not changed.
Message ID . . . . . . : CPD322D
Date sent . . . . . . : 03/28/12 Time sent . . . . . . : 17:33:24
Message . . . . : Explicitly specified CCSIDs or file restrictions present.
Cause . . . . . : The CCSID(s) for file SQLTEMP4 in library QTEMP can not be
changed because of reason 4. The reason codes are:
1 - The file was created with explicitly specified CCSIDs.
2 - There are logical files built over the physical file that prevent the
3 - The file is a logical file.
4 - The file is a program described file.
I need a flat file with a large record length to send to Excel, so I CRTPF FILENAME rcdlen(3000)
Is there a better method?
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of DeLong, Eric
Sent: Wednesday, March 28, 2012 5:17 PM
To: Midrange Systems Technical Discussion
Subject: RE: help with CCSID - how to ensure a file can be successfully sent to root directory using CPYTOIMPF
What is system value QCCSID set to on your server? If I were a gambler, I'd bet yours is set to 65535.
That particular value is painful on modern IBM midrange systems, since it makes dealing with import and export data less automatic...
I would also mention that changing that system value seems to be safe for most systems, especially those here in the US, where CCSID 00037 is most common.
For this specific case, you might just try this before your CPYTOIMPF command...
CHGPF FILE(QTEMP/SQLTEMP3) CCSID(037)
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Stone, Joel
Sent: Wednesday, March 28, 2012 4:53 PM
To: 'Midrange Systems Technical Discussion'
Subject: help with CCSID - how to ensure a file can be successfully sent to root directory using CPYTOIMPF
I am trying to
CPYTOIMPF FROMFILE(QTEMP/SQLTEMP3) TOSTMF(&PATH) +
MBROPT(*ADD) STMFCODPAG(*PCASCII) +
This is successful IF the CCSID = 37, but fails if the CCSID is 65535.
Shown below are some files I have been playing with. (fails defined as garbage when opened in MS Excel).
File Library Type Coded
File Set Id
QADSPFFD QTEMP P 37
RJSQMQRY QTEMP P 37
SQLTEMP2 QTEMP P 37
SQLTEMP3 QTEMP P 37
SQLTEMP4 QTEMP P 65535
WORKHEADER QTEMP P 37
WORK1WFLDS QTEMP P 37
WORK2WFLDS QTEMP P 65535
X QTEMP P 37
CRTPF rcdlen(3000) will NOT allow CCSID set to 37, it only allows *job.
Even if I force
CRTPF FILE(QTEMP/X) RCDLEN(3000)
The CCSID is STILL 65535, which will fail when using CPYTOIMPF.
1) How can I create a file that will be successful with CPYTOIMPF?
2) How can I force a file to be created with CCSID 65535
This outbound email has been scanned for all viruses by the MessageLabs Skyscan service.
For more information please visit http://www.symanteccloud.com