OVRDBF & OPNQRY – AS/400 question

440 pts.
Tags:
AS/400
OPNQRYF
OVRDBF
AS/400 question: Say, there are 3 programs. RPG 1, RPG2 & RPG 3. I have OVRDBF and OPNQRY which selects only active customer records. I want RPG 1 to use the OPNQRYF output data. I want RPG 2 to use the complete data I want RPG 3 to use the OPNQRYF output data again. This is how it was answered: RPG1 and RPG 3 can use share (*yes) and RPG 2 can use share(*no). Can anyone please tell me if this is correct? Thanks.

Answer Wiki

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

programs are contemporary-nested or sequential?

Discuss This Question: 3  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
  • TomLiotta
    If the interview asked more than two questions about OPNQRYF, I might consider thanking them for the interview and leaving. It's probably not an environment that I'd want to work in. I last used OPNQRYF around 10 years ago, and then it was because I was modifying a program that already had OPNQRYF in it.   OPNQRYF is a System/38 command that was brought to the AS/400 in the beginning. It has been useful, but it long ago became nearly obsolete. There have long been better ways of doing almost everything that it does.   RPG1 and RPG 3 can use share (*yes) and RPG 2 can use share(*no). Can anyone please tell me if this is correct?   I've never tried it. It could be tricky making the overrides effective. It might work. It's probably not how I'd do it, though. Your question 2 is probably related to how I'd do it.   Tom
    125,585 pointsBadges:
    report
  • ToddN2000
    OPNWRYF has gone by the wayside since you can embed SQL. There may still be some legacy code out there that uses it but there are more efficient ways to code today. As for your question I agree with Tom. It might work with a little creative coding of the overrides. If these jobs run in sequence you could DLTOVR before RPG2 runs then OVRDBF before you run RPG3.
    7,865 pointsBadges:
    report
  • TomLiotta
    ...you could DLTOVR before RPG2 runs then OVRDBF before you run RPG3.   Alternatively, the OVRDBF might only be applied before RPG2 and deleted after. It depends on whether or not the file already has the SHARE(*YES) attribute, which is uncommon.   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