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



Yes, that's an excellent use of the messaging capabilities of the system.  My only question is why break the message data apart only to put it back together again? That's a lot of your code.  Removing that logic and a couple of additional extraneous fields (ERRMSGID and ERRMSGTYP) gets you to this:

DCL VAR(&MSGDTA) TYPE(*CHAR) LEN(2000)
DCL VAR(&NOTREST) TYPE(*DEC) LEN(4 0)
DCL VAR(&MSGTYPE) TYPE(*CHAR) LEN(10)

RSTOBJ…
MONMSG MSGID(CPF3773) EXEC(DO)
RCVMSG MSGTYPE(*LAST) RMV(*YES) MSGDTA(&MSGDTA)
CHGVAR VAR(&NOTREST) VALUE(%BIN(&MSGDTA 5 4))
IF COND(&NOTREST *GT 0) THEN(DO)
CHGVAR VAR(&MSGTYPE) VALUE('*ESCAPE')
ENDDO
ELSE CMD(DO)
CHGVAR VAR(&MSGTYPE) VALUE('*DIAG')
ENDDO
SNDPGMMSG MSGID(CPF3773) MSGF(QCPFMSG) +
MSGDTA(&MSGDATA) MSGTYPE(&MSGTYPE)
ENDDO


On 3/6/2020 2:05 PM, smith5646midrange@xxxxxxxxx wrote:
Thanks Kevin. That got me the start that I needed. It wasn't as simple as I had hoped for but I am happy with the end result.

For anyone interested, here is my program.

I do the MONMSG CPF3773. I retrieve the message and remove it. If the number of objects not restored is > 0, I reissue the CPF message as *ESCAPE. If it is 0, I reissue the message as *DIAG.

DCL VAR(&ERRMSGID) TYPE(*CHAR) LEN(7)
DCL VAR(&ERRMSGTYP) TYPE(*CHAR) LEN(2)
DCL VAR(&MSGDTA) TYPE(*CHAR) LEN(2000)
DCL VAR(&NOTREST) TYPE(*DEC) LEN(4 0)
DCL VAR(&MSGTYPE) TYPE(*CHAR) LEN(10)
DCL VAR(&MSGDATA1) TYPE(*CHAR) LEN(4)
DCL VAR(&MSGDATA2) TYPE(*CHAR) LEN(4)
DCL VAR(&MSGDATA3) TYPE(*CHAR) LEN(10)
DCL VAR(&MSGDATA4) TYPE(*CHAR) LEN(10)
DCL VAR(&MSGDATA5) TYPE(*CHAR) LEN(8)
DCL VAR(&MSGDATA6) TYPE(*CHAR) LEN(4)
DCL VAR(&MSGDATA7) TYPE(*CHAR) LEN(10)
DCL VAR(&MSGDATA8) TYPE(*CHAR) LEN(97)
DCL VAR(&MSGDATA9) TYPE(*CHAR) LEN(32)
DCL VAR(&MSGDATA10) TYPE(*CHAR) LEN(4)
DCL VAR(&MSGDATA11) TYPE(*CHAR) LEN(4)

RSTOBJ…
MONMSG MSGID(CPF3773) EXEC(DO)
RCVMSG MSGTYPE(*LAST) RMV(*YES) MSGDTA(&MSGDTA) +
MSGID(&ERRMSGID) RTNTYPE(&ERRMSGTYP)
CHGVAR VAR(&NOTREST) VALUE(%BIN(&MSGDTA 5 4))
CHGVAR VAR(&MSGDATA1) VALUE(%SST(&MSGDTA 1 4))
CHGVAR VAR(&MSGDATA2) VALUE(%SST(&MSGDTA 5 4))
CHGVAR VAR(&MSGDATA3) VALUE(%SST(&MSGDTA 9 10))
CHGVAR VAR(&MSGDATA4) VALUE(%SST(&MSGDTA 19 10))
CHGVAR VAR(&MSGDATA5) VALUE(%SST(&MSGDTA 29 8))
CHGVAR VAR(&MSGDATA6) VALUE(%SST(&MSGDTA 37 4))
CHGVAR VAR(&MSGDATA7) VALUE(%SST(&MSGDTA 41 10))
CHGVAR VAR(&MSGDATA8) VALUE(%SST(&MSGDTA 51 97))
CHGVAR VAR(&MSGDATA9) VALUE(%SST(&MSGDTA 148 32))
CHGVAR VAR(&MSGDATA10) VALUE(%SST(&MSGDTA 180 4))
CHGVAR VAR(&MSGDATA11) VALUE(%SST(&MSGDTA 184 4))
IF COND(&NOTREST *GT 0) THEN(DO)
CHGVAR VAR(&MSGTYPE) VALUE('*ESCAPE')
ENDDO
ELSE CMD(DO)
CHGVAR VAR(&MSGTYPE) VALUE('*DIAG')
ENDDO
SNDPGMMSG MSGID(CPF3773) MSGF(QCPFMSG) +
MSGDTA(&MSGDATA1 +
*CAT &MSGDATA2 +
*CAT &MSGDATA3 +
*CAT &MSGDATA4 +
*CAT &MSGDATA5 +
*CAT &MSGDATA6 +
*CAT &MSGDATA7 +
*CAT &MSGDATA8 +
*CAT &MSGDATA9 +
*CAT &MSGDATA10 +
*CAT &MSGDATA11) +
MSGTYPE(&MSGTYPE)
ENDDO

-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Kevin Bucknum
Sent: Friday, March 6, 2020 2:04 PM
To: midrange-l@xxxxxxxxxxxxxxxxxx
Subject: Re: Looking for way around CPF3773

DCL VAR(&ERRORMSGID) TYPE(*CHAR) LEN(7)
DCL VAR(&MSGTYPE) TYPE(*CHAR) LEN(2)
DCL VAR(&MSGDTA) TYPE(*CHAR) LEN(8)
DCL VAR(&RESTORED) TYPE(*DEC) LEN(4 0)
DCL VAR(&NOTREST) TYPE(*DEC) LEN(4 0)
RSTLIB BLAHBLAHBLAH - your restore command here.
MONMSG MSGID(CPF3773) EXEC(DO)
RCVMSG MSGTYPE(*LAST) RMV(*NO) MSGDTA(&MSGDTA) +
MSGID(&ERRORMSGID) RTNTYPE(&MSGTYPE)
CHGVAR VAR(&RESTORED) VALUE(%BIN(&MSGDTA 1 4))
CHGVAR VAR(&NOTREST) VALUE(%BIN(&MSGDTA 5 4))
ENDDO


Deal with &RESTORED and &NOTREST as you see fit.


On Fri, 2020-03-06 at 13:30 -0500, smith5646midrange@xxxxxxxxx wrote:

We can't monitor for CPF3773 or we miss when object are not restored. I do want it to halt if it is not "0 objects not restored".


We aren't authorized to ALWOBJDIF. Don't ask why because I don't know. 😊


-----Original Message-----

From: MIDRANGE-L <

<mailto:midrange-l-bounces@xxxxxxxxxxxxxxxxxx>

midrange-l-bounces@xxxxxxxxxxxxxxxxxx

On Behalf Of Patrik Schindler
Sent: Friday, March 6, 2020 1:25 PM

To: Midrange Systems Technical Discussion <

<mailto:midrange-l@xxxxxxxxxxxxxxxxxx>

midrange-l@xxxxxxxxxxxxxxxxxx

Subject: Re: Looking for way around CPF3773


Hello,


Am 06.03.2020 um 19:19 schrieb

<mailto:smith5646midrange@xxxxxxxxx>

smith5646midrange@xxxxxxxxx

:


We are restoring a bunch of libraries to a test system. At the end or

each RSTOBJ command, we are receiving CPF3773 with X objects restored

and 0 objects not restored. I look and see the 0 objects not restored

and do an ignore.


If you are restoring with a CL script, simply add a MONMSG for CPF3773 do have it ignored.


Alternatively, look at rstobj option ALWOBJDIF(*ALL).


:wq! PoC


PGP-Key: DDD3 4ABF 6413 38DE -

<https://www.pocnet.net/poc-key.asc>

https://www.pocnet.net/poc-key.asc




--

This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email:

<mailto:MIDRANGE-L@xxxxxxxxxxxxxxxxxx>

MIDRANGE-L@xxxxxxxxxxxxxxxxxx

To subscribe, unsubscribe, or change list options,

visit:

<https://lists.midrange.com/mailman/listinfo/midrange-l>

https://lists.midrange.com/mailman/listinfo/midrange-l


or email:

<mailto:MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx>

MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx


Before posting, please take a moment to review the archives at

<https://archive.midrange.com/midrange-l>

https://archive.midrange.com/midrange-l

.


Please contact

<mailto:support@xxxxxxxxxxxx>

support@xxxxxxxxxxxx

for any subscription related questions.


Help support midrange.com by shopping at amazon.com with our affiliate link:

<https://amazon.midrange.com>

https://amazon.midrange.com





[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.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: https://amazon.midrange.com



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.