PRG TITLE 'DMMPRG (IPCS) VM/370 - RELEASE 6' 00001000
* 00002000
* MODULE NAME: DMMPRG 00003000
* 00004000
* 00005000
* FUNCTION: HANDLE CP PROGRAM CHECK PROCESSING. 00006000
* 00007000
* 00008000
* ATTRIBUTES: NON-REENTRANT 00009000
* NON-REUSABLE 00010000
* 00011000
* 00012000
* ENTRY POINTS: DMMPRG 00013000
* 00014000
* 00015000
* ENTRY CONDITIONS: SHARED CONSTANT AREA CONTAINS INFORMATION 00016000
* ABOUT THE FAILURE. 00017000
* 00018000
* 00019000
* EXIT CONDITIONS: TO DMMPRM (PROMPTING SUBROUTINE) WITH THE 00020000
* TEXT AREA CONTAINING THE FAILING CODE. 00021000
* 00022000
* 00023000
* CALLS TO OTHER ROUTINES: DMMRMV TO PUT REGISTERS IN OUTPUT 00024000
* DMMGRC TO GET DUMP REC.CONTAINING CODE 00025000
* DMMTRN TO TRANSLATE FAILING CODE 00026000
* DMMPRM WHEN DONE PROCESSING 00027000
* 00028000
* 00029000
* EXTERNAL REFERENCES: SHARECON (SHARED CONSTANT AREA) 00030000
* EXTINREC (DUMP INFORMATION RECORD) 00031000
* EXTPSA (PREFIX STORAGE AREA IN DUMP) 00032000
* 00033000
* 00034000
* TABLES/WORKAREAS: 00035000
* 00036000
* 00037000
* REGISTER USAGE: R13 SAVEAREA 00038000
* R12 BASE REGISTER 00039000
* R11 PSA IN DUMP 00040000
* R10 EXTINREC DUMP INFORMATION RECORD 00041000
* R7 SHARECON (SHARED CONSTANT AREA) 00042000
* R2-R6 WORK 00043000
* 00044000
* 00045000
* NOTES: A 200 BYTE PATCH AREA EXISTS AT LABEL 'PATCH' 00046000
* 00047000
* 00048000
* OPERATION: 00049000
* I. DETERMINE THE LENGTH OF THE FAILING INSTR. AND SET UP 00050000
* THE TEXT AREA BUFFERS AND VMFAILURE KEYWORD 00051000
* II. CALL DMMIDM TO DETERMINE THE FAILING MODULE AND THE 00052000
* DISPLACEMENT WITHIN THAT MODULE. 00053000
* III. GET THE ADDRESS OF THE FAILING INSTR. AND BACK UP 20 00054000
* BYTES OR TO THE BEGINNING OF THE MODULE WHICHEVER IS LESS. 00055000
* IV. CALL DMMRMV TO PUT THE PRINTABLE REGS.IN THE OUTPUT 00056000
* V. CALL DMMGRC TO READ IN THE DUMP REC. CONTAINING THE 00057000
* FAILING CODE. 00058000
* VI. CALL DMMTRN TO TRANS.THE FAILING CODE TO PRINTABLE. 00059000
* VII. MOVE THE FAILING CODE TO THE OUTPUT TEXT AREA IN THE 00060000
* FOLLOWING FORMAT: 00061000
* 00062000
* PRECEDING CODE XXXX XXXX XXXX XXXX XXXX VMINSTR=XXXXXXXX 00063000
* 00064000
* VIII. EXIT BY CALLING DMMPRM WHO WILL RETURN TO DMMEDM 00065000
* 00066000
* 00067000
* ERROR MESSAGES: NONE 00068000
* 00069000
*************************************************************** 00070000
EJECT 00071000
DMMPRG CSECT @VA04250 00072000
USING *,R15 TEMPORARY ADDRESSABILITY @VA04250 00073000
B START BRANCH AROUND EYECATCHER @VA04250 00074000
DS 0D @VA04250 00075000
MODNAME DC C'DMMPRG ' MODULE NAME @VA04250 00076000
RELLEV DC C'REL4LEV0' RELEASE AND LEVEL @V4075A1 00077000
START STM R14,R12,12(R13) SAVE CALLERS REGISTERS @VA04250 00078000
LR R12,R15 LOAD OUR BASE @VA04250 00079000
DROP R15 @VA04250 00080000
USING DMMPRG,R12 ESTABLISH ADDRESSABILITY @VA04250 00081000
ST R13,SAVEAREA+8 SAVE POINTER TO CALLER'S SAVEAREA@VA04250 00082000
LA R13,SAVEAREA ESTABLISH SAVE AREA @VA04250 00083000
L R11,VPSA POINT TO PSA @VA04250 00084000
USING PSA,R11 @VA04250 00085000
L R10,VDMPIN POINT TO DUMP INFO REC @VA04250 00086000
USING DMPINREC,R10 @VA04250 00087000
L R7,VSHARE SHARED CONSTANT AREA @VA04250 00088000
USING SHARECON,R7 @VA04250 00089000
*************************************************************** 00090000
* FIRST PROCESS THE FAILURE CODE 00091000
*************************************************************** 00092000
LH R5,INTPRL GET INSTRUCTION LENGTH CODE @VA04250 00093000
SLL R5,29 STRIP HI ORDER BITS @VA04250 00094000
SRL R5,29 ADJUST BACK TO NORMAL @VA04250 00095000
STH R5,ILENGTH AND SAVE LENGTH IN BYTES @VA04250 00096000
MVC VMFAIL1(L'CPA),CPA GET SYMPTOM CODE @VA04250 00097000
MVC VMFAIL1+L'CPA(PREFLEN),DMPABEND ABEND PREFIX @V4075A1 00098000
MVC ABCODE(CODELEN),DMPABEND ABEND CODE TO WRK AREA @V4075A1 00099000
NC ABCODE,ABMASK KNOCK OFF 'PRG'LEAVE 'XX' @VA04250 00100000
L R5,ABCODE CONVERT ABEND CODE SUFFIX @VA04250 00101000
CVD R5,ABCODE TO DECIMAL @VA04250 00102000
UNPK FAILCODE(UNPKLN),DECODE(DECLEN) MOVE TO TEXT @VA04250 00103000
OI VMFAIL+DISP20,NUMERIC FIX UP SO IT PRINTS OK @VA04250 00104000
MVC TEXT1(L'EHEADER3),EHEADER3 GET GEN REG HEADER @VA04250 00105000
MVC TEXT5(L'EHEADER4),EHEADER4 GET HEADER @VA04250 00106000
*************************************************************** 00107000
* CALL DMMIDM TO GET THE MODULE NAME AND DISPLACEMENT 00108000
*************************************************************** 00109000
LA R3,PROPSW+DISP4 GET PROG CHK ADDRESS @VA04250 00110000
ST R3,TRNPARM1 DATA ADDRESS FOR DMMTRN @VA04250 00111000
L R3,FOUR BYTE COUNT TO FOUR @VA04250 00112000
ST R3,TRNPARM BYTE COUNT FOR TRANSLATE @VA04250 00113000
CALL DMMTRN CALL TRANSLATE RTN. @VA04250 00114000
MVC TEXTA+RUNUSE(L'PCHK),PCHK PROG CHK HEADING @VA04250 00115000
MVC TEXTA+RUNUSE+L'PCHK(EIGHT),0(R1) PRG CHK ADDR. @VA04250 00116000
LA R1,PROPSW+DISP4 GET PROG. OLD PSW ADDR. @VA04250 00117000
CALL DMMIDM CALL MODULE SEARCH RTN. @VA04250 00118000
*************************************************************** 00119000
* CALL DMMRMV TO GET THE GPRS TRANSLATED AND MOVED TO OUTPUT 00120000
*************************************************************** 00121000
LA R1,DMPGPRS GET ADDR. OF GENERAL REGISTERS @VA04250 00122000
CALL DMMRMV CALL REGISTER MOVE ROUTINE @VA04250 00123000
************************************************ 00124000
* CALL DMMGRC TO GET THE CODE WHERE THE FAILURE OCCURRED 00125000
************************************************ 00126000
PRGINSTR L R2,PROPSW+DISP4 PICK UP PROG.CHK ADDRESS @VA04250 00127000
LA R2,0(R2) CLEAR HIGH ORDER BYTE @VA04250 00128000
ST R2,GRCPARM RECORD ADDRESS FOR GRC @VA04250 00129000
CALL DMMGRC CALL THE RECORD READ RTN. @VA04250 00130000
*************************************************************** 00131000
* WE NOW HAVE THE CODE WHERE THE FAILURE OCCURRED 00132000
* TRANSLATE IT TO PRINTABLE FORMAT BEFORE MOVING IT TO THE 00133000
* OUTPUT TEXT AREA. DO SOME PRELIMINARY CALCULATIONS TO INSURE 00134000
* WE STAY WITHIN THE MODULE WHERE THE FAILURE OCCURRED 00135000
*************************************************************** 00136000
LR R2,R1 RECORD ADDRESS FROM GRC @VA04250 00137000
LA R4,DISP20 MAXIMUM NUMBER OF BYTES @VA04250 00138000
L R5,MODDISP GET DISPLACEMENT @VA04250 00139000
LA R5,0(R5) CLEAR HIGH ORDER BYTE IN CASE @VA04250 00140000
LTR R5,R5 IF MODDISP IS ZERO @VA05442 00140100
BNZ DISPNZ FORCE IT @VA05442 00140200
LA R5,1(R5) TO BE ONE @VA05442 00140300
ST R5,MODDISP @VA05442 00140400
DISPNZ EQU * @VA05442 00140500
CR R5,R4 IS DISP LESS THAN 20 @VA04250 00141000
BL PRGLESS YES @VA04250 00142000
MVC EXCOUNT,TWENTY GET COUNT FOR TRANS @VA04250 00143000
B PRGMVCDE BYPASS DISPLACEMENT LESS THAN 20 @VA04250 00144000
PRGLESS MVC EXCOUNT,MODDISP GET COUNT FOR TRANS @VA04250 00145000
PRGMVCDE L R4,EXCOUNT SET LENGTH FOR EXECUTE @VA04250 00146000
BCTR R4,R0 AND MAKE IT RIGHT @VA04250 00147000
LR R5,R2 GET FAILING ADDRESS @VA04250 00148000
S R5,EXCOUNT BACK UP BY DISPLACEMENT @VA04250 00149000
EX R4,PRGMVEX MOVE THE CODE @VA04250 00150000
B PRGTRAN CONTINUE @VA04250 00151000
PRGMVEX MVC ESTART(0),0(R5) SUBJECT MOVE @VA04250 00152000
PRGTRAN L R3,EXCOUNT GET COUNT OF DATA @VA04250 00153000
ST R3,TRNPARM SAVE IT FOR TRANSLATE ROUTINE @VA04250 00154000
SLL R3,1 MULTIPLY COUNT BY 2 @VA04250 00155000
ST R3,HBCOUNT SAVE IT FOR LATER HERE TOO @VA04250 00156000
LA R4,ESTART POINT TO DATA @VA04250 00157000
ST R4,TRNPARM1 SAVE DATA POINTER FOR TRANSLATE @VA04250 00158000
*************************************************************** 00159000
* TRANSLATE THE FAILING CODE TO PRINTABLE (USING DMMTRN) 00160000
*************************************************************** 00161000
CALL DMMTRN GO TRNASLATE THE DATA TO READABLE@VA04250 00162000
*************************************************************** 00163000
* MOVE FAILING CODE TO THE OUTPUT AREA IN THE FOLLOWING FORMAT: 00164000
* 00165000
* PRECEDING CODE XXXX XXXX XXXX XXXX XXXX VMINSTR=XXXX XXXX 00166000
* 00167000
*************************************************************** 00168000
LR R5,R1 GET ADDRESS OF TRANSLATED DATA @VA04250 00169000
MVI TARG,BLANK CLEAR TARGET @VA04250 00170000
MVC TARG+1(L'TARG-1),TARG @VA04250 00171000
LH R2,ILENGTH GET INSTRUCTION LENGTH @VA04250 00172000
SLL R2,1 MULTIPLY X 2 TO GET PRINTABLE AMT@VA04250 00173000
LA R3,0(,R5) POINT TO OUTPUT @VA04250 00174000
A R3,HBCOUNT GO TO END OF O/P @VA04250 00175000
SR R3,R2 BACK UP TO BAD INSTR. @VA04250 00176000
LA R6,TARG START OF PADDED CELL @VA04250 00177000
AH R6,FIFTY END OF SAME @VA04250 00178000
SR R6,R2 START OF BAD INSTR @VA04250 00179000
BCTR R2,R0 CORRECT IT @VA04250 00180000
LA R4,SHIFT9 SET UP TO SHIFT OUTPUT BY NINE @VA04250 00181000
AR R6,R4 BUMP R6 BY 9 @VA04250 00182000
EX R2,PRGMVINS MOVE THE INSTR @VA04250 00183000
SR R6,R4 PUT IT BACK IN SYNC @VA04250 00184000
MVC SPACE1(EIGHT,R6),VMINSTR INSERT KEYWORD @VA04250 00185000
LA R2,0(,R5) GET LIMIT FOR MOVES @VA04250 00186000
PRGMORCD S R3,FOUR DECREMENT INPUT PTR @VA04250 00187000
SH R6,FIVE DITTO OUTPUT @VA04250 00188000
MVC 0(DISP4,R6),0(R3) MOVE STUFF @VA04250 00189000
CR R2,R3 DONE YET ? @VA04250 00190000
BL PRGMORCD NOT YET - MOVE MORE @VA04250 00191000
MVC PRECODE(L'TARG),TARG MOVE FAIL PADDED CODE @VA04250 00192000
*************************************************************** 00193000
* WE ARE DONE HERE. CALL DMMPRM (HE WILL EXIT TO DMMEDM) 00194000
* 00195000
*************************************************************** 00196000
CALL DMMPRM CALL PROMPTING ROUTINE @VA04250 00197000
PRGMVINS MVC 0(0,R6),0(R3) SUBJECT FOR MOVE @VA04250 00198000
EJECT 00199000
*************************************************************** 00200000
* CONSTANTS SAVEAREAS AND EQUATES 00201000
*************************************************************** 00202000
SAVEAREA DS 18F OUR SAVEAREA @VA04250 00203000
ESTART DC 16F'0' WORK AREA FOR FAILING CODE @VA04250 00204000
VSHARE DC V(SHARECON) POINTER TO SHARED CONSTANT AREA @VA04250 00205000
VDMPIN DC V(EXTINREC) POINTER TO DUMP INFO. RECORD @VA04250 00206000
VPSA DC V(EXTPSA) POINTER TO PSA IN DUMP @VA04250 00207000
ABMASK DC X'000000FF' USED TO ISOLATE ABEND CODE @VA04250 00208000
FOUR DC X'00000004' @VA04250 00209000
CPA DC C'ABEND' CP CODED ABEND @VA04250 00210000
VMINSTR DC C'VMINSTR=' KEYWORD I.D. FOR FAILING INSTR. @VA04250 00211000
DS 0F @VA04250 00212000
HBCOUNT DS CL4 LENGTH OF TRANSLATED DATA @VA04250 00213000
EHEADER3 DC C'GR 0-15' GENERAL REGISTER HEADER FOR TEXT @VA04250 00214000
EHEADER4 DC C'PRECEDING CODE' I.D. FOR CODE PREC.PROG. CHK. @VA04250 00215000
ABCODE DS D WORK AREA TO PROCESS ABEND CODE @VA04250 00216000
EXCOUNT DC F'0' NUMBER OF BYTES OF PRECEDING CODE@VA04250 00217000
TWENTY DC X'00000014' @VA04250 00218000
TARG DS CL60 TEMP AREA FOR PROCESSED CODE @VA04250 00219000
FIVE DC H'5' @VA04250 00220000
FIFTY DC H'50' @VA04250 00221000
ILENGTH DS H INSTRUCTION LENGTH OF FAIL INSTR @VA04250 00222000
PCHK DC C'PROGRAM CHECK AT ' PRG. CHK. TEXT HEADING @VA04250 00223000
PATCH DC 50F'0' PATCH AREA @VA04250 00224000
COPY EXCONST @VA04250 00225000
NUMERIC EQU X'F0' MAKE UNPACKED PRINTABLE @VA04250 00226000
RUNUSE EQU 48 @VA04250 00227000
BLANK EQU X'40' USED TO CLEAR AREAS TO BLANKS @VA04250 00228000
PREFLEN EQU 3 LENGTH OF ABEND PREFIX @VA04250 00229000
FAILCODE EQU VMFAIL+18 LOCATION OF FAILURE IN KEY @VA04250 00230000
UNPKLN EQU 3 BYTE LENGTH OF UNPACK WORK AREA @VA04250 00231000
DECODE EQU ABCODE+6 ABEND CODE IN DECIMAL FIELD @VA04250 00232000
PRECODE EQU TEXT5+17 TEXT FOR CODE PRECEDING FAILURE @VA04250 00233000
DECLEN EQU 2 LENGTH OF DECIMAL FIELD @VA04250 00234000
SHIFT9 EQU 9 INCREMENT OUTPUT AMOUNT @VA04250 00235000
SPACE1 EQU 1 OUTPUT SPACE AMOUNT @VA04250 00236000
CODELEN EQU 4 LENGTH OF ABEND CODE @VA04250 00237000
EIGHTEEN EQU 18 18 FOR LOAD ADDRESS ETC. @VA04250 00238000
DISP20 EQU 20 20 FOR LOAD ADDRESS ETC. @VA04250 00239000
SIX EQU 6 6 FOR LOAD ADDRESS ETC. @VA04250 00240000
DISP4 EQU 4 4 FOR LOAD ADDRESS ETC. @VA04250 00241000
EIGHT EQU 8 8 FOR LOAD ADDRESS ETC. @VA04250 00242000
R0 EQU 0 R0 EQUALS REGISTER 0 @VA04250 00243000
R1 EQU 1 R1 EQUALS REGISTER 1 @VA04250 00244000
R2 EQU 2 R2 EQUALS REGISTER 2 @VA04250 00245000
R3 EQU 3 R3 EQUALS REGISTER 3 @VA04250 00246000
R4 EQU 4 R4 EQUALS REGISTER 4 @VA04250 00247000
R5 EQU 5 R5 EQUALS REGISTER 5 @VA04250 00248000
R6 EQU 6 R6 EQUALS REGISTER 6 @VA04250 00249000
R7 EQU 7 R7 EQUALS REGISTER 7 @VA04250 00250000
R8 EQU 8 R8 EQUALS REGISTER 8 @VA04250 00251000
R9 EQU 9 R9 EQUALS REGISTER 9 @VA04250 00252000
R10 EQU 10 R10 EQUALS REGISTER 10 @VA04250 00253000
R11 EQU 11 R11 EQUALS REGISTER 11 @VA04250 00254000
R12 EQU 12 R12 EQUALS REGISTER 12 @VA04250 00255000
R13 EQU 13 R13 EQUALS REGISTER 13 @VA04250 00256000
R14 EQU 14 R14 EQUALS REGISTER 14 @VA04250 00257000
R15 EQU 15 R15 EQUALS REGISTER 15 @VA04250 00258000
PSA @VA04250 00259000
COPY DMPBLOKS @VA04250 00260000
END 00261000