|
This is a section of code I got from some list. After
execution RCVPGMNAME will contain the name of the program
that called the program containing this code.
*
----------------------------------------------------------
D sysSndPgmMsg PR Extpgm('QMHSNDPM')
D Msgid 7A Const
D Msgf 20A Const
D MsgData 32767A Const
Options(*varsize)
D MsgDataLen 10I 0 Const
D MsgType 10A Const
D CallStk 4096A Const
Options(*varsize)
D CallStkOffset 10I 0 Const
D Msgkey 4A Const
D ErrorDS 32767A Options(*varsize)
D CallStkLen 10I 0 Const
Options(*nopass)
D CallStkQual 20A Const
Options(*nopass)
D WaitTime 10I 0 Const
Options(*nopass)
D CallStkType 10A Const
Options(*nopass)
D CCSID 10I 0 Const
Options(*nopass)
*
----------------------------------------------------------
D sysRcvPgmMsg PR Extpgm('QMHRCVPM')
D RtnData 32767A Options(*varsize)
D RtnDataLen 10I 0 Const
D RtnDataFmt 8A Const
D CallStk 4096A Const
Options(*varsize)
D CallStkOffset 10I 0 Const
D MsgType 10A Const
D Msgkey 4A Const
D WaitTime 10I 0 Const
D Action 10A Const
D ErrorDS 32767A Options(*varsize)
D CallStkLen 10I 0 Const
Options(*nopass)
D CallStkQual 20A Const
Options(*nopass)
D CallStkType 10A Const
Options(*nopass)
D CCSID 10I 0 Const
Options(*nopass)
*
-------------------------------------------------------------
D ApiErrorDS DS
D 10I 0 Inz(*Zeros)
*
-------------------------------------------------------------
D RCVM0300 DS Inz
D BlahBlahBlah 113A
D rcvSenderInfo 630A
D rcvPgmType 1A
Overlay(rcvSenderInfo:41)
D rcvPgmName 10A
Overlay(rcvSenderInfo:355)
D rcvModName 10A
Overlay(rcvSenderInfo:365)
D rcvPrcName 256A
Overlay(rcvSenderInfo:375)
*
-------------------------------------------------------------
D Msgkey S 4A Inz(*Blanks)
*
------------------------------------------------------------
C CallP sysSndPgmMsg( *BLANK
:
C *BLANK
:
C '?'
:
C 1
:
C '*INFO'
:
C '*CTLBDY'
:
C 2
:
C MsgKey
:
C ApiErrorDS )
C CallP sysRcvPgmMsg( RCVM0300
:
C
%size(RCVM0300)
:
C 'RCVM0300'
:
C '* '
:
C *Zero
:
C '*INFO'
:
C MsgKey
:
C *Zero
:
C '*REMOVE'
:
C ApiErrorDS )
*
-----------------------------------------------------------
On Tue, 17 Sep 2002 20:30:36 -0500
"Steve Landess" <steve_landess@hotmail.com> wrote:
If you go search the RPG400-L archives for "api and program and name" you will get several hundred hits... here's one: http://archive.midrange.com/rpg400-l/200106/msg00421.html ----- Original Message ----- From: <dhanneman2@wallace.com> To: <rpg400-l@midrange.com> Sent: Tuesday, September 17, 2002 4:54 PM Subject: A quick method to determine the name of the calling program in RPG400We wanted to control the submission/execution of a label printing program without passing a PARM to it. Is there an API or command call that can tell the label printing program what program called it? Dave Hanneman Sr. Systems Analyst Wallace Technical Services 630-799-2365 _______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l or email: RPG400-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l._______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l or email: RPG400-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
<TEXTAREA NAME="Signature" ROWS="4" COLS="60"><TEXTAREA NAME="Signature" ROWS="4" COLS="60">
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.