IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Regarding duplicate occurences


IBM Mainframe Forums -> IMS DB/DC
Post new topic   Reply to topic
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
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
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> IMS DB/DC

 


Similar Topics
Topic Forum Replies
No new posts Duplicate transid's declared using CEDA CICS 3
No new posts Duplicate several members of/in one l... JCL & VSAM 7
No new posts Newbie Stuck on "Duplicate Datas... TSO/ISPF 5
No new posts Duplicate data in PUT CONTAINER using... CICS 4
No new posts Remove set of duplicate records from ... DFSORT/ICETOOL 10
Search our Forums:

Back to Top