×
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.
I want to create a dynamically allocated array to store popular
searches with each element storing a pointer, return code and field
name like below:
Struct DS Dim(32767)
Based(pStruct)
Ptr *
Retcod 10i 0
field 10a
* define array over subfield of structure
fieldarr 10a Dim(32767) Overlay(field)
Now I want to allocate elements as needed and populate the structure.
The problem I have is that I want to be able to do a lookup on the
field part of the structure (which is basically the key), something
like
Which would tell me if an element with the infield value already
exists and if so I would use the ptr and rtncod fields from that
element otherwise I would allocate memory and add another element to
Struct.
Unfortunately I have not been able to figure out how to do this, the
multiple entries in struct with the DIM keyword work fine but I can't
figure out how to define an array over the field subfield.
Any help with this would be appreciated.
Paul
As an Amazon Associate we earn from qualifying purchases.
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.