#include <os400msg.h> int QMHSNDPM(const char *msgid, const char *msgf, const void *msgdata, int msgdataLen, const char *msgtype, const char *pgmq, int pgmqDelta, int *msgkey, void *errcode); int QMHSNDPM1(const char *msgid, const char *msgf, const void *msgdata, int msgdataLen, const char *msgtype, const char *pgmq, int pgmqDelta, int *msgkey, void *errcode, int pgmqLen, const char *pgmqQual, int extWait); int QMHSNDPM2(const char *msgid, const char *msgf, const void *msgdata, int msgdataLen, const char *msgtype, const void *pgmq, int pgmqDelta, int *msgkey, void *errcode, int pgmqLen, const char *pgmqQual, int extWait, const char *pgmqType, int ccsid);
Note: These functions can only be used in an i5/OS PASE program. See i5/OS PASE for more information about creating i5/OS PASE programs.
The Send Program Message (QMHSNDPM, QMHSNDPM1, and QMHSNDPM2) i5/OS PASE runtime functions allow an i5/OS PASE program to send a message to a program call message queue or to the job external message queue.
These i5/OS PASE runtime functions accept the same arguments as the Send Program Message (QMHSNDPM) i5/OS API, except that the i5/OS PASE functions use character string inputs that are null-terminated strings in the i5/OS PASE CCSID. i5/OS PASE runtime automatically converts input character strings to the job default CCSID and pads with blanks (as necessary) to match the fixed-length inputs required by the system API.
No conversions are done for the msgdata (input) argument and the errcode (input/output) argument because they can contain a mixture of character and binary data. The ccsid argument specifies the CCSID for character data in the msgdata argument, and users can request CCSID information for the errcode argument by using ERRC0200 format. The QMHSNDPM and QMHSNDPM1 i5/OS PASE runtime functions use the current i5/OS PASE CCSID as a default for the ccsid value passed to the system API.
See QMHSNDPM()--Send Program Message for further description of the arguments for the QMHSNDPM, QMHSNDPM1, and QMHSNDPM2 i5/OS PASE runtime functions.
See QMHSNDPM()--Send Program Message for information about authorities required for the QMHSNDPM, QMHSNDPM1, and QMHSNDPM2 i5/OS PASE runtime functions.
The function result is zero for normal completion. The result is nonzero if any input character string could not be converted to the job default CCSID or was too long for the QMHSNDPM API, or if the QMHSNDPM API returned error information in the errcode argument.
Top | i5/OS PASE APIs | APIs by category |