Hi Rick

I think you have a couple parameters that won't work together - this command can be a little confusing with this.

Also, what release are you running on? This command got changed a few times at new release time. For example, older releases did not have STMFCCSID - only STMFCODPAG.

Also, look at the recovery in your message - lots of information that might help

Try prompting your command at a command line and see what parameters you really have - use F9 from the prompt to see everything.

I am not sure why your command is getting the message - the following command worked fine at the command line.

CPYTOIMPF FROMFILE(QTEMP/CUSTCDT)
TOSTMF(custcdt.csv)
MBROPT(*REPLACE)
STMFCCSID(*PCASCII)
RCDDLM(*CRLF)
RMVBLANK(*BOTH)
ADDCOLNAM(*SQL)

OH YEAH - be sure to put %trim() around the stmf variable, unless that variable is varying length and not fed by a fixed-length variable.

HTH
Vern

On 12/10/2015 2:26 PM, Rick Mason wrote:
Darren,
I keep getting the following error:
The copy did not complete for reason code 1.
Reason code 1 = the ccsid or code page value is not valid.

Any ideas?
Thanks
On Dec 10, 2015 2:58 PM, <darren@xxxxxxxxx> wrote:

The CL command, CPYTOIMPF

Example from an RPG program:

cmd= 'CPYTOIMPF FROMFILE(QTEMP/UR5006V) '
+ 'TOSTMF(''' + Stmf + ''') '
+ 'MBROPT(*REPLACE) '
+ 'STMFCCSID(*PCASCII) '
+ 'RCDDLM(*CRLF) '
+ 'RMVBLANK(*BOTH) '
+ 'ADDCOLNAM(*SQL) '



From: Rick Mason <rmason62@xxxxxxxxx>
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Date: 12/10/2015 02:47 PM
Subject: ASCII DELIMITED TEXT FILES
Sent by: "MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxx>



Hi,
What would the most efficient way of downloading/exporting ibm i files
(large and small) to ascii delimited text files?
Thanks
Rick
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.




--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.




This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].