Announcement Announcement Module
Collapse
No announcement yet.
Returning result sets from RPG Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Returning result sets from RPG

    Hello all, I got a clean compile on a simple RPG program that builds a 10 record result set. I tried to access it from VB and it doesn't seem like it's returning anything. It runs but no records are returned. Then I say "lets try this from the command line via STRSQL." This should work since it's returning a result set like any normal SELECT statement right? Well I call it from interactive SQL and it runs and completes with nothing showing on the screen. I've tried variations of this approach but nothing works. My code is as follows:
     D ItmMstRf E DS ExtName(ITMMST1) occurs(10) D i S 5I 0 Inz(0) D RowCount S 5I 0 Inz(10) C *Entry PList C Parm Close 1 C* Clear ResultSet C Clear *All ItmMstRf C For i = 1 to 10 C i Occur ItmMstRf C Eval ItmNme = 'Client ' + %Char(i) C Eval ItmSnm = 'Num ' + %Char(i) C Eval ItmDte = 20020215 C EndFor C/Exec SQL C+ SET RESULT SETS ARRAY :ITMMSTRF FOR :ROWCOUNT ROWS C/End-Exec * If a parameter was passed... C If %PARMS > 0 C Eval *InLr = *On C EndIf C Return 
    Can anybody help me on this? Cliff
Working...
X