Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ 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
View previous topic :: :: View next topic  
Author Message
varunraisharma

New User


Joined: 01 Sep 2005
Posts: 15
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

sourab
Warnings : 1

New User


Joined: 05 Oct 2005
Posts: 6

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: 15
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: 15
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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IMS DB/DC All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Sort Card to Remove Duplicate records... raj4neo SYNCSORT 2 Wed Jan 25, 2017 4:44 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts how to find the duplicate list RAVIGUPTA1990 DB2 6 Wed Mar 30, 2016 12:11 am
No new posts ADSO Store Procedure to receive mutip... yogi.47eie IDMS/ADSO 2 Fri Aug 21, 2015 7:14 pm
No new posts Duplicate component install allowed i... kratos86 CA Products 2 Fri Oct 03, 2014 12:08 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us