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



M. Lazarus wrote:

That means that it's more difficult to generate the limits file and the key lengths need to be hardcoded in the program(s) using it.

Is there any technical barrier to implementing it "properly"?


I agree that it's unfortunate that the key lengths have to be hardcoded.

I don't know whether there's any technical barrier to allowing an externally-described limits file. But I don't know how useful it would be either.

About generating the limits file, wouldn't that be a different program that _could_ use an externally-described file?

An externally-described limits file would have to have a double set of fields, one for the from-keyfields and one for the two-keyfields.

I think it would be easier to use two externally-described data structures with just the keys from the controlled file.

Flimits o f 100 disk
D keyDs e ds extname(myfile:*key)
D limitsRec ds qualified
D from likeds(keyDs)
D to likeds(keyDs)

... setup limitsRec.from and limitsRec.to
write limits limitsRec;
...

Using the program-described limits file with the externally-described keys has the downside that the record length has to be hardcoded in 2+ places (the program generating the limits file and the program(s) using the limits file).

Using an externally-described limits file would require keeping the two externally-described files in sync, with the limits file having two copies of each key field in the controlled file (with a different name for at least one of each pair of field). That seems to me to be much harder than keeping the record lengths in sync.

To help ensure the record lengths are in sync, you could add this to the program that generates the limits file:

if %size(limitsRec) <> 100);
issue an error that all the programs using the limits file
need to be updated
endif;


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.