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?
Answers were Sorted based on User's Feedback
Answer / syam
Before calling another program use DLTOVR fileName LVL(*).
LVL(*) = Call Level (*CALLLVL)
If I am wrong pls correct
Is This Answer Correct ? | 15 Yes | 1 No |
Answer / syam
Sekhar214's answer is correct....Thanks
DLTOVR FILE(Filename) LVL(*JOB)
Is This Answer Correct ? | 3 Yes | 0 No |
Answer / 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 |
Answer / sekhar214
Depends on the coding. If that is an interactive JOB and OVERSCOPE os on *JOB level, you have delete the overrides.
DLTOVR *ALL LVL(*JOB)
If that is a batch job , no impact on other jobs.
Is This Answer Correct ? | 0 Yes | 1 No |
Suppose File Name(MyFile) is overriding to File(MyFile1) in
one Cl program (i.e ClPGM1) by
Ovrdbf File(MyFile) ToFile(MyLib/MyFile1)
Now You are calling the program(i.e RPG1)in Cl Pgm(CLPGM1)
and want to use same file(MyFile1)
So Just Declare the File in F- spec
F MyFile1 IE F Disk
.
.
.
In this way we can use the file
Hope you got your answer!
Thanks!!
Is This Answer Correct ? | 3 Yes | 13 No |
How to handle duplicate error handling in RPG?
wat is curser?? and its types???
The RP program is displaying records 11 times .But there are 10 records in a pf.(ie last record is displayed twice).How to display records only 10 times?
HOW TO DEBUG A BATCH JOB WHEN IT IS IN MESSAGEWAIT(MSWG) STATUS.I KNOW THE STEPS FOR BATCH DEBUGGING,BUT IM CONFUSING WITH WHEN WE SUBMIT ANY JOB FOR BATCH DEBUG WE PUT IN HELD STATE.SO HERE ALSO DO SAME THING OR ANY OTHER WAY,PLEASE HELP ME....
I have two sessions S1 & S2 under this 3 jobs(say j1,j2,j3 under session S1) And 2 jobs(Say j4, j5 Under session S2)is running. How many QTEMP & how many LDA will create for the same.
Is it possible to call a subfile using CL. IF yes.. kindly help me out with explanation...?
What is the name of default out queue when user logs inn to syatem with valid profile?
How to sort an array in descending in RPG
1.I have a Physical file with 100 records, No duplicates exists, all are Unique,But while i am running Runqry utility i am getting only 80 records..What could be the reason?
can i use unique key in LF
Have a join logical file with more than one members with different record formats. So how can we read the different members from this file and also how we can read the different record format from the join logical?
am 2010 passed out . can any one tell me which course is good to put 2+fake .guide me