IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Display mismatching fields using SORT/ICETOOL utility


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rockish

Active User


Joined: 05 Jun 2009
Posts: 185
Location: Planet Earth

PostPosted: Fri Sep 11, 2009 5:20 pm
Reply with quote

If you dont know the algorithm by which you are going to separate fields from each other, not just COBOL, nothing can help u..

All that Enrico tries to ask from you is, what seperates the fields ? When do you say that a field has ended and the next field has started ?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Sep 11, 2009 5:20 pm
Reply with quote

any reason that You do not want to answer that simple question

what is the logic to separate fields ?

I proposed one, ( word concept ) is it the right approach ?
Back to top
View user's profile Send private message
MARINA JOSEPH

New User


Joined: 11 Jun 2009
Posts: 61
Location: chennai

PostPosted: Fri Sep 11, 2009 6:06 pm
Reply with quote

The delimiter is a comma, and i need to know how to retrieve the position of the mismatching byte.
That byte at the varying positon needs to be compared with the copybook positon in order to retrieve the exact field.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Sep 11, 2009 7:24 pm
Reply with quote

Hello,

Quote:
I have to agree that, this is beyond my capability as of now.
Yours, and everyone else. . . icon_wink.gif Unless they are very lucky (or happen to be psychic).

Quote:
Key fields will be same in both the files. (For the time being forget about inserted and deleted records).
No. The complete requirement including proper sample input and output should be posted. Why should people waste time providing multiple solutions for scope creep. Often, the additional requirement definition causes the original working solution to need changes (or be completely re-written) - wasting more time.

The sample data should be posted using the "Code" tag to preserve alignment and improve readability.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Sat Sep 12, 2009 3:32 am
Reply with quote

Quote:
The delimiter is a comma, and i need to know how to retrieve the position of the mismatching byte.
That byte at the varying positon needs to be compared with the copybook positon in order to retrieve the exact field.


why suddenly a change inn the whole environment description...
You start showing blank delimited <fields>, now You go dow a completely different path of utterly darkness

do You realize that You made people lose time on your unwillingness to post a proper description of Your problem/requirement from the beginning

and You did not even care to answer the qustions You were asked..

since You are asking for help, You should not post what You think,
but what people trying to help You want to know, which means reply to thyr question icon_evil.gif
Back to top
View user's profile Send private message
MARINA JOSEPH

New User


Joined: 11 Jun 2009
Posts: 61
Location: chennai

PostPosted: Mon Sep 14, 2009 12:10 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Sep 14, 2009 7:22 pm
Reply with quote

Hello,

Quote:
Apologies once again.
Not to worry - sometimes it takes a bit of a struggle to get clarification icon_smile.gif 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
View user's profile Send private message
donevin

New User


Joined: 07 Jun 2005
Posts: 70
Location: South Africa

PostPosted: Tue Sep 15, 2009 2:59 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL Goto page 1, 2  Next

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts REASON 00D70014 in load utility DB2 6
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top