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 |
What is difference between bind by copy and bind by reference?
What is the purpose of FRCDTA keyword?
Hi guys. Im in AS/400(RPGLE,CLP) from last 1 year.Now i wan to upgrade my Knowledge in AS/400. Suggest me some new fields & courses which falls under AS/400. Waiting for your quick Response.
What is ment by record level identifier?
HOW DO YOU DISPLAY A DISPLAYFILE AT OTHER WORKSTATION? CAN WE MOVE A PHYSICAL FILE? WITHOUT MOVING A FILE?
Anybody know the difference of primary file and full procedural file
how to convert date format from one format to another i think in CL/400 its CVTDAT,Please tell in RPG/400 sir not in RPGILE
3. Given the DOS Specification below and the following information: • Indicator 50 is off • No records have been written to the subfile What will be the result if the EXFMT operation code is performed on the record format CTLR? A R SUBFL A DESCRIP 101 6 1ODSPATR(UL) A DFT(’NOT FOUND’) A R CTLR SFLCTL(SUBFL) A N50 SFLDSP A SFLDSPCTL A SFLINZ A 67 SFIJEND A SFLSIZ(13) A SFLPAG(12) A ACCOUNTNO 100 S 10 a.) Only AccountNo will display b.) SUBFL will be initialized with 13 blank records c.) An I/O exception error will occur d.) The screen will display 12 records with ‘NOT FOUND’
why we do STRSRVJOB in batch debugging in as400
we are sending data of physical file to screen design and it is showing no record why?
A particular job executing on the iS is not behaving as expected and is operating in an environment in which it can be debugged. What commands would you use to debug and observe the program?
I know whole thing ab't Arrays related to declaration..can anyone tell me what exactly use of array or anyone faced a situation where he found use of array must....