View previous topic :: View next topic
|
Author |
Message |
ajaybshukla
New User
Joined: 09 Sep 2008 Posts: 39 Location: india
|
|
|
|
Hi all,
I want ur help..
i have to compare 2 records of two different files, field by field using a cobol progra.
i have 2 i/p files with same record structure bt may have different values.
Now i want 2 find which field is differing out of these two file records.
ultimately i have to compare two records using their copybook. I cant check field by field as its a big file having record size of 30k.
i cud hv find out difference but i m unable to find out the exact field.
so can u plz suggest me a solution.
Thanks |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
Sometimes it is necessary for a programmer to actually resort to writing a program. 30K records a somewhat large how many fields are in the records? By carefully formatting your if statements and such you could accomplish a lot by using cut and paste and change when you are writing the program. |
|
Back to top |
|
|
ajaybshukla
New User
Joined: 09 Sep 2008 Posts: 39 Location: india
|
|
|
|
thts true...
but its having too big structure as well...and having many occurs
tht is why i came here for any good innovative solution...
if u kno any plz suggest me... |
|
Back to top |
|
|
Succor
New User
Joined: 20 Feb 2009 Posts: 96 Location: Bangalore :)
|
|
|
|
ajaybshukla,
Quote: |
i have to compare 2 records of two different files, field by field using a cobol progra.
|
And then
Quote: |
I cant check field by field as its a big file having record size of 30k. |
So, is this a VSAM file or a sequential.For example if there are 5 records in file A and 10 records in then B will you have 50 iterations for the complete comparison?Please elaborate a little more on the requirement side.
WTH. |
|
Back to top |
|
|
ajaybshukla
New User
Joined: 09 Sep 2008 Posts: 39 Location: india
|
|
|
|
i have 2 PS files
i have file 1 and file 2 having same record size 30k and same copybook or structure.
file 1 wid 1 record and file 2 wid 1record.
now i want to compare these 2 file records.
if we directly compare it wont work for me as i want field which is having difference.
i think this is very much clear.
thanks |
|
Back to top |
|
|
Succor
New User
Joined: 20 Feb 2009 Posts: 96 Location: Bangalore :)
|
|
|
|
Quote: |
i think this is very much clear. |
Thanks,It was always clear to you and to us.
Quote: |
but its having too big structure as well...and having many occurs |
It would be a one time effort and I would suggest you go by Craq's post.
WTH. |
|
Back to top |
|
|
ajaybshukla
New User
Joined: 09 Sep 2008 Posts: 39 Location: india
|
|
|
|
hi..
that means there is no solution...neways thanks for ur help |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
between files having the same structure.
Then use File-Aid, SuperC, Comparex or Ecomp |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
If you are unwilling to write the code to compare field-by-field, you could write simpler code that would compare byte-for-byte and list the record number and the unequal displacements in the records of the ones that have one or more mis-matched bytes.
The output would be more difficult to work with, but you nearly completely avoid having to program. . . |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
If the copy books are accurate and readable, in 6 hours I could have setup a lot of "IF" statements and displays. |
|
Back to top |
|
|
Succor
New User
Joined: 20 Feb 2009 Posts: 96 Location: Bangalore :)
|
|
|
|
Quote: |
If the copy books are accurate and readable, in 6 hours I could have setup a lot of "IF" statements and displays. |
By now ajaybshukla would have written the code ..its more than 6 hours . |
|
Back to top |
|
|
|