Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Regarding duplicate occurences

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IMS DB/DC
Author Message
varunraisharma

New User


Joined: 01 Sep 2005
Posts: 13
Location: Bangalore

PostPosted: Wed Oct 12, 2005 7:06 pm    Post subject: Regarding duplicate occurences
Reply with quote

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
View user's profile Send private message
References
sourab
Warnings : 1

New User


Joined: 05 Oct 2005
Posts: 8

PostPosted: Thu Oct 13, 2005 2:24 am    Post subject:
Reply with quote

Define Cursor and then fetch/delete records one by one
Back to top
View user's profile Send private message
varunraisharma

New User


Joined: 01 Sep 2005
Posts: 13
Location: Bangalore

PostPosted: Fri Oct 14, 2005 5:26 pm    Post subject:
Reply with quote

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
View user's profile Send private message
varunraisharma

New User


Joined: 01 Sep 2005
Posts: 13
Location: Bangalore

PostPosted: Fri Oct 14, 2005 5:28 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Shaikshavali
Warnings : 1

New User


Joined: 18 Jun 2005
Posts: 22
Location: chennai

PostPosted: Sat Oct 15, 2005 5:03 pm    Post subject: Re: Regarding duplicate occurences
Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IMS DB/DC All times are GMT + 6 Hours
Page 1 of 1