On 13-May-2011 11:21 , Scott Klement wrote:
OVRDBF FILE(*LIBL/SOMEFILE) MBR(SOMEMBR)
This doesn't override to all files named SOMEFILE that have a member
named SOMEMBR. (What would THAT to do the called program?) And it
doesn't even override to the first SOMEFILE that contains SOMEMBR...
It only overrides to the first SOMEFILE in the library list. If that
first copy of SOMEFILE doesn't have a member named SOMEMBR, you get
an error when you try to open the file. <<SNIP>>
The expected syntax I believe was:
OVRDBF TOFILE(*LIBL/SOMEFILE) MBR(SOMEMBR)
And FWiW, for the Common Data Management Open "standard algorithm",
the intended effect is actually to find the first file named SOMEFILE in
*LIBL with a member named SOMEMBR; i.e. there is no error for a standard
open request unless *no* file exists in the library list with the named
member. Other features for which the searching is not [IMO, properly]
deferred to [i.e. allowing] the DM algorithm to locate the member for
the open, those may indeed issue an error for SOMEMBR not found in the
"first SOMEFILE in the library list."
addlible test1 *first
crtsrcpf test1/which mbr(one)
addlible test2 *first
crtsrcpf test2/which mbr(two)
ovrdbf TEST TOFILE(*LIBL/WHICH) MBR(TWO)
opndbf IGNORED/TEST MBR(IGNORED) OPTION(*INP)
>Member TWO file WHICH opened with no sharing allowed.
>Member TWO file WHICH in TEST2 opened.
In the above scripted requests, the standard DM open-member search
algorithm just ignored the fact that the first file named WHICH did not
have the desired member name, and continued looking for the member named
TWO in some another file by that same name; one later in the library list.