View previous topic :: View next topic
|
Author |
Message |
itsbalaji
New User
Joined: 12 Jun 2007 Posts: 7 Location: India
|
|
|
|
The requirement is to compare two files. The first record of the file (columns to compared 1-83,lRECL 91) has to be compared with all the records of second file (same columns to be compared, LRECL 91). If the record is in second file, but not in first file , then it should be written in to the output file.
Please let me know whether it can be done thru SuperC /File AID . The shop doesn't have comparex.
NB: I have tried SUPERC Line Compare option. It does not give the excepted results as it was Line Compare . Let me know if other option in SUPERC can be used to get the above requirement |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Balaji,
Quote: |
If the record is in second file, but not in first file , then it should be written in to the output file. |
Quote: |
I have tried SUPERC Line Compare option. It does not give the excepted results as it was Line Compare |
Are you expecting that the record found in second file but not in first file should ONLY be written to OP file. |
|
Back to top |
|
|
itsbalaji
New User
Joined: 12 Jun 2007 Posts: 7 Location: India
|
|
|
|
murmohk1,
The requirement with example
first file
8
6
4
2
second file
7
5
3
8
SuperC ( line compare option) compares first record(value 8) of first file with first record (value 7) of second file. Then second record (6) with second record(5). The last compare 2 with 8. 8 is written to final output file ( Using sort step to get only I's(Insert))
But requirement is first record(value 8) of first file should compare with all records so last record (value 8) and 8 should not be written to out put file .7,5,3 to be only written to outputfile as it is not found anywhere in first file.
Let me know whether it is possible thru SuperC |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Balaji,
Did you try all the SUPERC options? Following is the OP with your IP -
Code: |
ID SOURCE LINES
----+----1----+----2----+----3----+
D - 7
D - 5
D - 3
I - 6
I - 4
I - 2 |
|
|
Back to top |
|
|
itsbalaji
New User
Joined: 12 Jun 2007 Posts: 7 Location: India
|
|
|
|
Murali,
The option used
PGM=ISRSUPC
PARM=('DELTAL','LINECMP',' ')
In sysin,
CMPCOLM 1:2,3:83
Need to compare 1:83 cols, just coded 1:2,3:83(test jcl)aware it same as 1:83
(no difference)
In file 1, 84th record has value 0679045678890765
In file 2, 28th record has value 0679045678890765
But the output has 679045678890765. But should not be.
Please let me know which option I'm going wrong
Thanks,
Balaji. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Hi,
Please post your JCL, input & expected output files, enclose them in 'Code' format while posting. Hopefully, you'll get better suggestions. |
|
Back to top |
|
|
itsbalaji
New User
Joined: 12 Jun 2007 Posts: 7 Location: India
|
|
|
|
The code
/SUPERC EXEC PGM=ISRSUPC,
// PARM=('DELTAL','LINECMP',
// '')
//NEWDD DD DSN=FILE2,
// DISP=SHR
//OLDDD DD DSN=FILE1,
// DISP=SHR
//SYSIN DD *
CMPCOLM 1:2,3:83
/*
//OUTDD DD DISP=(NEW,CATLG),
// DSN=OUTPUTFILE,
// RECFM=FB,LRECL=91,
//* MGMTCLAS=SHRTBKUP,
// SPACE=(CYL,(500,50),RLSE),
// UNIT=DISK
//*
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//* |
|
Back to top |
|
|
itsbalaji
New User
Joined: 12 Jun 2007 Posts: 7 Location: India
|
|
|
|
I'm getting the below error message
"ISRS078I FALSE MATCHES CORRECTED. RESULTS MAY NOT REFLECT ALL MATCHES. SEE "ADDITIONAL NOTES" IN SUPERC TUTORIAL."
Please let me know how to proceed further.
Regards,
Balaji. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Is there some reason that the files are not both sorted in the same sequence? |
|
Back to top |
|
|
itsbalaji
New User
Joined: 12 Jun 2007 Posts: 7 Location: India
|
|
|
|
Hello,
I'm comparing the previous version and current version of GDG. In test environment, I did copy the GDG versions to flat files.
I did SORT columns 1-83. After that I 'm not getting error message.
But the record with value 0679045678890765 is appearing both as Insert and delete
D - 0679045678890765
I - 0679045678890765
The D and I means its in both Input file(that is compared)
I have checked that value 0679045678890765 is present in both Input files . So it should not appear in the output file.
In file 1, 84th record has value 0679045678890765
In file 2, 28th record has value 0679045678890765
When I have only this record (0679045678890765)in the both input files
and delete all other records SuperC works fine i.e. 0 Insert 0 Delete
So this record 0679045678890765 along with other record does not yield the desired result
Please help.
Thanks,
Bala. |
|
Back to top |
|
|
manihcl85 Warnings : 1 New User
Joined: 11 Jan 2007 Posts: 52 Location: chennai
|
|
|
|
Hi,
Try below JCL, which compare using COMPAREX utility
Code: |
//COMP EXEC COMPAREX,IN1='TEST.xxxx.inp1,
// IN2='TEST.xxxx.inp2'
MAXDIFF=50,CONTINUE /* REPORT 50 DIFFERENCES BUT COMPARE ALL
FORMAT=23 /* FULL ALPHA SYSUT1, DIFF LINES ON SYSUT2
PAGE=72 /* 72 LINES PER PAGE
CASE=MIXED /* PRINT LOWER CASE CHARACTERS
MLC=1 /* IN SYNC AGAIN AFTER MATCHING 1 LINE
DATA /* INTER-RECORD RELATIONSHIP
MBRHDR=COND /* PERFORM A PAGE EJECT ONLY WHEN A DIFFERENCE |
Regards,
Mani |
|
Back to top |
|
|
ashokm
New User
Joined: 28 Feb 2006 Posts: 11 Location: Chennai,India
|
|
|
|
Hi ,
You can easily achieve this in ICETOOL
Ashok M |
|
Back to top |
|
|
itsbalaji
New User
Joined: 12 Jun 2007 Posts: 7 Location: India
|
|
|
|
Hi Mani,
There is no CompareX here.
Thanks for your reply.
Regards,
Balaji. |
|
Back to top |
|
|
|