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

AlphaNumeric to Numeric Move-Dought


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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: 463

PostPosted: Thu Feb 09, 2006 10:51 am
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
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
No new posts Convert HEX to Numeric DB2 3
No new posts Find a record count/numeric is multip... COBOL Programming 1
No new posts How to move DB2 Installation HLQ DB2 4
Search our Forums:

Back to Top