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
 
Computing verb

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

New User


Joined: 28 Jul 2006
Posts: 60
Location: Mumbai

PostPosted: Thu Aug 31, 2006 3:12 pm    Post subject: Computing verb
Reply with quote

study the following

01 A PIC 99V0 VALUE 5
01 B PIC 9V9 VALUE 6
01 C PIC 99V9 VALUE 2.5
01 D PIC 99 VALUE 3
COMPUTE A ROUNDED B C = A+B*C/D
ON SIZE ERROR PERFORM PRINT-ERROR
the comments of A.B.C after execution of the above statement are
a.A=10 B=0 C=10
b.A=10 B=9.9 C=9.9
c.A=10 B=0 C=9.9
d.A=10 B=6 C=10

can anyone pls tell me the answer in brief
Back to top
View user's profile Send private message

DavidatK

Active Member


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

PostPosted: Fri Sep 01, 2006 1:44 am    Post subject: Re: computing verb
Reply with quote

Answer is 'a'. A=10.0, B=0.0, C=10.0

B * C = 15.0
15.0 / D = 5.0
5.0 + A = 10.0

10.0 is moved to A, B, and C. B truncates.

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 Computing statement truncation sivasaras COBOL Programming 5 Tue Jan 06, 2015 9:33 pm
No new posts Logic of START verb with Read next sandeep kumar302 COBOL Programming 6 Tue Feb 04, 2014 12:21 pm
No new posts Calling sub program using CALL verb Ron Masters COBOL Programming 16 Fri Apr 06, 2012 4:37 pm
No new posts Need help in understanding the Move v... Himanshu Pant COBOL Programming 2 Fri Mar 30, 2012 2:47 pm
No new posts Capturing the EX value x'15' using IN... ragu.vst COBOL Programming 8 Mon Dec 19, 2011 10:12 pm

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