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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

753


Define static linking and dynamic linking.

765


i want to learn mainframe..any websites and material to learn from basic..? my mail id : rajeswaribe2010@gmail.com

1885


What is the difference between comp and comp-3 usage?

775


2 input fles: 2 flat files, with different number of records. both are having unique key for each record and already sorted in ascending order . match these files using unique key and in output only matching key value has to be written. please procide cobol logic

2256






Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?

943


what is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.

8492


What are all the divisions of a COBOL program?

756


What is amode(31)

807


how do you reference the ksds vsam file formats from cobol programs

751


What is a scope terminator give example?

735


please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?

2061


What is static and dynamic call in cobol?

677


How do you reference the following file formats from cobol programs?

797


What is the difference between comp and comp-3?

795