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

difference btw PIC S9(3) COMP-3 and PIC S9(3)


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

New User


Joined: 24 Sep 2008
Posts: 30
Location: chennai

PostPosted: Sat Oct 04, 2008 10:19 pm
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
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Sat Oct 04, 2008 10:40 pm
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 Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

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

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

www.ibmmainframes.com/viewtopic.php?t=31905&highlight=comp3
www.ibmmainframes.com/viewtopic.php?t=20426&highlight=comp3
www.ibmmainframes.com/viewtopic.php?t=18456&highlight=comp3
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
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 COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
No new posts Timestamp difference and its average ... DB2 11
No new posts Difference when accessing dataset in ... JCL & VSAM 7
No new posts Converting ASCII values to COMP-3 (ZD... JCL & VSAM 2
No new posts Interviewers are surprised with my an... Mainframe Interview Questions 6
Search our Forums:

Back to Top