× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: *PSSR subroutine and the call stack
  • From: Paul Tuohy <tuohyp@xxxxxxx>
  • Date: Sun, 09 May 1999 22:25:50 +0100



Simon Coulter wrote:

> Hello Albert,
> <<< snip >>>
>  For instance, a
> divide by zero operation is an error.  If you code it as:
>         C               DIV     0       RESULT
> this is an unmonitored exception and the RPG error handler causes an inquiry 
>message to be
> sent.  If you code it as:
>         C               DIV     0       RESULT                  --99--
> you are using indicator 99 in the LO column to monitor for exceptions on the 
>DIV operation.
> You can of course use %ERROR in more recent dialects of RPG IV.  If you code 
>it as in the
> first example but also have a *PSSR in the program then you are performing a 
>global exception
> monitor (like MONMSG CPF0000 in CL).

  <<<<snip>>>

Simon, correct me if I am wrong (no machine or manual handy) but I think that 
the LO indicator on
a DIV operation will signify that the result of the divide is less then zero, 
not that an error
has occured. Where as some of the non-file operation codes can have an error 
indicator defined
(CALL, IN etc.), I think DIV is the exception. In ye oldie days of RPG, prior 
to structured
operation codes, the resulting indicators were used on arithmetic operations to 
signify that the
result was <, > or  = to zero.

Regards

Paul Tuohy.

+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.