IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

need to compare two files n write the unmatched record


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Purnendu.it

New User


Joined: 11 May 2007
Posts: 57
Location: chennai

PostPosted: Fri Apr 18, 2008 3:45 pm
Reply with quote

Hi all,
Requirement is like that.i need to compare the two file which have
same record length and structure.And need to write the unmatched record
in a output file in a job itself.
Back to top
View user's profile Send private message
Purnendu.it

New User


Joined: 11 May 2007
Posts: 57
Location: chennai

PostPosted: Fri Apr 18, 2008 3:52 pm
Reply with quote

sorry for posting here it should have been posted in sort..
to furthere add i need to use any sort card
Back to top
View user's profile Send private message
Purnendu.it

New User


Joined: 11 May 2007
Posts: 57
Location: chennai

PostPosted: Fri Apr 18, 2008 3:54 pm
Reply with quote

Requirement is like that.i need to compare the two file which have
same record length and structure.And need to write the unmatched record
in a output file in a job itself.
Back to top
View user's profile Send private message
vasanthkumarhb

Active User


Joined: 06 Sep 2007
Posts: 275
Location: Bang,iflex

PostPosted: Fri Apr 18, 2008 4:48 pm
Reply with quote

Hi,

I think this link willl helps you.


ibmmainframes.com/viewtopic.php?t=30039
Back to top
View user's profile Send private message
Naidu540

New User


Joined: 17 Apr 2008
Posts: 1
Location: Bangalore

PostPosted: Fri Apr 18, 2008 4:51 pm
Reply with quote

//SORTTOOL EXEC PGM=SORT
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SORTJNF1 DD DSN=FIRST.FILE,DISP=SHR
//SORTJNF2 DD DSN=SECOND.FILE,DISP=SHR
//SORTOUT DD DSN=THIRD.FILE,DISP=SHR
//SYSIN DD *
SORT FIELDS=COPY
JOINKEYS FILES=F1,FIELDS=(1,10,A)
JOINKEYS FILES=F2,FIELDS=(1,10,A)
JOIN UNPAIRED F1,ONLY(IF YOU WANT UNMATCHED RECORDS FROM F1 FILE )
IF U WANT RECORDS FROM BOTH FILES FI,F2 YOU CAN USE JOIN UNPAIRED F1,F2,ONLY)

AT FIELDS = (1,10, A) YOU NEED TO GIVE THE LENGTHS ACCORDING TO YOUR REQUIREMNT.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Fri Apr 18, 2008 5:26 pm
Reply with quote

Pur,

Quote:
And need to write the unmatched record
in a output file in a job itself.


This has been discussed many times. Search the DFSORT/ICETOOL forum with the Keyword as "SELECT" for examples.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Write line by line from two files DFSORT/ICETOOL 7
Search our Forums:

Back to Top