IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to move alphanumeric variable to Sigend implied numeric?


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kothai

New User


Joined: 01 Sep 2008
Posts: 32
Location: chennaii

PostPosted: Fri Aug 07, 2009 12:29 pm
Reply with quote

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
View user's profile Send private message
Binop B

Active User


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

PostPosted: Fri Aug 07, 2009 12:58 pm
Reply with quote

Hi Kothai,

Using an INSPECT statement would be a start....
Back to top
View user's profile Send private message
kothai

New User


Joined: 01 Sep 2008
Posts: 32
Location: chennaii

PostPosted: Fri Aug 07, 2009 2:00 pm
Reply with quote

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
View user's profile Send private message
Binop B

Active User


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

PostPosted: Fri Aug 07, 2009 2:22 pm
Reply with quote

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
View user's profile Send private message
kothai

New User


Joined: 01 Sep 2008
Posts: 32
Location: chennaii

PostPosted: Fri Aug 07, 2009 2:26 pm
Reply with quote

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
View user's profile Send private message
Binop B

Active User


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

PostPosted: Fri Aug 07, 2009 2:37 pm
Reply with quote

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
View user's profile Send private message
kothai

New User


Joined: 01 Sep 2008
Posts: 32
Location: chennaii

PostPosted: Fri Aug 07, 2009 2:44 pm
Reply with quote

Thank you.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri Aug 07, 2009 4:56 pm
Reply with quote

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
View user's profile Send private message
kothai

New User


Joined: 01 Sep 2008
Posts: 32
Location: chennaii

PostPosted: Fri Aug 07, 2009 5:08 pm
Reply with quote

Thanks so much Robert. I got it resolved by using FUCNTION NUMVAL.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri Aug 07, 2009 5:11 pm
Reply with quote

Glad to hear you got it working!
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Issues Converting From ZD to Signed N... DFSORT/ICETOOL 4
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Variable Output file name DFSORT/ICETOOL 8
No new posts COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
No new posts How to move the first field of each r... DFSORT/ICETOOL 5
Search our Forums:

Back to Top