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
 

 

Write output from file1 if record from file2 is unmatched

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

New User


Joined: 22 Nov 2007
Posts: 83
Location: Chennai

PostPosted: Sun Jun 08, 2014 9:19 pm    Post subject: Write output from file1 if record from file2 is unmatched
Reply with quote

Hi All,

I have two input files with account numbers (9 bytes). For example, file A is the master file and file B is deletion file. I have to compare file B against file A and if the account number from file B is matched with file A, then I need to omit those account numbers in the output file and write the output file from file A only if there is no matching account numbers with file B.

Example:

File A (Master file):

Code:

AAAAAAAAA
BBBBBBBBB
CCCCCCCCC
EEEEEEEEE
GGGGGGGGG
HHHHHHHHH
KKKKKKKKK
MMMMMMMMM



File B(deletion file):

Code:

BBBBBBBBB
HHHHHHHHH
KKKKKKKKK



Output file should have:

Code:

AAAAAAAAA
CCCCCCCCC
EEEEEEEEE
GGGGGGGGG
MMMMMMMMG



Please note that the input files are sorted already. File A is a VSAM KSDS file and file B is GDG version and output file should a flat file.

I tried searching in the forum but got a big list in the search result, can someone please help me on this?

Regards
Gopi
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10231
Location: italy

PostPosted: Sun Jun 08, 2014 9:48 pm    Post subject: Reply to: Write output from file1 if record from file2 is un
Reply with quote

DFSORT is perfectly capable of processing VSAM KSDS


the fact that one of the files is a GDG generation ( NOT VERSION ) is completely irrelevant ..
being a GDG generation affects only the DATASET naming convent, retention and catalog mangement
THE CONTENT IS NOT AFFECTED ...

remember that a SORT application ALWAYS create a new dataset ,
usually a VSAM KSKD dataset name is something a bit more static

anyway look at any JOINKEYS examples in the forums
keeping/excluding the records that are/are not in the other file
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1649
Location: NY,USA

PostPosted: Tue Jun 10, 2014 8:11 pm    Post subject:
Reply with quote

Please refer to the JOINKEY's examples from the below links and I am sure you will get the answer.

ftp://ftp.software.ibm.com/storage/dfsort/mvs/sorttrck.pdf
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 Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts How to get current date -1 and curren... murali.andaluri DFSORT/ICETOOL 3 Wed Mar 08, 2017 2:09 pm
No new posts Write R1 and R2 to OP1 and R1 to OP2 bhaskar_kanteti DFSORT/ICETOOL 10 Fri Mar 03, 2017 11:18 am


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