Alan Shore wrote:

and within each process there are other chains on other files

QUESTION: for those people who do NOT qualify with file names, how would
you handle this piece of logic?

Qualifying the %found seems reasonable here, but then so does matching record. I don't think the word standard should be construed to imply an immutable constraint in our industry. If I were forced to work for a place where we had an immutable Thou Shalt Never Qualify %Found() standard, I'd use %found() to set appropriately named booleans.

That might seem like extra work (not the typing, but the maintenance of more variables both in the code and in my brain as I work with this code next year) but reasonable names help a lot. What I mean is that I would NOT name the boolean after the file:
chain key1 file1:
if %found
file1_found=*on;
else
file1_found=*off
endif

Rather, I would name the boolean after the nominal function I'm trying to perform. I could be going off to CUSTHIST to see if the customer has any prior purchases at all:
if %found
custHasPriorPurchases=*on

or I might be interested in the past 90 days:
if %found
custHasPurchases90Day=*on

When I'm in the bowels of PROCESSA and I see
if %found(custhist)
...

I'm forced to go looking to see what key list was used to set %found. Was it the 90 day purchases, the customer umbrella group (i.e. any K-Mart store), a specific store (i.e. Sheboygan) or some other reason I went to CUSTHIST? One hopes the context makes it clear, but sometimes a well named boolean can clarify that.
--buck

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.