0 pts.
 CPYTOIMPF Nightmare
I am using this to transfer data from the S400 to the IFS. The data has to be tab delimited. I am the sending the data to a UNIX box. the problem is I am a getting a carriage return at the end of fields - and it appears to be random. Here is my command CPYTOIMPF FROMFILE(*LIBL/IOBEXT) + TOSTMF('/iobtest1/IOBext.TXT') + MBROPT(*REPLACE) STMFCODPAG(*PCASCII) + RCDDLM(*CRLF) DTAFMT(*DLM) FLDDLM(*TAB) This has to go live later this week. I have spent more time on this little command than on the rest of the application put together (3 RPGs and 2 CLs) Please help somebody

Software/Hardware used:
ASKED: November 8, 2006  12:30 PM
UPDATED: November 9, 2006  10:38 AM

Answer Wiki:
The problem is most likely RCDDLM(*CRLF). This terminates each record with a carriage return and line feed. This is the default for DOS & Windows but if you're sending it to Unix, they only require a line feed, so use RCDDLM(*LF). Depending on the exact machine, you may also need to look at STMFCODPAG(*PCASCII) which again is the default for PC's but may not be ideal for Unix. Code page 37 is US english, 850 is a fairly generic Roman alphabet with other bits added. If you can get a file FROM the target system first, you could put that in place and specify STMFCODPAG(*STMF) to ensure you get the same one they use. Hope this helps.
Last Wiki Answer Submitted:  November 9, 2006  7:41 am  by  Alasdair727   0 pts.
All Answer Wiki Contributors:  Alasdair727   0 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


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