No level was assumed.  It was just an example written on the spur of the moment 
without much thought or review.  As long as the code is being critiqued, what's 
with the BALR?  BAS, BASR or BASSM are much more appropriate for today's 
environment.

Chris Blaicher
Principal Software Engineer, Software Development
Syncsort Incorporated
50 Tice Boulevard, Woodcliff Lake, NJ 07677
P: 201-930-8260  |  M: 512-627-3803
E: cblaic...@syncsort.com


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Shmuel Metz (Seymour J.)
Sent: Thursday, May 09, 2013 7:48 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Return codes

In
<a6cf87cbc0b60a459cb79af044a096db2227dc9...@mailccr.us.syncsort.com>,
on 05/08/2013
   at 08:34 PM, "Blaicher, Christopher Y." <cblaic...@syncsort.com>
said:

>Item of note, unless you are working with all your own code, you have
>to validate the value in R15 before just using it to branch into a
>branch table with tests that the value is within limits and  the lower
>2 bits are not on.  Such as:

What architecture level are you assuming?

>         BALR  r14,r15        Call your routine
>         LR    R14,R15        DON'T DISTROY R15
>         CHI   R15,16         CHECK HIGH LIMIT
>         JH    BADRETURN      TOO BIG?  DIE WITH MESSAGE
>         N     R14,=XL4'00000003'  ANY STRAY BITS?
>         JNZ   BADRETURN      YES, DIE WITH MESSAGE
>         B     *+4(R15)       BRANCH ACCORDING TO RC

         BALR  r14,r15        Call your routine
         CHI   R15,16         CHECK HIGH LIMIT
         JH    BADRETURN      TOO BIG?  DIE WITH MESSAGE
         TMLL  R15,XL2'3'     ANY STRAY BITS?
         JNZ   BADRETURN      YES, DIE WITH MESSAGE
         B     *+4(R15)       BRANCH ACCORDING TO RC




--
     Shmuel (Seymour J.) Metz, SysProg and JOAT
     Atid/2        <http://patriot.net/~shmuel>
We don't care. We don't have to care, we're Congress.
(S877: The Shut up and Eat Your spam act of 2003)

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@listserv.ua.edu with the message: INFO IBM-MAIN



ATTENTION: -----

The information contained in this message (including any files transmitted with 
this message) may contain proprietary, trade secret or other  confidential 
and/or legally privileged information. Any pricing information contained in 
this message or in any files transmitted with this message is always 
confidential and cannot be shared with any third parties without prior written 
approval from Syncsort. This message is intended to be read only by the 
individual or entity to whom it is addressed or by their designee. If the 
reader of this message is not the intended recipient, you are on notice that 
any use, disclosure, copying or distribution of this message, in any form, is 
strictly prohibited. If you have received this message in error, please 
immediately notify the sender and/or Syncsort and destroy all copies of this 
message in your possession, custody or control.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to