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

wht is structured cobol pgm and non structred cobol pgm ?

1 Answers   CTS, DELL,


What are the different ways to run a COBOL DB2 program using JCL?

2 Answers  


What is rmode(24)

0 Answers  


I have a files containing both duplicate and non-duplicate records.The file is already sorted by a key.I want to determine those records that are duplicate and records that are non-duplicate.If duplicate the record is move to a duplicate file and if non-duplicate that will be move to valid file.thank you

1 Answers  


I need to compare two VSAM files, both having 'number' as key. If there is a matching record, write the data into another VSAM file. How will it be possible.

1 Answers   DSRC,






what is SYNCHRONIZATION?

3 Answers   Syntel,


If by mistake we MOVE a working storage variable into LINKAGE area. What will happen??

4 Answers   Accenture,


How to pass return codes from cobol to jcl?

5 Answers  


What is the difference between structured cobol programming and object alternativelyiented cobol programming?

0 Answers  


study the data discriptions and answer the questions given below i)01 ORDER RECORD 05 OUT-HEADER PIC X(50) 05 ITEM-COUNT PIC 99 05 OUT-ITEM PIC X(20) OCCURS 1 TO 20 DEPENDING ON ITEM-COUNT ii)01 NAME-AND-ADDRESS 05 N-AND-A-LINE OCCURES 5 05 LINE-LENGTH PIC P9 05 N-AND-A-CHAR PIC X OCCURS 1 TO 20 DEPENDING ON LINE-LENGTH iii)01 SALES-LIST 05 SALESMAN-COUNT PIC 99 05 SALES PIC 9(6) OCCURS 1 TO 100 DEPENDING ON SALESMAN-COUNT iv)01 ORDER-RECORD 05 NO-OF-BRANDS PIC 99 05 BRAND-PURCHASED OCCURS 1 TO 15 DEPENDING ON NO-OF-BRANDS which of the following is true? a.i) and iii) are valid b.i) and iv) are valid c.i) and iii) are not valid d.all are valid

4 Answers   TCS,


ID DIVISION. PROGRAM-ID. PLO. DATA DIVISION. WORKING-STORAGE SECTION. 01 VAR1 PIC 9(2). 01 VAR2 PIC X(2). PROCEDURE DIVISION. ACCEPT VAR2. MOVE VAR2 TO VAR1. STOP RUN. if i give 'PI' in var2 then what will b output of progr. any abend?????

6 Answers   TCS,


I hav vari declaration like..... 77 a pic s9(9).99. 77 b pic s9(9).99 comp. 77 c pic s9(9).99 comp-3. if i use MOVE 123456789.99 to a,b,c what happen every one working fine ?

1 Answers   Mphasis,


Categories