cpytoimpf CSV file showing garbage

300 pts.
Tags:
CPYTOIMPF
CSV
IFS
I have an application that does 3 CSV files to import to Excel. All three use the same cpytoimpf program/command, 1 is working correctly and 2 are not. I debugged and do not see a difference. I can view the data just fine with dsplnk on the iSeries/AS/400 but the Excel is all @@@@@@. Does anyone have an idea what could be causing this? Thanks, Gail

Answer Wiki

Thanks. We'll let you know when a new response is added.

If you can, post the command so we can see what it looks like. In the mean time, make sure that the STMFCODPAG parm is set to *PCASCII
================================

The files should have the CVS extension
- Can you open the files using wordpad from the PC?
- Phil
================================
The file did have the CSV extension and I could not open it with excel but did not try workpad.

Here is my command:
CPYTOIMPF FROMFILE(FFX010AF) TOSTMF(‘ + ”” + %trimr(%triml(dirfile))
”” + ‘) MBROPT(*REPLACE) STMFCODPAG(*STMF) RCDDLM(*LF)
DTAFMT(*FIXED) STRDLM(*NONE)

After I asked the question, I registered and then could see the answers for Sally for a TXT file. Randy suggested that I use STMFCODPAG(*STDASCII) and that worked for all 3 programs. I did have to delete or rename the previous file though.

Thanks all, Gail

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following