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 2 files, excluding cetain fields

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

New User


Joined: 24 Mar 2012
Posts: 17
Location: pune

PostPosted: Sat Sep 08, 2012 2:19 am    Post subject: Compare 2 files, excluding cetain fields
Reply with quote

Hi,

I have below requirement:
File 1:
Record length - 600
Record fomat - FB
say sample record -
Code:
123456ABCDE78901
234567FGHIJ79012
098765ASDFL12345

File 2:

Record length - 650
Record fomat - FB
say sample record -
Code:
123456&^$ABCDE78901%$@
234567&%#FGHIJ79012*@#
246765&*&ASDFL12345$%$




Here we can see that in file 2 we have extra fields from 7 to 9 and 20 to 22.

I have to find out the records those are same and different in file1 and file 2 after ignoring extra fields.
As we can see the 3rd record is different in file 2 from file 1 even we ignore extra fields value(e.g &*& and $%$)

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

Skolusu

Senior Member


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

PostPosted: Sat Sep 08, 2012 3:00 am    Post subject: Reply to: Compare 2 files, excluding cetain fields
Reply with quote

Ravi Kirti,

Use the following DFSORT JCL which will give you the desired results

Code:

//STEP0100 EXEC PGM=SORT                   
//SYSOUT   DD SYSOUT=*                     
//INA      DD DISP=SHR,DSN=Your Input FB 650 byte file
//INB      DD DISP=SHR,DSN=Your Input FB 600 byte file
//SORTOUT  DD SYSOUT=*                     
//SYSIN    DD *                           
  OPTION COPY                             
  JOINKEYS F1=INA,FIELDS=(1,6,A,10,10,A)   
  JOINKEYS F2=INB,FIELDS=(1,6,A,07,10,A)   
  JOIN UNPAIRED,F1,ONLY                   
//*
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 Subtract the ZD fields to provide neg... Balaryan DFSORT/ICETOOL 4 Wed Oct 11, 2017 10:51 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