Learn something new everyday. We don't have a lot of places with seperated monmsg's, but the few I found, all use the goto. All this time I thought it was required.
On Mon, 2021-05-17 at 20:27 +0000, Hiebert, Chris wrote:
A GOTO is not necessary.
For example here are two scenarios:
1. This SAV command received message ID CPFA09E as an Escape message (instead of as a diagnostic message). In that case this code would "GOTO LO" because CPFA09E would be a "HIT" in the first MONMSG block and thus break out of the MONMSG processing with the default "INGORE" because of the lack of EXEC on that MONMSG.
2. This SAV command received message id CPF3794 as an Escape message. Then that would be a Miss on the first MONMSG block, which then falls to the second MONMSG which it "Hits" since it's an Any-CPF error (CPF0000). So that process would hit the /* more code here */ "GOTO HI" section.
SAV DEV(()) OBJ(()) SAVACT(*YES) SEQNBR(*END) +
EXPDATE() ENDOPT(*LEAVE) ASYNCBRING(*YES)
MONMSG MSGID(CPFA09E CPD384E CPF3837 CPF3838) /* if any of these HIT then monmsg process stops here */
MONMSG MSGID(CPF0000) EXEC(DO)
/* more code here */
GOTO HI
ENDDO
GOTO LO
LO: RETURN
HI: RETURN
ENDPGM
Chris Hiebert
Senior Programmer/Analyst
Disclaimer: Any views or opinions presented are solely those of the author and do not necessarily represent those of the company.
-----Original Message-----
From: MIDRANGE-L <
<mailto:midrange-l-bounces@xxxxxxxxxxxxxxxxxx>
midrange-l-bounces@xxxxxxxxxxxxxxxxxx
On Behalf
Of Justin Taylor
Sent: Monday, May 17, 2021 12:05 PM
To: MIDRANGE-L <
<mailto:midrange-l@xxxxxxxxxxxxxxxxxx>
midrange-l@xxxxxxxxxxxxxxxxxx
Subject: Re: Mult MONMSG not working as expected
I see. I assume that if the first MONMSG executes a GOTO to skip the
second, that would work. Correct?
Thanks
[
https://www.medtronsoftware.com/img/MedtronMinilogo.bmp] Kevin Bucknum
Senior Programmer Analyst
MEDDATA / MEDTRON
120 Innwood Drive
Covington LA 70433
Local: 985-893-2550
Toll Free: 877-893-2550
https://www.medtronsoftware.com
CONFIDENTIALITY NOTICE
This document and any accompanying this email transmission contain confidential information, belonging to the sender that is legally privileged. This information is intended only for the use of the individual or entity named above. The authorized recipient of this information is prohibited from disclosing this information to any other party and is required to destroy the information after its stated need has been fulfilled. If you are not the intended recipient, or the employee of agent responsible to deliver it to the intended recipient, you are hereby notified that any disclosure, copying, distribution or action taken in reliance on the contents of these documents is STRICTLY PROHIBITED. If you have received this email in error, please notify the sender immediately to arrange for return or destruction of these documents.
As an Amazon Associate we earn from qualifying purchases.