> -----Original Message-----
> From: IBM Mainframe Discussion List On Behalf Of Farley, Peter x23353
> 
> > -----Original Message-----
> > From: IBM Mainframe Discussion List On Behalf Of Clark Morris
> <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.

But then there's this in the "Notes" for TRUNC in the Installation &
Customization Guide:

" 2. TRUNC=BIN is the recommended option when interfacing with other
products that have S/390-format binary data (such as CICS, DB2, FORTRAN,
and PL/I). This is especially true if there is a possibility of having
more than 9 digits in a fullword or more than 4 digits in a halfword."

So, we're stuck with TRUNC(BIN) in CICS, where arguably we'd want the
"best" performance.  :-(

    -jc-

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

Reply via email to