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
 
Compare two file which have identical column in splice tool

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

New User


Joined: 22 Jun 2006
Posts: 13
Location: mumbai

PostPosted: Thu Oct 18, 2007 3:43 pm    Post subject: Compare two file which have identical column in splice tool
Reply with quote

Hi please help me regarding splice tool.

1. i want to compare two file which have identical column and one file contains more rows compare to others i want rectify extra number of rows which are present in previous file.
and i want to write these extra rows in third file using JCL only
Back to top
View user's profile Send private message

Aaru

Senior Member


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

PostPosted: Thu Oct 18, 2007 4:02 pm    Post subject: Reply to: Compare two file which have identical column in sp
Reply with quote

Quote:
reagrading splice tool.


Hope you are referring to the SPLICE operator of ICETOOL

Requirements are not clear. Please explain it with examples as to what needs to be done.
Back to top
View user's profile Send private message
satish1978

New User


Joined: 22 Jun 2006
Posts: 13
Location: mumbai

PostPosted: Thu Oct 18, 2007 4:20 pm    Post subject: splice tool
Reply with quote

hi Aaru ,

i want to compare two file ..
1. Number of column in both file are same or may be different,,,
sequence is also not identical
for example:
File 1: colum1 colum2 colum3 colum4 colum5 colum6
Name school marks adress DOB hobies
File 2: colum1 colum2 colum3 colum4 colum5 colum6
DOB adress marks Name hobies school

file1 contains more number of rows comapre to file2
i want to compare File1 & File2 and write in File3 extra number of rows
File3::
Back to top
View user's profile Send private message
Aaru

Senior Member


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

PostPosted: Thu Oct 18, 2007 5:49 pm    Post subject: Reply to: Compare two file which have identical column in sp
Reply with quote

sathish,

Quote:
i want to compare File1 & File2 and write in File3 extra number of rows


How and on what fields do you want to compare the files? Give the format of the file, how the input looks like, field position of all the colums etc.

If you want to compare on some common field(column in the same position in both the files) then you can use SELECT operator instead of SPLICE.

Post your output details too.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Thu Oct 18, 2007 9:03 pm    Post subject:
Reply with quote

satish1978,

You haven't given enough information to make it clear what you want to do.

Please show an example of the records/rows (relevant fields) in each input file and what you expect for output, and explain the rules for getting from input to output. If input file1 can have duplicates, show that in your example. If input file2 can have duplicates, show that in your example.

Give the starting position, length and format of each relevant field.

Give the RECFM and LRECL of each input file.
Back to top
View user's profile Send private message
satish1978

New User


Joined: 22 Jun 2006
Posts: 13
Location: mumbai

PostPosted: Fri Oct 19, 2007 10:13 am    Post subject:
Reply with quote

Two files record length are same with no header information. And LRECL = 133

File 1:
Cust No Chk number Chk Amount Due date INV NO
Reliance 12345678 4,0000 10/06/07 456789
Ariel 456789 6,000 20/06/07 678900
Hutch 678909 7,0000 23/06/07 780000
VODA 978658 8,0000 25/06/07 999999

File2:
Cust no Amount Due date Inv NO Chk No
Reliance 4,0000 10/06/07 456789 12345678
Ariel 6,000 20/06/07 678900 456789
Hutch 7,0000 23/06/07 780000 678909
VODA 8,0000 25/06/07 999999 978658
Reliance 50,0000 10/06/07 7689000 56789000
Ariel 60,000 20/06/07 9999999 78965432
Hutch 70,000 23/06/07 888888 2398679

Major key is check number and invoice number use this key in two files
And compare extra column and write in output report using ICETOOL

Output File ::::

Cust No Chk No Inv No Due date Amount
Reliance 56789000 7689000 10/06/07 50,0000
Ariel 78965432 9999999 20/06/07 60,000
Hutch 2398679 888888 23/06/07 70,000
Back to top
View user's profile Send private message
Aaru

Senior Member


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

PostPosted: Fri Oct 19, 2007 11:29 am    Post subject: Reply to: Compare two file which have identical column in sp
Reply with quote

Check this JCL for your requirement

Code:
//S1    EXEC  PGM=ICETOOL                                               
//TOOLMSG DD SYSOUT=*                                                   
//DFSMSG  DD SYSOUT=*                                                   
//IN1 DD DSN=HLQ.ONE.ONX,DISP=SHR                                   
//IN2 DD DSN=HLQ.TWO.TWX,DISP=SHR                                   
//OUT  DD DSN=HLQ.T1T2KK,DISP=(,CATLG,DELETE)                       
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)           
//TOOLIN DD *                                                           
COPY FROM(IN1) TO(T1) USING(CTL1)                                       
COPY FROM(IN2) TO(T1) USING(CTL2)                                       
  SELECT FROM(T1) TO(OUT) ON(60,8,CH) ON(70,7,CH) NODUPS USING(CTL3)   
/*                                                                     
//CTL1CNTL DD *                                                         
  INREC OVERLAY=(60:10,8,70:35,7)                                       
/*                                                                     
//CTL2CNTL DD *                                                         
  INREC OVERLAY=(60:35,8,70:27,7)                                       
/*                                                                     
//CTL3CNTL DD *                                                         
  OUTFIL FNAMES=OUT,                                                   
     BUILD=(1:1,8,10:35,8,19:27,7,27:18,8,36:10,7,133:X)               
/*



File1:

Code:
RELIANCE 12345678 4.0000 10/06/07 456789               
ARIEL    456789   6.000  20/06/07 678900               
HUTCH    678909   7.0000 23/06/07 780000               
VODA     978658   8.0000 25/06/07 999999               


file2:

Code:
RELIANCE 4.0000  10/06/07 456789  12345678           
ARIEL    6.000   20/06/07 678900  456789             
HUTCH    7.0000  23/06/07 780000  678909             
VODA     8.0000  25/06/07 999999  978658             
RELIANCE 50.0000 10/06/07 7689000 56789000           
ARIEL    60.000  20/06/07 9999999 78965432           
HUTCH    70.000  23/06/07 888888  2398679             


output:

Code:
HUTCH    2398679  888888  23/06/07 70.000       
RELIANCE 56789000 7689000 10/06/07 50.0000       
ARIEL    78965432 9999999 20/06/07 60.000       


Just that the output is not in a particular order. Change accordingly.
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 Splice more than 50 occurances rajatbagga DFSORT/ICETOOL 1 Wed Oct 11, 2017 9:36 am
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am
No new posts Mainframe scheduling tool ddhar Compuware & Other Tools 2 Wed Sep 27, 2017 12:48 am

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