Arghh. I inserted the ADDLIBLE requests for clarity, but added them incorrectly. The <code> script in the quoted message is now updated [flagged with "<ed:"] to properly reflect that the TEST2 library was to be positioned *after* the library TEST1. With that correction, the script functions as I explained. Without that correction, the original script would not have been able to show what I explained.

Regards, Chuck

On 13-May-2011 14:48 , CRPence wrote:
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 *LAST /* <ed:> was incorrectly *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.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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

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