× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Fran wrote:

> We are attempting to set up source members in QCPYSRC
> for each data file. The source would include D specs,
> I/O type (Chain, SetLL, etc), %EOF assignment.
> We /define xxxx_ChainN, for example, in a subroutine in
> the main program with the /copy QCPYSRC/IOxxxx.
> The D specs are defined in 'DSpecs'.
> The problem I am encountering is key lists.

Let me start out by saying that I think this is quite a lot of work to do
manually, and you might consider a code generator to do it for you.  Having
got that caveat out of the way, I think you are pretty close with the
current structure.  Rather than create subroutines, create subprocedures.
Then define the key lists as local variables inside the procs.   Make the
parameter list have the full key list, but have all but the first one be
options(*nopass).  Have the subprocedure use the appropriate partial keylist
based on the number of keys passed in.  So your mainline might have
getProductHistory(cust) and getProductHistory(cust: product)  When you have
logicals that have keys in a different order (say customer, date, product)
you can use a special value as a place holder, so
getProductHistory(cust: -9: date).  All the intelligence will be in the
single I/O subprocedure.  Or you can create a subproc for each logical and
use getProductHistory to direct which one gets called.

Just one idea...
  --buck




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.