On 08-Oct-2015 19:30 -0600, Alan Campin wrote:
I am trying to create a copy of a join logical into another library.

By reading ahead... Apparently with the intention that the Join Logical File (JLF) will be referring to the based-on physical files in the _another_ library instead of still referring to the physical files in the _original_ library.?

I have all the physicals in my work library

All good so far. All objects and their references within the same library enables the Create Duplicate Object (CRTDUPOBJ) [and Restore Object (RSTOBJ)] to /connect/ the Logical File (LF) to the same-named based-on files that are located in the _another_ library.

But no mention, and this is critical... Where is the JLF in this scenario? Per above "good so far", the JLF needs to be in the *same* library as the based-on files.

and my library at the top of the list and none of the old libraries
on my library list

The library-list is immaterial. What is the one library name for all existing based-on file references, the name of the target library, and that all based-on file references [to which the new\duplicated LF will /connect-with/] exist already in that target library, and that the LF is in the same library as the based-on files, are what matters.

but when I finished doing the CRTDUPOBJ the join logical is pointing
at the original libraries, not the current one

Libraries? As in plural vs singular? But all the physical files were noted to be in the _one_ "my work library".?.?

Also, are "my library" and "my work library" the same; though again, the *LIBL is immaterial. Just trying to figure out if possibly those are two different libraries, with each named in the LF as a based-on file reference.

If the LF is not also in the "my work library" with the physical files, then there will be no updates to the based-on file references; i.e. correctly, the JLF will remain pointing to the original library for the based-on file references. This is what "midrange" refers to in the "2nd point" of the included doc quote: [http://archive.midrange.com/midrange-l/201510/msg00219.html]

which it does not with a regular logical.

Unless I recall incorrectly, or something seriously changed, the rules are the same for the JLF as for any other LF.

I checked the archive and did see much. If this normal behavior?

A scripted [pseudo-coded] example with actual names and qualified dependencies to allow for review is best for a reader to try to respond definitively.

Such a script follows, showing the effects for a couple example files, and how with a [not exceedingly] creative use of Move Object (MOVOBJ) [and optionally Rename Object (RNMOBJ) if name conflicts are an issue], the restriction can be overcome without having to fall back to the DDS Source and Create Logical File (CRTLF).

1. crtpf oldlib/a_PF
2. crtpf oldlib/b_PF
3. crtlf oldlib/abJF -> JFILE(a_PF b_PF)
based-on-files: oldlib/a_PF oldlib/b_PF
4. crtlf altlib/abJF -> JFILE(a_PF b_PF)
based-on-files: oldlib/a_PF oldlib/b_PF
5. crtlf oldlib/a_LF -> PFILE(a_PF)
based-on-files: oldlib/a_PF
6. crtlf altlib/a_LF -> PFILE(a_PF)
based-on-files: oldlib/a_PF
// ensure a copy of the PFs exist in the target library for
// the eventual duplication of the above-created logical files
7. crtdupobj a_PF oldlib *file tgtlib
8. crtdupobj b_PF oldlib *file tgtlib
// duplicate logicals into target library, and show if
// expected same or changed library-name of based-on files
9. crtdupobj abJF oldlib *file tgtlib abJFChgd
based-on-files: tgtlib/a_PF tgtlib/b_PF
10. crtdupobj abJF altlib *file tgtlib abJFSame
based-on-files: oldlib/a_PF oldlib/b_PF
11. crtdupobj a_LF oldlib *file tgtlib a_LFChgd
based-on-files: tgtlib/a_PF tgtlib/b_PF
12. crtdupobj a_LF altlib *file tgtlib a_LFSame
based-on-files: oldlib/a_PF oldlib/b_PF
// revisions, to circumvent the /different library/ rule
// and then reset effects from implementing circumvention
13. rnmobj altlib/abJF *file abJFcorr
14. movobj altlib/abJFcorr *file oldlib
15. crtdupobj abJFcorr oldlib *file tgtlib abJFfixd
based-on-files: tgtlib/a_PF tgtlib/b_PF
16. movobj oldlib/abJFcorr *file altlib
17. rnmobj altlib/abJFcorr *file abJF
// revisions, to circumvent the /different library/ rule
// and then reset effects from implementing circumvention
18. rnmobj altlib/a_LF *file a_LFcorr
19. movobj altlib/a_LFcorr *file oldlib
20. crtdupobj a_LFcorr oldlib *file tgtlib a_LFfixd
based-on-files: tgtlib/a_PF
21. movobj oldlib/a_LFcorr *file altlib
22. rnmobj altlib/a_LFcorr *file a_LF

This thread ...


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

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