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


Please Help Members By Posting Answers For Below Questions

How to traceback if I am getting SOC7 or SOC4 abend? List down the steps

914


Differentiate cobol and cobol-ii. (Most of our programs are written in cobolii, so, it is good to know, how, this is different from cobol)?

631


Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc

825


What is the difference between external and global variables in COBOL?

813


i want a program using by if, evaluate , string, unstring, perform, occurs?

4061






can you please let me know if there is any walkins for COBOL/PLI/DB2/IMS/JCL in pune other than IBM and ITC infotech

1960


What are various search techniques in cobol? Explain.

650


Why occurs cannot be used in 01 level in COBOL?

719


What are the access modes of START statement?

719


What the difference is between continue and next sentence?

659


if we have " ibm mainframe ",in that how to remove first and last leading space eg:"ibm mainframe" like that the answer we need

857


How do you get the data to code the BMS macro?

1476


Write the code to count the sum of n natural numbers.

699


What is comp-1 and comp-2?

764


what is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.

8167