View previous topic :: View next topic
|
Author |
Message |
MARINA JOSEPH
New User
Joined: 11 Jun 2009 Posts: 61 Location: chennai
|
|
|
|
Hi,
I am sorry about wasting peoples time.
I assumed the delimiters which actually created the confusion.
The requirement was not very clear.
I will avoid such instances in future.
Apologies once again. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
Apologies once again. |
Not to worry - sometimes it takes a bit of a struggle to get clarification Being clear will greatly reduce the time taken to deal with a requirement.
Do you have a working solution? If you used cobol, you could unstring bots sets of data into indivudual fields and compare these individual fields to get what you want. . . |
|
Back to top |
|
|
donevin
New User
Joined: 07 Jun 2005 Posts: 70 Location: South Africa
|
|
|
|
I have to commend all and sunder with the patience you demonstrated throughout this post. I read the thread with increasing disbelief and I have to say I am really impressed by how you kept your cool.
In any case Marina, I think I did a similar thing in the past as what you are trying to do here, if my deduction is correct that you want to display the key of mismatching records as well as the field name(s) that doesn't match for that key. I used a cobol program with a little help from INSYNC, which I accept not all installations might have, to solve this problem. The first issue I had was that my copybook had more than 900 fields in it and I was NOT looking forward to typing 900 plus field names in the COBOL program.
The steps I followed were.
(1). INSYNC has got the functionality to create output for you from a copybook in the format : Fieldnames, Fieldlength, Fieldoffset. I read this output into a Working-Storage Table and sorted it by Fieldoffset.
(2). I then compared the two input records from the two input files byte by byte through a perform loop and if/when I got a mismatch, the counter i used to step through the records I then also used to do a search in the WS Table, I then extracted the field name from the WS-Table.
(3). I then wrote the keys of both records as well as the field names and the field values to output.
This saved me a lot of time and is easily adaptable to accommodate other files and in fact has been requested by other development teams besides my own in our company. |
|
Back to top |
|
|
|