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
 

 

how to delete the records with particular key

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Absinthia

New User


Joined: 10 Jan 2008
Posts: 36
Location: CHINA

PostPosted: Thu Apr 16, 2009 12:01 pm    Post subject: how to delete the records with particular key
Reply with quote

Hi, everyone,

I have two files A and B, both are FB, Lrecl=80

File A is like below

Code:
ab11111dfadfdfdfdfa
cd22222fdfafadfdffad
ac33333fdfaf8989543


the keyA column starts at position 3rd, 5bytes(for instance 11111)

File B is like below

Code:
fdfaddded11111
eweefsddf33333


the keyB starts at position 10th, 5bytes.

What I want to do is if in file B, there exists a keyB which is equal to keyA, then I have to delete the corresponding record in file A.

so in this example , I only want the second record
Code:
cd22222fdfafadfdffad
to remain in file A.

Is there any way to solve it ?

Thanks in advance.
[/code]
Back to top
View user's profile Send private message

muthuvel

Active User


Joined: 29 Nov 2005
Posts: 217
Location: Chennai

PostPosted: Thu Apr 16, 2009 12:05 pm    Post subject:
Reply with quote

you can't delete the record in file A ,may be you can create a new file fileC with desired result.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Thu Apr 16, 2009 8:56 pm    Post subject:
Reply with quote

Absinthia,

Can fileA have duplicates within it?

Can fileB have duplicates within it?

Can fileB have a key that is not in fileA?

If any of these situations are possible, please show a better example of input and expected output including all possible situations.
Back to top
View user's profile Send private message
Absinthia

New User


Joined: 10 Jan 2008
Posts: 36
Location: CHINA

PostPosted: Thu Apr 16, 2009 10:04 pm    Post subject:
Reply with quote

Hi, Frank,

yes, both FileA and FileB can have duplicates.
and fileB can have a key that is not in fileA.

Besides, the new output can be put in a new file C, not necessarily also
in fileA.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Thu Apr 16, 2009 10:55 pm    Post subject:
Reply with quote

Again:

Quote:
If any of these situations are possible, please show a better example of input and expected output including all possible situations.
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts JCL to delete component in a package sundaram.naveen Compuware & Other Tools 14 Tue Nov 29, 2016 6:21 pm
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm


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