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
 

 

compare two files with different format using ICETOOl

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

New User


Joined: 13 Feb 2010
Posts: 3
Location: Calcutta

PostPosted: Tue May 03, 2011 11:35 am    Post subject: compare two files with different format using ICETOOl
Reply with quote

I have two files having LRECL=232 and FB

First file has the structure

USERID(1 to 7 position) ex :a111111,a111112 etc
Space ( 8th position)
SYSTEMCODE (9 to 11 position) ex: AB*


a111111 AB1
a111111 AB4
a111111 AB7
a111112 AB1
a111112 AB2
a111112 AB3
a111112 AB4
a111113 AB2
a111113 AB3


Second File has the structure

USERID(1 to 7 position)
Space ( 8th position)
SYSTEMCODE 1 (9 to 11 position)
Space ( 12th position)
SYSTEMCODE 2 (13 to 15 position)
Space ( 14th position)
-
-
-
_____UPTO system code 9 is possible----



a111111 AB1 AB4 AB7
a111112 AB1 AB3 AB4 AB2
a111112 AB2 AB3

The system codes in second file is not in sorted order so in the second record the sequence is 1,3,4,2
instead of 1,2,3,4

But The system codes in first file is sorted


the data in the above two files are the same but in different format.
We need to compare two files to ensure the data are the same.

So to validate above two files using ICETOOL or DFSORT , I reuire first file to be formatted as

a111111 AB1 AB4 AB7
a111112 AB1 AB2 AB3 AB4
a111113 AB2 AB3

and the second file to be formatted as the same as first file

a111111 AB1 AB4 AB7
a111112 AB1 AB2 AB3 AB4
a111113 AB2 AB3

Please let me know if it is can be done using ICETOOL
Back to top
View user's profile Send private message

Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Tue May 03, 2011 4:29 pm    Post subject:
Reply with quote

Quote:

So to validate above two files using ICETOOL or DFSORT , I reuire first file to be formatted as

a111111 AB1 AB4 AB7
a111112 AB1 AB2 AB3 AB4
a111113 AB2 AB3

and the second file to be formatted as the same as first file

a111111 AB1 AB4 AB7
a111112 AB1 AB2 AB3 AB4
a111113 AB2 AB3

Please let me know if it is can be done using ICETOOL

Yes definitely this can be done. but after doing that how do you validate? are you going to manually validate the files?
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Tue May 03, 2011 4:39 pm    Post subject:
Reply with quote

Also second input file data you have shown is
Code:

a111111 AB1 AB4 AB7
a111112 AB1 AB3 AB4 AB2
a111112 AB2 AB3

But I believe you mean..
Code:

a111111 AB1 AB4 AB7
a111112 AB1 AB3 AB4 AB2
a111113 AB2 AB3

Please confirm...
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Tue May 03, 2011 5:21 pm    Post subject:
Reply with quote

Below steps will give you what you wanted...

If data in both input files is same then final output file will be empty.
If data is present only in first file then that will appear in final output file with value 1 at 23rd position
If data is present only in second file then that will appear in final output file with value 2 at 23rd position....

Code:

//STEP0100 EXEC PGM=SORT                     
//SYSOUT   DD SYSOUT=*                       
//SORTIN   DD *                               
A111111 AB1 AB4 AB7                           
A111112 AB1 AB3 AB4 AB2                       
A111113 AB2 AB3 AB4                           
//SORTOUT  DD DSN=&&TEMP,DISP=(NEW,PASS)     
//SYSIN    DD *                               
  OPTION COPY                                 
  OUTFIL BUILD=(1,8,9,3,/,                   
                1,8,13,3,/,                   
                1,8,17,3,/,                   
                1,8,21,3,/,                   
                1,8,25,3,/,                   
                1,8,29,3,/,                   
                1,8,33,3,/,                   
                1,8,37,3,/,                     
                1,8,41,3)                     
/*                                           
//STEP0200 EXEC PGM=SORT                     
//SYSOUT   DD SYSOUT=*                       
//FIRST    DD *                                 
A111111 AB1                                     
A111111 AB4                                     
A111111 AB7                                     
A111112 AB1                                     
A111112 AB2                                     
A111112 AB3                                     
A111112 AB4                                     
A111113 AB2                                     
A111113 AB3                                     
A111113 AB6                                     
//SECOND   DD DSN=&&TEMP,DISP=(MOD,PASS)         
//JNF2CNTL DD *                                 
  OMIT COND=(9,3,CH,EQ,C' ')                   
//SORTOUT  DD SYSOUT=*                           
//SYSIN    DD *                                 
  OPTION COPY                                   
  JOINKEYS F1=FIRST,FIELDS=(1,11,A)             
  JOINKEYS F2=SECOND,FIELDS=(1,11,A),SORTED 
  JOIN UNPAIRED,ONLY                   
  REFORMAT FIELDS=(F1:1,11,F2:1,11,?)   
/*                                     


Output in this case will be...
Code:

           A111113 AB42   
A111113 AB6           1   
Back to top
View user's profile Send private message
Lopamudra Mukherjee

New User


Joined: 13 Feb 2010
Posts: 3
Location: Calcutta

PostPosted: Wed May 04, 2011 4:25 pm    Post subject:
Reply with quote

Thanks a lot for your help . But JOINKEYS are not supported in my my version of DFSORT . The Job giving RC 16 with following messages

Messages ******

ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R10 - 03:49
OPTION COPY
JOINKEYS F1=FIRST,FIELDS=(1,11,A)
$
ICE005A 0 BLANK NEEDED IN COLUMN 1 OR OPERATION NOT DEFINED CORRECTLY

Messages ******
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Wed May 04, 2011 6:56 pm    Post subject:
Reply with quote

Does it satisfy your requirement atleast?


Refer http://ibmmainframes.com/viewtopic.php?t=33389 and let us know your ptf level or post your complete ICE201I message...
Back to top
View user's profile Send private message
Lopamudra Mukherjee

New User


Joined: 13 Feb 2010
Posts: 3
Location: Calcutta

PostPosted: Thu May 05, 2011 6:17 pm    Post subject: Reply to: compare two files with different format using ICET
Reply with quote

yes... it does...
I can modify and customize it according to my need afterwards.
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Thu May 05, 2011 6:18 pm    Post subject: Re: Reply to: compare two files with different format using
Reply with quote

Lopamudra Mukherjee wrote:
yes... it does...
I can modify and customize it according to my need afterwards.


Sambhaji wrote:
Refer http://ibmmainframes.com/viewtopic.php?t=33389 and let us know your ptf level or post your complete ICE201I message...

You haven't answered my second request.....
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 member list compare jzhardy TSO/ISPF 6 Fri May 12, 2017 3:18 pm
No new posts Using ICETOOL, how we can seperate th... bshkris SYNCSORT 5 Tue May 09, 2017 8:33 pm
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Dynamic split of files under groups sril.krishy DFSORT/ICETOOL 4 Mon Apr 17, 2017 1:09 pm


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