× 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.



Quoting Scott Klement <midrange-l@xxxxxxxxxxxxxxxx>:

John McKee wrote:

(RE: CL program using SNDPGMMSG) Odd, that does not produce an error
in the QSH environment. Also does not produce a message, either.

SNDPGMMSG from a CL program *should* work. Unlike the QMHSNDPM API, the
SNDPGMMSG command is capable of sending non-program messages. (Don't
ask me why or how IBM decided to use a command named "Send Program
Message" to send non-program messages -- but they did.)

The QMHSNDPM API, however, can only send program messages. The two are
not "twins", functionally.

The message you send to QSYSOPR cannot be an *ESCAPE message (no matter
how you send it) and that might be why your CL program is failing.


The reason for this futility is people ask, after the fact, whether so-and-so
got done. I just wanted to be able to answer that it had retrieved
such-amd-such file and move on.

There's a command called 'logger' in Qshell that's intended to serve
this purpose. It actually outputs to the QHST history log (not to
QSYSOPR) but that might be good enough for you.

From QShell:

logger -t "coolscript" "Hey, I finished successfully! Woohoo!"


While SNDMSG works, SNDPGMMSG would look a little nicer. A little
more like other message that are there.

Again, the CL program SHOULD work... try debugging that a little
more... otherwise, the QMHSNDM API should also work.


Scott, thanks so much for all the help. I found the issue and it was a typo
building the system command string. Quotes in wrong places/order/type. Didn't
help that I used a $ character to end the string. Not a problem on the CL side.
But QSH took that a little differently. Fun working with runs of two different
command structures. Just had to escape the $ to make it behave.

John McKee



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.