View previous topic :: View next topic
|
Author |
Message |
catchyblues
New User
Joined: 28 Dec 2005 Posts: 24
|
|
|
|
Can anyone tell me how to retain cursor position when control is passed from program A to prog-B and when i return back to prog-A i dun hav the cursor position.....
I'm using a cursor in prog-A to read a policy table and when i find a particular record, I call prog B passing the policy information using Linkage Section. Then i do some processing and the control is returned back to prog-A but I dun't hav the cursor position anymore......
Can anyone please tell me how do I overcome this ?? |
|
Back to top |
|
|
Nimesh.Srivastava
New User
Joined: 30 Nov 2006 Posts: 78 Location: SINGAPORE
|
|
|
|
catchyblues,
its possible your prog-B is doing a Commit / Rollback during its processing and such an operation would close all the open cursors in a LUW what you can use to avoid such a situation is Open the cursor using "WITH HOLD" statement which would retain the cursor position on a Commit / Rollback operation.
Hope this helps
Nimesh |
|
Back to top |
|
|
catchyblues
New User
Joined: 28 Dec 2005 Posts: 24
|
|
|
|
Hi,
I'm basically doing a read on a View in prog-A and calling prog-B.
In prog-B, i'm reading the same table on which the view was created. So when I exit prog-B, the cursor needs to positioned on the 2nd record on the View. Will a with-hold option work in this case ?
newayz I'll try doing that .... thanx for ur help
Nimesh.Srivastava wrote: |
catchyblues,
its possible your prog-B is doing a Commit / Rollback during its processing and such an operation would close all the open cursors in a LUW what you can use to avoid such a situation is Open the cursor using "WITH HOLD" statement which would retain the cursor position on a Commit / Rollback operation.
Hope this helps
Nimesh |
|
|
Back to top |
|
|
|