On Mon, 3 Mar 2008 12:03:20 -0500, Arthur T. wrote:

>On Mon, 3 Mar 2008 06:50:22 -0800 (PST), in
>bit.listserv.ibm-main
>(Message-ID:<[EMAIL PROTECTED]>)
>[EMAIL PROTECTED] wrote:
>
>>1.    ISPEXEC "BROWSE "DSN
>>This fails when you try browsing an empty dataset (even
>>though the
>>documentation I've read says it responds with RC
>>12).  I've ended up
>>doing a LISTDSI and checking SYSUSED > 0 to prevent this
>>problem - but
>>I would still like to TRAP an error rather than
>>pre-empting one.
>>
Ouch!  This sounds like an ISPF question rather than a Rexx
question.  Another issue of IBM's unnecessarily treating
ordinary boundary conditions as special.  Would VIEW work
better than BROWSE here?  Is the data set initialized properly?

But if you get RC=12, there's no need to TRAP or pre-empt.
simply process the return code.  SIGNAL ON ERROR is overkill;
harmful to good coding.  I use it sparingly, in sections of
code where I expect no error and have coded no recovery.

-- gil

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