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
 
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 MXG - Processing Compressed DB2 SMF r... vasanthz All Other Mainframe Topics 2 Thu May 10, 2018 12:47 am
No new posts Extract the records with a PD field's... sudhakar84 DFSORT/ICETOOL 11 Mon Apr 02, 2018 7:26 pm
No new posts Merge 2 records sancraig16 SYNCSORT 19 Tue Mar 27, 2018 8:17 pm
No new posts Copy set of records based on condition krish.deepu SYNCSORT 2 Thu Mar 08, 2018 11:39 am
No new posts add sequence number for duplicate rec... SRUTHI DRAVIDAMANI COBOL Programming 11 Thu Feb 22, 2018 5:37 pm

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