× 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've always thought that coding it this way:

 D                              ds 
 D field_name                  1     50 
 D  sub_field1                            6S 5 overlay(field_name) 
 D  sub_field2                            6S 5 overlay(field_name:*next)
 D  sub_field3                            6S 5 overlay(field_name:*next)
 D  sub_field4                            6S 5 overlay(field_name:*next)
 D  the_rest                               26 overlay(field_name:*next)

made it very readable and easy to understand.  As opposed to:

 D                           ds 
 D field_name                  1     50 
 D  sub_field1                            6S 5 overlay(field_name:*next)   

 D  sub_field2                            6S 5 overlay(field_name:*next)
 D  sub_field3                            6S 5 overlay(field_name:*next)
 D  sub_field4                            6S 5 overlay(field_name:*next)
 D  rest                                       26 
overlay(field_name:*next)

Which doesn't seem to really improve anything.

In fact, I think if I had seen it coded that way the very first time I
came across it, I would have wondered what *next was really 
meant to do.  Just seems unnecessary to have ':*next' on the first
subfield.

mho anyway .....

Fred Underwood
North American Stainless
(502) 347-6187

mailto:funderwood@xxxxxxxxxxxxxxxxxxxxxxxxxx




Barbara Morris <bmorris@xxxxxxxxxx> 
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
07/28/2004 05:16 PM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>


To
rpg400-l@xxxxxxxxxxxx
cc

Subject
Re: Problem w/SQL






CWilt@xxxxxxxxxxxx wrote:
> 
> Something else along the same line, I've not really used the
> overlay(<...>:*NEXT) myself.  But every example I've seen from Scott and
> Barbara have the first field defined simply overlay(dataDS), then the 
rest
> defined with the *NEXT.  Don't know if it makes a difference but....
> 

Whenever I notice I've done that, I add *NEXT to the first one too.  I
don't know why I leave it out in the first place, nor do I know why I
think it's important to _have_ it on the first one...

But it doesn't make a difference.  Overlay(name) has an implicit
position of 1; the first overlay(name:*next) also has an implicit
position of 1.

--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



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.