Nope, which is why the IBM Enterprise COBOL for z/OS compiler would not generate a CLC in this case. It would use CLC if the fields were defined the same and the code was testing for equality, if compiled with NUMPROC(PFD). Note that NUMPROC(NOPFD) is the default.
If the test is... If field-a < field-b Then the code generated would be* CP 0(2,R2),0(2,R4) JNL L0005 If the test is... If field-a = field-b Then the code generated would be: CLC 0(2,R2),0(R4) JNE L0005 * assuming it didn't have the data in the packed decimal registers -----Original Message----- From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of Paul Gilmartin Sent: Monday, April 28, 2025 5:08 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Packed decimal sign nibbles On Mon, 28 Apr 2025 16:32:40 +0000, Schmitt, Michael wrote: > ... >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. > >Will a comparison by CLC show that x'200D' or P'-200' is properly less than x'100C' or P'+100'? -- gil ---------------------------------------------------------------------- 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