Hoffman
0 pts. | Aug 7 2006 10:36AM GMT
Upgrade you OS on the iSeries to v5r4, use the OLEDB provider that comes with Client Access for your SQL Link Server…. Also if you have SQL on the iSeries (try strsql from a command line) you can return a record set from an RPG-SQL program.
JPLamontre
0 pts. | Aug 7 2006 4:13PM GMT
this sample in free rpg (sorry for not-free-V4R4) returns a result set.
I have found it at
<a href="http://www.iseriesnetwork.com/isnetforums/showthread.php?p=168208#poststop" title="http://www.iseriesnetwork.com/isnetforums/showthread.php?p=168208#poststop" target="_blank">http://www.iseriesnetwork.com/isnetforum…</a>
h dftactgrp(*no)
fCstMst1 if a e k disk prefix(’CS.’)
d cs e ds qualified extname(CSTMSTPF)
d CustRS pr
d pRows 10i 0
d CustRS pi
d pRows 10i 0
d CustList ds occurs(100)
d CSTMST 481a
d i s 10i 0
/free
i = 0;
setll *Loval CstMst1;
read CstMst1;
dow not %eof(CstMst1);
if i >= pRows;
leave;
endif;
i = i + 1;
%occur(CustList) = i;
CSTMST = cs;
read CstMst1;
enddo;
exsr setResult;
*inlr = *On;
begsr setResult;
/end-free
C/EXEC SQL
C+ SET RESULT SETS ARRAY:CustList FOR:I ROWS
C/END-EXEC
/free
endsr;
/end-free






