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



No strong feelings either way, just a counterpoint re. maintenance.

For (1) the DS will be defined in one place and can be used throughout the code, (CHAIN, READE, etc.) If the key structure were to change - or a coding error encountered - only one place to correct. No need to search for the in-line definitions. (Same philosophy as when using Named Constants - define in one place only.)

I agree (2) is more readable.

Brian.

On 18/08/2021 14:24, Alan Cassidy wrote:
A question about using a data structure key list for record i/o vs. listing the keys in the i/o line.

(1) chain %kds( CustkeysDS )  Custfile ;

--versus-

(2) chain ( CustType : CustNbr )  Custfile ;

I like the #2 syntax better, for showing the actual key value arguments inline, at the sttement itself, as more maintenance-friendly, even if the arguments' field names are from the file itself. I'm mostly wondering if anybody knowss whether there are any performance differences?

--Alan Cassidy


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.