I wrote:
I have a CL program that communicates with the user mainly via
SNDPGMMSG and SNDUSRMSG. (User interaction is minimal, confined
to confirmation and error messages.)

I now have a situation in which I would like to send a message
requiring no response to the "Display Program Messages" screen,
immediately (i.e., without waiting) before sending one that does
require a response.

In other words, when the "Display Program Messages" screen pops
up, it should show both the first, informational message, and the
second, inquiry message, e.g.,

FOO is in state BAR. Are you sure you wish to perform the BAZ
operation on FOO? (Y N)

I know that sort of thing is easy enough to do with DSPLY
statements in RPG, but at least in the permutations of SNDUSRMSG
and SNDPGMMSG I've tried so far from CL, it always either waits,
or doesn't send the message.

A GOOGLE search turned this up, from user GLS400, on a board at "code400.com":

Code:

SNDPGMMSG MSG(MSG1) TOPGMQ(*EXT) MSGTYPE(*COMP)
SNDPGMMSG MSG(MSG2) TOPGMQ(*EXT) MSGTYPE(*COMP)
SNDPGMMSG MSG(MSG3) TOPGMQ(*EXT) MSGTYPE(*COMP)
SNDPGMMSG MSG(MSG4) TOPGMQ(*EXT) MSGTYPE(*COMP)
SNDUSRMSG MSG('MSG5') MSGTYPE(*INFO)

Results:

MSG1
MSG2
MSG3
MSG4
MSG5

Sure enough, when I changed the first message to a SNDPGMMSG to *EXT of type *COMP (does it get any more counterintuitive than THAT?), I got the desired result. Never heard of "code400.com" before.

Good trick to know, if anybody else here winds up in a similar situation.

--
JHHL

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.