From the docs:
If the call stack entry is to be identified by pointer, the pointer
that is specified must address a valid call stack entry within the
same job as the one the API is used in. Alternatively, the pointer can
be set to Null. The Optional Parameter Group 1 must be used and the
Length of Call Stack Entry parameter must be set to 16. In addition,
the Optional Parameter Group 2 must also be used and the Call Stack
Entry Format parameter must be set to *PTR.
If the pointer provided is set to Null, this indicates that the call
stack entry is the one in which the API is being used.
The call stack entry can be a nested procedure name from 1 through
4096 characters in length. When specifying nested procedures, each
procedure name must be separated by a colon, and the outermost
procedure is identified first followed by the procedures it contains.
The innermost procedure is the last procedure identified in the
string.
The call stack entry can be a partial name. To specify a partial name,
place three less-than signs (<<<) at the beginning of the call stack
entry identifier, or place three greater-than signs (>>>) at the end
of the call stack entry identifier, or place both the less-than signs
and the greater-than signs at their respective ends of the call stack
entry identifier. The value for the call stack entry excluding the
less-than signs and the greater-than signs is used to search backward
through the stack for the requested call stack entry name.
Thus my prototype is (perahps a bit more conplex than needed but.. :)
d SendProgramMessage...
d pr ExtPgm('QMHSNDPM')
d inMsgCode 7a const
d inMsgFileLib const like(t_SysQualifiedObjectName)
d inMsgData const like( t_Buffer32k )
d options(*varsize)
d inMsgDataLen const like( t_Int4 )
d inMsgType 10a const
d inCallStkEnt const likeds(t_CallStackEntry)
d inCallStkCount...
d const like( t_Int4 )
d inMsgQKey 4a
d ioErrorCode like ( t_ApiErrCode )
d options(*varsize)
//optional parm group 1, must use all or none
d inCallStkEntLen...
d const like( t_Int4 )
d options(*nopass)
d inCallStkEntQual...
d 20 const options(*nopass)
d inDspPgmMsgTime...
d const like( t_Int4 )
d options(*nopass)
d inCallStkEntType...
d 10 const options(*nopass)
d inMsgDtaCCSID const like( t_Int4 )
d options(*nopass)
///***** Below is in a common include file used by many QMHxxxx API prototypes
d CURRENT_CALL_STACK_ENTRY...
d c '* '
d EXTERNAL_CALL_STACK_ENTRY...
d c '*EXT '
d t_CallStackEntry...
d ds qualified
d min likeds(t_CallStackEntryMin)
d overlay(t_CallStackEntry)
d long likeds(t_CallStackEntryLong)
d overlay(t_CallStackEntry)
d ptr likeds(t_CallStackEntryPtr)
d overlay(t_CallStackEntry)
d t_CallStackEntryMin...
d ds qualified
d specialValue 10a overlay(t_CallStackEntryMin)
d pgmName 10a overlay(t_CallStackEntryMin)
d t_CallStackEntryLong...
d ds qualified
d procName
d withPartialNames...
d 4102a overlay(procName)
d noPartialNames...
d 4096a overlay(procName)
d t_CallStackEntryPtr...
d ds qualified
d pointer * procptr
On Tue, Sep 30, 2008 at 3:47 PM, Lim Hock-Chai
<Lim.Hock-Chai@xxxxxxxxxxxxxxx> wrote:
I'm a bit confuse about the Call Stack Entry parameter in QMHSNDPM api
and hope somebody can help me with it. In ibm doc, this parameter is
declared as char(*). See below:
QMHSNDPM api Required Parameters Group:
1 Message identifier Input Char(7)
2 Qualified message file name Input
Char(20)
3 Message data or immediate text Input Char(*)
4 Length of message data or immediate text Input
Binary(4)
5 Message type Input Char(10)
6 Call stack entry Input Char(*)
or Pointer
7 Call stack counter Input
Binary(4)
8 Message key Output Char(4)
9 Error code I/O
Char(*)
In most case, that means that there should be another parameter that
caller must use to tell this api how long this Call Stack Entry
parameter is. But, I'm not seeing this paramter, am I missing
something? I google the web and most of the prototype I found has been
declaring this parameter as 10 A. Here is one example
http://www.itjungle.com/fhg/fhg100307-story02.html.
--
This is the RPG programming on the AS400 / 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.