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