On 13-May-2011 11:21 , Scott Klement wrote:

<<SNIP>>

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."

<code>

crtlib test1
addlible test1 *first
crtsrcpf test1/which mbr(one)
crtlib test2
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.

</code>

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.

Regards, Chuck

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 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].