CPYTOIMPF
95 pts.
0
Q:
CPYTOIMPF
CPYTOIMPF FROMFILE(SARKNS/ENQP003) TOSTMF('C:/Documents and Settings/user/exc.xls') MBROPT(*REPLACE) RCDDLM(*LF) DTAFMT(*iso)


Here I have created a Excel book with name exc.xls , my requirement is to copy all the records from my physical file (sarkns/enqp003) to the desired excel book.

when i run this command I am getting message zero records are copied .


Could u suggest me where I went wrong ?

Thanks in advance .
ASKED: Jul 5 2009  6:58 AM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0
310 pts.
0
A:
 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0
  • AddThis Social Bookmark Button
CPYTOSTMF can copy to a folder on the IFS - the 400rd drive not to your pc
I don't think it can write an xls file .. a comma delimited which excel can pick up -- but not formated.
Phil

===============================================================================

Where I've needed to output comma delimited files, I've built the record(s) into a single-field file, then copied (or FTP'd) the file out with the .csv extension - Excel will pick that up with no additional formatting required.

Copy command can write to IFS:
COPY OBJ('qdls/TempFldr/Insrpt2.xls')
TODIR('qntc/accdc01/InterDocs')
TOCCSID(*CALC) DTAFMT(*BINARY)
REPLACE(*YES))
Last Answered: Jul 10 2009  12:58 AM GMT by Cunninjoe   310 pts.
Latest Contributors: Splat   1070 pts., Philpl1jb   24610 pts.
0
0
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Mcl   2500 pts.  |   Jul 6 2009  3:19PM GMT

This has been discussed before here. Check this link

Hope it helps.

 
0