Mathematically, positive and signed are equal (SP, AP, ZAP, CP). Character comparisons of Display / Packed go bit by bit so a character sort would be by high to penultimate digits, then sign nibble / last digit display or last digit / sign nibble packed.
On Mon, Apr 28, 2025 at 12:06 PM Paul Gilmartin < [email protected]> wrote: > On Mon, 28 Apr 2025 12:26:00 -0400, Phil Smith III wrote: > > >Ok, well, in 1975 I was still in high school and playing games on VM over > dialup, didn't start my mainframe career until 1980. But the question > stands: what's with these "unpreferred" values? Why would they even > exist/be valid? > > > I suspect it's a holdover from parsimoniously engineered hardware. > 1401? Punched cards? Competing vendors? ...? Only two nybble > values should have been designated valid; any others should have > caused data checks. but them gates was expensive back then. And > doing it right nowadays wouldn't be compatible. > > > > On Mon, 28 Apr 2025 16:32:40 +0000, Schmitt, Michael wrote: > > ... > >C: positive > >D: negative > >F: unsigned > > > ??? > So is any unsigned number algebraically greater than any negative number, > and algebraically less than any positive number? > > >If all your code has preferred signs then it can generate more efficient > code, by using CLC and MVC for example instead of packed decimal > instructions. > > > Isn't the sign nybble in the rightmost byte, and doesn't CLC go > left-to-right? > I don't see how CLC can give correct results. > > I remember only vaguely, and from distant past the JCL converter > failed my job on a decimal data exception on data it had generated. > > -- > gil > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to [email protected] with the message: INFO IBM-MAIN > -- Mike A Schwab, Springfield IL USA Where do Forest Rangers go to get away from it all? ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
