Midrange News for the IBM i Community


Posted by: mpasha
CPYTOIMPF copies data as bad characters. Why?
has no ratings.
Published: 18 Feb 2013
Revised: 23 Feb 2013 - 1639 days ago
Last viewed on: 20 Aug 2017 (3970 views) 

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.

CPYTOIMPF copies data as bad characters. Why? Published by: mpasha on 18 Feb 2013 view comments(2)

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)                           

Return to midrangenews.com home page.
Sort Ascend | Descend

COMMENTS

(Sign in to Post a Comment)
Posted by: bobcozzi
Site Admin ****
Chicagoland
Comment on: CPYTOIMPF copies data as bad characters. Why?
Posted: 4 years 5 months 27 days 7 hours 44 minutes ago

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?

Posted by: Ringer
Premium member *
Comment on: CPYTOIMPF copies data as bad characters. Why?
Posted: 4 years 5 months 27 days 1 hours 4 minutes ago

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