I want to declare a field with data type Double in my COBOL
program. how shall i do that ?

Answers were Sorted based on User's Feedback



I want to declare a field with data type Double in my COBOL program. how shall i do that ?..

Answer / tarunam

To Declare field with double data type u have to declare it
with comp-2
eg: PIC s9(8) usage is comp-2

Is This Answer Correct ?    8 Yes 0 No

I want to declare a field with data type Double in my COBOL program. how shall i do that ?..

Answer / fdsfsdfs

yes it has to be declared COMP 2

Is This Answer Correct ?    5 Yes 0 No

I want to declare a field with data type Double in my COBOL program. how shall i do that ?..

Answer / prasad

With the above answer we can achive decimal numeric
declaration but we will not achive double format
declaration.

To Declare double data type in COBOL we have to decalre
field with COMP-3.

Examples:

WS-NUM PIC 9(4) COMP-3. for non decimal numbers
WS-NUM1 PIC 9(4) v 99 COMP-3. For decimal values.

Is This Answer Correct ?    3 Yes 1 No

I want to declare a field with data type Double in my COBOL program. how shall i do that ?..

Answer / i go crazy

For COMP-2 we will not give PIC clause. By default it takes 8 bytes.

Is This Answer Correct ?    2 Yes 0 No

I want to declare a field with data type Double in my COBOL program. how shall i do that ?..

Answer / sri

9(X) V99 or 9(X) V(Y)

Where X and Y are integers.

Is This Answer Correct ?    3 Yes 4 No

Post New Answer

More COBOL Interview Questions

which certifications r 4 cobol,jcl,db2,cics what is format of xam n what is importance of these certifications... plz post answer only if u r sure... thanks

1 Answers  


At the minimum, which division of COBOL is enough to be coded?

3 Answers   CTS,


What is an explicit scope terminator?

3 Answers  


how to display date in reverse order if the pic clause of the is numeric suppose date is 09032010 ==> need to print in 20100309 (pic clause is numeric)

6 Answers  


What guidelines should be followed to write a structured cobol prgm?

0 Answers  






How to delete leading spaces/blank in COBOL ? Example:- 01 data-name-1 pic x(220) " English is a language". I would like to delete leading spaces.

7 Answers   Financial Services,


i have 10 names in an array and my name is one of them also array is not in sorted order i need to display my name using index how will i do this

0 Answers  


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

1 Answers  


how we can reverse the string in the cobol for example satheesh can be reveresed as hseehtas

3 Answers   IBM,


How to recover a deleted source physical file from library?

1 Answers   HCL,


What happens in the background of spool when we submit a job for compilation and execution... This is a recent question in ibm...Kindly help me.....

3 Answers   IBM,


What rules are to be followed while using the corresponding options?

0 Answers  


Categories