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


Please Help Members By Posting Answers For Below Questions

If my rpg program has a date field, what extra care I have to take while compiling that rpg program? If the file is keyed and I have declared the file as well as key list properly in my program. Still am getting an error message like "chain/reade operation is not allowed" what may be the case?

624


what is program status data structure?

1396


is this a rpg channel?

684


We have job which is running as batch. It takes atleast 06 hours to complete tht job. But I wanna do tht job with in 3 hours?

776


how do I declare a minor?

718






can I touch the array during treatments?

762


How to create a login screen using a command instead of display file.... intention is to get a password field on a command..... how do you achieve this...

1320


How would display prime numbers using CL program?

5682


What is the difference between iter and do?

680


1. What is bound-by-call and bound-by-reference? 2. Where and why is *Nomain used? 3. What are the difficulties faced by programmers when using service programs? 4. Explain the different ways of parsing and compiling XML in iSeries.

5431


How can we know running job is batch or interactive?

660


thanks mr.Harshad R Suryawaunshi,i'm new to as400 i think you are telling in rpgile i know only rpg400 if possible can you tell in rpg400

1899


what is the difference between do while and do until?

714


1.Load an runtime array of length 99 from the pf and you want to handle all the possible errors?

2378


what is the necessary keyword needed to scroll subfile records?

707