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 |
How many maximum number of procedures can we write in one COBOL program?
How does IDMS insure data integrity?
Which of the following paragraphs is compulsory in every COBOL program? (a) SPECIAL-NAMES (b) PROGRAM-ID (c) FILE-CONTROL (d) OBJECT-COMPUTER
OCCURS clause is used in the DATA DIVISION on data names at (a) 01 level (b) 77 level (c) 88 level (d) any level from 02 to 49
What is the difference between a DYNAMIC and STATIC call in COBOL?
How do u write test cases?
how to pass 100 to s9(4) how r they inserted ?
What is the difference between a binary search and a sequential search? What are the pertinent cobol commands?
how to transfer the file from pc to mainframe??
How to get the last record in vsam file in cluster? And how can you get the kids file records into your cobol program?
If a sub program is called from mainprogram.I have opened cursor in main program and Fetch the result in subprogram ,Is it possible ?If yes please tell me the reason.
what is linkcard in cobol?