35 pts.
Q:
cpytoimpf CSV file showing garbage
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
ASKED: Jul 2 2009  12:51 AM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
35 pts.
A:
 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0
  • Bookmark and Share
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
Last Answered: Jul 2 2009  1:54 PM GMT by VGP   35 pts.
Latest Contributors: Philpl1jb   25660 pts., Teandy   4495 pts.
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _