Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref

Author Message
meenakshi_forum
Warnings : 1

Active User

Joined: 27 May 2008
Posts: 121
Location: India

 Posted: Tue Dec 01, 2009 12:15 pm    Post subject: To identify Hex values 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

Binop B

Active User

Joined: 18 Jun 2009
Posts: 407
Location: Nashville, TN

 Posted: Tue Dec 01, 2009 12:35 pm    Post subject: Hi Meenakshi, The two nibbles exactly below your 27th byte will be the hex value of that byte.
Mathiv Anan

Active User

Joined: 23 Jul 2008
Posts: 106
Location: USA

 Posted: Tue Dec 01, 2009 12:36 pm    Post subject: Reply to: To identify Hex values 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').

New User

Joined: 20 Aug 2006
Posts: 34
Location: chennai

Posted: Tue Dec 01, 2009 5:33 pm    Post subject: Reply to: To identify Hex values

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.
dick scherrer

Site Director

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

 Posted: Wed Dec 02, 2009 3:43 am    Post subject: Hello Meenakshi, Is this resolved? If not, using COLS (along with HEX ON) will show a "ruler" that shows the data positions.
Bill O'Boyle

CICS Moderator

Joined: 14 Jan 2008
Posts: 2504
Location: Atlanta, Georgia, USA

Posted: Wed Dec 02, 2009 4:20 am    Post subject: Reply to: To identify Hex values

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
meenakshi_forum
Warnings : 1

Active User

Joined: 27 May 2008
Posts: 121
Location: India

 Posted: Wed Dec 02, 2009 10:43 am    Post subject: Reply to: To identify Hex values Yes, It's resolved. Thanks a lot to all.
enrico-sorichetti

Senior Member

Joined: 14 Mar 2007
Posts: 10478
Location: italy

 Posted: Wed Dec 02, 2009 11:54 am    Post subject: Reply to: To identify Hex values it' s good to see that the issue was resolved, but we still have not understood what it was
 All times are GMT + 6 Hours
 Page 1 of 1

Search our Forum:

 Topic Author Forum Replies Posted Similar Topics LOW VALUES as a KEY juares castro DB2 10 Sat Apr 07, 2018 1:06 am Query to compare 2 values of 1 column... Poha Eater DB2 13 Fri Mar 09, 2018 10:45 am Need to identify top 10 costly or tim... ashek15 DB2 4 Wed Feb 14, 2018 3:20 am attchmvs from rexx subroutine that re... harisukumaran CLIST & REXX 1 Fri Jan 19, 2018 5:29 am Extend the decimal values in DIVISION Balaryan DFSORT/ICETOOL 3 Thu Oct 05, 2017 4:05 pm

 © 2003-2017 IBM MAINFRAME Software Support Division
 Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us