View previous topic :: View next topic
|
Author |
Message |
varunraisharma
New User
Joined: 01 Sep 2005 Posts: 15 Location: Bangalore
|
|
|
|
Hi
I want to retrieve a certain segment occurence which has a matching search key. For example i want to retrieve a segment occurence with a matching NB ID. Then i need to delete that corresponding occurence. But the problem is there can be duplicates in the segment also i.e. more than one NB ID can be found. Now how do i fetch these and delete these duplicates.
Will it be a GN call or Gu call...
Any pointers will be appreciated...
Regards
Varun |
|
Back to top |
|
|
sourab Warnings : 1 New User
Joined: 05 Oct 2005 Posts: 6
|
|
|
|
Define Cursor and then fetch/delete records one by one |
|
Back to top |
|
|
varunraisharma
New User
Joined: 01 Sep 2005 Posts: 15 Location: Bangalore
|
|
|
|
Hi Sourab
I think i asked a IMS-DB Question and not DB2 one ?
Please let me know how to define cursors in IMS-DB ...?
Regards
Varun |
|
Back to top |
|
|
varunraisharma
New User
Joined: 01 Sep 2005 Posts: 15 Location: Bangalore
|
|
|
|
I think i got the answer....
Have a GU call followed by series of GN calls to retrieve the duplicates...
Regards
Varun |
|
Back to top |
|
|
Shaikshavali Warnings : 1 New User
Joined: 18 Jun 2005 Posts: 22 Location: chennai
|
|
|
|
Make the first call with a GHU with qualified SSA's to get the first of the many segments that match the key. You then issue a DLET call unqualified.
Then loop with GHN calls with the same qualified SSA's that you used from the first GU call. If the GHN call is successful, you issue a DLET call unqualified. Loop on
GHN
DLET
until you get a not found status on the GHN call |
|
Back to top |
|
|
|