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
 
MOVEMENT OF S9(4)v9(4) TO S9(4)v9(4)COMP-3

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: MOVEMENT OF S9(4)v9(4) TO S9(4)v9(4)COMP-3
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    Post subject: Re: MOVEMENT OF S9(4)v9(4) TO S9(4)v9(4)COMP-3
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    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 COMP Variables Mismatch gayu7 COBOL Programming 5 Wed Dec 20, 2017 5:06 pm
No new posts Moving a COMP-3 Variable to a Numeric... ajayachander COBOL Programming 2 Thu Dec 14, 2017 5:46 pm
No new posts CONDITIONAL USING COMP-2 WITH PROBLEMS. JOSUEGENTIL COBOL Programming 7 Wed Nov 08, 2017 11:13 pm
No new posts how can i move s9(9) to s9(9) usage comp HARENDRA CHOUDHARY COBOL Programming 3 Mon Nov 06, 2017 12:10 am
No new posts Protection Exception while move 0 to ... Kevin Vaz CICS 10 Tue Oct 18, 2016 4:19 pm

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