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
…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
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!