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 - 4051 days ago
Last viewed on: 28 Mar 2024 (7023 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: 11 years 1 months 3 days 2 hours 15 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: 11 years 1 months 2 days 19 hours 35 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