QMHSNDM() and QMHSNDM1()--Send Nonprogram Message for IBM PASE for i


  Syntax
 #include <os400msg.h>

 int QMHSNDM(const char  *msgid,
             const char   *msgf,
             const void   *msgdata,
             int          msgdataLen,    
             const char   *msgtype,
             const char   *msgqList,
             int          msgqCount,
             const char   *rpyq,
             int          *msgkey,
             void         *errcode);

 int QMHSNDM1(const char  *msgid,
              const char  *msgf,
              const void  *msgdata,
              int         msgdataLen,
              const char  *msgtype,
              const char  *msgqList,
              int         msgqCount,
              const char  *rpyq,
              int         *msgkey,
              void        *errcode,
              int         ccsid);
  Public Default 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 Send Nonprogram Message (QMHSNDM and QMHSNDM1) IBM PASE for i runtime functions allow an IBM PASE for i program to send a message to a nonprogram message queue so it can communicate with another job or user.


Parameters

These IBM PASE for i runtime functions accept the same arguments as the Send Nonprogram Message (QMHSNDM) 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 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 QMHSNDM IBM PASE for i runtime function uses the current IBM PASE for i CCSID as a default for the ccsid value passed to the system API.

See Send Nonprogram Message (QMHSNDM) API for further description of the arguments for the QMHSNDM and QMHSNDM1 IBM PASE for i runtime functions.


Authorities

See Send Nonprogram Message (QMHSNDM) API for information about authorities required for the QMHSNDM and QMHSNDM1 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 QMHSNDM API, or if the QMHSNDM API returned error information in the errcode argument.


Related Information



API introduced: V5R1

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