That's the right answer to the wrong question. OP asked about the generated code, not about the requirements of specific instructions. Lots of applications deal with unsigned packed decimal, and, yes, it requires more instructions than signed packed decimal.
-- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 עַם יִשְׂרָאֵל חַי נֵ֣צַח יִשְׂרָאֵ֔ל לֹ֥א יְשַׁקֵּ֖ר ________________________________________ From: IBM Mainframe Discussion List on behalf of Robin Vowels Sent: Friday, May 2, 2025 7:34 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Packed decimal sign nibbles External Message: Use Caution On 2025-05-02 18:45, Andrew Rowley wrote: > On 2/05/2025 1:22 pm, Tom Ross wrote: >> Hmm, if you don't want a sign, why have an 'S' in the PICTURE clause? >> Signed: >> 05 SIGNED-ITEM PIC S9(x) COMP-3. >> Unsigned: >> 05 UNSIGNED-ITEM PIC 9(x) COMP-3. >> >> I guess I am too close to COBOL, but signed and unsigned are easy in >> COBOL! > > What's the difference in the representation? > Is unsigned 1234: > 0x01234F > or > 0x001234 To be handled by the hardware, the least-significant nibble must contain the sign. Unsigned would contain a plus sign in this nibble. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN