• No replies
1 Post

Pinned topic How to handle Array in z/os DB2 Native stored procedure ?

‏2014-01-16T05:29:44Z | array db2 native procedreu stored

I am converting COBOL I/O module(option cursor OPEN,FETCH,CLOSE ,SELECT,COUNT,MAX) into Native  stored procedure . I am  facing following issue . please  some one guide  me how to go about  it

1. How to  pass back  array of data from native stored procedure to  calling program .

2.  In COBOL I/O module there is separate  OPEN ,FETCH and CLOSE cursor  options and converted into  native db2 stored procedure .

when I issue   OPEN cursor   it  returned  SQLCODE  =0000  . but when I issue Fetch CALL  after  Cursor OPEN I am getting  messages cursor already  closed .  and  I am unable to get this functionality  is there  any way to keep cursor open  and fetch cursor ?

Call TESTSP('OPEN')     -- OK

Call TESTSP('FETCH') --> Says  cursor  already closed