IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

PIC -(9).99 - how much space does it occupy


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Gursharan Khalsa

New User


Joined: 04 Sep 2007
Posts: 33
Location: Salinas

PostPosted: Wed Dec 03, 2008 10:48 am
Reply with quote

hi,
pic -(9).99.
how is this used ? i mean how will it handle positive and negatives values and how much space does it occupy?
Back to top
View user's profile Send private message
gomu_mm

New User


Joined: 05 Dec 2006
Posts: 19
Location: Chennai

PostPosted: Wed Dec 03, 2008 11:11 am
Reply with quote

Hi,

In case of -9.99, the negative sign is displayed only if the variable is negative.

It does not displays the - sign when positive value is passed to it.

Thanks,
Gomathi.
Back to top
View user's profile Send private message
Gursharan Khalsa

New User


Joined: 04 Sep 2007
Posts: 33
Location: Salinas

PostPosted: Wed Dec 03, 2008 5:04 pm
Reply with quote

an how much space does it occpy?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Dec 03, 2008 5:13 pm
Reply with quote

12 bytes

-(9) = 9
.99 = 3
=========
12
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Wed Dec 03, 2008 7:08 pm
Reply with quote

Dick,

I think you forgot the sign byte, s/b 13?
Back to top
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Wed Dec 03, 2008 7:18 pm
Reply with quote

Quote:
I think you forgot the sign byte, s/b 13?

Jack,

It's -(9). That should give only 9; plus that of .99 = 3 giving a total of only 12.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Thu Dec 04, 2008 12:35 am
Reply with quote

Hi Arun,

You're right, I'm looking at -(9).99 and seeing -9(9).99 icon_redface.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Merge 2 lines based on Space from a S... DFSORT/ICETOOL 5
No new posts Allocated space calculation from DCOL... PL/I & Assembler 3
No new posts split a name based on space in ASM PL/I & Assembler 9
No new posts Adding space to a dataset - getting D37 ABENDS & Debugging 10
Search our Forums:

Back to Top