|
----- Original Message -----
From: rob@xxxxxxxxx
To: "Midrange Systems Technical Discussion" <midrange-l@xxxxxxxxxxxx>
Subject: Re: Dtaq/ UsrQ Monitor
Date: Mon, 16 Mar 2009 14:04:33 -0400
Another reason why I hate CPF0000 messages...
ALCOBJ OBJ((QGPL/DTAQJOB *DTAARA *EXCL)) WAIT(0)
MONMSG MSGID(CPF0000) EXEC(GOTO ACTIVE)
/* if the data area can be allocated then the monitor job is not active */
DLCOBJ OBJ((QGPL/DTAQJOB *DTAARA *EXCL))
SBMJOB CMD(CALL PGM(DTAQPGM)) JOB(DTAQMON)
ACTIVE:
What happens if the data area doesn't exist? After all, your monitor job
builds it so plainly it is not expected to be there on startup.
Actually, the exception messages for ALCOBJ suck. You have to monitor for
CPF1085, then you have to find the diagnostic messages as to why CPF1085
failed. These could include:
CPF0939 - Object BUFU type *DTAARA was not found in library ROB.
CPF0952 - Library BUFU not found for *DTAARA BUFU.
CPF0986 - No authority to library DUMMYX.
CPF0991 - No authority to object BUFU in library DUMMYX type *DTAARA.
So it may be
ALCOBJ OBJ((QGPL/DTAQJOB *DTAARA *EXCL)) WAIT(0)
MONMSG MSGID(CPF1085) EXEC(GOTO wtf)
/* if the data area can be allocated then the monitor job is not active */
DLCOBJ OBJ((QGPL/DTAQJOB *DTAARA *EXCL))
FireUp:
SBMJOB CMD(CALL PGM(DTAQPGM)) JOB(DTAQMON)
goto mainBody
wtf:
RCVMSG ... MSGID(&MSGID) ...
If &msgid='CPF0939' THEN(GOTO FireUp) /* *DTAARA does not exist */
/* Unknown error - alert the troups */
DMPCLPGM
DSPJOBLOG OUTPUT(*PRINT)
DSPJOB OUTPUT(*PRINT)
GOTO fo
mainBody:
...
fo:
ENDPGM
Rob Berendt
--
Group Dekko Services, LLC
Dept 01.073
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com
From:
"Albert York" <albertyork@xxxxxxxxx>
To:
"Midrange Systems Technical Discussion" <midrange-l@xxxxxxxxxxxx>
Date:
03/16/2009 01:41 PM
Subject:
Re: Dtaq/ UsrQ Monitor
Sent by:
midrange-l-bounces@xxxxxxxxxxxx
This is what I do.
The monitor program allocates a data area (usually the same name as the
job) exclusively. Then other programs can determine if it is active by
attemptnig to allocate it (with a wait time of 0).
For example.
The monitor program:
CRTDTAARA DTAARA(QGPL/DTAQJOB) TYPE(*CHAR) LEN(1)
MONMSG MSGID(CPF1023) /* already exists */
ALCOBJ OBJ((QGPL/DTAQJOB *DTAARA *EXCL)) WAIT(0)
MONMSG MSGID(CPF0000) EXEC(GOTO EOJ) /* Already active so
end */
Other jobs:
ALCOBJ OBJ((QGPL/DTAQJOB *DTAARA *EXCL)) WAIT(0)
MONMSG MSGID(CPF0000) EXEC(GOTO ACTIVE)
/* if the data area can be allocated then the monitor job is not active */
DLCOBJ OBJ((QGPL/DTAQJOB *DTAARA *EXCL))
SBMJOB CMD(CALL PGM(DTAQPGM)) JOB(DTAQMON)
ACTIVE:
----- Original Message -----that
From: "Bob Bledsoe" <bledsoe.bob@xxxxxxxxx>
To: "Midrange Systems Technical Discussion" <midrange-l@xxxxxxxxxxxx>
Subject: Re: Dtaq/ UsrQ Monitor
Date: Mon, 16 Mar 2009 10:24:19 -0700
Well I need a lot of education on queues. But that said I think Albert
somehow came up with what I'm looking for. How do I tell if the program
which monitors the queue is active?wrote:
Thanks
Bob B
On Mon, Mar 16, 2009 at 10:05 AM, Albert York <albertyork@xxxxxxxxx>
queue
If the queue exists then it is active. You don't have to start it.
To check if the queue exists use the CHKOBJ command.
Do you mean that you want to know if the program which monitors the
<midrange-l@xxxxxxxxxxxx>is active?
Albetr
----- Original Message -----
From: "Bob Bledsoe" <bledsoe.bob@xxxxxxxxx>
To: "Midrange Systems Technical Discussion"
thatSubject: Re: Dtaq/ UsrQ Monitoranywork
Date: Mon, 16 Mar 2009 09:41:55 -0700
The problem here is that I'm not sure what I mean. I have not done
with the datq or usrq before. The program is calling another progran
alreadyis
used to start the queue. I don't want to start the queue if it is
queue?there and active. How do I know if the queue is there and active?wrote:
Thanks,
Bob
On Mon, Mar 16, 2009 at 9:36 AM, Alan Campin <alan0307d@xxxxxxxxx>
Not sure what you mean by instance? Do you mean a message in the
writeDo
Queue?you mean how do you monitor for a message in a Data Queue or User
I have a service program that implements functions that read and
<bledsoe.bob@xxxxxxxxx>to
user queues if that is what you need.
On Mon, Mar 16, 2009 at 10:22 AM, Bob Bledsoe
andwrote:
Good Morning,
I am writing a RPGLE program where I will be starting Dtaq's
are nousrq's.
I
want to monitor so that I only start up an instance when there
anythinginstances currently. I have looked around but can't find
rightthat
shows
how to do the monitor. Can someone please give me a push in the
mailingmailingdirection?
Thank you,
Bob B
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L)
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx--
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
This is the Midrange Systems Technical Discussion (MIDRANGE-L)
mailinglist
> This is the Midrange Systems Technical Discussion (MIDRANGE-L)To post a message email: MIDRANGE-L@xxxxxxxxxxxx--
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
listlist
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
listTo post a message email: MIDRANGE-L@xxxxxxxxxxxx--
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.