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



Sure. Within your Ctl-opt, use the Main() keyword to define the startup procedure for your program. Then you can use On-Exit.

HTH




-----Original Message-----
From: Greg Wilburn [mailto:gwilburn@xxxxxxxxxxxxxxxxxxxxxxx]
Sent: Wednesday, June 26, 2019 1:01 PM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: ON-EXIT for a Main program

I really like the on-exit for procedures... is there something similar for programs?

I'd rather not code a subroutine with *INLR=*ON and RETURN (along with my other stuff).

I'm looking to call a procedure anytime I need to end the program. I know I could do:

Callp MyProc();
Return;

Just wondering if there is a way to do that in ONE line of code.


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.