On 05 Dec 2012 11:39, fbocch2595@xxxxxxx wrote:

how would you code a CLP to copy all *LF's from 1 library to another
based on the attribute of the object? For example, LF's vs. PF's.

I would probably opt for finding an alternative approach for whatever is the overall scenario; i.e. the scenario for which I found myself wanting to effect that, esp. if the feature should operation against any possible user library. Using CRTDUPOBJ is not so much a concern when very explicit assumptions can be made about the scenario; e.g. that all PFs can be presumed to exist in both libraries and the LFs in the from-library will reference only the PFs or other LFs in the from-library, or that naming rules can be used to effect the equivalent of selection-by-attribute even if only for each separate DBF network. FWiW to best reflect the from-library, the LFs should be copied in the order they appear in the DSPDBR [or equivalent API] output.

In any case, I might choose to use save and restore instead, because that will order the DBF networks for me [like a *ALL or GENERIC* OBJ() specification on CRTDUPOBJ], so the work can be done more generically rather than relying on assumptions that the complexity of the scenario is low. There is also an API to the save object that allows passing the names gathered elsewhere, enabling avoiding building and using an interpreted command string; those names could be from an API, DSPOBJD, the system database Cross Reference, or the SQL catalogs [as VIEWs over the *DBXREF], for example.


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.