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
Discuss about changing dataset name in proc.
What is the difference between goback, stop run and exit program in cobol?
What is the utilization of copybook in cobol? Could we utilize a similar copybook?
HOw can I get the negative sign while deduct high value from low value
When is inspect verb is used in cobol?
Can we redefine the field of x(200) to less than 200?
Have you used the sort in your project?for this type of questions any working on real time project give the eg. with real time scenario.
How did the release of cobol/370 version 1.3 improve the performance of release 1.1?
How to get the last record in vsam file in cluster? And how can you get the ksds file records into cobol program?
) How do u handle errors in BMS macro
If you are current on the owner of a set, what is the difference between obtain next and obtain first?
Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?
What are the access modes of START statement?
How many bytes S(8) comp field occupy and its maximum value?
Mention the guidelines to write a structured cobol program?