CPYTOIMPF Nightmare

pts.
Tags:
Application development
CLP
RPG
RPGLE
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

Answer Wiki

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

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.

Discuss This Question:  

 
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

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