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



On Fri, Nov 11, 2011 at 9:52 AM, Kurt Anderson
<kurt.anderson@xxxxxxxxxxxxxx> wrote:
John,

I don't like storing all the contents of a file in an array
when I only need certain fields - to reduce questions
like "why is this field loaded if it's not used?" - which
is a question I would ask.

You can specify the length in the F-specs, so you don't load the whole
record. As far as I know, you do have to load contiguous bytes from
the leftmost part of the record, though. (No one said table files are
elegant or sophisticated.)

In service programs I'm not a fan of the pre-runtime array.
 This is a style thing, but in our shop [...]

You could have given this as an explanation for avoiding table files.

 I really only wanted to whine about the lack of
complete functionality of data structure arrays.  That
is to say, I'm a huge fan and use data structure arrays
a lot now, but it's a bummer that I can't use the binary
search functionality of %lookup with them.

I agree with the first batch of responses suggesting you use subfields
and overlays. (That was my first thought when I read your original
question, and I knew that plenty of other people would give you that
answer.) It's the closest thing to what you want; it's what people
did before data structure arrays (lots of folks still don't have data
structure arrays, like me); and in my opinion it strikes a good
balance between performance, resource usage, ease of implementation,
and ease of maintenance.

John

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.