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
 
Need to compare records of 2 files

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

New User


Joined: 17 Oct 2008
Posts: 10
Location: Pune

PostPosted: Thu Oct 15, 2009 3:11 am    Post subject: Need to compare records of 2 files
Reply with quote

hi i have 2 files: File1 and File2

The records present in file1:
9600000000
9700000000
9800000000

The records present in file2:
9400000000
9500000000
9600000000
9700000000

I want the output in 3rd file as
9700000000
9800000000

i.e The duplicates present in the 2 files and

In forth file i need the non duplicates

please help me with the sort.

Thanks
Back to top
View user's profile Send private message

Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Thu Oct 15, 2009 3:22 am    Post subject:
Reply with quote

zavedali85,

Your output does NOT match your requirements. How did 9800000000 be in the output as a duplicate? It is only present in file1.

Answer the following questions

1. What is the LRECL & RECFM of the input file 1
2. What is the Key position and format in input file 1
3. Do you have duplicates on the key in file1?


4. What is the LRECL & RECFM of the input file 2
5. What is the Key position and format in input file 2
6. Do you have duplicates on the key in file2?


7. What is the LRECL and RECFM of output files?
8. Show us an example of input and desired output
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Thu Oct 15, 2009 3:23 am    Post subject:
Reply with quote

Hi,

are there duplicates in either file ?

what are the matching keys ?


What is the RECFM and LRECL ?


Gerry
Back to top
View user's profile Send private message
zavedali85

New User


Joined: 17 Oct 2008
Posts: 10
Location: Pune

PostPosted: Thu Oct 15, 2009 3:28 am    Post subject: Reply to: Need to compare records of 2 files
Reply with quote

sorry..

it was a typo:

The output i am looking in the 3rd file is
9600000000
9700000000

file1:
Record format . . . : FB
Record length . . . : 100

file2
Record format . . . : FB
Record length . . . : 100



Key postion in file1:
1-10

Key postion in file2:
1-10

For output files file3 and file4
Record format . . . : FB
Record length . . . : 100


We dont have duplicates in either files.
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Thu Oct 15, 2009 3:35 am    Post subject: Reply to: Need to compare records of 2 files
Reply with quote

zavedali85,

use the following DFSORT/ICETOOL JCL

Code:

//STEP0100 EXEC PGM=ICETOOL         
//TOOLMSG  DD SYSOUT=*               
//DFSMSG   DD SYSOUT=*               
//IN       DD DSN=Your 100 byte file1,DISP=SHR
//         DD DSN=Your 100 byte file2,DISP=SHR
//OUT1     DD SYSOUT=*                                               
//OUT2     DD SYSOUT=*                                               
//TOOLIN   DD *                                                       
SELECT FROM(IN) TO(OUT1) ON(1,10,CH) ALLDUPS DISCARD(OUT2) USING(CTL1)
//CTL1CNTL DD *                                                       
  OUTFIL FNAMES=OUT1,REMOVECC,NODETAIL,                               
  SECTIONS=(1,10,HEADER3=(1,100))                                     
  OUTFIL FNAMES=OUT2                                                 
//*
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 sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am
No new posts FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 11 Fri Sep 22, 2017 11:35 pm

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