× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Sorry for being so late to the party. Maybe this has already been discussed. My apologies if it has.

Why not use one of the message API's to send the message? I stopped using QCMDEXC for this kind of thing years ago because of things like this. The API's are much better suited for this. I think the API for this particular instance would be Send Nonprogram Message (QMHSNDM).

If you just want to build a command string and execute it from your program try the Process Commands (QCAPCMD) API. I find this much easier to use than QCMDEXC and use it any place I want to execute CL commands from an RPG program.

Rick

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Denny Ray
Sent: Thursday, July 15, 2010 3:45 PM
To: RPG programming on the IBM i / System i
Subject: Re: sndmsg from rpg working but no message

'SNDMSG MSG('''Billing batch 1714B entered on 07/14/10 has not been
updated''') TOMSGQ(DALE )'

Booth Martin wrote:
What happens if you prompt the message, it goes to the right place,
and then you F9 on the command line? Does that look like you expect it to look?

On 7/15/2010 4:22 PM, dale janus wrote:

After much tweaking, I finally have my RPG program calling QCMDEXC
and sending a properly formatted message. I had problems with the
length parm (I had 15s 5, it must be 15p 5). Debug shows I have a
properly formatted command with quotes and everything.

SNDMSG MSG(' Billing batch 1714B entered on 07/14/10 has not
been updated ' ) TOMSGQ(DALE )


After all that work, the message does not appear to be sent.


If I type SNDMSG and prompt at the command line it sends the message.

If I paste the command above and press enter, it never appears in
the message que.

So what am I missing here?

My RPG program is reading a file that has the user name that I put
into the TOMSGQ parm. I suppose I could change it to workstation
name and try sending a break message, but I don't see how that would
work any differently.

Where is the message going to?

---Dale

Privileged and Confidential. This e-mail, and any attachments there to, is intended only for use by the addressee(s) named herein and may contain privileged or confidential information. If you have received this e-mail in error, please notify me immediately by a return e-mail and delete this e-mail. You are hereby notified that any dissemination, distribution or copying of this e-mail and/or any attachments thereto, is strictly prohibited.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.