yeah, usually pointless, mainly just a habit I got into because every statement 
resets the RC value, and if you don't put the RC check right after the critical 
statement that needs to be checked, you're checking the wrong RC.  putting 
statements in-between the RC that needs to be checked and the code that checks 
it, is one of those things that shouldn't happen, but somehow it does, 
especially when working with ISPF commands.  

the habit also ensures that I'm checking the RC's for the 
allocates/read/writes/calls etc.  If one my programs has a problem with a less 
than obvious solution, that's one the first things I do is look for the "lc = 
RC" statements (and corresponding action DO) to make sure I'm checking the 
critical things that need checking in order for the program to work the way I 
designed it. Cosmetically, it helps them stand out better. 


--- On Sat, 7/30/11, Paul Gilmartin <paulgboul...@aim.com> wrote:

> From: Paul Gilmartin <paulgboul...@aim.com>
> Subject: Re: REXX code on JES2
> To: IBM-MAIN@bama.ua.edu
> Date: Saturday, July 30, 2011, 8:44 AM
> On Fri, 29 Jul 2011 15:52:45 -0700,
> Cris Hernandez #9 wrote:
> >
> >what I usually do with my rexx programs is set one
> variable (maxcc =0) at the beginning, and then set every
> critical RC to lc, and then check "IF lc > maxcc THEN
> maxcc = lc".  only if the RC indicates a critical
> failure do I use "SIGNAL The#end" to "EXIT maxcc".
> > 
> I've done that.  Usually in a function, so it takes
> only one line of code
> at each "critical" point.  And a function has access
> to SIGL, so it can
> record the point of error.  (But beware of Rexx's
> negative RC.)
> 
> I still see no point in "lc = RC".  "IF RC > maxcc
> THEN maxcc = RC"
> does as well.
> 
> -- gil
> 
> ----------------------------------------------------------------------
> 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
> 

----------------------------------------------------------------------
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