Hi,
Can anybody tell me how to check if an iseries subsystem is active from a windows server. A script to do such a thing would be very help ful.
thanks
You need to create a stored procedure that can be called from the PC.
It would have 2 parms: Subsytem and Switch
The program would look something like this:
PGM (&pSbs &Switch)
DCL &pSbs *Char 10
DCL &Switch *Char 1
Chgvar &Switch 'N'
WRKSBS OUTPUT(*PRINT)
DLTF QTEMP/SPOOLTEMP
MONMSG CPF0000
crtpf qtemp/spooltemp rcdlen(132)
CPYSPLF FILE(QPDSPSBS) TOFILE(QTEMP/SPOOLTEMP) SPLNBR(*LAST)
Now with SQL or and RPG program search the file for the subsystem and if ACTIVE then change SWITCH to 'Y'
Here is sample of what file would look like.
File . . . . . . : SPOOLTEMP Library . . . . : QTEMP
Member . . . . . : SPOOLTEMP Record . . . . . : 1
Control . . . . . Column . . . . . : 1
Find . . . . . . .
*...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8....+....9....+....0....+....1....+....2....+....3
Work with Subsystems 8/12/09 10:32:33 Page 0001
Subsystem Active Total -----------Subsystem Pools---------------
Subsystem Number Jobs Status Storage (M) 1 2 3 4 5 6 7 8 9 10
QBATCH 227922 4 ACTIVE .00 2
QCMN 227925 7 ACTIVE .00 2
QCTL 178750 2 ACTIVE .00 2
QHTTPSVR 228031 5 ACTIVE .00 2
QINTER 227918 17 ACTIVE .00 2 3
QPGMR 227987 0 ACTIVE .00 2
QSERVER 227910 20 ACTIVE .00 2
QSNADS 227988 9 ACTIVE .00 2
QSPL 227928 5 ACTIVE .00 2 4
QSYSWRK 227908 104 ACTIVE .00 2
QUSRWRK 227912 101 ACTIVE .00 2
RJEFDR 228151 0 ACTIVE .00 2
SCHED_MAST 228150 1 ACTIVE .00 2
ZPSD 228152 6 ACTIVE .00 2
* * * * * E N D O F L I S T I N G * * * * *
Last Wiki Answer Submitted: August 12, 2009 3:43 pm by CharlieBrowne32,785 pts.
All Answer Wiki Contributors: CharlieBrowne32,785 pts.
If you live outside the United States, by submitting your email address you consent to having your personal data transferred to and processed in the United States.
looking for something else. I came across this API
List Active Subsystems (QWCLASBS) API
The List Active Subsystems (QWCLASBS) API retrieves a list of active subsystems
full details are here. maybe you can use it to rtv the list, and pass info around to windoze
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/apis/wm.pdf