override database and logical file

3790 pts.
Tags:
DB2/400
what the main difference between OVRDBF override database in CL and logical file... which one have most advantage...

Software/Hardware used:
as400 v4r5

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: 7  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
    Neither has an advantage. They are two very different types of things used for different kinds of reasons. OVRDBF allows you to substitute one file in place of another file at run-time. Different LFs allow you to use different views or indexes over the same physical file usually at compile-time. Tom
    125,585 pointsBadges:
    report
  • deepu9321
    As Tom mentioned, Both OVRDBF & LF are having their own advantages, If you would like to create a view in runtime, you can use OPNQRYF command. Pradeep.
    4,290 pointsBadges:
    report
  • philpl1jb
    So many questions, so little time. Have you done any research before you ask? Phil Add embedded SQL, embedded dynamic SQL, SQL views to the mix. And consider OVRDBF with OPNQRYF Organizational standards and simplicity and flexibility of code all go into the mix Phil
    51,355 pointsBadges:
    report
  • philpl1jb
    Yes both can be used. But you seem confused. The OVRDBF is used to present a different file (or member) to the RPG program. A logical file delivers the records in a different sequence and or by different selection rules. The rpg program will generally fail if - the file presented to it has a different structure (Recocd Format) - the file presented has a different key structure and is used by the RPG program. Phil
    51,355 pointsBadges:
    report
  • TomLiotta
    why we can use both operation OVRDBF and LF.... Why not? The two are different. They don't do the same things; they don't directly conflict with each other. Tom
    125,585 pointsBadges:
    report
  • pdsathishkumar
    OVRDBF and LF, the both operation retrieve record using Physical file access path, or different access path????
    3,790 pointsBadges:
    report
  • TomLiotta
    both operation retrieve record using Physical file access path, or different access path???? Neither. Those don't retrieve records. They determine where records will be retrieved from. OVRDBF determines that the records will be retrieved through an access path for the file named in the TOFILE() parameter. The file that is overridden to can be a different PF or it can be a LF over the original file or over a different PF. The file that is overridden from can be a PF or a LF. The access path for an LF will be used to retrieve records when a LF is opened. In both cases, the access path might be the same as a PF or different. Access paths can be 'shared' between files. It's often best to arrange files so that access paths are shared. Any access path that is shared will necessarily always be over records from the same PF (or PFs, in the case of joins or unions such as a multi-format LF). 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