BAB TITLE 'DMSBAB (CMS) VM/370 - RELEASE 6' 00001000 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 00002000 *. * 00003000 * MODULE NAME: * 00004000 * DMSBAB * 00005000 * * 00006000 * FUNCTION: * 00007000 * DMSBAB GIVES CONTROL TO AN ABNORMAL * 00008000 * TERMINATION ROUTINE IF LINKAGE HAS BEEN * 00009000 * ESTABLISHED VIA A STXIT AB MACRO. * 00010000 * * 00011000 * ATTRIBUTES: * 00012000 * DISCONTIGUOUS SHARED SEGMENT * 00013000 * REENTRANT * 00014000 * * 00015000 * ENTRY POINTS: * 00016000 * DMSBAB * 00017000 * * 00018000 * ENTRY CONDITIONS: * 00019000 * DMSBAB IS INVOKED BY MEANS OF AN SVC 2 * 00020000 * (FETCH) FROM ANY OF THE FOLLOWING ROUTINES: * 00021000 * DMSBOP, DMSITP. AT ENTRY TO DMSBAB R1 POINTS TO THE * 00022000 * NAME OF THE ROUTINE AND R0 CONTAINS AN HEXADECIMAL * 00023000 * ERROR CODE CORRESPONDING TO THE PARTICULAR ERROR . * 00024000 * * 00025000 * EXIT CONDITIONS: * 00026000 * NORMAL EXIT: * 00027000 * BRANCH TO ABNORMAL TERMINATION ROUTINE ESTABLISHED VIA * 00028000 * THE STXIT AB MACRO. * 00029000 * * 00030000 * ABNORMAL EXITS: * 00031000 * SVC 6 - IF LINKAGE HAS NOT BEEN ESTABLISHED * 00032000 * TO A STXIT AB ROUTINE, THE PROGRAM EXITS VIA AN * 00033000 * SVC 6 (CANCEL). * 00034000 * * 00035000 * ERROR MESSAGES: THERE ARE NO ERROR MESSAGES ISSUED BY * 00036000 * THIS ROUTINE. * 00037000 * * 00038000 * CALLS TO OTHER ROUTINES: * 00039000 * NONE OTHER THAN THE NORMAL/ABNORMAL EXITS. * 00040000 * * 00041000 * EXTERNAL REFERENCES: * 00042000 * NUCON, BGCOM, SYSCOM, PIBTAB, CMSAVE, REGEQU, DOSAVE * 00043000 * * 00044000 * CALLED BY: * 00045000 * INVOKED IN RESPONSE TO AN SVC 2 (FETCH) * 00046000 * FOR $$BABEND (DMSBAB) FROM DMSBOP AND DMSITP. * 00047000 * R1 POINTS TO THE PHASE NAME, IN THIS CASE * 00048000 * $$BABEND AND R0 CONTAINS AN HEXADECIMAL ERROR * 00049000 * CODE. * 00050000 * * 00051000 * TABLES AND WORK AREAS: * 00052000 * NONE OTHER THAN THE SIMULATED DOS CONTROL BLOCKS - * 00053000 * PIBTAB (PROGRAM INFORMATION BLOCK), BGCOM * 00054000 * (COMMUNICATION REGION) AND SYSCOM (SYSTEM * 00055000 * COMMUNICATION REGION). * 00056000 * * 00057000 * REGISTER USAGE: * 00058000 * R0 - AT DMSBAB ENTRY CONTAINS AN HEXADECIMAL * 00059000 * ERROR CODE * 00060000 * R1 - WORK REGISTER * 00061000 * R2 - ADDRESS OF SYSCOM, AB/PC OPTION TABLE ADDRESS * 00062000 * R3 - AB ROUTINE ADDRESS * 00063000 * R4 - AB SAVE AREA ADDRESS * 00064000 * R5 - BGCOM ADDRESS * 00065000 * R6 - WORK REGISTER * 00066000 * R7 - WORK REGISTER * 00067000 * R8 - WORK REGISTER * 00068000 * R9 - CONTAINS ERROR CODE PASSED IN R0 * 00069000 * R10 - WORK REGISTER * 00070000 * R11 - NOT USED * 00071000 * R12 - BASE REGISTER * 00072000 * R13 - CMS SAVE AREA * 00073000 * R14 - EXTERNAL LINKAGE REGISTER * 00074000 * R15 - RETURN CODE * 00075000 * * 00076000 * OPERATION: * 00077000 * DMSBAB FIRST DETERMINES IF LINKAGE HAS BEEN * 00078000 * ESTABLISHED TO AN ABNORMAL TERMINATION ROUTINE * 00079000 * VIA THE STXIT AB MACRO. IF NO LINKAGE HAS BEEN * 00080000 * ESTABLISHED, DMSBAB ISSUES AN SVC 6 TO CANCEL * 00081000 * THE ROUTINE. IF LINKAGE HAS BEEN ESTABLISHED, THE AB * 00082000 * OPTION TABLE ENTRY IS ZEROED, THE PC OPTION * 00083000 * TABLE ENTRY IS ZEROED AND CONTROL IS PASSED * 00084000 * TO THE AB ROUTINE ESTABLISHED BY THE STXIT AB MACRO. * 00085000 *. * 00086000 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 00087000 DMSBAB CSECT @V305066 00088000 USING *,R12 ADDRESSABILITY @V305066 00089000 USING SSAVE,R13 ... @V305066 00090000 USING NUCON,R0 ... @V305066 00091000 ST R14,OSTEMP SAVE RETURN ADDRESS @V305066 00092000 LR R9,R0 SAVE R0 @V305066 00093000 L R2,ASYSCOM ADDRESS OF SYSCOM @V305066 00094000 USING SYSCOM,R2 SYSCOM ADDRESSABILITY @V305066 00095000 L R5,ABGCOM BGCOM ADDRESS @V305066 00096000 USING BGCOM,R5 PART. COMM. REGION @V305066 00097000 L R2,IJBABTAB AB OPTION TABLE ADDRESS @V305066 00098000 LH R10,PIK PROGRAM REQUESTOR KEY @V305066 00099000 SRL R10,1 AB OPT TAB HAS 8-BYTE ENTRIES @V305066 00100000 AR R2,R10 CALCULATE AB TABLE ENTRY @V305066 00101000 LH R10,PIK PROGRAM REQUESTOR KEY @V305066 00102000 AH R10,PIBPT POINT TO PIB TABLE @V305066 00103000 USING PIBADR,R10 ESTABLISH PIB ADDRESSABILITY @V305066 00104000 LM R3,R4,0(R2) LOAD ROUTINE ADD AND SAVE ADD @V305066 00105000 NI VSAMFLG1,255-VSAMSERV CLEAR FLAG IN CASE OF AMS STXIT 00105100 LTR R3,R3 AB ROUT EXIST? @V305066 00106000 BZ CANCEL NO, CANCEL WITH CMS RET CODE @V305066 00107000 XC 0(4,R2),0(R2) CLEAR AB ENTRY @V305066 00108000 L R8,PIBSAVE PPSAVE ADDRESS @V305066 00109000 USING SVUARA,R4 USER SAVE AREA ADDRESSABILITY @V305066 00110000 USING SVEARA,R8 PPSAVE ADDRESSABILITY @V305066 00111000 MVC SVUPSW(8),SVEPSW MOVE PSW AND REGS TO USER @V305066 00112000 MVC SVUR00(36),SVER00 SAVEAREA IN SEQUENCE R0-R15 @V305066 00113000 MVC SVUR09(28),SVER09 @V305066 00114000 ST R3,SVEPSW2 STORE AB ROUT ADD @V305066 00115000 XC SVER00(3),SVER00 CLEAR HIGH ORDER 3 BYTES R0 @V305066 00116000 STC R9,SVER00+3 LOW ORDER BYTE CONTAINS CC @V305066 00117000 ST R15,SVER0F AND SAVE ERROR MSG RETURN CODE @V305101 00118000 STC R15,DOSRC SET DOSRC IN CASE EXIT RTNE EOJS @VM03127 00119000 ST R4,SVER01 USER SAVE ADDRESS IN R1 @V305066 00120000 LH R2,PIK PROGRAM REQUESTOR KEY @V305066 00121000 SRL R2,1 PC TABLE HAS 8-BYTE ENTRIES @V305066 00122000 LH R6,PCPTR ADDRESS PC OPT. TABLE @V305066 00123000 AR R2,R6 POINT TO PROPER ENTRY @V305066 00124000 L R6,0(,R2) LOAD PC RTN ADDRESS @V387274 00125100 LCR R6,R6 SET INACTIVE @V387274 00125200 ST R6,0(,R2) AND PUT BACK IN OPT TAB @V387274 00125300 LA R1,RETAD GET FINAL END ADDRESS @V305066 00126000 EOJ2 ST R1,OLDPSW+4 SAVE AS OLD PSW @V305066 00127000 MVI OLDPSW+4,0 ZERO HIGH ORDER BYTE @V305066 00128000 SR R15,R15 ZERO ERROR CODE FOR CMS @V305066 00129000 L R14,OSTEMP RESTORE RETURN ADDRESS @V305066 00130000 BR R14 BRANCH @V305066 00131000 CANCEL LA R1,FINAL CANCEL @V305066 00132000 B EOJ2 RETURN TO CMS TO UNSTACK SAVE @V305066 00133000 RETAD BALR R12,0 RE-ESTABLISH ADDRESSABILITY @V305066 00134000 USING *,R12 ... @V305066 00135000 USING SVEARA,R8 ... @V305066 00136000 USING BGCOM,R5 ... @V305066 00137000 L R5,ABGCOM PART. COMREG ADDRESS @V305066 00138000 LH R10,PIK PROGRAM INTERRUPT KEY @V305066 00139000 AH R10,PIBPT POINT TO PIB TABLE @V305066 00140000 USING PIBADR,R10 ... @V305066 00141000 L R8,PIBSAVE PPSAVE ADDRESS @V305066 00142000 L R14,SVEPSW2 AB ROUTINE ADDRESS @V305066 00143000 L R15,SVER0F RESTORE R15 @V305066 00144000 LM R9,R13,SVER09 MOVE USERS REGISTERS TO @V305066 00145000 LM R0,R8,SVER00 CMS REGISTERS @V305066 00146000 BR R14 GO TO AB ROUTINE @V305066 00147000 FINAL SVC 6 CANCEL @V305066 00148000 EJECT 00149000 NUCON @V305066 00150000 EJECT 00151000 BGCOM @V305066 00152000 SYSCOM @V305066 00153000 PIBTAB @V305066 00154000 CMSAVE @V305066 00155000 EJECT 00156000 REGEQU @V305066 00157000 EJECT 00158000 DOSAVE @V305066 00159000 SVUARA DSECT USER'S SAVE AREA FOR AB ROUTINE @V305066 00160000 SVUPSW DS F FIRST HALF PSW @V305066 00161000 SVUPSW2 DS F SECOND HALF PSW @V305066 00162000 SVUR00 DS 9F REGISTERS 0-8 @V305066 00163000 SVUR09 DS 7F REGISTERS 9-15 @V305066 00164000 SPACE 2 00165000 DMSBAB CSECT @V305066 00166000 LTORG @V305066 00167000 ORG DMSBAB+X'200' @V305066 00168000 END 00169000