CPYTOIMPF .txt file shows garbage when viewing on windows

5 pts.
Tags:
CCSID
CL Commands
CMD Source
Integrated File System (IFS)
CPYTOIMPF .txt file shows garbage on IFS when viewing on windows but when using wrklnk it looks fine, please help.  below is cmd than used.

 /* copy the file to stream file and put delimiter */       CPYTOIMPF  FROMFILE(&FILENAM) TOSTMF(&STRFILE) +                        MBROPT(*REPLACE) STMFCODPAG(*PCASCII) +                    RCDDLM(*CRLF) STRDLM(*NONE) FLDDLM(&DLM)   

Answer Wiki

Thanks. We'll let you know when a new response is added.

Look at the
From CCSID . . . . . . . . . . . *FILE 1-65533
If 65535 will give you garbage for some fields. try 00037

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    ...when using wrklnk it looks fine... Through WRKLNK, select option 5 to display the file. Does it look fine? (Apparently, the answer is "Yes.") When the display panel first opens, is there any message at the bottom? If so, what is the message? (Especially, what message identifier is it?) If you delete the streamfile and run your process again so that the streamfile is created by the CPYTOIMPF command, does the problem still appear? What is your OS version/release? Tom
    125,585 pointsBadges:
    report
  • Satvik
    CPYTOIMPF .txt file shows garbage on IFS when viewing on windows but when using wrklnk it looks fine, please help.Below is the query I am using CPYTOIMPF FROMFILE(BIN815PA) TOSTMF(&PATHDAT) + MBROPT(*ADD) FROMCCSID(*FILE) + STMFCODPAG(285) RCDDLM(*CRLF) + STRDLM(*NONE) FLDDLM(*TAB) CPYTOIMPF FROMFILE(BIN815PB) TOSTMF(&PATHDAT) + MBROPT(*ADD) FROMCCSID(*FILE) + STMFCODPAG(285) RCDDLM(*CRLF) + STRDLM(*NONE) FLDDLM(*TAB) CCSID of the file (BIN815PA) is 285 and the file has all char fields. but the other file (BIN815PB) has CCSID as 65535, Both files are copied to to the IFS folder (&PATHDAT). Issue is when viewing using WRKLNK the merged text file Look OK, but in the windows the text file has garbage values. Kindly help!
    35 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following