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 sequential files omitting some fields

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

New User


Joined: 08 Oct 2006
Posts: 19
Location: Bangalore

PostPosted: Sun Jan 07, 2007 7:43 pm    Post subject: Compare two sequential files omitting some fields
Reply with quote

Hello All,

There are lots of posts on file comparision , however I could not find any to satisfy my needs, hence this post.

I have to compare two sequential files omitting some fields from the comparison ( the fields to be omitted may not be in sequence) and if difference is found report the key( which is first four characters of File A and the starting and if possible the ending position of the record.

For example :
The input file is FB and LRECL is 80. The fields to be not considered for comparison lie between 6 to 7 and 11 to 14.
A sample FileA record is as :
0001TOBEORNOTTOBE

Sample FileB record is as :
0001TOBEORNOTTBEE

After the comparison the output report should look like :

0001 - 15,16

Thanks.

Regards.

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

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Jan 15, 2007 7:13 am    Post subject:
Reply with quote

Hello,

You'll have complete control and can format the output any way you'd like if you create some COBOL code to match the files and do what you want.

There has been recent discussion on matching files.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Mon Jan 15, 2007 9:51 am    Post subject:
Reply with quote

If you have SUPERC, you can use NEXCLUDE and OEXCLUDE statements to ignore specific positions. You can read more about it in the fine manual.

O.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Jan 15, 2007 10:24 am    Post subject:
Reply with quote

Hello,

If i understood what is needed, it is a report of the starting and ending position of "the mismatched data" after matching the records on the "keys".

I don't believe the mismatch would always be in the same positions. I'm also not sure what should happen if there is more than one set of characters that don't match. From the small amount of sample data it is difficult to guess.

Hence, the suggestion to write code and make the output be whatever is required.
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