C0 is not alphabetic. -- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 עַם יִשְׂרָאֵל חַי נֵ֣צַח יִשְׂרָאֵ֔ל לֹ֥א יְשַׁקֵּ֖ר
________________________________________ From: IBM Mainframe Discussion List on behalf of Gary Weinhold Sent: Tuesday, April 29, 2025 12:25 PM To: [email protected] Subject: Re: IBM-MAIN Digest - 27 Apr 2025 to 28 Apr 2025 (#2025-114) External Message: Use Caution COBOL allows definitions of decimal numeric fields to be signed or unsigned packed decimal or external decimal (as well as other other formats). I believe it had always generated Compared Packed hardware instructions to compare signed decimal fields, ensuring that negative and positive were properly collated. But this is relatively slow. For speed more recent compilers could generate the faster CLC instructions for unsigned decimal fields. However problems arise when the data in the unsigned field came from an external source and unsigned fields did not consistently use the C or the F nybble for the sign. One practical effect of the F-zone or C-zone in a signed number is the COBOL DISPLAY command, which uses the hardware Unpack instruction to convert the number to EBCDIC but does not interpret the sign. The last digit displayed will be numeric if an F-zone, but alphabetic if a C-zone. For other zones, it could be alphabetic or weird. On 2025-04-29 12:00 a.m., IBM-MAIN automatic digest system wrote: > Date: Tue, 29 Apr 2025 09:40:09 +1000 > From: Andrew Rowley<[email protected]> > Subject: Re: Packed decimal sign nibbles > > On 29/04/2025 9:32 am, Seymour J Metz wrote: >> The decimal instructions treat F zones as positive. > That's always been my understanding. But I'm intrigued by the statement > that it means unsigned in COBOL. Is there a practical difference? Or is > it just a difference e.g. for formatting output? Gary Weinhold Senior Application Architect DATAKINETICS | Data Performance & Optimization Phone:+1.613.523.5500 x216 Email: [email protected] Visit us online at http://secure-web.cisco.com/1odzdR0rnP9oLR3Q2tVFjzHsWZpd9H-b5axud1_gAt-GrgTug48aIXYheLLg1qzJKwy_88_YU4nL-FPBIErea1RlZEB1VscUUdIOp2vTXY7rXkSNu-cY8YWQjAhXjss6N5LmfI6ZHeKbNf5amh4neMsGeEbjuoSqDWkHJ1rFfDflSGaiLfjpbewi1C69rx64pi0RxV9BuiY04DB4_IpC1No1AZ6QPntpEQmK7c2C7hSOjcV5bnXNTuuq2zIKzjpqanHy-rZyDUfUwczyF-kt1HXkPxIw5xGui396Laf7LfKav7-oObgcpqS9hocxWX1gqFhn4NMT2rPwV0ek85sIbi-ovaReMpwLmQY65WzV2elXL7auexztNa5a4rP61CBme1hRn5kEQNzuGLRsAtuO_kCgoeujsdkjBZxvQkdgskLg/http%3A%2F%2Fwww.DKL.com E-mail Notification: The information contained in this email and any attachments is confidential and may be subject to copyright or other intellectual property protection. If you are not the intended recipient, you are not authorized to use or disclose this information, and we request that you notify us by reply mail or telephone and delete the original message from your mail system. ---------------------------------------------------------------------- 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
