Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Can we declare decimal value by a comp variable

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1187
Location: Bangalore,India

PostPosted: Sun Jul 30, 2006 9:23 am    Post subject: Can we declare decimal value by a comp variable
Reply with quote

Hi all,


Can we declare Decimal value to a comp variable.
Eg: Can we declare 9(2)V9(2) comp.
Back to top
View user's profile Send private message

priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Sun Jul 30, 2006 12:07 pm    Post subject: Re: Can ew declare decimal value by a comp variable
Reply with quote

Quote:
Can we declare Decimal value to a comp variable.

Yes...
Back to top
View user's profile Send private message
crrindia

Active User


Joined: 02 Jul 2005
Posts: 124
Location: Gurgaon

PostPosted: Sun Jul 30, 2006 7:11 pm    Post subject: Re: Can ew declare decimal value by a comp variable
Reply with quote

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
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Mon Jul 31, 2006 1:09 am    Post subject:
Reply with quote

Deleted by author. I completely misread the ques.
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1187
Location: Bangalore,India

PostPosted: Mon Jul 31, 2006 10:58 am    Post subject:
Reply with quote

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
View user's profile Send private message
neelesht

New User


Joined: 24 Jul 2006
Posts: 99
Location: Los Angeles

PostPosted: Mon Aug 14, 2006 1:36 pm    Post subject:
Reply with quote

Hi all,

Any updates on the above qns posted by Ekta....

Enjoy....
Neelesh
Back to top
View user's profile Send private message
cobolunni

Active User


Joined: 07 Aug 2006
Posts: 128
Location: kerala,india

PostPosted: Sat Aug 19, 2006 7:05 pm    Post subject:
Reply with quote

We can use comp for desimal points in z/os with cobolV3.2 and i dont know clearly about other versions
Back to top
View user's profile Send private message
Aditya Bhardwaj
Warnings : 1

New User


Joined: 02 Nov 2004
Posts: 18
Location: Noida, India

PostPosted: Sun Aug 20, 2006 1:24 am    Post subject: Re: Can we declare decimal value by a comp variable
Reply with quote

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
View user's profile Send private message
prashanth1

New User


Joined: 27 Sep 2006
Posts: 47
Location: Hyderabad

PostPosted: Wed Oct 04, 2006 2:24 pm    Post subject:
Reply with quote

COMP-1 and COMP-2 supports for floating values.
Back to top
View user's profile Send private message
sweetselva

New User


Joined: 17 Dec 2006
Posts: 4
Location: USA

PostPosted: Mon Dec 18, 2006 3:23 am    Post subject:
Reply with quote

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
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2276
Location: @my desk

PostPosted: Mon Dec 18, 2006 11:45 am    Post subject:
Reply with quote

Hi

We can use COMP for storing decimal values.It is possible.

Thanks
Arun
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Writing on to GSAM variable length rohanthengal JCL & VSAM 6 Fri Mar 03, 2017 7:46 pm
No new posts Joinkeys with decimal scdinesh DFSORT/ICETOOL 3 Fri Feb 10, 2017 4:46 am
No new posts Converting decimal to numeric using I... Balaryan DFSORT/ICETOOL 4 Thu Feb 02, 2017 11:27 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us