|
Alison .... I've had to deal with this problem too. Some users just get so impatient when it comes to running THEIR batch jobs... You are right... a routing entry will give you some control over this situation. What I did was create a routing entry in any subsystem I want to monitor for this type of activity. For example, I added this entry to subsystem QINTER: Routing entry sequence number . . . . . . . : 9998 Program . . . . . . . . . . . . . . . . . . : CHEATER Library . . . . . . . . . . . . . . . . . : QGPL Class . . . . . . . . . . . . . . . . . . . : QBATCH Library . . . . . . . . . . . . . . . . . : QGPL Maximum active routing steps . . . . . . . : *NOMAX Pool identifier . . . . . . . . . . . . . . : 1 Compare value . . . . . . . . . . . . . . . : 'QCMDB' Compare start position . . . . . . . . . . : 1 The "CHEATER" program referenced in this routing entry, intercepts the request, sends an entry to the system audit journal and a message to the system administrators. It then lets the job run, after all, I am a nice guy... I don't want to cancel their job even though "I could have". The impatient user does get a phone call from me so they can explain why it was so important to route a batch job to one of our interactive subsystems though! After they realize I'm watching, their behavior usually changes. Here is the source for my "CHEATER" program: /* ************************************************************** */ /* PROGRAM DESCRIPTION : */ /* */ /* THIS PROGRAM IS CALLED WHEN A BATCH JOB IS STARTED IN */ /* A NON BATCH SUBSYSTEM. IT REQUIRES A ROUTING ENTRY IN ANY */ /* SUBSYSTEM YOU WISH TO MONITOR COMPARE VALUE = QCMDB */ /* */ /* SPECIAL COMPILE OPTIONS: */ /* */ /* WRITTEN BY: KEN GRAAP 09/22/99 */ /* */ /* ************************************************************** */ PGM /* ************************************************************** */ /* */ /* DECLARE PROGRAM VARIABLES */ /* */ /* ************************************************************** */ DCL VAR(&JOB) TYPE(*CHAR) LEN(10) DCL VAR(&USER) TYPE(*CHAR) LEN(10) DCL VAR(&NUMBER) TYPE(*CHAR) LEN(6) DCL VAR(&JOBTYP) TYPE(*CHAR) LEN(1) DCL VAR(&JOBQ) TYPE(*CHAR) LEN(10) DCL VAR(&SBSD) TYPE(*CHAR) LEN(10) DCL &ERRORSW *LGL /* Std err */ DCL &MSGID *CHAR LEN(7) /* Std err */ DCL &MSGDTA *CHAR LEN(100) /* Std err */ DCL &MSGF *CHAR LEN(10) /* Std err */ DCL &MSGFLIB *CHAR LEN(10) /* Std err */ /* ************************************************************** */ /* */ /* GLOBAL MESSAGE MONITOR */ /* */ /* ************************************************************** */ MONMSG MSGID(CPF0000) EXEC(GOTO CMDLBL(STDERR1)) /* ************************************************************** */ /* */ /* NOTIFY SYS ADMIN'S THEN PROCESS JOB */ /* */ /* ************************************************************** */ ADDLIBLE LIB(TAATOOL) POSITION(*LAST) MONMSG MSGID(CPF2103) RTVJOBA JOB(&JOB) USER(&USER) NBR(&NUMBER) RTVJOBSTRA JOBTYP(&JOBTYP) JOBQ(&JOBQ) SBSD(&SBSD) <-- TAATOOL SAE ID(CHEATER) ENTDTA(JOB_TYPE *BCAT &JOBTYP + <-- CMD that sends *BCAT JOBQ *BCAT &JOBQ *BCAT SBSD *BCAT + an entry to the &SBSD *BCAT ' JOB was submitted to a non + system audit jrn. batch subsystem') SNDPGMMSG MSG('CHEATER Monitor entry created... Use + QSNDAUD command to view it...') TOUSR(KEG) SNDPGMMSG MSG('CHEATER Monitor entry created... Use + QSNDAUD command to view it...') TOUSR(KKH) TFRCTL PGM(QCMD) <-- Let the job run. /* ************************************************************** */ /* */ /* NORMAL END OF PROGRAM */ /* */ /* ************************************************************** */ END: RETURN /* ************************************************************** */ /* */ /* STANDARD ERROR PROCESSING */ /* */ /* ************************************************************** */ STDERR1: /* Standard error handling routine */ IF &ERRORSW SNDPGMMSG MSGID(CPF9999) + MSGF(QCPFMSG) MSGTYPE(*ESCAPE) /* Func chk * CHGVAR &ERRORSW '1' /* Set to fail ir error occurs */ STDERR2: RCVMSG MSGTYPE(*DIAG) MSGDTA(&MSGDTA) MSGID(&MSGID) + MSGF(&MSGF) MSGFLIB(&MSGFLIB) IF (&MSGID *EQ ' ') GOTO STDERR3 SNDPGMMSG MSGID(&MSGID) MSGF(&MSGFLIB/&MSGF) + MSGDTA(&MSGDTA) MSGTYPE(*DIAG) GOTO STDERR2 /* Loop back for addl diagnostics */ STDERR3: RCVMSG MSGTYPE(*EXCP) MSGDTA(&MSGDTA) MSGID(&MSGID) + MSGF(&MSGF) MSGFLIB(&MSGFLIB) SNDPGMMSG MSGID(&MSGID) MSGF(&MSGFLIB/&MSGF) + MSGDTA(&MSGDTA) MSGTYPE(*ESCAPE) ENDPGM This program can be modified to take whatever action you feel is appropriate. Good luck! Kenneth -----Original Message----- From: Alison Sherman-2270 [mailto:Asherman@amerexgroup.com] Sent: Thursday, December 12, 2002 7:32 AM To: midrange-l@midrange.com Subject: Running batch jobs in Qinter HI I would like to know if there is a way to disable batch jobs from running in Qinter. Thanks, Alison _______________________________________________ This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l or email: MIDRANGE-L-request@midrange.com 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-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.