|
Charles, the fields in neither file are null capable, but there's the possibility of recieving nulls from the second file due to unmatched records on the left outer join. I'm on v5r1, and making the array a standalone instead of a DS worked - see my reply to Eugen. thanks, On 7/21/05, Wilt, Charles <CWilt@xxxxxxxxxxxx> wrote: > Rick, > > Does the indicator array really need to be 12? Are TMLICD, TMTMCD, and > TMRYET null capable? > > > > Charles Wilt > -- > iSeries Systems Administrator / Developer > Mitsubishi Electric Automotive America > ph: 513-573-4343 > fax: 513-398-1121 > > > > -----Original Message----- > > From: rpg400-l-bounces@xxxxxxxxxxxx > > [mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of rick baird > > Sent: Thursday, July 21, 2005 12:00 PM > > To: RPG programming on the AS400 / iSeries > > Subject: SQL null indicators: what am I doing wrong > > > > > > hey all, coding imbedded SQL for the first time in more than a couple > > years, and i'm stuck. > > > > given the following code: > > > > d s3DS ds > > d S3LICD Like(TMLICD) > > d S3TMCD Like(TMTMCD) > > d S3RYET Like(TMRYET) > > d S3GEOG Like(REGEOG) > > d S3EFDT Like(REEFDT) > > d S3LIC1 Like(RELIC1) > > d S3RYL1 Like(RERYL1) > > d S3TMC1 Like(RETMC1) > > d S3LIC2 Like(RELIC2) > > d S3RYL2 Like(RERYL2) > > d S3TMC2 Like(RETMC2) > > d S3STTS Like(RESTTS) > > > > d s3nullDS ds > > d s3DSnull 5i 0 dim(12) > > > > ----- > > > > c/exec sql > > > > c+ declare c3a cursor for > > > > c+ select TMLICD, > > > > c+ TMTMCD, > > > > c+ '0', > > > > c+ REGEOG, > > > > c+ REEFDT, > > > > c+ RELIC1, > > > > c+ RERYL1, > > > > c+ RETMC1, > > > > c+ RELIC2, > > > > c+ RERYL2, > > > > c+ RETMC2, > > > > c+ RESTTS > > > > c+ from ICTEAMP left outer > > > > c+ join (select * from BLRYLEP where > > RERYET = '0') as B > > c+ on b.RETMCD = TMTMCD > > > > c+ and b.RELICD = TMLICD > > > > c+ where TMTMCD = :C3TMCD > > > > c+ and TMRYET = :C3RYET > > > > c+ order by TMTMCD, TMLICD > > > > c+ for fetch only > > > > c/end-exec > > > > > > c/exec sql > > c+ open c3a > > c/end-exec > > > > * load subfile > > > > c dow 1=1 > > c/exec sql > > c+ fetch c3a > > c+ into :s3DS :s3nullDS > > c/end-exec > > > > ... etc. > > > > I'm getting SQL0312 - S3NULLDS undefined or unusable. > > > > the second file in my join could possibly have a no-match, hence the > > need for the null indicators. > > > > am I doing this right? > > > > thanks, > > > > -- > > 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. > > > > > > -- > 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-2025 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.