Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Remove leading spaces from numeric field rexx77 SYNCSORT 6 Wed Sep 06, 2017 2:15 am
No new posts Return a Non Numeric value from REXX Learncoholic CLIST & REXX 3 Fri Sep 01, 2017 8:33 pm
No new posts Select numeric portion from CHAR data... balaji81_k DB2 6 Sat Aug 19, 2017 1:51 am
No new posts Move from Comp3 variable to Edited Va... sreekusr COBOL Programming 8 Thu Aug 10, 2017 4:20 pm
No new posts Validate if a Value from the file is ... balacsv2 COBOL Programming 8 Mon Jun 19, 2017 11:52 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us