385 pts.
 Check Active iSeries Subsystem from Windows
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

Software/Hardware used:
ASKED: July 22, 2009  6:12 AM
UPDATED: August 14, 2009  8:17 AM

Answer Wiki:
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  CharlieBrowne   32,785 pts.
All Answer Wiki Contributors:  CharlieBrowne   32,785 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

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

 5,505 pts.