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



Simple example cmd/cl:

CMD PROMPT('RTN the # of jobs in subsystem')
PARM KWD(SUBSYSTEM) TYPE(SBS) MIN(1) +
PROMPT('Subsystem name')

SBS: QUAL TYPE(*NAME) LEN(10) MIN(1)
QUAL TYPE(*CHAR) LEN(10) DFT(*LIBL) +
SPCVAL((*LIBL)) PROMPT('Library')


PGM PARM(&SBSlib)
DCL &SBSLIB *CHAR 20
DCL &SBS *CHAR stg(*defined) defvar(&sbslib 1 ) len(10)
DCL &LIB *CHAR stg(*defined) defvar(&sbslib 11) len(10)
DCL &SPACE *CHAR 100
DCL &ACT *CHAR stg(*defined) defvar(&space 29) len(10)
DCL &NBR *CHAR stg(*defined) defvar(&space 73) len( 4)
DCL &LEN *CHAR 4
DCL &ERROR *CHAR 8 (X'0000000000000000')
DCL &TOT *CHAR 6
DCL &TOT1 *CHAR 50

CHGVAR VAR(%BIN(&LEN)) VALUE('100')
CALL PGM(QWDRSBSD) PARM(&SPACE &LEN SBSI0100 &SBSLIB &ERROR)
MONMSG MSGID(CPF1608) EXEC(DO)
SNDPGMMSG MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA('The +
subsystem ' || &SBS *tCAT ' in ' || &LIB *TCAT ' is not found.')
GOTO CMDLBL(END)
ENDDO
CHGVAR VAR(&TOT) VALUE(%BIN(&NBR))
TRMLEAD0 INPUT(&TOT) OUTPUT(&TOT1)
SNDPGMMSG MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA('The +
number of jobs active in ' || &LIB *TCAT +
'/' || &SBS *BCAT 'is ' *cat &TOT1 *tcat ' & the sbs is ' || &ACT)

END: ENDPGM



Bryan

Paul E Musselman wrote on 12/5/2022 2:00 PM:
QWDRSBSD is a better solution--  doesn't even need a User Space!

--Paul E Musselman


.

On 12/5/22 2:36 PM, James H. H. Lampert via MIDRANGE-L wrote:
On 12/5/22 11:22 AM, Jerry Draper wrote:
Sorry. A bit vague.

We have a job that submits a bunch of jobs to a subsystem.

Using CL we need to be able to confirm when all those jobs are complete and there are no jobs in that subsystem.

Maybe a call to QWDRSBSD?

It takes a subsystem name, qualified with the library wherein the SBSD lives, and it returns such information as whether it's up, and the number of currently active jobs therein.

--
JHHL


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.