I actually checked that. The code is slightly different, but I don't see that it's much better.
01 FULLWORD-SORTOF PIC S9(9) BINARY VALUE +999999999. 000009 ADD 100 TO FULLWORD-SORTOF 000354 GN=16 EQU * 000354 4820 A01C LH 2,28(0,10) PGMLIT AT +20 000358 8E20 0020 SRDA 2,32(0) 00035C 5840 8000 L 4,0(0,8) FULLWORD-SORTOF 000360 8E40 0020 SRDA 4,32(0) 000364 1A42 AR 4,2 000366 1E53 ALR 5,3 000368 58B0 C02C L 11,44(0,12) PBL=1 00036C 47C0 B16C BC 12,364(0,11) GN=17(000374) 000370 5A40 C004 A 4,4(0,12) SYSLIT AT +4 000374 GN=17 EQU * 000374 5D40 C000 D 4,0(0,12) SYSLIT AT +0 000378 5040 8000 ST 4,0(0,8) FULLWORD-SORTOF 01 FULLWORD-SORTOF PIC S9(9) COMP-5 VALUE +999999999. 000009 ADD 100 TO FULLWORD-SORTOF 000350 GN=16 EQU * 000350 5820 8000 L 2,0(0,8) FULLWORD-SORTOF 000354 8E20 0020 SRDA 2,32(0) 000358 4840 A01C LH 4,28(0,10) PGMLIT AT +20 00035C 8E40 0020 SRDA 4,32(0) 000360 1A24 AR 2,4 000362 1E35 ALR 3,5 000364 58B0 C028 L 11,40(0,12) PBL=1 000368 47C0 B16C BC 12,364(0,11) GN=17(000370) 00036C 5A20 C000 A 2,0(0,12) SYSLIT AT +0 000370 GN=17 EQU * 000370 5030 8000 ST 3,0(0,8) FULLWORD-SORTOF Of course I am not an assembler programmer, so maybe it is better? Frank ----- Original Message ----- > From: David Andrews <d...@lists.duda.com> > To: IBM-MAIN@bama.ua.edu > Cc: > Sent: Thursday, April 12, 2012 11:23 AM > Subject: Re: Modernizing the BCP code ? > > On Thu, 2012-04-12 at 12:45 -0400, McKown, John wrote: >> I am constantly amazed at the amount of code generate by a simpe: >> >> ADD +1 TO WS-INTEGER. >> >> when WS-INTEGER is defined as PIC S9(9) BINARY > > Try defining it as COMP-5 (or compile with TRUNC(BIN)) and see if that > improves the generated code? > > -- > David Andrews > A. Duda & Sons, Inc. > david.andr...@duda.com > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to lists...@bama.ua.edu with the message: INFO IBM-MAIN > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: INFO IBM-MAIN