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



One solution that I have used, and liked, is to replace the error-line message with a message window that prominently displays on the screen. I have never been a fan of the red X and the White X.

Use a cascading process to offset the windows if there are multiple messages.

http://martinvt.com/Code_Samples/Message_Window/message_window.html

On 4/24/2015 1:42 PM, Bob Cagle wrote:
It seems this subject has been discussed ad-nauseam, but yes, this again:

I recently converted my messaging routines to service programs and switched to using sub-procedures vs subroutines and was having trouble getting the everything to work.

With the help of older posts here on the list and some others examples (thanks Alan Campin and your Trigger Mediator code), I finally got everything working.

Now I'm just trying to understand something, hope I explain this well enough:

I have a module with a 'ProcessScreen' procedure that is just controlling the flow and calls subprocedures for everything, like so:


Dcl-proc ProcessScreen;

Init();

DOU Key = F3:
Display();
IF Not FunctionKeyPressed();

IF ValidInput();
Process();
ENDIF;
ENDIF;
ENDDO;

End-proc;


Obviously, the screen logic is buried in the Display() subprocedure:

Dcl-proc Display;
Write MSGCTL01;
Exfmt SC01;
MSG_Clear( Procedure:Module:Program );
End-proc;


Error messages are thrown in both the FunctionKeyPressed and ValidInput subprocedures.

I manually set the Procedure variable to be 'ProcessScreen' and pull the module and program names from the program status data structure. And I set the SLPGMQ on the message subfile to '*'.

What I have found with this structure is that even though the messages show in the joblog, they will not display in the message subfile.

But when I get rid of the Display() subprocedure and move the display logic to ProcessScreen, voila, it works.

Pretty sure this has to do with the program stack. How would I make the message subfile work with the display logic in a 'sub' subprocedure? I did try changing the procedure variable to 'Display', but received the 'call stack entry not found' error.

So what's the answer here - am I just stuck with the having the display logic in the top-level procedure? Not that it's that big a deal, but it's annoying not being able to figure this out.

Thanks

Bob Cagle
IT Manager
Lynk, Inc.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.