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
Answer Posted / karthik
IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO-WORLD.
DATA division.
WORKING-STORAGE SECTION.
01 A PIC 99V9 VALUE 5.
01 B PIC 99V9 VALUE 6.
01 C PIC 99V9 VALUE 2.5.
01 D PIC 99 VALUE 3.
PROCEDURE DIVISION.
COMPUTE A ROUNDED B C = A+B*C/D
ON SIZE ERROR PERFORM PRINT-ERROR.
DISPLAY A.
DISPLAY B.
DISPLAY C.
STOP RUN.
PRINT-ERROR.
DISPLAY "ERROR".
o/p
10.0
10.0
10.0
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Explain what you understand by passing by value.
which is Best IBM Mainframe Training and Placement Institute in Ameerpet Hyderabad
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
What is the utilization of copybook in cobol? Could we utilize a similar copybook?
What is a SSRANGE and NOSSRANGE?
Difference between cobol and cobol-ii?
EXPLAIN MAIN FRAME TESTING PROCESS...HOW TO FIX THE MAINFRAME BUGS?
Write the code implementing the perform … varying.
what is amode(24), amode(31), rmode(24) and rmode(any)?
What is the difference between Call and a Link?
How do you differentiate between cobol and cobol-ii?
Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc
Our issue is there seems to be a disconnect, or no link, between our SELECT statement and our SD. We had SELECT SORT-FILE and SELECT SORT-FILE ASSIGN TO SORTWRK. ASSIGN TO SORTWRK1 SORTWRK2 SORTWRK3 SORTWRK4. with SD SORT_FILE RECORD CONTAINS 7833 CHARACTERS. In either case, at run time, the system ignored our SORTWRK# DD statements and allocated 16 sort works with the SORTWK## naming convention. Any ideas why the system does not recognize the connection? We do not even need the SORTWRK DD statements. Thanks
What is the use of intialize verb?
Name some of the examples of COBOl 11?