Code: Select all
/*REXX ==============================================================*/
/* */
/* THIS REXX LISTS THE VERSION NUMBERS OF SOME MVS COMPONENTS. */
/* */
/*===================================================================*/
numeric digits 10 /* Allow 10 digits/num */
CVT = C2d(Storage(10,4)) /* point to CVT */
PRODNAME = Storage(D2x(CVT - 40),7) /* point to mvs version */
If Substr(PRODNAME,3,1) > 3 then
ECVT = C2d(Storage(D2x(CVT + 140),4)) /* point to CVTECVT */
FMIDNUM = Storage(D2x(CVT - 32),7) /* point to fmid */
JESCT = C2d(Storage(D2x(CVT + 296),4)) /* point to JESCT */
JESPJESN = Storage(D2x(JESCT + 28),4) /* name of primary JES */
CSD = C2d(Storage(D2x(CVT + 660),4)) /* point to CSD */
SMCA = Storage(D2x(CVT + 196),4) /* point to SMCA */
SMCA = Bitand(SMCA,'7FFFFFFF'x) /* zero high order bit */
SMCA = C2d(SMCA) /* convert to decimal */
MODEL = C2d(Storage(D2x(CVT - 6),2)) /* point to cpu model */
CVTVERID = Storage(D2x(CVT - 24),16) /* "user" software vers.*/
CVTRAC = C2d(Storage(D2x(CVT + 992),4)) /* point to RACF CVT */
RCVTID = Storage(D2x(CVTRAC),4) /* point to RCVTID */
If Sysvar(SYSISPF)='ACTIVE' then do /* no, is ISPF active? */
Address ISREDIT "MACRO (OPTION)" /* YES - allow use as macro */
OPTION = Translate(OPTION) /* ensure upper case for edit macro */
Address ISPEXEC "VGET ZENVIR" /* ispf version */
SYSISPF = 'ACTIVE' /* set SYSISPF = ACTIVE */
End
/* RCVT, ACF2, or RTSS */
SECNAM = RCVTID /* ACF2 SECNAME = RCVTID*/
If RCVTID = 'RCVT' then SECNAM = 'RACF' /* RCVT is RACF */
If RCVTID = 'RTSS' then SECNAM = 'Top Secret' /* RTSS is Top Secret */
RACFVRM = Storage(D2x(CVTRAC + 616),4) /* RACF Ver/Rel/Mod */
RACFVER = Substr(RACFVRM,1,1) /* RACF Version */
RACFREL = Substr(RACFVRM,2,2) /* RACF Release */
RACFREL = Format(RACFREL) /* Remove leading 0 */
RACFMOD = Substr(RACFVRM,4,1) /* RACF MOD level */
RACFLEV = RACFVER || '.' || RACFREL || '.' || RACFMOD
If RCVTID = 'RCVT' | RCVTID = 'RTSS' then ,
RCVTDSN = Strip(Storage(D2x(CVTRAC + 56),44)) /* RACF prim dsn or */
/* TSS Security File */
/* */
CVTDFA = C2d(Storage(D2x(CVT + 1216),4)) /* point to DFP ID table*/
DFAPROD = C2d(Storage(D2x(CVTDFA +16),1)) /* point to product byte*/
If DFAPROD = 0 then do /* DFP not DF/SMS */
DFAREL = C2x(Storage(D2x(CVTDFA+2),2)) /* point to DFP release */
DFPVER = Substr(DFAREL,1,1) /* DFP Version */
DFPREL = Substr(DFAREL,2,1) /* DFP Release */
DFPMOD = Substr(DFAREL,3,1) /* DFP Mod Lvl */
DFPRD = 'DFP' /* product is DFP */
DFLEV = DFPVER || '.' || DFPREL || '.' || DFPMOD
End
Else do /* DFSMS not DFP */
DFARELS = C2x(Storage(D2x(CVTDFA+16),4)) /* point to DF/SMS rel */
DFAVER = X2d(Substr(DFARELS,3,2)) /* DF/SMS Version */
DFAREL = X2d(Substr(DFARELS,5,2)) /* DF/SMS Release */
DFAMOD = X2d(Substr(DFARELS,7,2)) /* DF/SMS Mod Lvl */
DFPRD = 'DFSMS' /* product is DF/SMS */
DFLEV = DFAVER || '.' || DFAREL || '.' || DFAMOD
If DFAPROD = 2 then DFLEV = 'OS/390' DFLEV
If DFAPROD = 3 then DFLEV = 'z/OS' DFLEV
End
/* */
CVTTVT = C2d(Storage(D2x(CVT + 156),4)) /* point to TSO vect tbl*/
TSVTLVER = Storage(D2x(CVTTVT+100),1) /* point to TSO Version */
TSVTLREL = Storage(D2x(CVTTVT+101),2) /* point to TSO Release */
TSVTLREL = Format(TSVTLREL) /* Remove leading 0 */
TSVTLMOD = Storage(D2x(CVTTVT+103),1) /* point to TSO Mod Lvl */
TSOLEV = TSVTLVER || '.' || TSVTLREL || '.' || TSVTLMOD
/* */
CVTEXT2 = C2d(Storage(D2x(CVT + 328),4)) /* point to CVTEXT2 */
CHKVTACT = Storage(D2x(CVTEXT2+64),1) /* VTAM active flag */
If bitand(CHKVTACT,'80'x) = '80'x then do /* vtam is active */
CVTATCVT = C2d(Storage(D2x(CVTEXT2 + 65),3)) /* point to VTAM AVT */
ISTATCVT = C2d(Storage(D2x(CVTATCVT + 0),4)) /* point to VTAM CVT */
ATCVTLVL = Storage(D2x(ISTATCVT + 0),8) /* VTAM Rel Lvl VOVRP */
VTAMVER = Substr(ATCVTLVL,3,1) /* VTAM Version V */
VTAMREL = Substr(ATCVTLVL,4,1) /* VTAM Release R */
VTAMMOD = Substr(ATCVTLVL,5,1) /* VTAM Mod Lvl P */
If VTAMMOD = ' ' then VTAMLEV = VTAMVER || '.' || VTAMREL
else VTAMLEV = VTAMVER || '.' || VTAMREL || '.' || VTAMMOD
/* */
ATCNETID = Strip(Storage(D2x(ISTATCVT + 2080),8)) /* VTAM NETID */
ATCNQNAM = Strip(Storage(D2x(ISTATCVT + 2412),17)) /* VTAM SSCPNAME*/
VTAM_ACTIVE = 'YES'
End /* if bitand (vtam is active) */
Else VTAM_ACTIVE = 'NO'
If Substr(PRODNAME,3,1) < 6 then
say 'The MVS version is 'PRODNAME' - FMID 'FMIDNUM'.'
Else do
PRODNAM2 = Storage(D2x(ECVT+496),16) /* point to product name*/
PRODNAM2 = Strip(PRODNAM2,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 'PRODNAM2 VRM' - FMID' ,
FMIDNUM' ('PRODNAME').'
End
If CVTVERID <> ' ' then ,
say 'The "user" system software version is' Strip(CVTVERID,T)'.'
say 'The primary job entry subsystem is 'JESPJESN'.'
If SECNAM <> 'RACF' | RACFVRM < '2608' then do
say 'The security software is 'SECNAM'.' ,
'The RACF level is 'RACFLEV'.'
If SECNAM = 'Top Secret' then ,
say ' The TSS Security File DSN is' RCVTDSN'.'
If SECNAM = 'RACF' then ,
say ' The RACF Primary DSN is' RCVTDSN'.'
End
Else do
say 'The security software is' Word(PRODNAM2,1) ,
'Security Server (RACF).' ,
'The FMID is HRF' || RACFVRM || '.'
say ' The RACF Primary DSN is' RCVTDSN'.'
End
say 'The' DFPRD 'level is' DFLEV'.'
say 'The TSO level is 'TSOLEV'.'
If SYSISPF = 'ACTIVE' then do /* is ISPF active? */
Address ISPEXEC "VGET ZISPFOS" /* yes, is it OS?390? */
If RC = 0 then do /* yes, get OS/390 var */
ISPFLEV = Strip(Substr(ZISPFOS,10,15)) /* only need version */
Address ISPEXEC "VGET ZENVIR" /* ispf internal rel var*/
ISPFLEVI = Substr(ZENVIR,1,8) /* internal ISPF release*/
say 'The ISPF level is 'ISPFLEV' ('ISPFLEVI').'
End /* if RC */
Else do /* not OS/390 - use old variables */
Address ISPEXEC "VGET ZPDFREL" /* get pdf release info */
ISPFLEV = Substr(ZENVIR,6,3) /* ISPF level */
PDFLEV = Substr(ZPDFREL,5,3) /* PDF level */
say 'The ISPF level is 'ISPFLEV'. The PDF level is' PDFLEV'.'
End /* else do */
End /* if SYSISPF */
If VTAM_ACTIVE = 'YES' then do
say 'The VTAM level is 'VTAMLEV'.'
say 'The NETID is' ATCNETID'. The SSCPNAME is' ATCNQNAM'.'
End /* if VTAM_ACTIVE = YES */
Else say 'The VTAM level is not available - VTAM is not active.'
EXIT 0