|
Booth
That's an interesting concept. But getting this message subfile to work
with subprocedures has become a personal quest of mine. :)
Besides, if I were to go a different route, since we are a JDE World shop,
I would mimic how JDE does it to match their system.
But, I don't like how JDE does it: all the fields in error turn red and
you press F7 to get to a separate screen where the errors are listed. Yuck!
Thanks
Bob Cagle
IT Manager
Lynk, Inc.
-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Booth
Martin
Sent: Friday, April 24, 2015 3:14 PM
To: RPG programming on the IBM i (AS/400 and iSeries)
Subject: Re: Interactive screen logic, Message subfiles, and the program
stack
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:switched to using sub-procedures vs subroutines and was having trouble
I recently converted my messaging routines to service programs and
getting the everything to work.
(thanks Alan Campin and your Trigger Mediator code), I finally got
With the help of older posts here on the list and some others examples
everything working.
enough:
Now I'm just trying to understand something, hope I explain this well
controlling the flow and calls subprocedures for everything, like so:
I have a module with a 'ProcessScreen' procedure that is just
subprocedures.
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
module and program names from the program status data structure. And I set
I manually set the Procedure variable to be 'ProcessScreen' and pull the
the SLPGMQ on the message subfile to '*'.
show in the joblog, they will not display in the message subfile.
What I have found with this structure is that even though the messages
logic to ProcessScreen, voila, it works.
But when I get rid of the Display() subprocedure and move the display
message subfile work with the display logic in a 'sub' subprocedure? I did
Pretty sure this has to do with the program stack. How would I make the
try changing the procedure variable to 'Display', but received the 'call
stack entry not found' error.
logic in the top-level procedure? Not that it's that big a deal, but it's
So what's the answer here - am I just stuck with the having the display
annoying not being able to figure this out.
Thanks
Bob Cagle
IT Manager
Lynk, Inc.
--
This is the RPG programming on the IBM i (AS/400 and 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 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.