|
Here is the source of a SIMPLE cl pgm to do just that. Just provide the subsystem. PGM PARM(&SBS) DCL VAR(&JQ) TYPE(*CHAR) LEN(10) DCL VAR(&Q) TYPE(*CHAR) LEN(10) DCL VAR(&SBS) TYPE(*CHAR) LEN(10) DCL VAR(&SUB) TYPE(*CHAR) LEN(10) DCL VAR(&L) TYPE(*CHAR) LEN(500) DCL VAR(&BIN) TYPE(*CHAR) LEN(8) VALUE(X'000001F4') DCL VAR(&NAME) TYPE(*CHAR) LEN(10) + VALUE('JOBI0300') DCL VAR(&JOBI6) TYPE(*CHAR) LEN(10) + VALUE('JOBI0600') DCL VAR(&ERROR) TYPE(*CHAR) LEN(4) + VALUE(X'00001000') DCL VAR(&JOB26) TYPE(*CHAR) LEN(26) DCL VAR(&JOBIDENT) TYPE(*CHAR) LEN(26) + VALUE(' ') DCLF FILE(WHICHJQ) SNDPGMMSG MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA('Getting + list of jobs that are currently running + in ' || &SBS) TOPGMQ(*EXT) MSGTYPE(*STATUS) OVRPRTF FILE(QPDSPAJB) HOLD(*YES) WRKACTJOB OUTPUT(*PRINT) RESET(*YES) SBS(&SBS) SEQ(*SBS) CPYSPLF FILE(QPDSPAJB) TOFILE(WHICHJQ) JOB(*) + SPLNBR(*LAST) MBROPT(*REPLACE) CHGVAR VAR(&SUB) VALUE(&SBS) LOOP: RCVF MONMSG MSGID(CPF0864) EXEC(GOTO CMDLBL(END)) IF COND(&NBR *EQ '* * * ') THEN(GOTO CMDLBL(END)) IF COND(&TYPE *EQ 'ASJ' *OR + &TYPE *EQ 'BCH' *OR + &TYPE *EQ 'BCI' *OR + &TYPE *EQ 'EVK' *OR + &TYPE *EQ 'INT' *OR + &TYPE *EQ 'MRT' *OR + &TYPE *EQ 'PJ ' *OR + &TYPE *EQ 'PDJ' *OR + &TYPE *EQ 'RDR' *OR + &TYPE *EQ 'WTR') + THEN(DO) CHGVAR VAR(&JOB26) VALUE(&JOB || &USR || &NBR) CALL PGM(QUSRJOBI) PARM(&L &BIN &NAME &JOB26 + &JOBIDENT &ERROR) CHGVAR VAR(&JQ) VALUE(%SST(&L 63 10)) CHGVAR VAR(&Q) VALUE(&JQ) IF COND(&JQ *EQ ' ') THEN(GOTO + CMDLBL(LOOP)) IF COND(&SBS *EQ '*ALL ') THEN(DO) CALL PGM(QUSRJOBI) PARM(&L &BIN &JOBI6 &JOB26 + &JOBIDENT &ERROR) CHGVAR VAR(&SUB) VALUE(%SST(&L 72 10)) ENDDO SNDPGMMSG MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA('Job ' + || &JOB *CAT ' is running in ' || &SUB + *CAT ' and came from jobq ' || &Q) + TOPGMQ(*EXT) MSGTYPE(*STATUS) SNDPGMMSG MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA('Job ' + || &JOB *CAT ' is running in ' || &SUB + *CAT ' and came from jobq ' || &Q) GOTO LOOP ENDDO GOTO LOOP END: FIN: DLTSPLF FILE(QPDSPAJB) SPLNBR(*LAST) ENDPGM ================= PF Source ========== A R JOBQ A FILL1 3A A JOB 10A A FILL2 3A A USR 10A A FILL3 2A A NBR 6A A FILL4 3A A TYPE 3A A FILL6 99A I hope it meets your needs. If not maybe it will spark new ideas. Bryan Dietz 3X Corp. Visit us at : http://www.3x.com boothm@earth.goddard.edu on 09/01/97 10:49:51 AM Please respond to MIDRANGE-L@MIDRANGE.COM To: MIDRANGE-L@MIDRANGE.COM cc: (bcc: Bryan Dietz/Columbus/3X Corp) Subject: Re: Display jobs according to job q What does DSPJOBQ do? And then perhaps a Cmd 16 on the column you want ranked? > Does anyone know a way of displaying jobs by the job q they were > submitted into? > -- ----------------------------------------------------------- boothm@earth.goddard.edu ----------------------------------------------------------- +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to "MIDRANGE-L@midrange.com". | To unsubscribe from this list send email to MAJORDOMO@midrange.com | and specify 'unsubscribe MIDRANGE-L' in the body of your message. | Questions should be directed to the list owner/operator: david@midrange.com +--- +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to "MIDRANGE-L@midrange.com". | To unsubscribe from this list send email to MAJORDOMO@midrange.com | and specify 'unsubscribe MIDRANGE-L' in the body of your message. | 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-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.