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
 

 

AlphaNumeric to Numeric Move-Dought

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
venkat_India

New User


Joined: 18 Dec 2005
Posts: 7

PostPosted: Thu Feb 09, 2006 10:47 am    Post subject: AlphaNumeric to Numeric Move-Dought
Reply with quote

Hi All,
When I move the alphanumeric data item to numeric data item why I am getting one zero in the trailing position.


Regards
Back to top
View user's profile Send private message

Rupesh.Kothari

Member of the Month


Joined: 27 Apr 2005
Posts: 464

PostPosted: Thu Feb 09, 2006 10:51 am    Post subject: Re: AlphaNumeric to Numeric Move-Dought
Reply with quote

HI,

Is length of both the variable same ?


Regards
Rupesh
Back to top
View user's profile Send private message
venkat_India

New User


Joined: 18 Dec 2005
Posts: 7

PostPosted: Thu Feb 09, 2006 11:19 am    Post subject: Re: AlphaNumeric to Numeric Move-Dought
Reply with quote

Hi

To be specific the requirement is like this.
var1 pic x(10)
var2 pic 9(10) .
var1 is having the value 123 and 7 spaces like this 123sssssss
move var1 to var2
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Fri Feb 10, 2006 7:48 am    Post subject:
Reply with quote

Hi Venkat,

Because the sign processing selected as one of your compiler options generates code to put (via an OI assembler instruction) an X'F' in the hi-order nibble of the low order byte of the result field.

Since there's a space (X'40') in the low order byte, it's changed to X'F0', a zero.
Back to top
View user's profile Send private message
venkat_India

New User


Joined: 18 Dec 2005
Posts: 7

PostPosted: Fri Feb 10, 2006 9:18 am    Post subject: Re: AlphaNumeric to Numeric Move-Dought
Reply with quote

Thank you mmwife
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 date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts Converting decimal to numeric using I... Balaryan DFSORT/ICETOOL 4 Thu Feb 02, 2017 11:27 pm
No new posts DB2 9.1.0 not move values to Host-Var... Miguel Fernandez DB2 8 Wed Jan 25, 2017 8:24 pm
No new posts DB2 9.1.0 not move values to Host-Var... Miguel Fernandez DB2 0 Wed Jan 25, 2017 8:23 pm
No new posts DB2 9.1.0 not move values to Host-Var... Miguel Fernandez DB2 0 Wed Jan 25, 2017 8:21 pm


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