QMHRCVM() and QMHRCVM1()--Receive Nonprogram Message for IBM PASE for i


  Syntax
 #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);

  Default Public Authority: *USE

  Library: Standard C Library (libc.a)

  Threadsafe: Yes

Note: These functions can only be used in an IBM® i PASE program. See the IBM PASE for i topic collection for more information about creating IBM PASE for i programs.

The Receive Nonprogram Message (QMHRCVM and QMHRCVM1) IBM PASE for i runtime functions allow an IBM PASE for i program to receive a message from a nonprogram message queue.


Parameters

These IBM PASE for i runtime functions accept the same arguments as the Receive Nonprogram Message (QMHRCVM) IBM i API, except that the IBM PASE for i functions use character string inputs that are null-terminated strings in the IBM PASE for i CCSID. IBM PASE for i 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 IBM PASE for i 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 IBM PASE for i 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 Receive Nonprogram Message (QMHRCVM) API for further description of the arguments for the QMHRCVM and QMHRCVM1 IBM PASE for i runtime functions.


Authorities

See Receive Nonprogram Message (QMHRCVM) API for information about authorities required for the QMHRCVM and QMHRCVM1 IBM PASE for i runtime functions.


Return Value

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.


Related Information



API introduced: V5R1

[ Back to top | IBM PASE for i APIs | APIs by category ]