View previous topic :: View next topic
|
Author |
Message |
scorp_rahul23
New User
Joined: 06 May 2008 Posts: 96 Location: Delhi
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
Back to top |
|
|
scorp_rahul23
New User
Joined: 06 May 2008 Posts: 96 Location: Delhi
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
that is not what the topic title said
and what You asked
Quote: |
How can I read this number form the above line in REXX. |
anyway the answer is YES |
|
Back to top |
|
|
scorp_rahul23
New User
Joined: 06 May 2008 Posts: 96 Location: Delhi
|
|
|
|
Yaa, Sorry for confusing you with my question.
Can you tell how to read this number in hex format. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Akatsukami
you have again caught me assuming.
good post |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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 |
|
Back to top |
|
|
|