CPYTOIMPF FROMFILE(&LIB/&FILE) TOFILE(QTEMP/TEMPXLS) +
MBROPT(*ADD) RCDDLM(X'0D') DTAFMT(*DLM) +
STRDLM(*NONE) FLDDLM(X'05') DATFMT(*USA) +
TIMFMT(*USA)
Hex '05' translates to a tab. And then all I had to do was copy to a file with an .xls extension:
CPYTOSTMF +
FROMMBR('/QSYS.LIB/QTEMP.LIB/TEMPXLS.FILE/TEMPXLS.MBR') +
TOSTMF(&STMF) +
STMFOPT(*REPLACE) CVTDTA(*AUTO) +
DBFCCSID(37) STMFCODPAG(850) ENDLINFMT(*LF)
Where &STMF = 'q:homedownloadmyfile.xls'
No comments:
Post a Comment