|
Probably not what you are asking for but after you declare and open a cursor you can do a Dow FetchCursor(); ... EndDo; and have subprocedure FetchCursor do your actual sql fetch. Keeps your free format code much cleaner too. However I think you are trying to do a D MyFileDS DS extname(Myfile) ... fetch cursor1 into :MyFileDs ... For EachField = 1 to NbrFldsInMyFileDS; ... EndFor; and I can't wrap my hands around that. Maybe instead you could open a cursor on QSYS2/SYSCOLUMNS and do a SELECT SYSTEM_TABLE_SCHEMA, SYSTEM_TABLE_NAME, SYSTEM_COLUMN_NAME FROM qsys2/syscolumns where system_Table_scheme=:MyLib and system_Table_Name=:MyFile and fetch from that? Rob Berendt
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.