View previous topic :: View next topic
|
Author |
Message |
kothai
New User
Joined: 01 Sep 2008 Posts: 32 Location: chennaii
|
|
|
|
How to move a alphanumeric variable with X(11) to Signed implied numeric variable S9(10)V9(6)?
Suppose the value in X(11) variable is 6.556 when moved to this implied
decimal variable it becomes 00006.556000000{
The decimal point is explicitly represented when doing this way.
How to move the correct value to this field.?
Please help with your valuable suggestions. |
|
Back to top |
|
|
Binop B
Active User
Joined: 18 Jun 2009 Posts: 407 Location: Nashville, TN
|
|
|
|
Hi Kothai,
Using an INSPECT statement would be a start.... |
|
Back to top |
|
|
kothai
New User
Joined: 01 Sep 2008 Posts: 32 Location: chennaii
|
|
|
|
Thanks for the response.
But i dont have to determine the decimal point position.
I need to the output field to have the value 000000000655600{ instead of
00006.556000000{
Please let me know what needs to be done in this case. |
|
Back to top |
|
|
Binop B
Active User
Joined: 18 Jun 2009 Posts: 407 Location: Nashville, TN
|
|
|
|
Hi Kothai,
Quote: |
But i dont have to determine the decimal point position.
|
So I guess you want to use the variable as a number.
The same topic has been discussed a lot of times in the forum before. Please check and let us know if you are still not able to find a solution. |
|
Back to top |
|
|
kothai
New User
Joined: 01 Sep 2008 Posts: 32 Location: chennaii
|
|
|
|
Yes..I'm just doing the search..but i've no time to spend on it now..thats why raising it. If you have the link to this topic in the forum please let me know. |
|
Back to top |
|
|
Binop B
Active User
Joined: 18 Jun 2009 Posts: 407 Location: Nashville, TN
|
|
|
|
Hi,
Quote: |
I'm just doing the search..but i've no time to spend on it now |
You will need to do it better and please understand that we all here are busy.
Please do the following...
1. Click Search link on top of this page
2. Search for "alphanumeric and numeric"
3. Select "Mainframe COBOL" in the Forums section
4. Probably you could tick "Search topic title only" option. |
|
Back to top |
|
|
kothai
New User
Joined: 01 Sep 2008 Posts: 32 Location: chennaii
|
|
|
|
Thank you. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
FUNCTION NUMVAL is one idea. Reading up in the COBOL Language Reference (manuals link at the top of the page) on MOVE rules so you understand why COBOL did exactly what you asked it to do would also be quite helpful. |
|
Back to top |
|
|
kothai
New User
Joined: 01 Sep 2008 Posts: 32 Location: chennaii
|
|
|
|
Thanks so much Robert. I got it resolved by using FUCNTION NUMVAL. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Glad to hear you got it working! |
|
Back to top |
|
|
|