Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.
The command below puts the file to IFS but the data is all bad characters. Help please.
CPYTOIMPF FROMFILE(QTEMP/FILEW) TOSTMF('/qdls/jmmtire/filew') MBROPT(*REPLACE) FROMCCSID(*FILE) STMFCCSID(*PCASCII) STMFCODPAG(*STMF) STMFAUT(*FILE) RCDDLM(*LF) DTAFMT(*FIXED) STRDLM(*NONE) STRESCCHR(*NONE)
What does "bad characters" mean? Can you use WRKLNK and option 8 (display attributes) to view the CCSID of the IFS file? Is it CCSID(819) or something else?
Let me guess... you see a bunch of @'s. If so, it's still in EBCDIC. Those are blanks x'40' which is interpreted as @ in ASCII. When you specify *REPLACE and the IFS file already exists, it's CCSID is retained (37).
Chris Ringer