|
Mary,
The range of valid values for this parameter is 0-32767 when a message ID is
passed. Based on the message I would guess you did not define the length
parameter as either 10i 0 or 9B 0. If you are using RPGIV I would use 10i 0.
I would also use a prototype which is similar to this:
DAPIQMHSNDPM PR EXTPGM('QMHSNDPM')
Send message API.
D PR_MsgID 7A CONST
Message ID.
D PR_MsgFil 20A CONST
Qual message file.
D PR_MsgDta 32767A CONST OPTIONS(*VARSIZE)
Message data.
D PR_MsgDtaLen 10I 0 CONST
Message data length.
D PR_MsgTyp 10A CONST
Message type.
D PR_PgmQ 256A CONST OPTIONS(*VARSIZE)
Message queue.
D PR_MsgLvl 10I 0 CONST
Message level.
D PR_MsgKey 4A
Return message key.
D PR_APIErr LIKE(APIErr) OPTIONS(*VARSIZE)
API error info.
D PR_PgmQLen 10I 0 CONST OPTIONS(*NOPASS)
Length of PgmQ.
D PR_PgmQQ 20A CONST OPTIONS(*NOPASS)
PgmQ qualifier.
D PR_DspTim 10I 0 CONST OPTIONS(*NOPASS)
Screen wait time.
D PR_PgmQTyp 10A CONST OPTIONS(*NOPASS)
PgmQ type *CHAR/*PTR
D PR_CCSID 10I 0 CONST OPTIONS(*NOPASS)
Coded char set ID.
Using a prototype will ensure that the parameters are passed correctly. For
a more complete RPGIV examples showing the message APIs look at the
November issue of Midrange Computing, or download the code from that issue.
David Morris
>>> Mary Koetting <Mary_Koetting@mail.mchcp.org> 03/08/99 02:44PM >>>
I'm trying to use QMHSNDPM to send myself program messages for use with a
message subfile. I can get everything to work as long as I don't specify any
replacement data fields in my messages. So I'm stuck with a message like
"Invalid Item Number" instead of being able to do something like "Item
'AH102' is an invalid Item Number". (Where I'd pass 'AH102' as the data and
5 as it's length.)
I think my problem is in my parm to QMHSNDPM which specifies the length of
the data I want to pass or I've messed up somehow defining the message in
the message file... (I'm usually getting CPF24B6 errors in my APIErr parm
once I make the call.)
Any suggestions?
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---
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.