5 pts.
 CPYTOIMPF .txt file shows garbage when viewing on windows
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)   



Software/Hardware used:
ASKED: June 24, 2010  6:57 AM
UPDATED: June 4, 2012  5:31 PM

Answer Wiki:
Look at the From CCSID . . . . . . . . . . . *FILE 1-65533 If 65535 will give you garbage for some fields. try 00037
Last Wiki Answer Submitted:  June 24, 2010  12:32 pm  by  Rickmcd   1,480 pts.
All Answer Wiki Contributors:  Rickmcd   1,480 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

…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

 110,135 pts.

 

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 pts.