Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Reading HEX Value

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
scorp_rahul23

New User


Joined: 06 May 2008
Posts: 90
Location: Chennai

PostPosted: Wed Feb 22, 2012 3:04 pm    Post subject: Reading HEX Value
Reply with quote

I have file where data is in format as below.


Code:
<T074               
4EFFF4444056642144444
C30740000394800C00000


In this there is a number 359646840201

How can I read this number form the above line in REXX.

And for this field PICTURE Clause is S9(12)


Can someone help..
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Wed Feb 22, 2012 3:08 pm    Post subject: Reply to: Reading HEX Value
Reply with quote

search the forum ( my posts ) for rexx pack unpack
ok I had it bookmarked

here
http://ibmmainframes.com/viewtopic.php?t=27921&highlight=rexx+pack+unpack
and here
http://ibmmainframes.com/viewtopic.php?t=41407&highlight=rexx+pack+unpack
and here
http://ibmmainframes.com/viewtopic.php?t=31547&postdays=0&postorder=asc&start=15
Back to top
View user's profile Send private message
scorp_rahul23

New User


Joined: 06 May 2008
Posts: 90
Location: Chennai

PostPosted: Wed Feb 22, 2012 3:18 pm    Post subject: Reply to: Reading HEX Value
Reply with quote

Hi,

I read the posts, but I dont think I need it in such a details. I just want to know if I can put my number in hex format to search it.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Wed Feb 22, 2012 3:20 pm    Post subject: Reply to: Reading HEX Value
Reply with quote

that is not what the topic title said
Quote:
Reading HEX Value

and what You asked
Quote:
How can I read this number form the above line in REXX.

icon_evil.gif
anyway the answer is YES
Back to top
View user's profile Send private message
scorp_rahul23

New User


Joined: 06 May 2008
Posts: 90
Location: Chennai

PostPosted: Wed Feb 22, 2012 3:31 pm    Post subject: Reply to: Reading HEX Value
Reply with quote

Yaa, Sorry for confusing you with my question.

Can you tell how to read this number in hex format.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Wed Feb 22, 2012 3:33 pm    Post subject: Re: Reading HEX Value
Reply with quote

Bear in mind that you are showing a "packed decimal" number, positively signed. So you have a "C" at the end of the number, using half a byte, so you'll have to deal with it, and any "D" which would show a negative value for the number.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Feb 22, 2012 4:24 pm    Post subject:
Reply with quote

scorp_rahul23
do you realize that you are looking at a 7 byte field?

the number that you have provided as an example: 359646840201

would be x'0359646840201C'

the reason Enrico provided the links is that
the details from which you wish to absquatulate without any knowledge
would free you from future rookie questions.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Wed Feb 22, 2012 5:02 pm    Post subject:
Reply with quote

dbzTHEdinosauer wrote:
scorp_rahul23
do you realize that you are looking at a 7 byte field?

the number that you have provided as an example: 359646840201

would be x'0359646840201C'

Actually, his OP offers an embarrassing mishmash of packed decimal, binary, and zoned decimal (heesh may be too stupid or lazy to use an explicit USAGE clause on his COBOL picture, but the assumption of the compiler would be USAGE IS DISPLAY). Moreover, despite nearly four years of membership, heesh still refuses to use code tags or read documentation.

I recommend that we prescind from this topic until the TS starts acting like a human being instead of like a software engineer.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Feb 22, 2012 5:29 pm    Post subject:
Reply with quote

Akatsukami

you have again caught me assuming.

good post
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Wed Feb 22, 2012 7:31 pm    Post subject: Reply to: Reading HEX Value
Reply with quote

Quote:
Can you tell how to read this number in hex format.


whatever You mean by <read> the code snippets pointed by the links
provide the tested code to transform a packed number into a displayable thing and viceversa

if Yo are not able to understand that, then a career switch is strongly advised icon_evil.gif
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 -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Reading data from PS file and send it... rajatbagga All Other Mainframe Topics 18 Fri Sep 23, 2016 12:51 pm
No new posts Reading selected volumes of a multi-v... RickBig JCL & VSAM 6 Wed Jul 13, 2016 7:26 pm
No new posts Reading from File 1 and Writing to Fi... shiitiizz CLIST & REXX 2 Thu May 14, 2015 5:49 pm
No new posts reading adabas file without descriptor Ralph Zbrog Java & MQSeries 1 Wed Feb 25, 2015 3:28 pm
No new posts Using DSECT - for file reading Apurva Mehta PL/I & Assembler 2 Mon Nov 17, 2014 10:09 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us