|
Does the nulls field have any bearing on the syntax here at all? This is a great example. From what I can see, I am doing pretty much all these things in just a much simpler text, yet don't get the results. I will use this as a model. Thank you very much!! -Tracy Ext. 3107 -----Original Message----- From: MWalter@xxxxxxxxxxxxxxx [mailto:MWalter@xxxxxxxxxxxxxxx] Sent: Tuesday, February 25, 2003 12:39 PM To: RPG programming on the AS400 / iSeries Subject: Re: SQLRPGLE - Dynamic selection something like this: DgetItemData PR 40 D itnbr 15 CONST D year 4 0 CONST PgetItemData B Export DgetItemData PI 40 D itnbr 15 CONST D year 4 0 CONST ditemDS ds D itdsc 30 overlay(itemDs:*next) D itcls 4 overlay(itemds:*next) D itacim 3 overlay(itemDs:*next) D unmsr 2 overlay(itemDs:*next) D valuc 1 overlay(itemDs:*Next) Dnulls S 5i 0 DsqlStmt S 250 DfileName S 21 c reset itemDs c eval fileName = 'Yearend/Itemasa' + c %subst(%editc(year:'X'):3:2) c eval sqlStmt = 'SELECT itdsc, itcls, itacim, + c unmsr, valuc + C FROM ' + %trim(fileName) + C ' WHERE itnbr = ''' + C %trim(itnbr) + '''' C/exec sql C+ PREPARE stmt from :sqlStmt c/end-exec c/exec sql c+ DECLARE c CURSOR FOR stmt c/end-exec c/exec sql c+ OPEN c c/end-exec c/exec sql C+ FETCH c INTO :itemDS :nulls c/end-exec c/exec sql c+ CLOSE c c/end-exec c return itemDs P E Thanks, Mark Mark Walter Sr. Programmer/Analyst Hanover Wire Cloth a div of CCX, Inc. mwalter@xxxxxxxxxxxxxxx http://www.hanoverwire.com 717.637.3795 Ext.3040 /"\ \ / X / \ _______________________________________________ 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.