In a particular program one file is used where override
command is applied to a file, now this program calls
another program where we want to use the same file but
without override.How it can be done?
Answer Posted / david lex
The question is somewhat ambiguous. The OVRDBF command
contains MANY parameters, all of which have a very
different impact on the file.
Very often the OVRDBF is used to access the same file in a
different library, but that is not always the case.
It is also of note that the TYPE of programs are not
mentioned - are they CL, CLLE, OPM RPG, ILE RPG, COBOL...
or a combination? It does make a difference, specifically
as to whether you even need to take this approach.
The most common scenario is a CL overriding a file/Lib1 to
file/Lib2 then calling an RPG/Cobol pgm. But in this
scenario the override is generally required in the
RPG/Cobol program.
Answer one does not address the override. Unless using
embedded SQL or some non standard technique, one must
include the file being used in the F-specs regardless of an
override scenario.
Answer two (with nuances) will have the desired effect, but
there are other things to consider before merely removing
the override.
Do you need the override in place upon return to the
calling program? If you do, you'll have to re-issue the
override.
Additionally, the call level on the DLTOVR command must be
the same that was on the original OVRDBF issued, otherwise
it will fail (albeit silently) with something
like 'Override not found at specified level'.
Defaults on the system in question also come into play.
What is your default activation group?
There are a variety of ways to handle this, each with
strengths & weaknesses.
Embedded SQL, new activation groups, using a QUALIFIED file
opening, call stored procedures, exported procedures in a
service program, etc.
It VERY much depends on the original intention of the file
override to begin with.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Hi Viewers can any body explain me how to update and ahange the already existed data in physical file using subfile ? please explain me with the code if possible?
what is file information data structure?
How Chain operation copies the record's data to the input buffer for the program?
what is the difference between do while and do until?
what was the robotech rpg?
What is the difference between iter and do?
can any one help in hawkeye and turnover or any change management system plzzzzz or send the documents to my mail id :gvsp.as4@gmail.com
how can you display specific subfile page on the screen in unequal subfile?
How to write record if no field or the field are different in physical file in rpgle ?
How do u design a physical file, when you have 2 Unique fields like for eg in A student file student ID and student examination no both are unique
what is a rpg?
what is data area and how it is used in rpg program ?
When we have a file with Duplicate records and I want to read the unique record from the file. For example a file containing Emp Name as 'Ram' and there are 3 entries of it. So how to read a unique record from File?
how do you use commitment control in rpg?
How to define data area in RPG program? In which scenario multi occurrence DS is use in AS400?