/*--Rexx-------------------------------------------------------------*/ /* */ /* This rexx will extract and print CPU serial no, model, LPAR name */ /* MIF ID and CSS ID. */ /* */ /*-------------------------------------------------------------------*/ say say say say if syscpus('CPUS.') = 0 then say "CPU Model="right(CPUS.1, 4), " Serial Number="substr(CPUS.1, 3, 6) else say "Machine information retrieval failed." CPCND_MODEL = "n/a" CPCSI_MODEL = "n/a" LPARNAME = "n/a" CSSID = "n/a" MIFID = "n/a" CVT = c2d(storage(10,4)) MVSVER = storage(d2x(CVT - 40),7) RMCT = c2d(storage(d2x(CVT+604),4)) IRALCCT = c2d(storage(d2x(RMCT+620),4)) if Substr(MVSVER,3,1) >= 3 then do CVTOSLV0 = storage(d2x(CVT + 1264),1) CVTOSLV1 = storage(d2x(CVT + 1265),1) CVTOSLV2 = storage(d2x(CVT + 1266),1) CVTOSLV3 = storage(d2x(CVT + 1267),1) CVTOSLV4 = storage(d2x(CVT + 1268),1) CVTOSLV5 = storage(d2x(CVT + 1269),1) end if Bitand(CVTOSLV5,'08'x) = '08'x then SI_OFF = 128 else SI_OFF=0 CPCSI_MODEL = strip(storage(d2x(IRALCCT+336+SI_OFF),4)) if Bitand(CVTOSLV0,'08'x) = '08'x then , ECVT = c2d(storage(d2x(CVT + 140),4)) if Bitand(CVTOSLV1,'20'x) = '20'x then do CVTIXAVL = c2d(storage(d2x(CVT+124),4)) IOCIOVTP = c2d(storage(d2x(CVTIXAVL+208),4)) CDA = c2d(storage(d2x(IOCIOVTP+24),4)) CVTHID = C2d(storage(d2x(CVT + 1068),4)) CPCND_FLAGS = storage(d2x(CVTHID+22),1) if CPCND_FLAGS <> 0 then do CPCND_VALID = Bitand(CPCND_FLAGS,'E0'x) CPCND_INVALID = Bitand('40'x) if CPCND_VALID <> CPCND_INVALID then do CPCND_TYPE = storage(d2x(CVTHID+26),6) CPCND_MODEL = storage(d2x(CVTHID+32),3) end end end if Bitand(CVTOSLV1,'10'x) = '10'x then do LPARNAME = storage(d2x(ECVT+344),8) if Bitand(CVTOSLV2,'01'x) = '01'x then do MIFID = c2d(storage(d2x(CDA+252),1)) MIFID = d2x(MIFID) if Bitand(CVTOSLV3,'04'x) = '04'x then do CSSID = c2d(storage(d2x(CVTIXAVL+275),1)) CSSID = d2x(CSSID) end end end say "CPU Sub-Model="CPCSI_MODEL " Model Family Type="CPCND_MODEL say "LPAR Name="LPARNAME " LPAR Number="CSSID||MIFID exit