View previous topic :: View next topic
|
Author |
Message |
anjoos20
New User
Joined: 09 Apr 2008 Posts: 14
|
|
|
|
I know the difference between a comp and and comp-3 variable. Could some1 please tell me in what all scenarios the usage comp and comp-3 is preferred? |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1050 Location: Richmond, Virginia
|
|
|
|
All? That would take some time. I could devote an hour of my day to you, or ...
Have you done any research yourself - I'm just guessing this is a topic that others have already written about, either here or elsewhere (read "world wide web") dontcha think?[/i] |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
You should consult with some of your more Senior Tech's at your site. I'm sure they can give you some sound answers, which you need to run with.
As far as your request, you need to spend time researching this on your own, because an extensive explanation (as Phil has said) is time consuming and is above and beyond what members provide (and for free).
Remember, we are a Help board and members need to put in an effort in an attempt to resolve their questions before posting. If you do this and provide your findings in a given post, you'll find that other members are more receptive and more willing to lend a hand.
Thank You,
Bill |
|
Back to top |
|
|
anjoos20
New User
Joined: 09 Apr 2008 Posts: 14
|
|
|
|
From my research: Comp variables are used as counters and should be integers. Comp-3 variables are used for numeric data like amounts and decimal points are allowed. |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1050 Location: Richmond, Virginia
|
|
|
|
Your "research" is flawed. |
|
Back to top |
|
|
anjoos20
New User
Joined: 09 Apr 2008 Posts: 14
|
|
|
|
Thanks.. |
|
Back to top |
|
|
baichunli2010
New User
Joined: 26 Aug 2010 Posts: 3 Location: China
|
|
|
|
when you use the db2 database, the data type maybe :
decimal(m,n) -----> pic s9(m-n)vn comp-3.
smallint -----> pic 9(04) comp.
integer -----> pic 9(09) comp.
however, comp-3 always used to represent amount when comp is used
for counter and address. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
From my research: Comp variables are used as counters and should be integers. Comp-3 variables are used for numeric data like amounts and decimal points are allowed. |
Quote: |
Your "research" is flawed. |
Or at least incomplete. . .
Quote: |
Could some1 please tell me in what all scenarios the usage comp and comp-3 is preferred? |
If you mention a few specifics, someone may have a suggestion for these specifics (and these suggestions will not always agree. . .). |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1050 Location: Richmond, Virginia
|
|
|
|
I'll agree to "incomplete," but suggest that incomplete ==> flawed in the context of a newby who would accept another newby's "research" as gospel. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hi Phil,
Quote: |
flawed in the context of a newby who would accept another newby's "research" as gospel. |
It is quite scary the "things" that people will accept simply because someone else (with even less knowledge) posted them. . .
Brrr (shiver). . .
d |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1050 Location: Richmond, Virginia
|
|
|
|
My research shows that 3+1 = 10.
[I forgot to tell you I use base 3 arithmetic.] |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Uh, in base 3 wouldn't 10 represent 3? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Robert Sample wrote: |
Uh, in base 3 wouldn't 10 represent 3? |
picky, picky, picky! |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1050 Location: Richmond, Virginia
|
|
|
|
My research is flawed. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Quote: |
My research is flawed. |
He replied flawlessly. . . |
|
Back to top |
|
|
santy Warnings : 1 New User
Joined: 19 Jul 2007 Posts: 22 Location: mumbai
|
|
|
|
people,
as u all r sr. b'cos more exprience and resarch people compare to others,
but i think the ans given by baichunli2010 was also correct. Also this ans in not enough to solve anjoos20 question. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10889 Location: italy
|
|
|
|
Quote: |
as u all r sr. b'cos more exprience and resarch people compare to others, |
please translate to something that we can understand
it is not proper to use sms/kiddie jargon |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
Also this ans in not enough to solve anjoos20 question |
Which question? The original?
anjoos wrote: |
Could some1 please tell me in what all scenarios the usage comp and comp-3 is preferred? |
The first reply is the answer:
Phil wrote: |
All? That would take some time. |
We do not support the "tell me everything about. . ." questions. There simply is not time/space/willingness to do so. If someone wants "everything" they need to do the research and post here when there is some question/doubt.
Or did you have something else in mind. . . |
|
Back to top |
|
|
Elixir
Active User
Joined: 08 Feb 2009 Posts: 116 Location: CHENNAI/NEW JERSEY - INDIA/USA
|
|
Back to top |
|
|
|