Scope Of Cursor.

IBM's flagship relational database management system

Scope Of Cursor.

Postby Vineet » Fri Dec 04, 2009 6:41 pm

Hi All,

I am having a Query Related to Cursor. I am Having a Cobol Pgm. Say Pgm. ABC. Pgm. ABC is calling a Sub Program say Pgm. XYZ.I define & Open a Cursor in Pgm. ABC. In Pgm. XYZ can I Fetch the Values for the Cursor Open in Pgm. ABC. If
Pgm. XYZ is Static Or Dynamic Call.

Note: In Pgm. XYZ I am not Declairing / Opening Cursor. Its done in Parent Pgm.
Posts: 86
Joined: Tue Jun 19, 2007 11:38 am
Has thanked: 0 time
Been thanked: 0 time

Re: Scope Of Cursor.

Postby dick scherrer » Sat Dec 05, 2009 3:38 am


I don't know if this would work of not. . . I suspect it would have problems.

Suggest you try to pre-process/compile/bind the code both ways and see what is generated.

Even if this could work, i'd suggest you consider a different approach. . . For those who have to maintain this later.
Hope this helps,
User avatar
dick scherrer
Global moderator
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Return to DB2


  • Related topics
    Last post