The reference by the program to APDTLWK2 would only be during 
compile-time; i.e. there is no requirement at run-time that any file 
named APDTLWK2 exist anywhere on the system.  Anything the program would 
need to know about that file at run-time should have been established by 
the HLL, stored within the compiled program object; an effective 
rules-list is generated for how the file is to be opened.  The FILE() 
named on OVRDBF is just a label for reference, and need not name any 
actual object of type *FILE.  When the file name APDTLWK2 is referenced 
by a program, that name [label] is searched in the Common Data 
Management list of overrides, and the override is applied to that open 
if an entry by that name\label is located with the proper scoping. 
Whether the named TOFILE() has the necessary attributes to be compatible 
with how the program was compiled, that will be determined in part by 
the Common DM Open [e.g. lvlchk, existence, allocation], then some more 
by the Database Open [e.g. is keyed], each in response to the 
compile-time rules established from both the file declaration to the HLL 
and the file definition\attributes extracted during the compile [which 
also could have been directed to another file name by an override to 
database file request]; then I suppose the HLL run-time might do 
something to further ensure compatibility.
Regards, Chuck
On 27-May-2011 06:17 , Morgan, Paul wrote:
Because you've done an override from APDTLWK2 to &FILE the program
has to reference APDTLWK2 instead of &FILE for the override to take
effect.  Because &FILE has a different key that APDTLWK2 if AP340 is
compiled over APDTLWK2 then I'm not sure that override will work.
What's the code in AP340 look like that references APDTLWK2
and &FILE?
Robert Ostrowski on Friday, May 27, 2011 9:01 AM wrote:
The OVRDBF  command below doesn't seem to be working.  APDTLWK2 is
a logical file keyed on Vendor Name and Invoice Number. When AP340
(simple print program) is called, the program uses the sort order
in&FILE (Vendor Number, Invoice Number).
Any suggestions?
OVRDBF FILE(APDTLWK2) TOFILE(*CURLIB/&FILE) +
       OVRSCOPE(*JOB) SHARE(*YES)
CALL       PGM(*CURLIB/AP340) PARM(&FILE)
As an Amazon Associate we earn from qualifying purchases.
	
 
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.