/* REXX AUTHOR: MARK ZELDEN DTA TECHNICAL SERVICES ******************************************************************* DISPLAY SYSTEM INFORMATION ON TERMINAL - MARK ZELDEN 03/94 UPDATED 03/96 UPDATED 08/97 ******************************************************************* */ address TSO arg parms "((" opts tp = Wordpos("TRACE",opts) if tp > 0 then tv = Word(opts,tp+1) else tv = "O" rc = Trace("O"); rc = Trace(tv) "CLEAR" /* Call RDATE TODAY /* call RDATE subroutine*/ DAY = Word(RESULT,3) /* weekday from RDATE */ DATE = Substr(RESULT,1,10) /* date as MM/DD/YYYY */ JUL = Substr(RESULT,7,8) /* date as YYYY.DDD */ */ parse value Date("S") Date("W") Date("D") with, ccyymmdd day ddd . date = Translate("Mm/Dd/CcYy",ccyymmdd,"CcYyMmDd") jul = Left(ccyymmdd,4)"."ddd CVT = C2d(Storage(10,4)) /* point to CVT */ JESCT = C2d(Storage(D2x(CVT + 296),4)) /* point to JESCT */ CVTGDA = C2d(Storage(D2x(CVT + 560),4)) /* point to GDA */ GDAPVTSZ = C2d(Storage(D2x(CVTGDA + 164),4)) /* point to MAX PVT<16M */ GDAPVTSZ = GDAPVTSZ/1024 /* convert to kbytes */ RESUCB = C2d(Storage(D2x(JESCT + 4),4)) /* point to SYSRES UCB */ JESNAME = Storage(D2x(JESCT + 28),4) /* point to JESNAME */ IPLADDR = Storage(D2x(RESUCB + 13),3) /* point to IPL address */ IPLVOL = Storage(D2x(RESUCB + 28),6) /* point to IPL volume */ CVTEXT2 = C2d(Storage(D2x(CVT + 328),4)) /* point to CVTEXT2 */ IOCON = Storage(D2x(CVTEXT2 + 6),2) /* HCD IODFxx or MVSCP */ /* IOCONFIG ID=xx */ AMCBS = C2d(Storage(D2x(CVT + 256),4)) /* point to AMCBS */ ACB = C2d(Storage(D2x(AMCBS + 8),4)) /* point to ACB */ CAXWA = C2d(Storage(D2x(ACB + 64),4)) /* point to CAXWA */ MCATDSN = Storage(D2x(CAXWA + 52),44) /* master catalog dsn */ MCATDSN = Strip(MCATDSN,T) /* remove trailing blnks*/ MCATUCB = C2d(Storage(D2x(CAXWA + 28),4)) /* point to mcat UCB */ MCATVOL = Storage(D2x(MCATUCB + 28),6) /* master catalog VOLSER*/ SMCA = Storage(D2x(CVT + 196),4) /* point to SMCA */ SMCA = Bitand(SMCA,'7FFFFFFF'x) /* zero high order bit */ SMCA = C2d(SMCA) /* convert to decimal */ /*********************************************************************/ /* The IPL date is stored in packed decimal format - so to make */ /* the date printable, it needs to be converted back to hex and */ /* the packed sign needs to be removed. */ /*********************************************************************/ IPLTIME = C2d(Storage(D2x(SMCA + 336),4)) /* IPL Time - binary */ IPLDATE = C2d(Storage(D2x(SMCA + 340),4)) /* IPL Date - 0CYYDDDF */ If IPLDATE >= 16777231 then do /* is C = 1 ? */ IPLDATE = D2x(IPLDATE) /* convert back to hex */ IPLDATE = Substr(IPLDATE,2,5) /* keep YYDDD */ IPLDATE = '20'IPLDATE /* use 21st century date*/ End Else do IPLDATE = D2x(IPLDATE) /* convert back to hex */ IPLDATE = Left(IPLDATE,5) /* keep YYDDD */ IPLDATE = '19'IPLDATE /* use 20th century date*/ End IPLYYYY = Substr(IPLDATE,1,4) /* YYYY portion of date */ IPLDDD = Substr(IPLDATE,5,3) /* DDD portion of date */ /* Call RDATE IPLYYYY IPLDDD /* call RDATE subroutine*/ IPLDAY = Word(RESULT,3) /* weekday from RDATE */ IPLDATE = Substr(RESULT,1,10) /* date as MM/DD/YYYY */ IPLJUL = Substr(RESULT,7,8) /* date as YYYY.DDD */ */ iplday = "Weekday"; ipljul = iplyyyy||iplddd; ipldate = Jul2greg(ipljul) IPLTIME = IPLTIME / 100 /* remove hundreths */ HH = IPLTIME % 3600 /* IPL hour */ MM = (IPLTIME - (3600 * HH)) % 60 /* IPL minute */ SS = (IPLTIME - (3600 * HH) - (60 * MM)) % 1 /* IPL seconds */ HH = Right(HH,2,'0') /* ensure 2 digit HH */ MM = Right(MM,2,'0') /* ensure 2 digit MM */ SS = Right(SS,2,'0') /* ensure 2 digit SS */ IPLTIME = HH':'MM':'SS /* time in HH:MM format */ ASMVT = C2d(Storage(D2x(CVT + 704),4)) /* point to ASMVT */ CLPABYTE = Storage(D2x(ASMVT + 1),1) /* point to CLPA byte */ CHKCLPA = Bitand(CLPABYTE,'8'x) /* check for B'1000' */ CHKCLPA = C2d(CHKCLPA) /* convert to decimal */ If CHKCLPA < 8 then IPLCLPA = '(with CLPA)' /* bit off - CLPA */ Else IPLCLPA = '(without CLPA)' /* bit on - no CLPA */ SMFNAME = Storage(D2x(SMCA + 16),4) /* point to SMF name */ PRODNAME = Storage(D2x(CVT - 40),7) /* point to mvs version */ FMIDNUM = Storage(D2x(CVT - 32),7) /* point to fmid */ GRSNAME = Storage(D2x(CVT + 340),4) /* point to system name */ STORSIZE = C2d(Storage(D2x(CVT + 856),4)) /* point to storage size*/ STORSIZE = STORSIZE/1024 /* convert to Megabytes */ RCE = C2d(Storage(D2x(CVT + 1168),4)) /* point to RCE */ ESTOR = C2d(Storage(D2x(RCE + 160),4)) /* point to ESTOR frames*/ ESTOR = ESTOR*4/1024 /* convert to Megabytes */ /*********************************************************************/ /* The CPU model is stored in packed decimal format with no sign, */ /* so to make the model printable, it needs to be converted back */ /* to hex. */ /*********************************************************************/ MODEL = C2d(Storage(D2x(CVT - 6),2)) /* point to cpu model */ MODEL = D2x(MODEL) /* convert back to hex */ CSD = C2d(Storage(D2x(CVT + 660),4)) /* point to CSD */ NUMCPU = C2d(Storage(D2x(CSD + 10),2)) /* point to # of CPUS */ /*********************************************************************/ /* Write information to terminal. */ /*********************************************************************/ Say '***********************************************************' || , '*************' Say '************************* SYSTEM INFORMATION ************' || , '*************' Say '***********************************************************' || , '*************' Say '' Say 'Today is 'DAY DATE' ('JUL')'. Say 'The last IPL was 'IPLDAY IPLDATE' ('IPLJUL')' , 'at 'IPLTIME IPLCLPA'.' Say 'The system IPL address was 'IPLADDR' ('IPLVOL').' If Substr(PRODNAME,3,1) > 3 then do ECVT = C2d(Storage(D2x(CVT + 140),4)) /* point to CVTECVT */ IPLPARM = Storage(D2x(ECVT+160),8) /* point to LOAD PARM */ IPLPARM = Strip(IPLPARM,T) /* del trailing blanks */ Say 'The IPL LOAD PARM used was 'IPLPARM'.' End Say 'The currently active IOCONFIG or HCD IODF is 'IOCON'.' Say 'The Master Catalog is 'MCATDSN' on 'MCATVOL'.' Say '' If Substr(PRODNAME,3,1) < 6 then Say 'The MVS version is 'PRODNAME' - FMID 'FMIDNUM'.' Else do PRODNAME = Storage(D2x(ECVT+496),16) /* point to product name*/ PRODNAME = Strip(PRODNAME,T) /* del trailing blanks */ VER = Storage(D2x(ECVT+512),2) /* point to version */ REL = Storage(D2x(ECVT+514),2) /* point to release */ MOD = Storage(D2x(ECVT+516),2) /* point to mod level */ VRM = VER'.'REL'.'MOD Say 'The OS version is 'PRODNAME VRM' - FMID 'FMIDNUM'.' End Say 'The primary job entry subsystem is 'JESNAME'.' Say 'The GRS system id is 'GRSNAME'. The SMF system id is 'SMFNAME'.' Say 'The real storage size is 'Format(STORSIZE,,0)'M.' If ESTOR > 0 then do Say 'The expanded storage size is 'ESTOR'M.' End Else Say 'The system has no expanded storage.' Say 'The maximum private area size below the line is 'gdapvtsz'K.' Say '' Say 'The CPU model number is 'MODEL'.' Say 'The number of online CPUs is 'NUMCPU'.' PCCAVT = C2d(Storage(D2x(CVT + 764),4)) /* point to PCCA vect tb*/ CPNUM = 0 FOUNDCPUS = 0 Do until FOUNDCPUS = NUMCPU PCCA = C2d(Storage(D2x(PCCAVT + CPNUM*4),4)) /* point to PCCA */ If PCCA ^= 0 then do CPUID = Storage(D2x(PCCA + 6),10) /* point to CPUID */ IDSHORT = Substr(CPUID,2,5) Say 'The CPU serial number for CPU 'CPNUM' is 'CPUID' ('IDSHORT').' FOUNDCPUS = FOUNDCPUS + 1 End CPNUM = CPNUM + 1 End /* do until */ Say '' Exit