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



Bob Cozzi wrote:
Wouldn't there be a problem with overlaying the array over the
DS that contains the array though?


That is not what is happening.
The OVERLAY keyword is used to position a subfield in a specific location within
a data structure. You can specify either another subfield name or the data
structure name itself. The second parameter of OVERLAY is the actually position
within the overlaid subfield where you want the new field to begin. If the
overlaid "subfield" is really the data structure name, then it is within the
data structure itself and the second parameter is the position within the data
structure where you want the new subfield to appear.
If the second parameter is not specified, then it defaults to 1.
Hence, Jerry's example is the (only?) correct one.

It is just too darn bad that IBM didn't think of using OVERLAY(*DS) instead of
the actually data structure name... makes using LIKEDS with an overlay hurt my
brain.
-Bob Cozzi
In the interest of full disclosure, I did not come up with the method independently. I can't remember exactly, but I think it was either Paul Tuohy or Tommy Holden (I steal from so many people it's hard keep it straight). Heck, it might even have been you, Bob.



* Jerry C. Adams
*IBM System i5/iSeries Programmer/Analyst
B&W Wholesale Distributors, Inc.* *
voice
615.995.7024
fax
615.995.1201
email
jerry@xxxxxxxxxxxxxxx <mailto:jerry@xxxxxxxxxxxxxxx>





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.