IFS – records in file are not in original sequence

5 pts.
Tags:
AS/400
IFS
I am not a AS400 developer. I work on an RS6000 (Unix) but we use IFS (NFS) to exchange interface files. Has anyone on V5R4 experienced having the records, in a large file, be out of order when a file from a libray is copied to an IFS directory? I am experiencing this and have been told that IBM did make a change about 2 yrs ago to speed things up and it initially had a problem and was patched. The change, as explained to me, is, with large files, the data transfer protocal will automatically switch to transfer blocks instead of bytes. That's all fine with me. But why would they not put the file back together in the proper sequence? Please help point us in the right direction or help me ask my engineers better questions? Thanks daves

Answer Wiki

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

Theory – If the file beeing copied has not been reorganized or copied in key order, it will not be in key order when copied sequentially . Either reorg the file first to be in key order then copy to IFS to see if that corrects the problem.

==============================================================

I’m not aware of any definition of CPYTOIMPF that says order will be maintained. Nor can I think of any way to guarantee order in any case without either processing by key or through an ORDER BY clause. Since CPYTOIMPF uses neither, I’d say that you probably should use a method that guarantees order if order is important.

Tom

Discuss This Question: 2  Replies

 
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
  • NullFields
    My experience with the CPYF is that it copies based on the primary keys in the order of the SENDING file. If there are no keys, it uses the Relative Record Number (RRN). Maybe it works the same with CPYTOIMPF?
    880 pointsBadges:
    report
  • TomLiotta
    One potential complication is that CPYTOIMPF is based internally on SQL. (You can see evidence running under debug.) SQL doesn't guarantee an order without an ORDER BY clause. And there is no access to ORDER BY with CPYTOIMPF (AFAIK). 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