|
Joel, You might want to try this instead. D pExtDS S * Inz(%addr(extds)) d extDS e ds extname(EXTDS) d extDSovr 100a BASEd(pExtDS) %dim(elem) Of course I don't know but think the SQL preprocessor doesn't like any RPG IV extensions beyond that of V3R2. :) -Bob > > I'm trying to overlay an external DS that gets populated by an SQL > statement. When I do NOT include the data, the DS is populated > correctly: if I add the overlay, the DS is blank even though the SQL > statement has no trouble finding the record. > > <psuedo-code> > > // this way extDS gets populated > d extDS e ds extname(EXTDS) > ... > c/exec SQL > c+ Fetch next > c+ from myCursor > c+ into :extDS > c/end-exec > > // this way extDS (and hence extDSovr) does NOT get populated > // elem is the correct number of fields in EXTDS > // All fields in EXTDS are defined the same: 100a > d extDS e ds extname(EXTDS) > d extDSovr 100a overlay(extDS) > %dim(elem) > ... > c/exec SQL > c+ Fetch next > c+ from myCursor > c+ into :extDS > c/end-exec > > </psuedo-code> > > Any idea why this is happening or even better how to fix it? > > Thanks! > > Joel > http://www.rpgnext.com > > > _______________________________________________ > 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 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.