Re: rcvmsg wait(*max) doesn't wait for reply

Rob Berendt <[email protected]> Thu, 4 Jun 2026 08:51:23 -0400
Newsgroups gmane.comp.hardware.ibm.midrange
Message-ID <CAPJ+qQOZKiM7TgSy9Cy-26PwvAVxv14tLpmvrfTuH-KW5ogwFg@mail.gmail.com>
What was the entire contents of &RpyMsg?  "No reply in requested
interval"?  SST 1,1 of that would be N.
There's not enough code there to determine the significance of the fourth
try.
Any message monitoring software or some such thing which may be
autoprocessing messages?  We use some with the intelligence enough to do
something different after x tries.

On Wed, Jun 3, 2026 at 9:34 PM Michael Quigley <[email protected]>
wrote:

> I have a program which sends an inquiry message and is supposed to wait
> for the reply. Here's the actual code:
>
>   dowhile    cond('1') /* Force a yes or no answer */
>      sndpgmmsg  msg('Reports are generated. Please review the data before +
>                   continuing and sending out the emails.&N Reply ''Y'' to +
>                   continue and send emails out or ''N'' to abort.') +
>                   tomsgq(QSYSOPR) msgtype(*inq) rpymsgq(*pgmq)
>      rcvmsg     wait(*max) msg(&RpyMsg)
>      if         cond(%sst(&RpyMsg 1 1) *eq 'Y' *or %sst(&RpyMsg 1 1) *eq +
>                   'y') then(leave)
>      if         cond(%sst(&RpyMsg 1 1) *eq 'N' *or %sst(&RpyMsg 1 1) *eq +
>                   'n') then(return)
>
>
> If I isolate the code for sending the message, it waits for the response
> as expected. But when running in the context of the entire program, it does
> the sndpgmmsg 4 times. On the forth time, it takes the 'N' branch and the
> program terminates.
>
> I'm stumped. Does anyone know any reason this code would behave that way?
>
> Thanks,
> Michael Quigley
> Computer Services
> www.TheWay.org<http://www.TheWay.org>
>
> --
> This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
> To post a message email: [email protected]
> To subscribe, unsubscribe, or change list options,
> visit: https://lists.midrange.com/mailman/listinfo/midrange-l
> or email: [email protected]
> Before posting, please take a moment to review the archives
> at https://archive.midrange.com/midrange-l.
>
> Please contact [email protected] for any subscription related
> questions.
>
>
-- 
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: [email protected]
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: [email protected]
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact [email protected] for any subscription related questions.