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 add sequence number for duplicate rec... SRUTHI DRAVIDAMANI COBOL Programming 10 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 Merging records, but not all the time prino DFSORT/ICETOOL 17 Sat Feb 17, 2018 4:20 pm
No new posts Need all records with high key kalidasvs SYNCSORT 15 Fri Feb 09, 2018 10:38 pm
No new posts load and delete table through JCL wit... ram_vizag JCL & VSAM 9 Thu Feb 01, 2018 12:47 am

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