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



Thanx. That explains it perfectly.

Mihael

-----Ursprüngliche Nachricht-----
Von: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] Im Auftrag von Barbara Morris
Gesendet: Samstag, 20. Juni 2009 00:28
An: rpg400-l@xxxxxxxxxxxx
Betreff: Re: linear-main procedure

Schmidt, Mihael wrote:

I'm just getting my hands dirty with message handling and have come
to a point I cannot explain to myself. I got a program with a
procedure. The procedure produces an escape message and the message
goes up in the stack. I'm calling the program from the command line
and am getting the error message displayed with the entry line for
the response. Everything ok so far. (cycle program)

Now if I change the program to use a linear-main procedure (V6R1 -
new H-spec main) I see the error message but it seems that it is
already handled (at the control boundary? = the ILE program, I am
calling from QCMD = OPM) and I don't have to give a response.


The RPG inquiry message is displayed by the "default error handler" that
is part of the RPG cycle.

When the default error handler is invoked for a cycle-main procedure,
and you reply to the message with 'C' (or anything except 'G'), the
exception gets percolated by the RPG handler. This means that the
exception remains unhandled, and it eventually gets to the control boundary.

The linear-main program doesn't use the RPG cycle, so the default error
handler is not in effect. This means that you don't get the RPG inquiry
message, but otherwise the result should be the same, CEE9901
"Application error. MCH3601 unmonitored ...".

A linear-main procedure is very similar to an ordinary subprocedure.
Unless you code a handler yourself (monitor, (E) or *PSSR), any
exception in the procedure will go unhandled.

If you need an inquiry message when your linear-main procedure ends in
error, you could code a MONITOR around all the code in your main
procedure, and then put up an inquiry message of your own in the
ON-ERROR section.

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.