|
Ok, I've got another one. (V5R1). On this one, I do want to fetch multiple rows (14 for one page of a subfile). I'm following my examples ALMOST to the letter, but the precompiler's puking. here's the pertinant code: d s2DS ds occurs(14) d S2TMCD d S2TMDS d S2RYL1 d S2P1DT like(TMP1DT) d S2RYET d S2STTS c/exec sql c+ declare c2a scroll cursor for c+ select TMTMCD, c+ TMTMDS, c+ TMRYL1, c+ TMP1DT, c+ TMRYET, c+ TMSTTS c+ from ICTEAMP c+ where TMLICD = :C2LICD c+ and TMSTTS = ' ' c+ and TMRYET <> ' ' c+ order by TMTMCD c+ for fetch only c/end-exec c/exec sql c+ open c2a c/end-exec c/exec sql c+ fetch next from c2a for 14 rows c+ into :s2DS c/end-exec I'm getting: SQL5011 Position 35 Host structure array S2DS not defined or not usable. All the fields in the DS are described by the display file (fields in a subfile record) except for the single "Like" - which is described by an input database file. If I remove the OCCURS and fetch only one row at a time, it compiles fine. Thanks, Rick
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.