95 pts.
 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 .

Software/Hardware used:
ASKED: July 5, 2009  6:58 AM
UPDATED: July 10, 2009  12:58 PM

Answer Wiki:
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 Wiki Answer Submitted:  July 10, 2009  12:58 pm  by  Splat   5,670 pts.
All Answer Wiki Contributors:  Splat   5,670 pts. , philpl1jb   44,190 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

This has been discussed before here. Check this link

Hope it helps.

 2,725 pts.