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
 

 

How to move alphanumeric variable to Sigend implied numeric?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: How to move alphanumeric variable to Sigend implied numeric?
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    Post subject:
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    Post subject: Reply to: How to move alphanumeric variable to Sigend implie
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
Reply with quote

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

Global Moderator


Joined: 06 Jun 2008
Posts: 7931
Location: Bellevue, IA

PostPosted: Fri Aug 07, 2009 4:56 pm    Post subject:
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    Post subject:
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: 7931
Location: Bellevue, IA

PostPosted: Fri Aug 07, 2009 5:11 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. How to move a long alphanumeric data ... lind sh COBOL Programming 8 Mon Dec 05, 2016 7:51 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts Protection Exception while move 0 to ... Kevin Vaz CICS 10 Tue Oct 18, 2016 4:19 pm
No new posts Format to pipe delimited with variabl... pshongal SYNCSORT 6 Wed Sep 14, 2016 2:48 pm
No new posts Casting a Binary Number to Numeric in... Bob Steinkraus Java & MQSeries 6 Tue Aug 09, 2016 5:58 pm


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