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



Hadn't thought of that. Thank you and thank you Simon.

Sharon Wintermute

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Rory Hewitt
Sent: Wednesday, May 12, 2010 5:11 PM
To: RPG programming on the IBM i / System i
Subject: Re: QMHSNDPM

Sharon,

In all my programs, I define a global constant called 'ThisProgram,
which I
use to define the main procedure (i.e. program) interface e.g.:

D ThisProgram C 'CRTMIPGMR'

D main PR Extpgm(ThisProgram)
D P_qPgm 20A Const
D P_qSrcf 20A Const
D P_SrcMbr 10A Const
D P_Text 50A Const
D P_Option Const Like(Option)
D P_qPrtf 20A Const
D P_Aut 10A Const

D main PI
D P_qPgm 20A Const
D P_qSrcf 20A Const
D P_SrcMbr 10A Const
D P_Text 50A Const
D P_Option Const Like(Option)
D P_qPrtf 20A Const
D P_Aut 10A Const

My SndPgmMsg() subprocedure (which is defined ain a copybook and then
brought into the program code that way) pass this value to the
CallStackEntry parameter of QMHSNDPM.

Works like a charm.

Rory

On Wed, May 12, 2010 at 11:26 AM, Wintermute, Sharon <
Sharon.Wintermute@xxxxxxxxxxxxxxxx> wrote:


I have several shell routines that were subroutine based using Message
Control subfiles. I am trying to create a basic shell that is
procedure
based and the main holdup is QMHSNDPM/QMHRMVPM.

I can get a /include version to work at the main level, but once you
get
nested within procedures it doesn't work very well. It looks like I
need to interrogate the call stack in order to get back to the initial
PEP. Am I headed in the right direction?

TIA,

Sharon Wintermute


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.