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
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 |
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 |
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 |
What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?
How can you add a particular field in copybook?
What are the different rules to perform a Search?
What are the ways you can generate a copybook?
can I copy book which contain db2 statment in procedure divion?
for an INITIALIZE and what keyword allows for an override of the default.
What is the difference between NEXT SENTENCE and CONTINUE?
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there
I have sequential file recl 1000 i want to add another 15 bytes to it. The record length should not change..How?
can u plz expain me how to declare dynamic array? what is the meaning of depending on clause in dynamic array?
Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?
in cobol i have one file it contains records like 10,4,23,98,7,90..... total records 100. iwant 10 to 20 in reverse order in cobol environ ment any one please give the answer......