Craig,
Very nice application but I think you should be able to make it more
efficient by folding the second step, SORT2, into the first. This would
avoid a second pass of that data. You should be able to create an
second OUTFIL that will produce the 2 files that you are looking for.
The INCLUDE statement on the second OUTFIL would be:
INCLUDE=(072,008,CH,NE,C' ',AND,
478,008,CH,NE,C' ',AND,
072,008,BI,NE,478,008,BI),
The rest of the OUTFIL statement from the copy should be able to be used
as is. I would be happy to work with you if you experience any
problems.
John Reda
Syncsort, Inc.
-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On
Behalf Of Schneiderwent, Craig
Sent: Tuesday, June 03, 2008 11:53 AM
To: [email protected]
Subject: Re: Compare files - with different date fields
I would use SyncSort's JOIN feature (I don't have DFSORT.)
//SORT1 EXEC PGM=SORT
//SORTJNF1 DD DISP=SHR,DSN=input.file.1
//SORTJNF2 DD DISP=SHR,DSN=input.file.2
//SYSIN DD *
JOINKEYS FILE=F1,
FIELDS=(001,072,A,080,326,A)
JOINKEYS FILE=F2,
FIELDS=(001,072,A,080,326,A)
JOIN UNPAIRED
REFORMAT FIELDS=(F1:001,406,F2:001,406)
SORT FIELDS=COPY
OUTFIL FNAMES=MATCHED,
INCLUDE=(072,008,CH,NE,C' ',AND,
478,008,CH,NE,C' '),
OUTREC=(001:001,812)
//MATCHED DD DISP=(NEW,PASS),
// AVGREC=U,
// LRECL=812,
// RECFM=FB,
// SPACE=(812,(1000,100))
//SYSOUT DD SYSOUT=*
//*
//SORT2 EXEC PGM=SORT
//SORTIN DD DISP=(SHR,PASS),DSN=*.SORT1.MATCHED
//SYSIN DD *
SORT FIELDS=COPY
INCLUDE COND=(072,008,BI,NE,478,008,BI)
OUTFIL with some nice formatting for a report
//SORTOUT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//*
No warranty, express or implied, yadda yadda.
-----Original Message-----
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?
----------------------------------------------------------------------
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