Hi guys:
I am a mainframe cobol programmer, and now i need some helps.
I want to write a cobol subroutine it can provide functions for accessing DB2.
ex. there is a subroutine called DBI0000.
In cobol program, I can access DB2 use the DBI0000 as below.
CALL DBI0000 USING PARM-OPTION
PARM-KEY
PARM-TABLE
PARM-DATA-AREA.
In my mind,the PARM-OPTION will be SELECT,OPEN,FETCH,CLOSE etc.
the PARM-KEY is the access key
the PARM-TABLE is the db2 table that I read
and the PARM-DATA-AREA is the result.
I can do the SELECT function by myself,
but I have no ideas for writing the CURSOR function.
Whether there some ways to provide the CURSOR function instead of SQL OPEN,FETCH,CLOSE statement.
Could someone can help me or give me some tips(samples).
Thanks for your help in advance.
Regards.