given the following:
77 A PIC 9V9 VALUE 9.5
77 B PIC 9 VALUE 9.
77 C PIC V9 VALUE 0.8
77 D PIC 9
77 E PIC 9
77 F PIC 9V999
what are the contenta of D E nad F after the following
statements are
executed:
COMPUTE F ROUNDED=A+C/B
MULTIPLY A BY C GIVING E
ADD B C A GIVING D ROUNDED
a.F=9.589 E=8 D=1
b.F=9.589 E=8 D=9
c.F=9.589 E=7 D=9
d.F=9.589 E=7 D=1
Answer Posted / ram g [mind tree]
c is the correct answer ...
the result will be like this
f = 9589
e = 7
d = 9
bcoz num truncation will happen in left.
for eg: if you try to store 123 in 01 x pic 9.
the value of x should 3 not 1.
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
Explain the configuration section of a cobol program with examples of syntax.
What is the difference between a binary search and a sequential search? What are the pertinent cobol commands?
write a cobol logic. i have file that has 10 records .1 record go to first output file and second record goes to 2 output and etc
Is it possible that the redefines clause has different picture clauses compared to the one it redefined?
How can we find that module can be called – whether DYNAMICALLY or STATICALLY?
How can you get the ksds file records into your cobol program?
Why did you choose to work with ibm mainframe cobol programming?
Why occurs cannot be used in 01 level in COBOL?
I have one ps file in which there are 3 fileds emp_no,emp_name and leave_app.this ps file information give the detail of employee which is going to apply for leave.suppose emp_no=113430,emp_name=ajay,leave_app=1 that means he is going to apply for 1 day leave.and accordingling the table in db2 will be updated means if he has that no of leave in his account then he will get dat leave and updated acc. in table(leave_balance=previous leave present in table-leave_app).Now i want to check whther the updated result is correct or not by comparing the two ps file using IEBCOMPARE or icetool so what is going to be the two ps file and how its is going to be compare.
What is the utilization of copybook in cobol? Could we utilize a similar copybook?
What is the difference between comp and comp-3 usage?
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there
For rewrite, why is it mandatory that file needs to be opened?
What is the difference between perform … with test after and perform … with test before?
I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?