Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Comparing HEXADECIMAL values from two different files
Goto page Previous  1, 2
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
William Thompson

Global Moderator


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

PostPosted: Wed Aug 01, 2007 10:13 pm    Post subject:
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    Post subject:
Reply with quote

ok.. let me try and get back to you
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Wed Aug 01, 2007 10:26 pm    Post subject:
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: 3158
Location: Tucson AZ

PostPosted: Thu Aug 02, 2007 12:00 am    Post subject:
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

Site Director


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

PostPosted: Thu Aug 02, 2007 12:06 am    Post subject:
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: 3158
Location: Tucson AZ

PostPosted: Thu Aug 02, 2007 1:09 am    Post subject:
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

Site Director


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

PostPosted: Thu Aug 02, 2007 1:39 am    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Fri Aug 03, 2007 7:19 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Pack to Unpack conversion for sending... A_programmers COBOL Programming 13 Wed Sep 11, 2019 10:46 pm
This topic is locked: you cannot edit posts or make replies. Compare two files logic in COBOL Nishant Singhal COBOL Programming 4 Sun Aug 25, 2019 2:25 am
No new posts Concatenate two files of variable rec... Thiru S DFSORT/ICETOOL 3 Wed Aug 21, 2019 11:53 pm
No new posts ADD/ SUB Values oerdgie DFSORT/ICETOOL 7 Thu Jul 18, 2019 5:09 pm
No new posts position, start pos, length of column... juares castro SYNCSORT 14 Fri Jun 21, 2019 8:47 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us