Copy File from PC file to Iseries- Change record length.

5 pts.
Tags:
CPYFRMIMPF
IBM iSeries
I am trying to copy a PC text file and copy it in a wrapping format to an ISeries DB File with a single 128 length field. I am trying CPYFRMIMPF, CPYFRMPCD, CPYFRMSTRMF and they all seem to cut off part of the record. Can this be done short of counting characters in a record?

Software/Hardware used:
Windows, ISeries

Answer Wiki

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

Sounds like you are trying to copy a long character string into a flat file and for a single input record you want to output multiple records.
I do not believe you can do that in one step.
You would have to copy it to a longer file and then use SQL or a program to split it into multiple records.
Another option would be to copy into a file that had a variable length field,

Discuss This Question: 1  Reply

 
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
    Maybe the simplest option is to use FTP. You can FTP on the same system from a streamfile into a flat file, and, IIRC, FTP will do that kind of wrapping. (I haven't needed to disturb lines like that, so I haven't actually seen such wrapping.) Tom
    125,585 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