SAB TITLE 'DMSSAB (CMS) VM/370 - RELEASE 6' 00001000
SPACE 2 00002000
*. 00003000
* 00004000
* 00005000
* MODULE NAME: 00006000
* 00007000
* DMSSAB (SOABEND) 00008000
* 00009000
* FUNCTION: 00010000
* 00011000
* THE CMS SOABEND ROUTINE HANDLES OS ABEND MACROS. 00012000
* 00013000
* ATTRIBUTES: 00014000
* 00015000
* REENTRANT, NUCLEUS RESIDENT 00016000
* 00017000
* ENTRY POINTS: 00018000
* 00019000
* DMSSAB - SVC 13 00020000
* EXIT CONDITIONS: 00021000
* 00022000
* CONTROL IS PASSED TO DMSABNUA. 00023000
* 00024000
* CALLS TO OTHER ROUTINES: 00025000
* 00026000
* DMSABNUA, GETMAIN, DMSKEY, STAE EXIT AND STAE RETRY ROUTINES 00027000
* 00028000
* EXTERNAL REFERENCES: 00029000
* 00030000
* NONE. 00031000
* 00032000
* TABLES/WORKAREAS: 00033000
* 00034000
* NONE. 00035000
* 00036000
* REGISTER USAGE: 00037000
* 00038000
* R15 - BASE REGISTER 00039000
* R4 - STAE DSECT 00040000
* R0-R3 - WORK 00041000
* R5-R10 - WORK 00042000
* R11 - PGMSECT DSECT 00043000
* R13 - SAVE AREA 00044000
* R14-R15 - WORK 00045000
* 00046000
* OPERATION: 00047000
* 00048000
* UPON ENTRY TO DMSSAB, A CHECK IS MADE TO DETERMINE IF 00049000
* A STAE IS OUTSTANDING. IF SO, A WORKAREA 00050000
* IS BUILT WITH THE PROPER REGISTERS IN IT AND CONTROL 00051000
* IS PASSED TO THE STAE EXIT ROUTINE. CONTROL IS NEXT 00052000
* PASSED TO A STAE RETRY ROUTINE IF ONE IS SPECIFIED. 00053000
* IF A RETRY ROUTINE IS NOT SPECIFIED OR IF THE RETRY ROUTINE 00054000
* RETURNS TO DMSSAB, CONTROL IS PASSED TO DMSABNUA. 00055000
* IF WHEN CONTROL IS FIRST PASSED 00056000
* TO DMSSAB, THERE ARE NO OUTSTANDING STAE REQUESTS, 00057000
* CONTROL IS PASSED TO DMSABNUA. 00058000
* 00059000
* 00060000
* 00061000
*. 00062000
EJECT 00063000
DMSSAB START 0 00064000
USING DMSSAB,R12 00065000
USING NUCON,R0 00066000
USING PGMSECT,R11 00067000
USING SSAVE,R13 00068000
TERMSTEP EQU X'40' STEP TERMINATION INDICATOR 00069000
L R13,CURRSAVE 00070000
L R11,APGMSECT GET PGMSECT ADDR 00071000
STM R12,R14,SCBSAV12 SAVE REGS 12 TO 14 00072000
LR R3,R1 PUT INPUT CODE IN R3 @VMQ3222 00073000
SRL R3,24 SHIFT OUT COMPLETION CODE @VMQ3222 00074000
C R3,=F'128' WAS DUMP SPECIFIED? @VMQ3222 00075000
BNE NODUMP NO, SKIP DUMP @VMQ3222 00076000
USING FCBSECT,R7 @VMQ3222 00077000
L R7,FCBFIRST GET START OF FCB CHAIN @VMQ3222 00078000
DUMP1 EQU * @VMQ3222 00079000
LTR R7,R7 ANY MORE FCB'S? @VMQ3222 00080000
BZ NODUMP NO, PROPER FCB NOT FOUND @VMQ3222 00081000
CLC FCBDD(8),=C'SYSUDUMP' IS THIS SYSUDUMP FCB? @VMQ3222 00082000
BE DOSNAP YES, GO TAKE SNAP @VMQ3222 00083000
CLC FCBDD(8),=C'SYSABEND' IS THIS SYSABEND FCB? @VMQ3222 00084000
BE DOSNAP YES, GO TAKE SNAP @VMQ3222 00085000
L R7,0(,R7) GET NEXT FCB @VMQ3222 00086000
B DUMP1 LOOP @VMQ3222 00087000
DOSNAP EQU * @VMQ3222 00088000
CLI FCBDEV,FCBDUM IS IT A DUMMY DEVICE ?? @VA05383 00088100
BE NODUMP YES DON'T BOTHER TO DUMP IT @VA05383 00088200
L R7,DEBDCBAD GET DCB ADDR. @VMQ3222 00089000
LTR R7,R7 GOT A DCB?? @VA05383 00089100
BNZ GOTDCB YES SKIP A LINE @VA05383 00089200
L R7,=4X'FF' NO DUMMY UP THE DCB FOR DMSSVT @VA05383 00089300
* VA05383 00089400
GOTDCB EQU * @VA05383 00089500
DROP R7 @VMQ3222 00090000
DMSFREE DWORDS=2,TYPE=NUCLEUS,TYPCALL=BALR @VMQ3222 00091000
XC 0(16,R1),0(R1) CLEAR GOTTEN AREA @VA02872 00091100
LR R3,R1 SAVE GOTTON AREA @VMQ3222 00092000
SNAP DCB=(R7),PDATA=ALL,MF=(E,(R3)) @VMQ3222 00093000
LR R1,R3 RESTORE GOTTON AREA @VMQ3222 00094000
DMSFRET DWORDS=2,LOC=(1),TYPCALL=BALR @VMQ3222 00095000
SPACE 1 00096000
NODUMP EQU * @VMQ3222 00097000
LM R3,R4,SCBPTR GET SCB PTRS 00098000
LTR R3,R3 WAS A STAE ISSUED 00099000
BZ GETCODE NO, BYPASS STAE RTN 00100000
TM SCBPTR,STAEBIT+STAIBIT ABEND IN STAE OR STAI? @V1D1709 00101000
BZ STAI NO @V1D1709 00102000
LA R7,RESET3 @VA04449 00102500
BAL R10,CNCLSTAE YES, MUST CLEAR LAST STAI SCB@V1D1709 00103000
RETRYABN EQU * @V1D1709 00104000
TM 12(R3),X'20' IS THIS ONE A STAI? @V1D1709 00105000
BO STAI YES, USE IT @V1D1709 00106000
BAL R10,CNCLSTAE GET NEXT SCB @V1D1709 00107000
B RETRYABN YES, CHECK FOR STAI @V1D1709 00108000
STAI LTR R1,R4 IS THERE A WORK AREA V0015 00109000
BNZ SETUP YES, BYPASS GETMAIN 00110000
L R5,USAVEPTR USER SAVE USED FOR GETMAIN @V1D1709 00111000
LA R4,SCBWORK SCBWORK IN PGMSECT @V1D1709 00112000
GETMAIN EC,LV=104,A=(R4),MF=(E,(R5)) @V1D1709 00113000
L R1,0(,R4) PUT WORK AREA ADDR IN R1 @V1D1709 00114000
USING STAEBLK,R1 @V1D1709 00115000
LTR R15,R15 REQUESTED STORAGE GOTTON? @V1D1709 00116000
BZ SETUP YES, NORMAL SETUP @V1D1709 00117000
L R2,8(,R3) NO, SET R2 TO EXIT PARA. LIST@V1D1709 00118000
L R1,EGPR1 R1 = ABEND COMP. CODE @V1D1709 00119000
LR R5,R1 ABEND CODE IN REG 5 ALSO @VA07762 00119050
CLC OLDPSW+5(3),USERA USER ABEND? @V305665 00120100
BL SHIFT1 YES, IF BELOW USER AREA @VA04440 00121100
TM DCSSFLAG,DCSSAVAL CMSSEG IS SYSTEM CODE @VA04440 00121200
BNO CHKSVT1 BR, IF NO CMSSEG @VA04440 00121300
L R0,ACMSSEG GET ADDRESS OF CMSSEG @VA04440 00121400
B CHKSYS1 AND MAKE THE DECISION @VA04440 00121500
SPACE 1 00121600
CHKSVT1 TM DCSSFLAG,DCSSVTLD OS SIMULATION LOADED ? @VA04440 00121700
BNO NOSHIFT NO, MUST BE USER ABEND @VA04440 00121800
L R0,AOSMODL GET ADDRESS OF DMSSVT LOAD @VA04440 00121900
SPACE 1 00122000
CHKSYS1 CLM R0,ADR3,OLDPSW+5 USER OR SYSTEM ABEND ? @VA04440 00122100
BH NOSHIFT SKIP IF USER @VA04440 00122200
SPACE 1 00122300
SHIFT1 SLL R5,12 ALIGN SYSTEM CODE @VA04440 00122400
NOSHIFT EQU * @V1D1709 00123000
LA R0,12 INDICATE NO WORKAREA @V1D1709 00124000
B GOSTAE GO TO STAE OR STAI @V1D1709 00125000
SETUP MVC PARAM(4),8(R3) FILL IN ADR OF PARM LIST 00126000
L R5,EGPR1 GET ABEND CODE 00127000
C R5,=F'192' IS ABEND CODE '0CX'? @VM03223 00128000
BNH NOT0CX NO @VM03223 00129000
C R5,=F'208' @VM03223 00130000
BNL NOT0CX @VM03223 00131000
MVC PROBPSW(8),PGMOPSW YES, USE PGM OLD PSW @VM03223 00132000
B SETUP2 @VM03223 00133000
NOT0CX EQU * @VM03223 00134000
L R13,SSAVEPRV GET PREVIOUS SAVE AREA ADDR @VM03223 00135000
MVC PROBPSW(8),OLDPSW NOT '0CX', USE PREV. TASK PSW@VM03223 00136000
L R13,CURRSAVE RESTORE R13 TO THIS SAVE AREA@VM03223 00137000
SETUP2 EQU * @VM03223 00138000
CLC OLDPSW+5(3),USERA IS THIS A USER ABEND? @V305665 00139100
BL SHIFT2 YES, IF BELOW USER AREA @VA04440 00140100
TM DCSSFLAG,DCSSAVAL CMSSEG IS SYSTEM CODE @VA04440 00140200
BNO CHKSVT2 BR, IF NO CMSSEG @VA04440 00140300
L R0,ACMSSEG GET ADDRESS OF CMSSEG @VA04440 00140400
B CHKSYS2 AND MAKE THE DECISION @VA04440 00140500
SPACE 1 00140600
CHKSVT2 TM DCSSFLAG,DCSSVTLD OS SIMULATION LOADED ? @VA04440 00140700
BNO SETCODE NO, MUST BE USER ABEND @VA04440 00140800
L R0,AOSMODL GET ADDRESS OF DMSSVT LOAD @VA04440 00140900
SPACE 1 00141000
CHKSYS2 CLM R0,ADR3,OLDPSW+5 USER OR SYSTEM ABEND ? @VA04440 00141100
BH SETCODE SKIP IF USER @VA04440 00141200
SPACE 1 00141300
SHIFT2 SLL R5,12 ALIGN SYSTEM CODE @VA04440 00141400
SETCODE ST R5,ERRCODE SET ABEND CODE IN WORKAREA 00142000
MVI ERRCODE,TERMSTEP INDICATE STEP IS BEING TERMINATED 00143000
MVC SVCPSW(8),OLDPSW FILL IN WORKAREA 00144000
MVC REGS(64),EGPRS FILL IN REGS 00145000
XC CLEAR(16),CLEAR CLEAR RTN ADDRESSES 00146000
LA R0,4 FILL IN ACTION CODE 00147000
GOSTAE EQU * @V1D1709 00148000
OI SCBPTR,STAEBIT INDICATE TAKING STAE EXIT @V1D1709 00149000
TM 12(R3),X'20' IS IT REALLY A STAI? @V1D1709 00150000
BNO GOSTAE2 NO @V1D1709 00151000
XI SCBPTR,STAEBIT+STAIBIT YES, INDICATE STAI @V1D1709 00152000
GOSTAE2 EQU * @V1D1709 00153000
OI TYPFLAG,TPFUSR INDICATE USER PGM @V1D1709 00154000
L R13,USAVEPTR GET SAVE AREA 00155000
DMSKEY LASTUSER SET USER KEY 00156000
L R15,4(,R3) GET EXIT ROUTINE ADDRESS 00157000
BALR R14,R15 GO TO STAE EXIT RTN 00158000
L R11,APGMSECT GET ADDR OF PGMSECT 00159000
LM R12,R14,SCBSAV12 RESTORE REGS 12,13 14 @V1D1709 00160000
LTR R15,R15 RETRY REQUESTED @V1D1709 00161000
BZ CK0RET NO @V1D1709 00162000
CH R15,=H'12' ANY RETRY REQUEST @V1D1709 00163000
BH RESET NO, STAI CONTINUE ABEND @V1D1709 00164000
DMSKEY RESET @V1D1709 00165000
CLEARSAV EQU * @VM03223 00166000
MVC EGPR9(4),OLDPSW SAVE PSW KEY @VM03223 00167000
ST R14,EGPR14 SAVE R14 AROUND SAVE CLEAN @VM03223 00168000
ST R11,EGPR11 SAVE R11 IN CURRENT SAVE @V1D1709 00169000
ST R12,EGPR12 SAVE R12 IN CURRENT SAVE @V1D1709 00170000
ST R0,EGPR0 AND R0 @V1D1709 00171000
MVC OLDPSW,=A(0,RETRY) MODIFY RESTART BACK TO ME @V1D1709 00172000
BR R14 GO BACK TO DMSITS @V1D1709 00173000
RETRY EQU * @V1D1709 00174000
L R3,SCBPTR RESTORE SCB ADDRESS @VA06345 00174500
L R13,CURRSAVE GET CURRENT SAVE AREA ADDR @VM03223 00175000
CLC CALLEE(4),=C'SVC ' IS THIS AN OS SVC? @VM03223 00176000
BNE RETRY2 NO, DONE CLEARING SAVE AREAS @VM03223 00177000
ST R1,EGPR1 YES, SAVE R1 (ABEND CODE) @VM03223 00178000
B CLEARSAV GO CLEAR THIS SAVE AREA @VM03223 00179000
RETRY2 EQU * @VM03223 00180000
L R8,SCBWORK GET WORK AREA ADDR. @VM03223 00181000
LTR R8,R8 IS THERE ONE? @VM03223 00182000
BNZ RETRY3 YES, USE SAVE AREA PSW @VM03223 00183000
C R1,=F'192' NO, IS THIS A '0CX'? @VM03223 00184000
BNH RETRY4 NO, R9 CONTAINS PSW @VM03223 00185000
C R1,=F'208' ARE WE SURE THIS IS NOT '0CX'@VM03223 00186000
BNL RETRY4 YES WE ARE SURE @VM03223 00187000
L R9,PGMOPSW IT IS A '0CX', USE PGM OLD @VM03223 00188000
B RETRY4 GO @VM03223 00189000
RETRY3 EQU * @VM03223 00190000
L R9,16(,R8) USE SAVE AREA PSW IN SCBWORK @VM03223 00191000
RETRY4 EQU * @VM03223 00192000
L R13,USAVEPTR GET USER SAVE AREA ADDR. @VM03223 00193000
ST R9,0(,R13) BUILD PSW FOR RETRY RTN IN IT@VM03223 00194000
OI SCBPTR,RETRYBIT INDICATE RETRY @V1D1709 00195000
LR R9,R0 RETRY ADDR. IN R9 @V1D1709 00196000
LR R2,R1 SAVE ABEND CODE @VM03223 00197000
BAL R10,CNCLSTAE GO CANCEL STAE/STAI @V1D1709 00198000
LA R0,0 INDICATE WORKAREA PRESENT @V1D1709 00199000
L R1,SCBWORK WORKAREA ADDR. @V1D1709 00200000
LTR R1,R1 WAS THERE REALLY A WORKAREA? @V1D1709 00201000
BNZ NOSHIFT2 YES, GO TO RETRY @V1D1709 00202000
LR R1,R2 RESTORE ABEND CODE TO R1 @VM03223 00203000
LA R0,12 NO, INDICATE NO WORKAREA @V1D1709 00204000
LA R2,0 INDICATE NO I/O RECOVERABLE @V1D1709 00205000
L R13,CURRSAVE @V1D1709 00206000
CLC OLDPSW+5(3),USERA USER ABEND? @V305665 00207100
BNL NOSHIFT2 YES @V1D1709 00208000
SLL R1,12 NO, SHIFT SYSTEM ABEND CODE @V1D1709 00209000
NOSHIFT2 EQU * @V1D1709 00210000
NI SCBPTR,X'00' TURN OFF STAE/STAI BIT @V1D1709 00211000
XC SCBWORK(4),SCBWORK CLEAR WORKAREA POINTER @VM03223 00212000
GORETRY EQU * @V1D1709 00213000
LTR R0,R0 IF NOT ZERO, NO SCBWORK AREA @V1D1709 00214000
BNZ GORETRY2 IS AVAILABLE @V1D1709 00215000
L R13,CURRSAVE GET CURRENT SAVE AREA ADDR @V1D1709 00216000
L R13,USAVEPTR GET USER SAVE AREA ADDR @V1D1709 00217000
GORETRY2 EQU * @V1D1709 00218000
ST R9,4(,R13) SET RETRY ADDR. FOR LPSW @V1D1709 00219000
LA R14,EXIT SET R14 @V1D1709 00220000
LPSW 0(R13) GO TO RETRY ROUTINE @V1D1709 00221000
SPACE 3 00222000
CK0RET EQU * @V1D1709 00223000
DMSKEY RESET @V1D1709 00224000
LA R7,RESET3 SET R7 @VA01311 00224500
BAL R10,CNCLSTAE GO CLEAR STAE/STAI @V1D1709 00225000
TM 12(R3),X'20' IS THIS ONE A STAI? @V1D1709 00226000
BNO CK0RET NO, CANCEL @V1D1709 00227000
B STAI YES @V1D1709 00228000
RESET EQU * @V1D1709 00229000
DMSKEY RESET @V1D1709 00230000
LA R7,RESET3 SET ADDR TO CONTINUE @VA01311 00230500
RESET2 EQU * @V1D1709 00231000
NI TYPFLAG,255-TPFUSR RESET USER PGM RUNNING @V1D1709 00232000
LM R12,R14,SCBSAV12 RESTORE REGS 12 TO 14 00233000
BR R7 IF R7 = RECOVER ,GO THERE @VA01311 00233300
RESET3 EQU * ELSE R3 POINTS HERE @VA01311 00233600
L R3,SCBPTR RETURN FROM STAI EXIT V0015 00234000
LTR R3,R3 ANY MORE SCBS? @V1D1709 00235000
BZ GETCODE NO @V1D1709 00236000
TM 12(R3),X'20' STAI FLAG IN SCB V0015 00237000
BO RECOVER YES, TRY TO REDISPATCH ATTACHER V0015 00238000
LA R10,CNCL2 @V1D1709 00239000
CNCLSTAE EQU * @V1D1709 00240000
LA R8,CNCL11 @V1D1709 00241000
TM SCBPTR,RETRYBIT IN RETRY? @V1D1709 00242000
BNO CNCL1 NO @V1D1709 00243000
LR R8,R10 @V1D1709 00244000
CNCL1 TM 12(R3),X'20' IS THIS A STAI? @VA01311 00245000
BNO CNCL12 NO @VA01311 00245200
LA R7,RECOVER YES, SET R7 TO RECOVER RTN @VA01311 00245400
CNCL12 STAE 0,OV @VA01311 00245600
LM R3,R4,SCBPTR GET SCB PARMS @V1D1709 00246000
BR R8 @V1D1709 00247000
CNCL11 EQU * @V1D1709 00248000
LTR R3,R3 ANY MORE SCB'S V0015 00249000
BZ RESET2 NO, EXIT @V1D1709 00250000
BR R10 @V1D1709 00251000
CNCL2 EQU * @V1D1709 00252000
TM 12(R3),X'20' IS NEXT A STAI SCB V0015 00253000
BNO CNCLSTAE NO, CANCEL IT V0015 00254000
B STAI YES, GO TO STAI EXIT V0015 00255000
GETCODE EQU * 00256000
XC SCBWORK(4),SCBWORK CLEAR WORK AREA PTR V0015 00257000
LM R12,R14,SCBSAV12 SET REGS V0015 00258000
L R15,AABNSVC GET ADDR OF CMS ABEND ROUT @V305665 00259100
BR R15 AND GO TO DMSABN 00260000
RECOVER L R6,LINKLAST LAST LINK/XCTL/ATTACH V0015 00261000
CLI 23(R6),42 WAS IT ATTACH? @VA01311 00262000
BNE GETCODE NO, OMIT RECOVERY V0015 00263000
L R13,CURRSAVE ABEND'S SAVE AREA V0015 00264000
LA R3,EXIT POINT RESUME PSW TO AN EXIT V0015 00265000
ST R3,OLDPSW+4 V0015 00266000
MVC EGPR15(4),ERRCODE PUT ABEND CODE IN R15 FOR POST V0015 00267000
BR R14 EXIT TO ATTACHER V0015 00268000
EXIT SVC 3 V0015 00269000
SPACE 3 00269100
USERA DC X'020000' START OF USER REGION @VM03125 00269300
SPACE 1 00269320
ADR3 EQU B'0111' @VA04440 00269340
EJECT 00270000
REGEQU 00271000
PGMSECT 00272000
CMSAVE 00273000
NUCON 00274000
CMSCB @VMQ3222 00275000
* 00276000
STAEBLK DSECT 00277000
PARAM DS 1F ADDRESS OF PARAMETERS 00278000
ERRCODE DS 1F ERROR CODE FOR ABEND 00279000
SVCPSW DS 2F OLD SVC PSW 00280000
PROBPSW DS 2F OLD PROBLEM PSW 00281000
REGS DS 16F REG. SAVE AREA R0-R15 @V1D1709 00282000
CLEAR DS 4F CALL RTN ADDRESSES 00283000
END 00284000