Consider the following code:

77 A PIC 99V99 VALUE 55.35
77 B PIC 99V999 VALUE 32.754

ADD B TO A ON SIZE ERROR DISPLAY "ERROR!!!"

What will be the result ?
(a) A=88.10, B=32.754
(b) A=87.00 B=32.754
(c) A=87.10 B=32.754
(d) ERROR!!! will be DISPLAYed on the screen.

Answers were Sorted based on User's Feedback



Consider the following code: 77 A PIC 99V99 VALUE 55.35 77 B PIC 99V999 VALUE 32.754 ..

Answer / milind

The previous answer is wrong.

The correct answer is (a) 88.10.

Is This Answer Correct ?    18 Yes 4 No

Consider the following code: 77 A PIC 99V99 VALUE 55.35 77 B PIC 99V999 VALUE 32.754 ..

Answer / g venkatesh

Answer is D.
as data name length is 9(2).9(2) after the operation
the value will get over flow.
it will routed to on size error display

Is This Answer Correct ?    4 Yes 1 No

Consider the following code: 77 A PIC 99V99 VALUE 55.35 77 B PIC 99V999 VALUE 32.754 ..

Answer / vel

D

Is This Answer Correct ?    3 Yes 6 No

Post New Answer

More COBOL Interview Questions

Hi pls anybody tell me about " ANALYSIS DOCUMENT PREPARATION AND ESTIMATION OF TASK " (in real time project)."I want to update a sequential file in my project" for that purpose i need both structures i mean analysis document and estimation of task.

0 Answers  


what happens when a copybook variables are declared using include statement ?

3 Answers   IBM,


What is normalisation?

2 Answers   IBM,


How do you define a table/array in COBOL?

5 Answers   Hexaware,


i need a small 3d program using inline and outline.

0 Answers  






I have put two write operations in a single para for two different conditions.Will that lead to an abend or run successfully and write two records?

1 Answers   CTS,


What is the difference between goback, stop run and exit program in cobol?

0 Answers  


In a file if a column account number conatain value 0001234.. how can we move the value to another variable without zero. value may contain any type such as 00123405. we need the value 1234 or 12305. how can we do that in cobol. Please help.

1 Answers   CSC,


I have program P1 which calls file F1 which has 100 records and following structure 001 .................. 002 .................. 003 .................. 098 .................... 099 ................... 100 .................... Now I want to read these files and write these records in file F2 in following manner. 001 ...... 051 ..... 002 ...... 052 ..... 003 ...... 053 ..... .......... ....... .......... ....... .......... ....... 048 ........ 098 ...... 049 .......... 099 ....... 050 .... 100 ......

4 Answers   Accenture,


How does IDMS communicate with CICS?

1 Answers   Covansys, Satyam,


Explain the configuration section of a cobol program with examples of syntax.

0 Answers  


how do you define single dimensional array and multidimensional array in your cobol?

0 Answers  


Categories