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


  • Subject: Re: Additional RPGLE Enhancement Requests
  • From: "Hans Boldt" <hboldt@xxxxxxxxxxxx>
  • Date: Thu, 17 Jul 97 08:06:32 EDT

Charlie Massoglia, Massoglia Technical Consulting, Inc. wrote:
> Hans Boldt wrote:
>
> >The reason I mentioned the idea of relaxed OVERLAY rules is that the
> >combination of relaxed OVERLAY rules and OVERLAY(x:*NEXT) should go a
> >long way in avoiding database dependencies.  Consider the following
> >data structure:
> >
> >   D  Combined     DS
> >   D   Field1                 OVERLAY(Combined:1)
> >   D   Field2                 OVERLAY(Combined:*NEXT)
> >   D   Field3                 OVERLAY(Combined:*NEXT)
> >
> >The data structure name COMBINED is implicitly defined with a length
> >that is the sum of the subfield lengths!
> >
>
> This is fine except Combined must be a data structure.  It can not be a data
> structure subfield.

Well, I knew you were going to say that!  That's what prompted the
following idea.

>
> >I just had another wild and crazy idea:  How about if we implicitly
> >define overlayed subfields with the appropriate length to contain all
> >overlaying subfields?  (I'm not sure if I can convince the rest of my
> >team on this one, though!)
> >
> Hans, could you please explain this further, perhaps with a sample.  I'm not
> sure what you mean.

As I said, this is just some random bit of brainstorming, so I don't
know all of the ramifications yet.  But here is an example:

   D DataStruct    DS
   D   Combined
   D     Field1                 OVERLAY(Combined:1)
   D     Field2                 OVERLAY(Combined:*NEXT)
   D     Field3                 OVERLAY(Combined:*NEXT)

As you know, a data structure without an explicit length specified is
implicitly defined big enough to hold all of its subfields.  What I am
proposing is that we have the same rule for subfields.  If a subfield
is not otherwise explicitly defined and the subfield has subfields
OVERLAYed on it, the subfield is implicitly defined as character with
a length big enough to hold all of its OVERLAYing subfields.

So, in this example, if FIELD1, FIELD2, and FIELD3 are each 10 byte
long fields, subfield COMBINED is implicitly defined as 30A.  If the
definition of any subfield changes, the definition of COMBINED would
also change on recompile with no source change.

This shouldn't be too difficult for us to implement since we already
have to deal with computing the length of data structures like this.

Cheers!  Hans

Hans Boldt, ILE RPG Development, IBM Toronto Lab, hboldt@vnet.ibm.com

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This is the Midrange System Mailing List!  To submit a new message,   *
* send your mail to "MIDRANGE-L@midrange.com".  To unsubscribe from     *
* this list send email to MAJORDOMO@midrange.com and specify            *
* 'unsubscribe MIDRANGE-L' in the body of your message.  Questions      *
* should be directed to the list owner / operator: david@midrange.com   *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.