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
 

 

need to compare two files n write the unmatched record

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

New User


Joined: 11 May 2007
Posts: 59
Location: chennai

PostPosted: Fri Apr 18, 2008 3:45 pm    Post subject: need to compare two files n write the unmatched record
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: 59
Location: chennai

PostPosted: Fri Apr 18, 2008 3:52 pm    Post subject:
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: 59
Location: chennai

PostPosted: Fri Apr 18, 2008 3:54 pm    Post subject: compare two files n write unmatched record using sort
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: 276
Location: Bang,iflex

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

Hi,

I think this link willl helps you.


http://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    Post subject: Hi, you can use this sort card it will work
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: 1288
Location: Chennai, India

PostPosted: Fri Apr 18, 2008 5:26 pm    Post subject: Reply to: need to compare two files n write the unmatched re
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts fuzzy compare Martylin JCL & VSAM 6 Thu Mar 30, 2017 2:45 pm
No new posts Record Not found in AlX but record re... mukun264 COBOL Programming 7 Fri Mar 24, 2017 9:28 am
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 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


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