I am pretty sure I misremembered it as binary and in reality it was packed. I 
didn't actually write the code. It was a subroutine that tried to distribute 
the difference due to rounding across a variable and not small number or 
"transactions". This was during testing and it didn't get into production with 
the failure in place. Of course, in 1981, we only had the one MVS system, so 
testing and production were commingled.

My original note was meant to reinforce the idea that if a program is using 
larger than expect amounts of CPU time, giving it more time is not always a 
good idea and that identifying why the CPU use is high can be more productive.

> -----Original Message-----
> From: IBM Mainframe Discussion List [mailto:[email protected]]
> On Behalf Of Tom Marchant
> Sent: Thursday, September 15, 2016 8:41 AM
> To: [email protected]
> Subject: Re: Bypassing s322
> 
> On Wed, 14 Sep 2016 15:34:32 -0500, Bill Woodger wrote:
> 
> >When IBM decided to use "character" comparisons where possible for
> numerics, they had to ban the negative zero.
> 
> They also had to enforce the preferred sign. Just as X'0C' and X'0D' would be
> equal using a CP instruction, they are also equal to X'0F', but they are not
> when performing a character compare.
> 
> As to the idea that X'80000000' could be a negative zero, consider what
> happens when you add 1 to it. You get X'80000001'.
> 
> Dave may indeed have had a loop that used a binary counter that started out
> negative and eventually reached X'80000000'. Someone at the time may
> have looked at and mistakenly thought that it was negative zero, but it would
> have in fact been the maximum negative number, and subtracting one again
> would have resulted in overflow. If the overflow was ignored, the value
> would then be X'7FFFFFFF'. It would take a while for that counter to reach
> zero.
> 
> --
> Tom Marchant
> 
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions, send email to
> [email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to