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



Hi
Joe, Scott, Bob,
Yup.. that's definetly a problem, i just implemented this method in the PSSR
, the problem is the *PSSR of B pick up the *ESCAPE message and displays our
custom error message screen, and when this ends, PGM A picks it up...and
does the same...and now my user would have to deal with three error screens
instead of one..:-)...
As of now I have no clue on how to detemine the the First Pgm in the Call
Stack, 
I will try killing the actgrp as suggested by Bob Cozzi i.e "call CEETREC ",
as there could be multiple *ACTGRPs within the call sequence..i am not too
sure...
I guess, I would decide on using a return parameter after all...as i don't
have too much time to try out things before the delivery....

Thanks for all the help and suggestion...all these would be archived and
stored for future reference..

Warm Regards
Denzil D'Souza

-----Original Message-----
From: Joe Pluta [mailto:joepluta@xxxxxxxxxxxxxxxxx]
Sent: Thursday, August 07, 2003 9:52 PM
To: 'RPG programming on the AS400 / iSeries'
Subject: RE: Termination of the entire Call stack


> From: Denzil D'souza
> 
>       Is there a way to kill an entire call sequence at one go?
>       For example:
>       ------------
>       I have a Program A, calling B which, further calls another
program C
>       Now, lets say a fatal error occurs in Pgm C, on Error (Within
the
> *PSSR) is it possible to terminate B and A along with
>       C in an elegant manner?

The answer is - it depends <grin>.

Do you know which program is at the top?  If so, you can send an escape
message directly to that program, which will in effect terminate the
entire stack.

SNDPGMMSG  MSGID(&MSGID) MSGF(&MSGF) MSGDTA(&MSGDTA) +
             TOPGMQ(*PRV (&PGM)) MSGTYPE(*ESCAPE)

This sends an escape message to the program that calls &PGM (which could
be a menu or the command line).  So, if you call A from the command
line, if program C encounters an error, it can send it back to A's
caller by specifying &PGM as "A", and the error will be returned to the
workstation.

The hard part sometimes is determining which program is the highest
level, especially if A is sometimes the top and B is sometimes the top.

Joe

_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.