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 are the access modes of START statement?
What is the difference between structured cobol programming and object alternativelyiented cobol?
What is binary search?
9(2).99 how many bytes take? Why . consider as a byte?
how do u link sub pgm to main pgm ?
is it possible to pass an SQL query inside a jcl which is inside a cobol program?
u have passed sme charecters thru parm parameter in jcl. how do u code in cobol to recieve the values u gave in parm ?
What is diff betn PS and ESDS file? What is the diffrent compiler options in cobol and there discription? What is retrive nth maximum salary from salary DB2 table. Can we redefine COM-3 variable with varchar variable?
1) can we display the index?
consider two data items 77 W-A PIC 9(3)V99 VALUE 23.75 77 W-B PIC ZZ9V99 VLAUE 123.45 after the statement MOVE W-A TO W-B what will be W-B's value? a.123.75 b.b23.75 (where b indicates space) c.023.75 d.invalid move
What is the difference between comp and comp-3 usage?
what is the basic concept of mainframe? what knowledge is needed for learn this mainframe?