5 pts.
 SNDUSRMSG equivalent in RPG (including VALUES and DFT)
Some time ago I found a piece of code by Scott Klemens regarding the implementation of SNDUSRMSG in RPG using QMHSNDM and QMHRCVPM. I need to do the exact same thing, however I also need to pass the values for the VALUES and DFT keywords used with SNDUSRMSG. Does anybody have an idea on how to do this?

Software/Hardware used:
IBM iSeries
ASKED: August 26, 2009  1:19 PM
UPDATED: April 20, 2010  10:59 PM

Answer Wiki:
http://archive.midrange.com/rpg400-l/200405/msg00228.html Here is another discussion on that topic. K ============================================================ Since the QMHSNDM API has no parameters to specify VALUES or DFT, you can't pass them in when you call the API. If you must use them, then simply use the SNDUSRMSG command. That's why it exists -- for you to run it in a program. There are two general ways to do it. You can build a command string and pass it to the QCAPCMD API (or QCMDEXC); or you can compile a CL module that executes the command and processes the reply. I would compile the ILE CL module in order to have all of the code encapsulated as well as compiled. That's one of the major points of "ILE". You can bind a CL module to your RPG without concern that they're different languages. (Okay, there are some potential concerns such as single-byte character parm handling.) Tom
Last Wiki Answer Submitted:  April 20, 2010  10:59 pm  by  KSoniat   610 pts.
All Answer Wiki Contributors:  KSoniat   610 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _