CPYF w/INCREL copying too many records

90 pts.
Tags:
CPYF
iSeries Commands
iseries v5r4
I'm using the following command: CPYF FROMFILE(REIDATA/DESGDTL) TOFILE(ISJN/DESG73133) MBROPT(*ADD) INCREL((*IF DSDID *EQ '73133')) ... in the file I am ending up with records containing both '73133' and '73133-1' in the file.  The field DSDID is the primary key to the file.  In summary it is acting as if it were a LIKE instead of a *EQ.  We've tried it on other files and it happening there also.

 



Software/Hardware used:
iseries v5r4
ASKED: June 21, 2010  2:14 PM
UPDATED: June 21, 2010  11:29 PM

Answer Wiki

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

I dug some more and I found this is not a problem, but a “feature”. I found this article written in 2002 that explains what is going on…

http://www.itjungle.com/guruo/mgo012302-story02.html

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
    Consider coding something like this:
    CPYF FROMFILE(REIDATA/DESGDTL) TOFILE(ISJN/DESG73133) MBROPT(*ADD) INCREL((*IF DSDID *EQ '73133') (*AND DSDID *LT '73133..'))
    It would be better if a variable was used so the last two characters could be hexadecimal value x'41', but the dots are x'4B' which is usually good enough. In short, make any trailing positions be a low enough value that only blanks will be allowed in the result. 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