View previous topic :: View next topic
|
Author |
Message |
kpriya6
New User
Joined: 20 Nov 2006 Posts: 13
|
|
|
|
Hi,
I need to know the procedure for storing an integer as a hex decimally 4-byte string in the long character string.
Can anyone help me out.
Thanks in Advance
Priya |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Priya,
You should know better than to start a new thread on the end of an old one......
As far as you question goes, can you give an example? |
|
Back to top |
|
|
kpriya6
New User
Joined: 20 Nov 2006 Posts: 13
|
|
|
|
Hi
I have an integer variable which has a declaration of
PIC S9(9) USAGE COMP . I need this variable to be stored as
hex decimally 4-byte string in the long character string .
Can you please help me out.
Thanks in Advance.
Priya. |
|
Back to top |
|
|
vijaybachu
New User
Joined: 23 Jul 2007 Posts: 2 Location: Bangalore
|
|
|
|
Priya,
Why dont you try using Redefine.
The technik of using based for Fixed dec and char can be successfully used in PL/I, same can be implemented using COBOL using REDEFINE.
Regards....Bachu |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Depending on the compiler options, it probably already is....
01 hex-string.
05 binary-string pic s9(9) comp-5. |
|
Back to top |
|
|
kpriya6
New User
Joined: 20 Nov 2006 Posts: 13
|
|
|
|
Hi,
I have an integer variable with picture clause of S9(9) comp.
I need this to be stored as a hex decimally 4-byte string in the long character string.
When i convert the integer into hexadecimal value i get 8 digits
for example
If the value of integer is 999999999
When i convert this to hexadecimal value i get 389AC9FF.
When i move this to variable of PIC X(4)
I get only 389A.
Only if use a variable of PIC X(8).I am getting the value 389AC9FF.
Can any one help me out .
Thanks in Advance
Priya |
|
Back to top |
|
|
|