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



This isn't CL, and it does use an API (but does not require a user space). I put this together in 1996 or so... We were going to totally automate our week-end IPL. That never happened, but some useful pieces survived.

QWDRSBSD API was introduced in V2R1...

--Paul E Musselman

.

At 8:55 AM -0800 3/2/21, James H. H. Lampert wrote:
I'll admit that I haven't done more than a cursory look at the CMDJOB and CMDSBS menus (and even that only on our V4R4 box, even though the box I'm asking this for is on V7), but short of an API call, can a CL program easily check to see if a given subsystem is active?

--
JHHL
*************** Beginning of data ***********************************************
0001.00 RTVSBSINF: CMD PROMPT('Retrieve Subsystem Information')
0002.00
0003.00 /* CRTCMD CMD(UTLPRD/RTVSBSINF) PGM(UTLPRD/RTVSBSINFR) SRCFILE(UTLSRC/QCMDSRC) +
0004.00 ALLOW(*BPGM *IPGM *BREXX *BMOD) */
0005.00
0006.00 PARM KWD(SBS) TYPE(SBS_LIB) MIN(1) +
0007.00 PROMPT('Subsystem Name')
0008.00 SBS_LIB: QUAL TYPE(*NAME) LEN(10) MIN(1)
0009.00 QUAL TYPE(*NAME) LEN(10) DFT(ALTQSYS) +
0010.00 SPCVAL((*LIBL *LIBL)) MIN(0) +
0011.00 PROMPT('Library Containing SBSD')
0012.00
0013.00 PARM KWD(STATUS) TYPE(*CHAR) LEN(10) RTNVAL(*YES) +
0014.00 PROMPT('Subsystem Status')
0015.00
0016.00 PARM KWD(SUBDFN) TYPE(*CHAR) LEN(10) RTNVAL(*YES) +
0017.00 PROMPT('Device File Name')
0018.00
0019.00 PARM KWD(SUBDFL) TYPE(*CHAR) LEN(10) RTNVAL(*YES) +
0020.00 PROMPT('Device File Library')
0021.00
0022.00 PARM KWD(LANGLB) TYPE(*CHAR) LEN(10) RTNVAL(*YES) +
0023.00 PROMPT('2ndary Language Library')
0024.00
0025.00 PARM KWD(MAXACT) TYPE(*DEC) LEN(7 0) RTNVAL(*YES) +
0026.00 PROMPT('Maximum Active Jobs')
0027.00
0028.00 PARM KWD(CURACT) TYPE(*DEC) LEN(7 0) RTNVAL(*YES) +
0029.00 PROMPT('Current Number of Active Jobs')
0030.00
0031.00 PARM KWD(NBRPOL) TYPE(*DEC) LEN(7 0) RTNVAL(*YES) +
0032.00 PROMPT('Numbr of Defined Storage Pools')
0033.00
0034.00 PARM KWD(POOL#) TYPE(*DEC) LEN(7 0) RTNVAL(*NO) +
0035.00 DFT(1) PROMPT('Following Fields for Pool#')
0036.00
0037.00 PARM KWD(POOLID) TYPE(*DEC) LEN(7 0) RTNVAL(*YES) +
0038.00 PROMPT('Pool ID')
0039.00
0040.00 PARM KWD(POOLNM) TYPE(*CHAR) LEN(10) RTNVAL(*YES) +
0041.00 PROMPT('Pool Name')
0042.00
0043.00 PARM KWD(POOLRS) TYPE(*CHAR) LEN(6) RTNVAL(*YES) +
0044.00 PROMPT('*** reserved ***')
0045.00
0046.00 PARM KWD(POOLSZ) TYPE(*DEC) LEN(7 0) RTNVAL(*YES) +
0047.00 PROMPT('Pool Size')
0048.00
0049.00 PARM KWD(POOLAC) TYPE(*DEC) LEN(7 0) RTNVAL(*YES) +
0050.00 PROMPT('Pool Activity Level')
0051.00
****************** End of data ***********************************************




*************** Beginning of data ***********************************************
0001.00 ** Retrieve Subsystem Information.
0002.00 **
0003.00 ** COMMAND: RTVSBSINF SBS(subsystemlib/subsystemname) + <---+
0004.00 ** STATUS(status) + |
0005.00 ** SIGNON(filelib/filename) + |
0006.00 ** SECONDLANG(library) + |
0007.00 ** MAXACT(maxactivejobs) + |
0008.00 ** CURRACT(currentlyactivejobs) + |
0009.00 ** NBRPOOLS(number) + |
0010.00 ** POOLNBR(nbr) + <----------------+
0011.00 ** POOLID(nbr) + |
0012.00 ** POOLNAME(name) + |
0013.00 ** POOLRES(reserved) + |
0014.00 ** POOLSIZE(nbr) + |
0015.00 ** POOLACTLVL(nbr) |
0016.00 ** |
0017.00 ** Information entered on command >---+
0018.00 ** All other fields returned by command
0019.00 **
0020.00 ** This program uses an API, but it does NOT require a User Space.
0021.00 **
0022.00 **
0023.00 ** --Paul E Musselman 24 Sept 1996
0024.00 **
0025.00 **
0026.00 **
0027.00 E POOL 10 28
0028.00 **
0029.00 ISYSTEM SDS
0030.00 I *STATUS SYSSTS
0031.00 I *PARMS PARMS
0032.00 I*
0033.00 I*
0034.00 **
0035.00 IERROR DS
0036.00 I B 1 40ERRNOT
0037.00 **
0038.00 IMISC DS
0039.00 I B 1 40LENDTA
0040.00 I B 5 80STRPOS
0041.00 ICMDDS DS
0042.00 I 1 80 CMD
0043.00 I 22 31 JQUEUE
0044.00 I 14 34 JQLBNM
0045.00 I 56 59 QCOUNT
0046.00 I 81 160 CMD2
0047.00 ISBSDTA DS
0048.00 I 1 10 SBNAME
0049.00 I 11 20 SBLIB
0050.00 IVARBLS DS
0051.00 I B 1 40SUBDSL
0052.00 IRCVVAR DS
0053.00 I B 1 40OFFSET
0054.00 I* OFFSET TO LIST DATA SECTION
0055.00 I B 5 80LISIZE
0056.00 I* SIZE OF LIST DATA SECTION
0057.00 I B 9 120NUMENT
0058.00 I* NUMBER OF LIST ENTRIES
0059.00 I B 13 160LSTSIZ
0060.00 I* SIZE OF EACH ENTRY
0061.00 IHEADER DS
0062.00 I 1 10 SBSNMU
0063.00 I 11 20 SBSLBU
0064.00 IQUSER DS
0065.00 I 1 5 QUSER5
0066.00 I 1 8 QUSER8
0067.00 I 1 10 QUSERX
0068.00 ISUBDS DS
0069.00 I B 1 40SUBYTE
0070.00 I B 5 80SUBAVL
0071.00 I 9 18 SUBSYS
0072.00 I 19 28 SUBLIB
0073.00 I 29 38 SUBSTS
0074.00 I 39 48 SUBDFN
0075.00 I 49 58 SUBDFL
0076.00 I 59 68 SUBLAN
0077.00 I B 69 720SUBMAX
0078.00 I B 73 760SUBACT
0079.00 I B 77 800SUBPOO
0080.00 I 81 360 POOL
0081.00 **
0082.00 IPOOL1 DS
0083.00 I B 1 40SUBPID
0084.00 I 5 14 SUBPNM
0085.00 I 15 20 SUBPRS
0086.00 I B 21 240SUBPSZ 0087.00 I B 25 280SUBPAL
0088.00 **
0089.00 C *ENTRY PLIST
0090.00 C PARM SBSDTA
0091.00 C PARM STATUS 10
0092.00 C PARM SCNNAM
0093.00 C PARM SCNLIB
0094.00 C PARM LANGLB 10
0095.00 C PARM MAXACT 70
0096.00 C PARM CURACT 70
0097.00 C PARM NBRPOL 70
0098.00 C PARM POOL# 70
0099.00 C PARM POOLID 70
0100.00 C PARM POOLNM 10
0101.00 C PARM POOLRS 6
0102.00 C PARM POOLSZ 70
0103.00 C PARM POOLAC 70
0104.00 **
0105.00 C Z-ADD0 ERRNOT
0106.00 C Z-ADD360. SUBDSL
0107.00 C*
0108.00 C CALL 'QWDRSBSD'
0109.00 C PARM SUBDS
0110.00 C PARM SUBDSL
0111.00 C PARM 'SBSI0100'FMT 8
0112.00 C PARM SBSDTA
0113.00 C PARM ERRNOT
0114.00 **
0115.00 C POOL# IFLE 0
0116.00 C Z-ADD1. POOL#
0117.00 C END
0118.00 **
0119.00 C POOL# IFLE SUBPOO
0120.00 C MOVEAPOOL,POOL#POOL1
0121.00 C ENDIF
0122.00 **
0123.00 C POOL# IFGT SUBPOO
0124.00 C*
0125.00 C Z-ADD0 SUBPID
0126.00 C MOVEL'INVALID 'SUBPNM
0127.00 C MOVEL'XXXXXX' SUBPRS
0128.00 C Z-ADD0 SUBPSZ
0129.00 C Z-ADD0 SUBPAL
0130.00 C*
0131.00 C ENDIF
0132.00 **
0133.00 C MOVE SUBSTS STATUS 10
0134.00 C MOVE SUBDFN SCNNAM 10
0135.00 C MOVE SUBDFL SCNLIB 10
0136.00 C MOVE SUBLAN LANGLB 10
0137.00 C Z-ADDSUBMAX MAXACT 70
0138.00 C Z-ADDSUBACT CURACT 70
0139.00 C Z-ADDSUBPOO NBRPOL 70
0140.00 C Z-ADDSUBPID POOLID 70
0141.00 C MOVE SUBPNM POOLNM 10
0142.00 C MOVE SUBPRS POOLRS 6
0143.00 C Z-ADDSUBPSZ POOLSZ 70
0144.00 C Z-ADDSUBPAL POOLAC 70
0145.00 **
0146.00 C SETON LRRT
0147.00 **
****************** End of data **************************************

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.