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
 
comparing more than 2 files using ICETOOL

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

New User


Joined: 03 May 2007
Posts: 20
Location: bangalore

PostPosted: Tue Sep 09, 2008 2:33 pm    Post subject: comparing more than 2 files using ICETOOL
Reply with quote

Hi all,

I have three different input files, where i need to compare them based on the key field at appropriate position and get 2 output files (matching and non-matching records). The key field is present in the same position in all the three files.

Code:
//CC11 EXEC UCC11,TYPRUN=F
//*
//S1   EXEC  PGM=ICETOOL
//TOOLMSG   DD  SYSOUT=*
//DFSMSG    DD  SYSOUT=*
//QTR1FILE DD DSN=UNLOAD,DISP=OLD
//RT7CLSCD DD DSN=RT7CLSCD,DISP=OLD
//LITCLSCD DD DSN=LITCLSCD,DISP=OLD
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//LIT1     DD DSN=LITGTN1,
//            SPACE=(CYL,(10,10),RLSE),
//            DISP=(,CATLG,CATLG)
//*
//PRG1     DD DSN=PURGE1,
//            SPACE=(CYL,(10,10),RLSE),
//            DISP=(,CATLG,CATLG)
//*
//TOOLIN DD *
COPY FROM(RT7CLSCD) TO(T1) USING(CTL1)
COPY FROM(LITCLSCD) TO(T1) USING(CTL2)
COPY FROM(QTR1FILE) TO(T1) USING(CTL3)
SPLICE FROM(T1) TO(LIT1) ON(147,2,BI) KEEPBASE KEEPNODUPS -
  WITHALL WITH(1,161) ---- USING(CTL4)
/*
//CTL1CNTL DD *
  INREC BUILD=(147:1,2,161:C'AAA')
/*
//CTL2CNTL DD *
  INREC OVERLAY=(147:1,2,161:C'BBB')
/*
//CTL3CNTL DD *
  INREC OVERLAY=(161:C'CCC')
/*
//CTL4CNTL DD *
  OUTFIL FNAMES=LIT1,INCLUDE=(---------),
    BUILD=(1,160)
  OUTFIL FNAMES=PRG1,INCLUDE=(-----------),
    BUILD=(1,160)
/*


plz correct me if i'm wrong anywhere and suggest me what needs to be put in the control card.

I need to get 2 o/p files:
OUTPUT FILE1: Should contain the matching records from files QTR1FILE and RT7CLSCD and non-matching records from file LITCLSCD.

OUTPUT FILE2: Should contain the matching records from files QTR1FILE, RT7CLSCD and LITCLSCD.
Back to top
View user's profile Send private message

hchinnam

New User


Joined: 18 Oct 2006
Posts: 73

PostPosted: Tue Sep 09, 2008 3:33 pm    Post subject:
Reply with quote

I assume by matching records you mean records that are present in all the three files. I also assume in the ouput you need only one record per key.

If so your splice shouls look like this

Code:


SPLICE FROM(SORTIN) TO(SORTOUT)-                           
ON(1,1,CH) WITH(161,1) WITH(162,1) WITH(163,1) KEEPNODUPS WITHEACH



and your outfil should include "BCA" to get the matching. To get non-matching you can include non "BCA"
Back to top
View user's profile Send private message
obulisankar

New User


Joined: 03 May 2007
Posts: 20
Location: bangalore

PostPosted: Thu Sep 11, 2008 12:31 pm    Post subject: Reply to: comparing more than 2 files using ICETOOL
Reply with quote

Kolusu,
Here is the information you asked for:

LRECL --> 160
RECFM --> FB
Volume of records --> will be in millions
No. of duplicates --> keep varying
No. of keys used
for comparision --> 1
Lenghth of
key field --> 10
Position of Key --> 147


The DCB properties are same for all the input and output files.

I have 3 files: File1 , File2 , File3 . All of these files contain the records of the same type.

I need to compare these 3 files and get 2 output files.

Output File1 : Should contain the matching records from File1 and File2 and non-matching records from File3.

Output File2 : Should contain all the matching records from 3 files.

Example:
--------

File1: File2: File3:
----- ------ ------
AAA BBB 100 DDD AAA BBB 100 DDD AAA BBB 100 DDD
EEE FFF 200 ccc CCC FFF 600 EEE CCC FFF 200 GGG
DDD NNN 300 AAA XXX jjj 400 VVV EEE JJJ 500 KKK
zzz NNN 300 AAA zzz NNN 300 AAA


Output File1: Output File2:
-------------- -------------
DDD NNN 300 AAA AAA BBB 100 DDD
zzz NNN 300 AAA

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

New User


Joined: 03 May 2007
Posts: 20
Location: bangalore

PostPosted: Thu Sep 11, 2008 12:37 pm    Post subject: Reply to: comparing more than 2 files using ICETOOL
Reply with quote

Hey,
Sorry for the improper format of example.Please find it below:

File1:
-----
AAA BBB 100 DDD
EEE FFF 200 ccc
DDD NNN 300 AAA
zzz NNN 300 AAA


File2:
------
AAA BBB 100 DDD
CCC FFF 600 EEE
XXX jjj 400 VVV
zzz NNN 300 AAA



File3:
------
AAA BBB 100 DDD
CCC FFF 200 GGG
EEE JJJ 500 KKK



Output File1:
--------------
DDD NNN 300 AAA
zzz NNN 300 AAA

Output File2:
-------------
AAA BBB 100 DDD

Thanks
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 FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm
No new posts Comparing 2 Files using Current time arunsoods SYNCSORT 9 Fri Sep 22, 2017 6:00 pm
No new posts Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 22 Sun Aug 27, 2017 10:35 pm

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