>From a minor test, the code generated for a simple "ADD +1 TO WS-INTEGER" 
>generates the same code for TRUNC(OPT) and TRUNC(BIN). And TRUNC(STD) only 
>adds a single D (divide) instruction to do the needed truncation. I have not 
>looked at all the other verbs which could be affected. May do that if I have 
>some time over the weekend (login from home).

-- 
John McKown 
Systems Engineer IV
IT

Administrative Services Group

HealthMarkets(r)

9151 Boulevard 26 * N. Richland Hills * TX 76010
(817) 255-3225 phone * 
[email protected] * www.HealthMarkets.com

Confidentiality Notice: This e-mail message may contain confidential or 
proprietary information. If you are not the intended recipient, please contact 
the sender by reply e-mail and destroy all copies of the original message. 
HealthMarkets(r) is the brand name for products underwritten and issued by the 
insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake Life Insurance 
Company(r), Mid-West National Life Insurance Company of TennesseeSM and The 
MEGA Life and Health Insurance Company.SM

 

> -----Original Message-----
> From: IBM Mainframe Discussion List 
> [mailto:[email protected]] On Behalf Of Clark Morris
> Sent: Friday, April 13, 2012 9:53 AM
> To: [email protected]
> Subject: Re: Modernizing the BCP code ?
> 
> On 12 Apr 2012 09:48:17 -0700, in bit.listserv.ibm-main you wrote:
> 
> >Now that you mention it, I remember that the C/C++ compiler 
> has a architecture option to control the instructions 
> generated. I should have known that the PL/X compiler would 
> too. I didn't know that they both share the same back-end. I 
> wish that the COBOL compiler did. 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 or NATIVE. 
> COBOL seems to have an inordinate love for PACKED-DECIMAL. 
> Someone once said it was due to ANSI standards compliance. 
> Might be worth it, in CPU saved, to license the C compiler 
> and port the OpenCOBOL
> >
> >Unless I somehow have the wrong compile parameters.
>  Make sure you have TRUNC(OPT) implied or expressed in the compile
> parameters.  If you have TRUNC(STD) then WS-INTEGER must be in the
> range -999,999,999 through +999,999,999.  TRUN(BIN) always has been
> fiasco.
> 
> Clark Morris
> 
> ----------------------------------------------------------------------
> 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

Reply via email to