(1) The Prefix Save Area (PSA) points (->) to the CVT, which points to the SMCA, which gets us to the system name. (2) PSATOLD -> JSCB -> SSIB -> jobtype, tasknum (3) PSATOLD -> TIOT -> job, step, proc name plus allocated DD information /*-------------------------------------------------------*/ /* Follow the control blocks to the Step Control Table. */ /*-------------------------------------------------------*/ /* Psa Prefix Save Area /* Psa@540 Pointer of PSATOLD /* Psa@540=>tcb Task control block /* Psa@540=>tcb+181 Pointer of TCBJSCBB /* Psa@540=>tcb+181=>jscb JOBSTEP control block /* Psa@540=>tcb+181=>jscb+261 Pointer to Job Control Table /* Psa@540=>tcb+181=>jscb+261=>jct Job Control Table /* Psa@540=>tcb+181=>jscb+261=>jct+329 Pointer to Step Contolr Table /* Psa@540=>tcb+181=>jscb+261=>jct+329=>sct Step Control Table*/ /*------------------------------------------------------------*/
2013年6月14日 星期五
Get task information from control blocks
2013年6月4日 星期二
MVS Control Blocks
CVT DSECT=YES,LIST=NO MVS CVT IKJCPPL , Command Processor Parm List IEFJESCT , JES Communication Table IHAPSA , Prefix save area IKJTCB , Task Control Block IEZJSCB , Job Step Control Block IEFAJCTB , Job Control table IEFASCTB , Step Control table IHAASCB , Address Space Control Block IHAASSB , Address Space Secondary Block IAZJSAB , Job Schedular Addr Spc CB IEFZB505 LOCEPAX=YES EPA mapping for SWAREQ IEFQMIDS , Equates for SWA requests DCBD DSORG=PO,DEVD=DA Data Control Block
Get step name and return code
/* REXX */ /* GET THE STEP NAME AND RETURN CODE */ NUMERIC DIGITS(32) /* ENSURE MAX PRECISION */ TCB=STORAGE(D2X(540),4) /* PSATOLD IN PSA */ JSCB =STORAGE(D2X(C2D(TCB)+180),4) /* TCBJSCB IN TCB */ JCT = STORAGE(D2X(C2D(JSCB)+261),3) /* JSCBJCTA IN JSCB */ THIS_STEP_NO = X2D(C2X(STORAGE(D2X(C2D(JSCB)+228),1))) /* THIS STEP NO. */ FSCT = STORAGE(D2X(C2D(JCT)+48),3) /* JCTSDKAD IN JCT */ /* IS FIRST SCT */ TEMP_SCT = FSCT DO I = 1 TO (THIS_STEP_NO - 1) STEP = STORAGE(D2X(C2D(TEMP_SCT)+68),8) RCSTEP = X2D(C2X(STORAGE(D2X(C2D(TEMP_SCT)+24),2))) /* SCTSEXEC IN SCT */ BYPASS = STORAGE(D2X(C2D(TEMP_SCT)+188),1) IF X2D(C2X(BYPASS)) = 80 THEN /* CHECK IF STEP WAS NOT EXECUTED */ DO RCSTEP = 'FLUSHED ' END SAY 'STEP ==>' STEP ' RC ==>' RCSTEP TEMP_SCT = STORAGE(D2X(C2D(TEMP_SCT)+36),3) END EXIT
2013年6月3日 星期一
How many MIPS does your MVS machine deliver ?
/* REXX */ CVT = STORAGE(10,4) RMCT = STORAGE(D2X(C2D(CVT)+604),4) SU = STORAGE(D2X(C2D(RMCT)+64),4) SU = 16000000/C2D(SU) SAY 'SU/SEC FACTOR IS' SU , '(1 CPU SECOND EQUALS' SU 'SERVICE UNITS)' CVTPCCAT = STORAGE(D2X(C2D(CVT)+764),4) SAY 'PCCA VECTOR TABLE AT' C2X(CVTPCCAT) I = 0 P = 0 SAY '----------------------------------------' SAY ' PROC VERSION CPUID MODEL PCCA ' SAY 'NUMBER CODE ADDRESS' SAY '----------------------------------------' DO WHILE I < 16 PCCA = STORAGE(D2X(C2D(CVTPCCAT)+I*4),4) IF PCCA ^= '00000000'X THEN DO PCCAPCCA = STORAGE(D2X(C2D(PCCA)),4) PCCAVC = STORAGE(D2X(C2D(PCCA)+4),2) PCCACPID = STORAGE(D2X(C2D(PCCA)+6),6) PCCAMDL = STORAGE(D2X(C2D(PCCA)+12),4) IF PCCAPCCA = 'PCCA' THEN DO SAY ' ' I ' ' PCCAVC ' ' PCCACPID , ' '!!PCCAMDL ' ' C2X(PCCA) P = P + 1 END END I = I + 1 END IF P > 1 THEN PROCS = 'PROCESSORS' ELSE PROCS = 'PROCESSOR' SAY SAY P PROCS 'IN THIS COMPLEX' MIPS = SU/48.5 SAY SAY '** TOTAL MIPS :' MIPS*P IF P > 1 THEN SAY , '** EQUIVALENT UNIPROCESSOR MIPS :' MIPS /* */ /* MSU EVALUATION */ /* */ MSU = SU*P*3600/1000000 SAY FORMAT(MSU,,0) 'MSU (FOR PSLC PRICING -'
Getting info about your MVS environment
/* rexx */ say "user :" userid(); say "mvs :" mvsvar('sysmvs'); say "sysname :" mvsvar('sysname'); say "opsys :" mvsvar('sysopsys'); say "sysplex :" mvsvar('sysplex'); say "sysclone :" mvsvar('sysclone'); say "DfpLevel :" mvsvar('sysdfp'); say "SMFid :" mvsvar('syssmfid'); say "SMS is? :" mvsvar('syssms'); cvt=c2d(storage(10,4)); csd=c2d(storage(d2x(cvt+660),4)); hid=c2d(storage(d2x(cvt+x2d(42c)),4)); pccavt=c2d(storage(d2x(cvt+764),4)); do cpu=0 to 15; pcc=c2d(storage(d2x(pccavt+(cpu*4)),4)); if pcc=0 then leave; serial=storage(d2x(pcc+4),8); cpuid=storage(d2x(pcc+12),4) say "cpu :" right(cpu,2,'0') " id: " cpuid " serial: " serial end ecvt=c2d(storage(d2x(cvt+140),4)) say "CBID :" storage(d2x(ecvt+000),4) say "HD-name :" storage(d2x(ecvt+336),8) say "LPAR name :" storage(d2x(ecvt+344),8) say "LPAR# :" c2d(storage(d2x(csd+252),1)) say "VMNM :" storage(d2x(ecvt+352),8) say "TYPE :" storage(d2x(hid+26),6) say "MODEL :" storage(d2x(hid+32),3) say "FACTURE BY :" storage(d2x(hid+35),3) say "PLANT :" storage(d2x(hid+38),2) say "SEQNO :" storage(d2x(hid+40),12)
訂閱:
文章 (Atom)