185 pts.
 What is ovrdbf?
Hi all , Actually I know OVRDBF is used to override database file . After OVRDBF we have to use OPENQRY command But My question is , What purrpose this OVRDBF file created and After creation it will accessible to all the programs at a single time , Means can we access OVRDBF file in multiple programs at a time?

PLz explain me in detail....



Software/Hardware used:
ASKED: February 9, 2011  12:28 PM
UPDATED: March 3, 2011  11:54 AM

Answer Wiki:
This may help you, <a href="http://www.ibm.com/eserver/iseries/infocenter. "> iSeries INFO Center</a> Also, <a href="http://itknowledgeexchange.techtarget.com/itanswers/ovrdbf-5/">TomLiotta</a> answered your question for the same question back on Sept 20, 2010.
Last Wiki Answer Submitted:  February 9, 2011  10:01 pm  by  HMSSL2K   3,175 pts.
All Answer Wiki Contributors:  HMSSL2K   3,175 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

OVRDBF is often used for ‘redirection’. A program can be compiled over a specific file description. You can execute OVRDBF to cause the program to open a different file description than the one that was used for the compile.

Example usage — Many commands have an option to output to an *OUTFILE. The outfile will be based upon a file description that IBM supplies in QSYS. The DSPUSRPRF command is one of those. Its help text says that the outfile will be based on the file named QADSPUPO in QSYS if you ask for *OBJOWN.

You can use QADSPUPO as the name of the file in your program when you compile. And when you run, you have the DSPUSRPRF command send its output to a different file name, perhaps in QTEMP, and then you execute OVRDBF QADSPUPO to redirect your program to open the new file instead of QADSPUPO.

The result is that the format of QADSPUPO is used to compile the program, and the format of your new file matches when your program opens it. You don’t need to have a copy of the new file when you compile because it’s going to match correctly when you open the file.

Other uses of OVRDBF include changing some attributes of the file at run-time, including even changing the device type in some cases.

One attribute that is often overridden is the SHARE() attribute. By default, files are created as SHARE(*NO). The ‘sharing’ refers to the ODP (Open Data Path) that gets created when a file is opened in a program. See What is Open Data path in OVRDBF? for some discussion.

Tom

 108,135 pts.

 

OVRDBF cmd, with respect to your question will override another file over a file. Overide scope will determine the accessibility of the overriden file to other programs.

Override scope can be –
Activation group
Job
Call level

Based on the scope defined the file may be accessible.

 50 pts.