Join files using OPNQRYF

2505 pts.
Tags:
AS/400
OPNQRYF
I'm not much familiar with complex OPNQRYF statements. I need to select records from a file say FileA which has a field AccNo. I need to select those accounts whose country code ='002'. Country code comes from another file say FileB. FileB has account number as key. I know this is simple, but I am not able to achieve it.

Answer Wiki

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

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
  • philpl1jb
    Open Query is never easy. If you post your code we'll try to help. Here is an example http://publib.boulder.ibm.com/infocenter/iseries/v5r3/index.jsp?topic=%2Fdbp%2Frbafodynjf.htm
    49,550 pointsBadges:
    report
  • TomLiotta
    Why would you use OPNQRYF in this century? Why not use something at least modern? . You should show us the code you are trying. If you don't show us, we don't know if our examples would be exactly the same as the code that isn't working for you. It'd be a waste of everyone's time. . 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