Is it possible to mutliply a comp variable with an comp-3
variable. Will there be any error if i do it?

Answers were Sorted based on User's Feedback



Is it possible to mutliply a comp variable with an comp-3 variable. Will there be any error if i d..

Answer / vikas pujar

Yes. Comp and Comp-3 are used to store numeric values so
operation is valid.

Is This Answer Correct ?    15 Yes 1 No

Is it possible to mutliply a comp variable with an comp-3 variable. Will there be any error if i d..

Answer / lu

yes, but never do it, you always multiply COMP with COMP
and COMP-3 with COMP-3....when you want to display : move
COMP to pic 9 (extend field) and comp-3 to pic 9 (extend
field)

Is This Answer Correct ?    9 Yes 0 No

Is it possible to mutliply a comp variable with an comp-3 variable. Will there be any error if i d..

Answer / raja

It should give S0C7. Data Exception.

Is This Answer Correct ?    2 Yes 7 No

Post New Answer

More COBOL Interview Questions

if i am reading a file with some 50000 records and moving to a DB2 table and suddenly the program abends in between, is there anyway i could restart from the exact record at which the job failed once the program restarts.

2 Answers   UST,


Hi All, Can anyone tell me how we can MOVE value of a X(19) variable to a S9(17) COMP-3 variable? Answer with an Example will be of great help.

6 Answers   EDS,


Why occurs can not be used in 01 level ?

2 Answers   TCS,


file status 00 is checked after opening the file or reading the file

4 Answers   John Deere,


What COBOL construct is the COBOL II EVALUATE meant to replace?

1 Answers  






77 a pic x(4) value '1234' -----> instead of this 'abcd' 77 b pic 9(4) value zeros. move a to b what is the answers for both cases? IS it possible? Give me elementary move rules briefly......

8 Answers  


Why is it necessary that file needs to be opened in I-O mode for REWRITE?

0 Answers  


why do u need inspect verb?

3 Answers   Patni,


i want to use only first 100 records from a file.plz tell me how to write JCL for this(for read,copy,write operations).plz give me details of all posible JCL utilities?

7 Answers   CTS,


input:- 12233344445555566666... output:- 1=1,2=4,3=9... Here firstno i.e 1 should be displayed and after that the alikeno.s should be added n displayed.i.e 2+2=4 like tat it goeson.

1 Answers  


What is 77 level used for ?

12 Answers   IBM, iGate,


What is the maximum length of a field you can define using COMP-3 in COBOL?

1 Answers   UGC Corporation,


Categories