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

MOVEMENT OF S9(4)v9(4) TO S9(4)v9(4)COMP-3


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mk_kumar315

New User


Joined: 21 Nov 2005
Posts: 10

PostPosted: Sun Jun 04, 2006 8:23 am
Reply with quote

Hi,

I have doubt regarding MOVE statement in cobol.

I want to move a variable S9(4)v9(4) to another variable
S9(4)v9(4)COMP-3.

Is it possible by giving MOVE A TO B.
By giving like this can i get all valid data or any INVALID will be displayed.

Thanks In Advance,
M.K.Kumar
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Mon Jun 05, 2006 8:01 am
Reply with quote

Yes, of course this can be done, The only difference in the two variables is the internal format that the computer uses to store the numbers.

If you wanted to store a numbet +1234.5678. The S9(4)v9(4) would have a hex value of 'F1F2F3F4F5F6F7C8' with the assumed decimal point, and the S9(9)v9(4) COMP-3 would have an internal hex value of X'012345678C', also with the assumed decimal point.

Dave
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 Converting ASCII values to COMP-3 (ZD... JCL & VSAM 2
No new posts Interviewers are surprised with my an... Mainframe Interview Questions 6
No new posts Cobol COMP-2 fields getting scrambled... Java & MQSeries 6
No new posts convert alphanumeric PIC X(02) to hex... COBOL Programming 3
Search our Forums:

Back to Top