View previous topic :: View next topic
|
Author |
Message |
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi all,
Can we declare Decimal value to a comp variable.
Eg: Can we declare 9(2)V9(2) comp. |
|
Back to top |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
Quote: |
Can we declare Decimal value to a comp variable. |
Yes... |
|
Back to top |
|
|
crrindia
Active User
Joined: 02 Jul 2005 Posts: 124 Location: Gurgaon
|
|
|
|
Hi Priyush, I am thinking that we can't use COMP clause for decimals, for decimals we can use COMP-3. Decimals are allowing in COMP from the recent versions of Cobol or from the beginning? Can you please let me know about it.
Thanks!
Rat... |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Deleted by author. I completely misread the ques. |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi Priyush, I am thinking that we can't use COMP clause for decimals, for decimals we can use COMP-3. Decimals are allowing in COMP from the recent versions of Cobol or from the beginning? Can you please let me know about it.
Thanks!
Rat...
What do u say Priush?
CAn we declare 9(2)V9(2)? |
|
Back to top |
|
|
neelesht
New User
Joined: 24 Jul 2006 Posts: 99 Location: Los Angeles
|
|
|
|
Hi all,
Any updates on the above qns posted by Ekta....
Enjoy....
Neelesh |
|
Back to top |
|
|
cobolunni
Active User
Joined: 07 Aug 2006 Posts: 127 Location: kerala,india
|
|
|
|
We can use comp for desimal points in z/os with cobolV3.2 and i dont know clearly about other versions |
|
Back to top |
|
|
Aditya Bhardwaj Warnings : 1 New User
Joined: 02 Nov 2004 Posts: 18 Location: Noida, India
|
|
|
|
Hi,
When usage is specified as COMP, the numeric data item is represented in pure binary. The item must eb an integer (no assumed decimal point is allowed). Such data items are often used as subscripts. |
|
Back to top |
|
|
prashanth1
New User
Joined: 27 Sep 2006 Posts: 47 Location: Hyderabad
|
|
|
|
COMP-1 and COMP-2 supports for floating values. |
|
Back to top |
|
|
sweetselva
New User
Joined: 17 Dec 2006 Posts: 4 Location: USA
|
|
|
|
Yes. COMP -1 and COMP-2 supports decimal values.
COMP-1 uses one word and COMP-2 uses 2 word of memory.
Regards,
Selva |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Hi
We can use COMP for storing decimal values.It is possible.
Thanks
Arun |
|
Back to top |
|
|
|