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 Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am
No new posts Inserting records based on conditions vickey_dw DFSORT/ICETOOL 9 Wed Feb 22, 2017 1:33 pm


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