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



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

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

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

Answer / fdsfsdfs

yes it has to be declared COMP 2

Is This Answer Correct ?    5 Yes 0 No

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

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

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

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

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

Answer / sri

9(X) V99 or 9(X) V(Y)

Where X and Y are integers.

Is This Answer Correct ?    3 Yes 4 No

Post New Answer

More COBOL Interview Questions

What are the different data types in cobol?

0 Answers  


maximum of how many screens we can open in emulator

2 Answers  


How do u debug a S0C7 abend? (aswered till we get the field which caused that) After knowing the field which caused that how do u know the record which caused that if it is in production env? (dumb) Ok let us assume that we got to know that 100th record caused that and I wanted to skip only 100th record from the file and process from 101th. How to do that in JCL using SORT? (tried with STOPAFT but ended up dumb when he said smthing else is ther)

3 Answers   IBM,


What is the difference between structured cobol programming and object alternativelyiented cobol?

0 Answers  


What is rmode(any) ?

0 Answers  


There are 5 fields and 1000 records in a file. Unload it into an array. Write the syntax for declaration and how will you unload it.

0 Answers  


i have a requrement in A as viswa!@#$%&^**reddy i need to move viswareddy in B without junk values pls say how to do ths reply fast

4 Answers   L&T,


I need to compare two VSAM files, both having 'number' as key. If there is a matching record, write the data into another VSAM file. How will it be possible.

1 Answers   DSRC,


What is perform what is varying?

0 Answers  


How does IDMS insure data integrity?

1 Answers  


The order of precedence of arithmetic operators in an expression can be overridden with the use of (a) [] (b) () (c) {} (d) Any of the above

3 Answers   TCS,


can you please let me know if there is any walkins for COBOL/PLI/DB2/IMS/JCL in pune other than IBM and ITC infotech

0 Answers  


Categories