|
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 +---
As an Amazon Associate we earn from qualifying purchases.
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.