|
I know I know I know...you are right, but I have not had the time to become proficient with SQL in RPGLE...... On Thu, 2 Jun 2005 15:54:52 -0500, Holden Tommy wrote > This just SCREAMS SQL... > c *entry plist > c parm fromdate > c parm todate > c/exec sql > c+ declare cursor SalesData For > c+ Select ilnsoldto,ilninvdate,ilnstk,ilnqtyshp,ilneprice, > ilneuavcst from c+ impiln00 where ilninvdate between ? and ? Order > By ilnsoldto,ilninvdate c+ ,ilnstk c/end-exec c/exec > sql c+ Open SalesData Using :fromdate,:todate c/end-exec > > then to read... > > c/exec sql > c+ Fetch SalesData Into :MyDS > c/end-exec > > where myDS is the same layout as the record. positioning is off i'm > sure I coded this in outlook...but you should be able to get the idea... > > Thanks, > Tommy Holden > > -----Original Message----- > From: rpg400-l-bounces@xxxxxxxxxxxx > [mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Douglas W. Palme > Sent: Thursday, June 02, 2005 3:43 PM > To: RPG Group > Subject: Issue with chain and SETLL > > I am in need of some help...... > > I have a LF that contains the following: > > 0001.00 R SALES PFILE(IMPILN00) > 0002.00 A ILNSOLDTO > 0003.00 A ILNINVDATE > 0004.00 A ILNSTK > 0005.00 A ILNQTYSHP > 0006.00 A ILNEPRICE > 0007.00 A ILNEUAVCST > 0008.00 A K ILNINVDATE > 0009.00 A K ILNSOLDTO > 0010.00 A K ILNSTK > > What I am trying to accomplish here is display a subfile with stock > totals for the various sales staff individuals for their respective customers. > > At first I had the primary K set to ILNSOLDTO so I could chain the > file and verify the entered (coming from a DSPF) customer number is > / was valid. Then I need to do a SETLL for the specific data range > they want.... > > I really need to keep the records grouped by the customer number, > then in date order and then by stock number, that way I can do a > READE until the customer number changes and thus EOF display the > data and I'm out. > > I know I can eval each record for the date but it seems that will > only take a ton more time....correct? Incorrect? > > Suggestions or ideas would be appreciated. > > -- > 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. -- Open WebMail Project (http://openwebmail.org)
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.