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



Matt,

my DS wasn't a MODS - at this time, i'm not fetching more than one
record at a time - this could change, but I'm only fetching 10 or so
records total, so performance is not an issue.

On 7/21/05, Tyler, Matt <mattt@xxxxxxxxxxxxxx> wrote:
> Rick,
>        I quickly looked it up in the V5.2 SQL programming with host
> languages (pg 6-7) and of course Cobol examples.  I then tested it out
> (after your response) and nope its not 4S 0.  Error message states it needs
> to be of type SMALLINT.  So I changed the type to be 5I 0 and recompiled and
> it worked.  I also am using MODS in my testing.
> 
> So, I am not certain why it's giving you the error.  Is this on compile or
> runtime?
> 
> 
> 
> Thank you,
> Matt Tyler
> WinCo Foods, LLC
> mattt@xxxxxxxxxxxxxx
> 
> 
> -----Original Message-----
> From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
> On Behalf Of rick baird
> Sent: Thursday, July 21, 2005 10:12 AM
> To: RPG programming on the AS400 / iSeries
> Subject: Re: SQL null indicators: what am I doing wrong
> 
> Matt,
> 
> not in any of the examples I've seen.  4b is acceptable as well, but
> 5i seemed to be the consensus I've seen.
> 
> thanks,
> 
> Rick
> 
> On 7/21/05, Tyler, Matt <mattt@xxxxxxxxxxxxxx> wrote:
> > I think the null indicators need to be 4.0 S
> >
> > Thank you,
> > Matt Tyler
> > WinCo Foods, LLC
> > mattt@xxxxxxxxxxxxxx
> >
> >
> > -----Original Message-----
> > From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
> > On Behalf Of rick baird
> > Sent: Thursday, July 21, 2005 10:00 AM
> > 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.
> >
> >
> 
> --
> 
> 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 thread ...

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.