|
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 / \
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.