×
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.
you can also usr the QWCRSSTS API:
http://publib.boulder.ibm.com/infocenter/systems/scope/i5os/index.jsp?topic=/apis/qwcrssts.htm
SSTS0200 Format contains LPAR info.
I have used it in a CL to get the %ASP used. A quick change should get
you the LPAR info at offset 77 and 81.
/* Here is a quick way to see the percent used of ASP1. */
/* The API used is QWCRSSTS. */
/* */
/* */
/* comments to bryandietz@xxxxxxxxx */
PGM
DCL VAR(&PCT) TYPE(*CHAR) LEN(7)
DCL VAR(&RCVDTA) TYPE(*CHAR) LEN(067)
DCL VAR(&RCVLEN) TYPE(*CHAR) LEN(4) VALUE(X'00000043')
DCL VAR(&RESETO) TYPE(*CHAR) LEN(10) VALUE('*YES ')
DCL VAR(&FMTNAM) TYPE(*CHAR) LEN(08) VALUE('SSTS0200')
DCL VAR(&ERRSTS) TYPE(*CHAR) LEN(08) VALUE(X'00000000')
DCL VAR(&PCTASP) TYPE(*DEC) LEN(7) VALUE(0)
DCL VAR(&PCTX) TYPE(*DEC) LEN(7 4) VALUE(0)
CALL PGM(QWCRSSTS) PARM(&RCVDTA &RCVLEN &FMTNAM &RESETO &ERRSTS)
CHGVAR VAR(&PCTASP) VALUE(%BIN(&RCVDTA 53 4))
CHGVAR VAR(&PCTX) VALUE(&PCTASP / 10000)
CHGVAR VAR(&PCT) VALUE(&PCTX)
SNDPGMMSG MSG('The system disk is ' || &PCT *TCAT '% used')
ENDPGM
Bryan
James Lampert said the following on 2/13/2008 8:16 PM:
Is there an easy way to get the LPAR number from RPG? One that works
under all OS releases that support LPARs?
As an Amazon Associate we earn from qualifying purchases.