|
Joe, Excellent suggestion! And I've forwarded this on to the developer using this. So instead of: D FLWORKREC DS likerec(flworkr) D pFLWORKRECDS s * inz(%addr(flworkrec)) D FLWORKRECDS ds based(pFLWORKRECDS) D col 15p 4 overlay(FLWORKRECDS:39) dim(389) I get: D FLWORKREC DS likerec(flworkr) D pFLWORKRECDS s * inz(%addr(COL001)) D FLWORKRECDS ds based(pFLWORKRECDS) D col overlay(FLWORKRECDS) dim(389) D like(COL001) Rob Berendt -- "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." Benjamin Franklin "Joe Giusto" <jgiusto@xxxxxxxxxxxxxx> Sent by: rpg400-l-bounces@xxxxxxxxxxxx 04/29/2003 12:46 PM Please respond to RPG programming on the AS400 / iSeries To: "'RPG programming on the AS400 / iSeries'" <rpg400-l@xxxxxxxxxxxx> cc: Fax to: Subject: RE: Adding another subfield to an externally defined data structu re. rob@xxxxxxxxx wrote: > Overlaying an array. > > D FLWORKREC DS likerec(flworkr) > D pDuh s * inz(%addr(flworkrec)) > D duh ds based(pDuh) > D col 15p 4 overlay(duh:39) dim(389) > > Rob Berendt <snip> One problem is that any workaround (easy or not) is fraught with certain dangers. For example, if the field layout happens to change, the overlay may become invalid. <snip> could pDuh be defined as inz(%addr(arrayfld)) if so, it would not matter if the layout changes, only if the arrayfld size changes. Joe Giusto II Programmer/Analyst Ritz Camera Beltsville, MD 301-419-3209 x347 410-813-2812 x347 -----Original Message----- From: rpg400-l-bounces+jgiusto=ritzcamera.com@xxxxxxxxxxxx [mailto:rpg400-l-bounces+jgiusto=ritzcamera.com@xxxxxxxxxxxx] On Behalf Of Hans Boldt Sent: Tuesday, April 29, 2003 1:09 PM To: rpg400-l@xxxxxxxxxxxx Subject: Re: Adding another subfield to an externally defined data structu re. rob@xxxxxxxxx wrote: > Overlaying an array. > > D FLWORKREC DS likerec(flworkr) > D pDuh s * inz(%addr(flworkrec)) > D duh ds based(pDuh) > D col 15p 4 overlay(duh:39) dim(389) > > Rob Berendt Rob: Maybe I'm a little thick today, but doesn't that code fragment accomplish what you want? I guess this all goes back to the decision in DDS not to support arrays in records. The argument goes that arrays should be implemented in tables, not within individual rows, in a relational database (ignoring the fact that some RDBMS's do allow arrays within rows). So the question becomes, should a programming language make it easy to get around a design limitation in the database? One problem is that any workaround (easy or not) is fraught with certain dangers. For example, if the field layout happens to change, the overlay may become invalid. The bottom line is that if EXTNAME suits your purposes better than LIKEREC, then continue to use it. Cheers! Hans _______________________________________________ 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.cgi/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. _______________________________________________ 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.cgi/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 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.