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

Comparing HEXADECIMAL values from two different files


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Wed Aug 01, 2007 10:13 pm
Reply with quote

feellikeneo wrote:
I am sorry that this doesn't work in my case.

I am just comparing these two values from file-1 and file-2 but still then my IF fails
I hate to be amoung those to tell you, but if the eight byte fields are the same, they will compare equal....
Just before comparing them, display both as in:
DISPLAY '*' field1 '*' field2 '*'
and look at the spool after SET HEX ON.......
Back to top
View user's profile Send private message
feellikeneo

New User


Joined: 19 Mar 2007
Posts: 73
Location: Chennai

PostPosted: Wed Aug 01, 2007 10:21 pm
Reply with quote

ok.. let me try and get back to you
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: Wed Aug 01, 2007 10:26 pm
Reply with quote

Hello,

I'd suggest making sure that RB-INDEX has the correct value and also making sure the table was actually loaded - if the values were moved to the array, but the position in the array was not incremented, the "load" would execute, but the array would not have all of the values.

I'm also confused why
Code:
|      º_    ±Õò |
44129608EC44
F071BDEFFD0F
does not align propperly. If the entire set was copy/pasted, all 3 lines should have the same width. . .

Is there some reason not to post the content of the 2 files (in hex)?
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Thu Aug 02, 2007 12:00 am
Reply with quote

William Thompson wrote:
for example, your "º_ ±Õò" showed up as:
Code:
º_ ±Õò
9648EC
BD0FFD
Mine didn't align quite correctly either.........
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: Thu Aug 02, 2007 12:06 am
Reply with quote

Hello,

It should if it is copied from a browse with "hex on". . . .

That of course means the info needs to come from the actual data files rather than the sysout after it has been thru some amount of code.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Thu Aug 02, 2007 1:09 am
Reply with quote

Dick, to expand a little:
Code:

|   Âº_ ±Õò |
44129608EC44
F071BDEFFD0F

Had some "tabbing" in the upper line (with my green card, I'm helpless)......
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: Thu Aug 02, 2007 1:39 am
Reply with quote

Hello,

Looks like the web page is not using a fixed font even in code sometimes.

Both of the x'4F' characters should have the | over them. . . Bummer.

Maybe we'll hear back from TS as to what the data really is (or what the code is that we may see why the IF is not working). The good news is that the hex values do line up and the "funny little values" won't have any impact on the compare.
Back to top
View user's profile Send private message
feellikeneo

New User


Joined: 19 Mar 2007
Posts: 73
Location: Chennai

PostPosted: Fri Aug 03, 2007 7:12 pm
Reply with quote

Hello everybody,

Apologize me for the delayed response.

I tried moving both the values from file-1 and file-2 to a working storage variable of same level. I moved both to a 77 level variable with PIC clause as X.

I am not sure how it worked for me.. My IF condition is working fine now. I still dont understand what is the difference between moving a variable and comparing them at different level.


Just an info -

I browsed the spool to see what is displayed in SYSOUT. It was different from what is in file (3.4 view), But when we compare the HEX values between the spool data and 3.4 view data, both are same.

I suppose this is because they are non displayable character and so they are displayed differently in spool and 3.4 view.

Thanks for all your suggestion.. You ppl were really fast to help me..

Cheers,
Neo icon_smile.gif
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 Aug 03, 2007 7:19 pm
Reply with quote

You're welcome icon_smile.gif

Thanks for letting us know what you found.
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 -> COBOL Programming Goto page 1, 2  Next

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
Search our Forums:

Back to Top