Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
difference btw PIC S9(3) COMP-3 and PIC S9(3)

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL
Author Message
charavind17

New User


Joined: 24 Sep 2008
Posts: 14
Location: chennai

PostPosted: Sat Oct 04, 2008 10:19 pm    Post subject: difference btw PIC S9(3) COMP-3 and PIC S9(3)
Reply with quote

What is the diffrence btw PIC S9(3) COMP-3 and PIC S9(3) variables ..
Back to top
View user's profile Send private message
References
Robert Sample

Senior Member


Joined: 06 Jun 2008
Posts: 941
Location: Atlanta, GA

PostPosted: Sat Oct 04, 2008 10:40 pm    Post subject:
Reply with quote

Have you read the manual on USAGE COMP-3 and USAGE DISPLAY? If not, start by reading the Language Reference on these first. If you have read the manual, since both types of variables are defined in there, we'll need a better sense of what you're asking.
Back to top
View user's profile Send private message
Anuj D.

Global Moderator


Joined: 22 Apr 2006
Posts: 2222
Location: Phoenix, AZ

PostPosted: Sun Oct 05, 2008 1:16 am    Post subject:
Reply with quote

And/or search the forum, you'll find many threads.. some basic & some advance enough..

http://www.ibmmainframes.com/viewtopic.php?t=31905&highlight=comp3
http://www.ibmmainframes.com/viewtopic.php?t=20426&highlight=comp3
http://www.ibmmainframes.com/viewtopic.php?t=18456&highlight=comp3
http://www.ibmmainframes.com/viewtopic.php?t=17566&highlight=comp3

BTW, they say - Packed-decimal (comp-3) has long been the preferred way to store things like quantities and amounts and for use in computations. Part of this was that comp-3 takes considerable less space than zoned-decimal. Another (and i believe larger) part is that the mainframe has assembler packed-decimal instructions that are required to "edit" values for readability. If an amount was stored in a comp field, internally it must be converted to comp-3 in order to show commas, a decimal point, a minus, etc.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL All times are GMT + 6 Hours
Page 1 of 1