× 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.



<snip>
For partial key lists to get at a logical, I just used %parms inside the
procedure to count them and do a select list to separate a CHAIN (or
SETLL) for example.

Select
When %parms >= 3 ;
Chain(e) (key1: key2: key3) OrdFile ;
When %parms >= 2 ;
Chain(e) (key1: key2 ) OrdFile ;
When %parms >= 1 ;
Chain(e) (key1 ) OrdFile ;
When %parms < 1 ;
Read OrdFile ; // (Didn't use this one, but you could...)
EndSL ;

I would suppose you could use %KLST from a DS, and calculate how many
fields from the %parms, but you'd need to load the KLST fields.

You could even set up a STATIC field to track whether it's the first
time in, to determine whether to do a SETLL/READE or just a READE.
</snip>

Not that JDE is much of a source of coding inspiration, but that's sort
of how their file server programs (same concept but they tend to have
some business logic in them as well) work. They pass in a key list name,
a copy of the record format with the key values populated, and an
operation code.

Matt


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.