Discuss DB2 stored procedure and Cobol in the Other Programming Languages forum on Dev Shed. DB2 stored procedure and Cobol A place for discussing programming languages not covered in specific forums such as Assembler, COBOL, etc. - you get the idea.
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
Posts: 2
Time spent in forums: 15 m 17 sec
Reputation Power: 0
DB2 stored procedure and Cobol
I have a stored procedure with a main module say MAIN and a data access module DAM. I validate data in MAIN and call DAM. The DAM has DECLARE CURSOR and OPEN CURSOR statements in it. would like to do a fetch outside the DAM , but in the MAIN module. Whenever i issue a fetch it returns to me error sqlstate 34000 for invalid cursor name. I xpedite the stored procedure. The cursor is opened successfully in the DAM , but when tried to access from MAIN it doesn't find it. How can i do this ? I know about locators , but it wont help in this case. Is there a way to refer a cursor opened in a module and do a fetch from another module . How can it be referenced ?