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


  • Subject: RE: Send Message Reply (SNDRPY)
  • From: Bob Crothers <bob@xxxxxxxxxxxxxx>
  • Date: Mon, 9 Aug 1999 11:38:46 -0500
  • Organization: Cornerstone Communications, LLC

On the SNDPGMMSG command, there is a parm KEYVAR...specify this and 
you will get the Message Key when you do the send...no need to do any 
RcvMsg.

Bob

-----Original Message-----
From:   Brendan Bispham [SMTP:midrangel@black-and-blue.com]
Sent:   Monday, August 09, 1999 10:49 AM
To:     MIDRANGE-L@midrange.com
Subject:        RE: Send Message Reply (SNDRPY)


After the SNDPGMMSG, do a RCVMSG :

             RCVMSG     MSGQ(SMTSTMQ) MSGTYPE(*LAST) +
                          RMV(*NO) KEYVAR(&MSGKEY)

And then use that key for the SNDRPY.

The only problem is that msgtype(*LAST) is not exactly accurate, 
another
message may nip in inbetween your SNDPGMMSG & RCVMSG...


Brendan Bispham

~ -----Original Message-----
~ From: owner-midrange-l@midrange.com
~ [mailto:owner-midrange-l@midrange.com]On Behalf Of MCPARTLAND, Stan
~ Sent: 06 August 1999 18:29
~ To: 'MIDRANGE-L@midrange.com'
~ Subject: Send Message Reply (SNDRPY)
~
~
~ I have a program that sends an *INQ message to *SYSOPR.  If the
~ message has
~ not been responded to within 10 minutes, I want to automatically 
retry the
~ condition that caused the *INQ message to be sent.  Using
~ SNDPGMMSG to send
~ the message and RCVMSG to wait for a response with a timeout works 
fine.
~ However, I don't want to leave expired, unanswered messages in 
QSYSOPR.  I
~ am trying, without success, to send the message an "R" for retry.  I 
have
~ tried this on both a V3R7 and V4R3 system, so I assume that I am 
doing
~ something wrong and it is not a system problem with the SNDRPY 
command.  I
~ have set up the following code to test an automated response to an 
inquiry
~ message.
~
~ XA172CP:    PGM        /* Wait for Multi-Threaded to Complete and +
~                          Submit Single */
~             DCL        VAR(&MSGKEY) TYPE(*CHAR) LEN(4) /* message +
~                          key */
~             DCL        VAR(&MSGRPY) TYPE(*CHAR) LEN(1) /* message +
~                          reply */
~             SNDPGMMSG  MSGID(UXA0193) MSGF(XAMSGMF) TOMSGQ(SMTSTMQ) 
+
~                          MSGTYPE(*INQ) KEYVAR(&MSGKEY) /* ask +
~                          operator to retry or ignore active jobs */
~             SNDRPY     MSGKEY(&MSGKEY) MSGQ(SMTSTMQ) RPY('R') +
~                          RMV(*NO)
~ END:        ENDPGM
~
~ This code receives CPF2410 "Message key not found in message queue
~ SMTSTMQ.". If I add RPYMSGQ(SMTSTMQ) to the SNDPGMMSG command,
~ error CPF2432
~ "Cannot send reply to message type other than *INQ or *NOTIFY."
~ is received.
~
~ My problem seems to be related to the use of message keys with 
non-program
~ message queues.
~
~ Any thoughts on how I can make this work?
~
~ Regards,
~ Stan McPartland
~
~ ------------------------------------------
~ Stanley A. McPartland
~ Bently Nevada Corporation
~ 1617 Water St; Minden, NV  89423  USA
~ Voice: (775) 782-9339  Fax: (775) 782-1382
~ E-mail: stanley.mcpartland@bently.com
~ ------------------------------------------
~ +---
~ | This is the Midrange System Mailing List!
~ | To submit a new message, send your mail to 
MIDRANGE-L@midrange.com.
~ | To subscribe to this list send email to 
MIDRANGE-L-SUB@midrange.com.
~ | To unsubscribe from this list send email to
~ MIDRANGE-L-UNSUB@midrange.com.
~ | Questions should be directed to the list owner/operator:
~ david@midrange.com
~ +---
~

+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to 
MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: 
david@midrange.com
+---

+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.