View previous topic :: View next topic
|
Author |
Message |
meenakshi_forum Warnings : 1 Active User
Joined: 27 May 2008 Posts: 121 Location: India
|
|
|
|
Hi,
Please help me in identifying Hex values of any literal,
it can be a constant, numeric, alphanumeric.
Eg- 3456, open, closed, spaces.
I know the way to do hexon but for each given value above, two lines are being dispalyed, i am unable to make out how to read it?
Say if the field length is 30 bytes, i want to know what is hex value at 27th byte, how will i identify, as the hex value is very long.
Please help.
Thanks |
|
Back to top |
|
|
Binop B
Active User
Joined: 18 Jun 2009 Posts: 407 Location: Nashville, TN
|
|
|
|
Hi Meenakshi,
The two nibbles exactly below your 27th byte will be the hex value of that byte. |
|
Back to top |
|
|
Mathiv Anan
Active User
Joined: 23 Jul 2008 Posts: 106 Location: USA
|
|
|
|
Do you want to identify hex values in cobol program?
Or if you just want to identify the hex values, use hex on and find out.
ex>
444
000
If you issue 'hex on' it displays as copied above for spaces.
so it is hex value of space of 3 bytes. (x'404040'). |
|
Back to top |
|
|
shaktiprasad
New User
Joined: 20 Aug 2006 Posts: 34 Location: chennai
|
|
|
|
Hi,
When you put hex on you will able to see some hex values just along with the original values.Hex values will be displayed just below the original values.For example if your value is -3450 and length of your file is 80 bytes then when you put hex on the value will be displayed as:
-3450
6FFFF
03450
Code: |
As rest of the bytes are spaces so it will be 4444 as shown by Mathiv
0000
(this is hex value of spaces of 4 bytes) |
Code'd to give people half a chance
So don't get confused by seeing these values.Hope it clears your doubt. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello Meenakshi,
Is this resolved?
If not, using COLS (along with HEX ON) will show a "ruler" that shows the data positions. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Programmatically in COBOL -
Code: |
03 WS-HEX-BYTE PIC X(01).
03 WS-PACKED PIC 99V9 PACKED-DECIMAL.
03 WS-PACKED-X REDEFINES WS-PACKED PIC X(02).
03 WS-DISPLAY PIC 99V9.
MOVE X'BD' TO WS-HEX-BYTE.
MOVE ZERO TO WS-PACKED.
MOVE WS-HEX-BYTE TO WS-PACKED-X (1:1).
MOVE WS-PACKED TO WS-DISPLAY.
*
* BEFORE THE INSPECT, WS-DISPLAY EQUALS X'FBFDF0'.
*
INSPECT WS-DISPLAY CONVERTING X'FAFBFCFDFEFF' TO 'ABCDEF'.
|
At this point (and after the INSPECT), WS-DISPLAY (1:2) equals C'BD', with byte-3 equal to C'0', in hex X'C2C4F0'.
Bill |
|
Back to top |
|
|
meenakshi_forum Warnings : 1 Active User
Joined: 27 May 2008 Posts: 121 Location: India
|
|
|
|
Yes, It's resolved.
Thanks a lot to all. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
it' s good to see that the issue was resolved,
but we still have not understood what it was |
|
Back to top |
|
|
|