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: 8117
Location: East Dubuque, Illinois, USA

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: 8117
Location: East Dubuque, Illinois, USA

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
No new posts Validate if a Value from the file is ... balacsv2 COBOL Programming 8 Mon Jun 19, 2017 11:52 pm
No new posts Can I traverse a STEM variable? chong.zhou CLIST & REXX 5 Wed May 31, 2017 3:54 pm
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm


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