SNDUSRMSG equivalent in RPG (including VALUES and DFT)

5 pts.
Tags:
API
AS/400
CL
IBM iSeries
RPG
SNDUSRMSG
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

Answer Wiki

Thanks. We'll let you know when a new response is added.

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

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following