Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Duplicate PARM on OUTFIL sancraig16 SYNCSORT 11 Thu Apr 05, 2018 10:25 pm
No new posts WRITE to VSAM giving duplicate RC picus_mf CICS 1 Fri Feb 23, 2018 2:52 pm
No new posts add sequence number for duplicate rec... SRUTHI DRAVIDAMANI COBOL Programming 11 Thu Feb 22, 2018 5:37 pm
No new posts how to add the amount for duplicate r... SRUTHI DRAVIDAMANI COBOL Programming 6 Wed Feb 21, 2018 7:21 pm
No new posts Using ICETOOL, how we can seperate th... bshkris SYNCSORT 5 Tue May 09, 2017 8:33 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us