Re: COMP and COMP-3 fields
From: Roger (sudhakarkreddy_at_yahoo.com)
Date: 05/25/04
- Next message: Richard: "Re: R: GOBACK (was: Perform Thru/Go to vs. Perform - Compile Speed"
- Previous message: Richard: "Re: GOBACK (was: Perform Thru/Go to vs. Perform - Compile Speed"
- In reply to: Arnold Trembley: "Re: COMP and COMP-3 fields"
- Next in thread: William M. Klein: "Re: COMP and COMP-3 fields"
- Reply: William M. Klein: "Re: COMP and COMP-3 fields"
- Reply: JerryMouse: "Re: COMP and COMP-3 fields"
- Reply: Michael Mattias: "Re: COMP and COMP-3 fields"
- Reply: Howard Brazee: "Re: COMP and COMP-3 fields"
- Reply: Arnold Trembley: "Re: COMP and COMP-3 fields"
- Reply: Harley: "Re: COMP and COMP-3 fields"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 24 May 2004 22:35:07 -0700
Arnold Trembley <arnold.trembley@worldnet.att.net> wrote in message news:<t1gsc.21673$fF3.557761@bgtnsc05-news.ops.worldnet.att.net>...
> Roger wrote:
> > Hi,
> >
> > I would like to know what is the maximum and minimum value that can be
> > stored in the following declarations and how?
> >
> > 1. VAR1 PIC S9(03) COMP-3.
> > 2. VAR2 PIC S9(04) COMP.
> > 3. VAR3 PIC 9(03) COMP-3.
> > 4. VAR4 PIC 9(04) COMP.
> >
> > It would be of great help, if anybody can answer to me on this.
> >
> > Thanks,
> > Sudhakar
>
> Assuming IBM mainframe COBOL, which seems likely given the COMP-3,
> which is usually IBM packed decimal, making COMP likely to be IBM binary:
>
> 1. Integer values from -999 through +999.
> 2. Depends on the TRUNC compile-time option, but integer -9999
> through +9999 for sure, possibly -32767 through +32767.
> 3. Integer values from 000 through 999.
> 4. Depends on the TRUNC compile-time option, but 0000 through 9999
> for sure, possibly 00000 through 65535.
>
> My answer for #2 is debatable, due to two's complement of the lowest
> negative number.
>
> I hope that helps!
Thanks very much!!
I still have few questions, in the program i am debugging it is right
now able to store 18981 in the S9(04)comp field.
So, can you please let me know how do i find out what should be the
COMP declaration if i have to store a value of 45000....
Also i heard that in S9(04) we can store a value of up to 65635
eventhough we declared as s9(04) COMP....this is because COMP fields
do not care the sign field if it is having positive value...
Please clarify...
Thanks,
Sudhakar
- Next message: Richard: "Re: R: GOBACK (was: Perform Thru/Go to vs. Perform - Compile Speed"
- Previous message: Richard: "Re: GOBACK (was: Perform Thru/Go to vs. Perform - Compile Speed"
- In reply to: Arnold Trembley: "Re: COMP and COMP-3 fields"
- Next in thread: William M. Klein: "Re: COMP and COMP-3 fields"
- Reply: William M. Klein: "Re: COMP and COMP-3 fields"
- Reply: JerryMouse: "Re: COMP and COMP-3 fields"
- Reply: Michael Mattias: "Re: COMP and COMP-3 fields"
- Reply: Howard Brazee: "Re: COMP and COMP-3 fields"
- Reply: Arnold Trembley: "Re: COMP and COMP-3 fields"
- Reply: Harley: "Re: COMP and COMP-3 fields"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|