> -----Original Message-----
> From: IBM Mainframe Discussion List [mailto:ibm-m...@bama.ua.edu] On
> Behalf Of Clark Morris
> Sent: Thursday, April 30, 2009 7:03 PM
> To: IBM-MAIN@bama.ua.edu
> Subject: Re: Enterprise COBOL code generation question
<Snipped> 
> On 30 Apr 2009 13:00:02 -0700, in bit.listserv.ibm-main you wrote:
> 
> Try TRUNC(OPT).  Trunc STD would require the conversion to decimal to
> guarantee that the data fit the picture.  TRUNC(BIN) is known and
> documented to generate less than optimal code.

Son of a gun, that did it.  From half a page of code to six
instructions.

I will have to test this program with TRUNC(OPT) pretty carefully to
make sure it has no other adverse affects.  The doc on OPT is pretty
clear in its warnings.

And the doc on TRUNC(BIN) does have the phrase "... you can avoid the
performance overhead of using TRUNC(BIN) ...", implying there is, in
fact, a performance penalty for using it.

Thanks for pointing out the benefit of TRUNC(OPT) to me.

Peter


This message and any attachments are intended only for the use of the addressee 
and
may contain information that is privileged and confidential. If the reader of 
the 
message is not the intended recipient or an authorized representative of the
intended recipient, you are hereby notified that any dissemination of this
communication is strictly prohibited. If you have received this communication in
error, please notify us immediately by e-mail and delete the message and any
attachments from your system.


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to