#include <os400msg.h> int QMHRCVM(void *msginfo, int msginfoLen, const char *format, const void *msgq, const char *msgtype, int *msgkey, int wait, const char *action, void *errcode); int QMHRCVM1(void *msginfo, int msginfoLen, const char *format, const void *msgq, const char *msgtype, int *msgkey, int wait, const char *action, void *errcode, 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 Receive Nonprogram Message (QMHRCVM and QMHRCVM1) i5/OS PASE runtime functions allow an i5/OS PASE program to receive a message from a nonprogram message queue.
These i5/OS PASE runtime functions accept the same arguments as the Receive Nonprogram Message (QMHRCVM) 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 by i5/OS PASE runtime for the msginfo and errcode (input/output) arguments because they can contain a mixture of character and binary data. The ccsid argument specifies the CCSID for character data returned by the system API in the msginfo argument, and users can request CCSID information for the errcode argument by using ERRC0200 format. The QMHRCVM i5/OS PASE runtime function uses a default for the ccsid value passed to the system API that does not do any CCSID conversion for character data in the received message.
See QMHRCVM()--Receive Nonprogram Message for further description of the arguments for the QMHRCVM and QMHRCVM1 i5/OS PASE runtime functions.
See QMHRCVM()--Receive Nonprogram Message for information about authorities required for the QMHRCVM and QMHRCVM1 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 QMHRCVM API, or if the QMHRCVM API returned error information in the errcode argument.
Top | i5/OS PASE APIs | APIs by category |