> -----Original Message-----
> From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On
> Behalf Of Howard Brazee
> Sent: Tuesday, June 03, 2008 10:11 AM
> To: [email protected]
> Subject: Compare files - with different date fields
> 
> I'd like to create a compare job that will compare two files.
> 
> One file should have the current date (YYYYMMDD) in columns 72-79 of a
> 406 column record, but the other should have a different current date
in
> the same format.
> 
> My user would like to not just ignore these dates, but have something
> that shows him that the two files are identical, except one had
20080603
> and the other had 20080602 (or whatever) for the dates.   I'd just
> exclude those fields, and use TSO to exclude exceptions, but I'm not
the
> user.
> 
> Any simple solutions?

I can tell you two "simple" two-comparison-pass solutions for two
different data file compare products: Comparex and Insync.  You will
also need two additional passes with SORT (one per file) to finish the
job.

In each comparison product there is a parameter that tells the product
to stop *reporting* differences after N have been displayed.  Set this
parameter to 1 and you will get 1 reported difference, but for both
products the files will still be compared to EOF and the statistics at
EOF will tell you how many records were different.

For Comparex this would be "CONTINUE,MAXDIFF=1".  For INSYNC you would
use "MAXREPORT=1".

You will need to make two comparison passes, one with the date field
masked and no reporting limit and one without a mask and with the
"report" value set to 1.

The masked comparison pass will tell you if any field except the date
field is different in any records.  The unmasked pass will give you the
report of the difference in the first record with a different date field
and a count of differences that should be equal to the record count (I'm
assuming here that all the records have the date field).

HOWWEVER, of course this will not tell you if all the differences are
for the *same* dates.  You will need two more passes (one for each file)
using MERGE FIELDS=(date field) combined with SUM FIELDS=(NONE) to
determine if there is more than one date in each file.  If the output of
the merge pass is more than one record output from the merge pass then
there is more than one date in each file.

Hope that helps.

Peter


This message and any attachments are intended only for the use of the addressee 
and
may contain information that is privileged and confidential. If the reader of 
the 
message is not the intended recipient or an authorized representative of the
intended recipient, you are hereby notified that any dissemination of this
communication is strictly prohibited. If you have received this communication in
error, please notify us immediately by e-mail and delete the message and any
attachments from your system.


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to