0 pts.
 Question on OVRDBF command
RPG
Suppose, in my CL program, I am using the following command: OVRDBF file(file1) tofile(file2) The question is: In my RPG program, which file will be read in C specs..will it be Read file1 or Read file2?? Thanks.

Software/Hardware used:
ASKED: April 13, 2005  8:05 PM
UPDATED: October 21, 2009  5:42 AM

Answer Wiki:
Hi Your RPG program will read file1, and the operating system will then use the override to get the data from file2. All the best Jonathan
Last Wiki Answer Submitted:  April 14, 2005  4:52 am  by  astradyne   370 pts.
All Answer Wiki Contributors:  astradyne   370 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


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


 

Note that it will depend on what you code for the F-spec. Whichever name you code on the F-spec, that will be the name you must code on your READ statement. Of course, if the override is in effect, the actual file being read is going to be file2. That’s the point of the override — you code a program to process some generic name, and different overrides allow you to run the program against different files. The coded name doesn’t change, but the file being processed does change. You use the same program and control what it does from the outside.

Tom

 107,905 pts.