//ZMD0001 JOB (SMP), // 'Usermod ZMD0001', // CLASS=A, // MSGCLASS=T, // MSGLEVEL=(1,1), // REGION=4096K //********************************************************************* //* //* Name: SYS1.UMODCNTL(ZMD0001) //* //* Desc: Install usermod ZMD0001 //* Requirements: This usermod is for TK4- and will not work with TK3 //* It uses the TK4- customised IEECVXIT as a base //* //* Update (TK4- level) IEECVXIT WTO message automation exit: //* //* o INCLUDE INLINE ALL CHANGES MADE BY ZJW0006 or they //* would be lost. //* o If a RAKF deny on a TAPEVOL resource cancel the JOB //* requesting the tape to prevent endless mount requests //* o If an ENQ on VSAM.INSTALL.TAPEMAN3.VVDS.VOLSERS then issue //* a 'F BSPPILOT,SCRIPT=MMPFCYCL' to stop/wait/start MMPF //* to release the dataset temporarily //* o Remove the code to start printer and punch devices, that is //* now handled by my MMPF //* o Change $HASP093 (spool > 80%+ full) from an informational //* to a critical message so MMPF can trigger to do some //* spool cleanup. //* o Change &C3PO from BSPPILOT as CMD1 is a 'master' subsystem //* that can keep running after JES2 is shutdown. This change //* is to allow JES2 to be shutdown as part of the system //* shutdown (not possible using bsppilot as the autopilot as //* bsppilot has to be stopped before jes2 can be shutdown) //* I have added $HASP099 (jes2 all functions complete) //* to issue the $PJES2 then stop CMD1... so JES2 will stop //* without manual intervention now //* o Removed lots of hard coded 'bsppilot' strings and replaced //* with the &C3PO constant which was only being used //* infrequently instead of everywhere as it should be //* //* ************* NOTE: ****************************************** //* TK4- HAS USERMOD ZJW0006 APPLIED ON TOP OF ZUM0003 (IEECVXIT) //* This usermod superceeds that and includes the changes to //* ieecvxit made by that usermod. //* ************* END NOTE *************************************** //* //* M. Dickinson, 01/2016, last updated 2017/05/02 //* //********************************************************************* //UPDATE EXEC PGM=IEBUPDTE //SYSUT1 DD DISP=SHR,DSN=SYS1.UMODSRC //SYSUT2 DD DISP=(,PASS),UNIT=SYSDA, // DCB=(LRECL=80,RECFM=FB,BLKSIZE=3120), // SPACE=(TRK,(15,5),RLSE) //SYSPRINT DD SYSOUT=* //SYSIN DD * ./ CHANGE NAME=IEECVXIT,NEW=PS GBLC &VNETSW reactivation time for switched lines 00082000 GBLC &VNETLS reactivation time for leased lines 00084000 COPY BSPSGLBL , set globals 00086000 &C3PO SETC 'CMD1' ZMD0001 00140000 &VNETSW SETC '1' reactivation time for switched lines 00173000 &VNETLS SETC '10' reactivation time for leased lines 00176000 CTAPEVOL DS 0H , RAKF TAPEVOL DENY RAKF000A ZMD0001 01330002 * NOTE: because we cancel the job the user never sees RAKF000A ZMD0001 01330003 * RAKF0005 INVALID ATTEMPT TO ACCESS RESOURCE ZMD0001 01330005 * RAKF000A GUEST1 ,GUEST1J ,TAPEVOL ,MARK01 ZMD0001 01330006 * We must build the command in the dsect work area in order to ZMD0001 01330007 * remain re-entrant. ZMD0001 01330008 CLC =C'TAPEVOL',UCMMSTXT+28 ONLY C ON TAPEVOL RULE ZMD0001 01330009 BNE RETURN Not tapevol, ignore it ZMD0001 01330010 * else build SVC34 string here ZMD0001 01330011 LA R1,14 length of cmd in 1st AL2 fld ZMD0001 01330012 STH R1,CTAPVOLM ZMD0001 01330013 LA R1,0 0 in second AL2 field ZMD0001 01330014 STH R1,CTAPVOLM+2 ZMD0001 01330015 MVC CTAPVOLM+4(2),=C'C ' Move in jobname to cmd ZMD0001 01330016 MVC CTAPVOLM+6(8),UCMMSTXT+19 ZMD0001 01330017 LA R1,CTAPVOLM address command buffer ZMD0001 01330018 DS 0H ZMD0001 01330019 SR R0,R0 ZMD0001 01330020 SVC 34 issue cancel command ZMD0001 01330021 B RETURN ZMD0001 01330022 TAPEVCHK CLC =C'VSAM.INSTALL.TAPEMAN3.VVDS.VOLSERS',UCMMSTXT+12 D0001 01330024 BNE RETURN not that dataset so ignore ZMD0001 01330025 SVC34 'F BSPPILOT,SCRIPT=MMPFCYCL' bounce mmpf ZMD0001 01330026 B RETURN ZMD0001 01330027 SVC34 'P BSPPILOT' ZMD0001 01350000 SVC34 '$P' ZMD0001 01360000 ./ DELETE SEQ1=01370000,SEQ2=01390000 STOPSYS DS 0H ZMD0001 01400001 SVC34 '$PJES2' ZMD0001 01400002 SVC34 'P CMD1' ZMD0001 01400003 B RETURN ZMD0001 01400004 ./ DELETE SEQ1=01590000,SEQ2=01770000 VARYIACT DS 0H vary automated terminal inactive 01770100 * 0----+----1----+----2----+----3----+----4----+----5----+ 01770200 * LGN001I TSO logon in progress at MTHD terminal LUNAME 01770300 CLC UCMMSTXT+33(4),=C'VTAM' is it a VTAM terminal? 01770400 BNE RETURN -> no, don't touch it 01770500 LA R3,UCMMSTXT+47 address LUNAME 01770600 BAL R1,AUTOTERM is this an automated terminal? 01770700 LA R1,VNET point R1 to V NET,... plist 01770800 MVC 0(LVINACT,R1),VINACT move SVC 34 plist to workarea 01770900 MVC VINACTLU(8,R1),0(R3) insert LUNAME into V NET command 01771000 SR 0,0 setup and .. 01771100 SVC 34 .. call SVC 34 01771200 B RETURN exit 01771300 VARYACT DS 0H vary automated terminal active 01771400 * 0----+----1----+----2----+----3----+ 01771500 * IST105I LUNAME NODE NOW INACTIVE 01771600 LA R3,UCMMSTXT+9 address LUNAME 01771700 BAL R1,AUTOTERM is this an automated terminal? 01771800 LA R1,VNET V NET,... plist in workarea 01771900 MVC 0(LVACT,R1),VACT move SVC 34 plist to workarea 01772000 MVC VACTLU(8,R1),0(R3) insert LUNAME into V NET command 01772100 LA R1,EXECVNET have R2D2 execute .. 01772200 B DOSRB .. time delayed SVC 34 01772300 VARYFAIL DS 0H suppress IST073I for auto term 01772400 * 0----+----1----+----2----+----3----+----4----+ 01772500 * IST073I VARY FAILED FOR ID= T327AL11 01772600 LA R3,UCMMSTXT+33 address LUNAME 01772700 BAL R1,AUTOTERM is this an automated terminal? 01772800 CLC UCMMSTXT+62(4),=C'DEAC' is it being deactivated? 01772900 BNE RETURN -> no, leave message alone 01773000 MVC UCMROUTC(2),DELROUTC -> yes, delete .. 01773100 MVC UCMDESCD(2),DELDESCD .. message 01773200 B RETURN exit 01773300 AUTOTERM DS 0H check if terminal is automated 01773400 CLC 0(5,R3),=C'T327A' automated 3270 terminal? 01773500 BNE CHK3767 -> no, check for 3767 01773600 BR R1 -> yes, go automate! 01773700 CHK3767 CLC 0(5,R3),=C'T376A' automated 3767 (TTY) terminal? 01773800 BNE RETURN -> no, don't touch it 01773900 BR R1 -> yes, go automate! 01774000 VACT DC AL2(LVACT) SVC 34 plist.. 01774100 DC AL2(0) .. for .. 01774200 DC C'V NET,ACT,ID=' .. v net,act command 01774300 VACTLU EQU *-VACT offset to LUNAME 01774400 DC CL8' ' LUNAME goes here 01774500 LVACT EQU *-VACT length of SVC 34 plist 01774600 DS 0H 01774700 VINACT DC AL2(LVINACT) SVC 34 plist.. 01774800 DC AL2(0) .. for .. 01774900 DC C'V NET,INACT,ID=' .. v net,inact command 01775000 VINACTLU EQU *-VINACT offset to LUNAME 01775100 DC CL8' ' LUNAME goes here 01775200 LVINACT EQU *-VINACT length of SVC 34 plist 01775300 ./ DELETE SEQ1=02560000,SEQ2=02560000 * We will schedule a subroutine to process the action requests. The * 02560000 ./ DELETE SEQ1=02580000,SEQ2=02590000 * If this address space is not active, no action processing will * 02580000 * take place * 02586000 ./ DELETE SEQ1=02780000,SEQ2=02790000 * Check again if CMD1 is running. If not, we cannot process the * 02780000 * action. We do this by scanning the ASCB chain (again) for CMD1 * 02786000 CHKIT CLC 0(8,R7),=CL8'&C3PO' , Autopilot task? ZMD0001 03030000 ./ DELETE SEQ1=03370000,SEQ2=03370000 DC CL8'$HASP099',A(STOPSYS) JES2 all funcs comp ZMD0001 03380001 DC CL8'IEF863I ',A(TAPEVCHK) check if tape vsam ds ZMD0001 03380002 DC CL8'RAKF000A',A(CTAPEVOL) c if deny is TAPEVOL ZMD0001 03380003 DC CL8'LGN001I ',A(VARYIACT) deactivate automated term 03382000 DC CL8'IST105I ',A(VARYACT) activate automated term 03384000 DC CL8'IST073I ',A(VARYFAIL) delete if automated term 03386000 * Make the HASP093 spool > 80% full an action message ZMD0001 03590001 DC CL8'$HASP093',A(ACTDESCD) ZMD0001 03590002 ./ DELETE SEQ1=03770000,SEQ2=03770000 * List of messages and their canned actions * 03770000 REPLYES EQU 32 , R XX,YES 03863000 EXECVNET EQU 36 V NET,ACT,ID= 03866000 DC CL8'IST183A ',A(REPLYES) 03955000 * IEECODES ID=DEL,ROUTCDE=0,DESC=0 ZMD0001 04000001 DELDESCD DC H'0' ZMD0001 04000002 DELROUTC DC H'0' ZMD0001 04000003 IEECODES ID=ACT,ROUTCDE=1,DESC=2 ZMD0001 04000004 ./ DELETE SEQ1=04040000,SEQ2=04040000 * Actually, the SRB routine does not process the action requests at * 04040000 ./ DELETE SEQ1=04060000,SEQ2=04070000 * which in turn will do what we need to do, namely issue a WTOR * 04060000 * reply or other command via SVC34 * 04066000 ./ DELETE SEQ1=04570000,SEQ2=04570000 TITLE 'IRBROUT - IRB Routine that REALLY processes the action' 04570000 ./ DELETE SEQ1=04660000,SEQ2=04660000 CLC $REASON,=YL2(EXECVNET) is it a V NET,... request? 04660000 BNE CHKPWD -> no, check for passwd request 04660800 LA R1,VNET point R1 to V NET,... plist 04661600 CLI VACTLU+5(R1),C'S' is it a switched terminal? 04662400 BE WAITSW -> yes, go wait 04663200 STIMER WAIT,BINTVL=VNETLS wait &VNETLS seconds 04664000 B DOVNET go execute 04664800 WAITSW STIMER WAIT,BINTVL=VNETSW wait &VNETSW seconds 04665600 DOVNET LA R1,VNET point R1 to V NET,... plist 04666400 B DOSVC34 execute V NET,... command 04667200 CHKPWD CLC $REASON,=YL2(REPLCAT) , is it a password request? 04668000 B RYES , 20: R XX,YES 05255000 RYES EQU * 05542000 MVC WTOAREA(REPLY9L),REPLY9 05544000 B ISSUE 05546000 SPACE 05548000 ./ DELETE SEQ1=05580000,SEQ2=05580000 DOSVC34 SR R0,R0 , clear R0 for SVC 34 05580000 REPLY1 WTO 'R XX,''NOHOLD'' <<<<<< BY &C3PO',DESC=(5), +05700000 REPLY2 WTO 'R XX,''U'' <<<<<< BY &C3PO',DESC=(5), +05740000 REPLY3 WTO 'R XX,''GO'' <<<<<< BY &C3PO',DESC=(5), +05780000 REPLY4 WTO 'R XX,''POST'' <<<<<< BY &C3PO',DESC=(5), +05820000 REPLY5 WTO 'R XX,''WAIT'' <<<<<< BY &C3PO',DESC=(5), +05860000 REPLY6 WTO 'R XX,''SIC'' <<<<<< BY &C3PO',DESC=(5), +05900000 REPLY7 WTO 'R XX,''CANCEL'' <<<<<< BY &C3PO',DESC=(5), +05940000 REPLY8 WTO 'R XX,''NOPASSWD'' <<<<<< BY &C3PO',DESC=(5), +05980000 REPLY9 WTO 'R XX,''YES'' <<<<<< BY &C3PO',DESC=(5), +06012000 ROUTCDE=(1,2,11),MF=L 06014000 REPLY9L EQU *-REPLY9 06016000 *------------------------------------------------------------------* 06018000 VNETSW DC A(&VNETSW*100) reactivation time for switched lines 06033000 VNETLS DC A(&VNETLS*100) reactivation time for leased lines 06036000 * CTAPVOLM is for dynamically built cancel command ZMD0001 06160001 DS 0H ZMD0001 06160002 CTAPVOLM DS AL2,AL2 ZMD0001 06160003 DS CL10'C xxxxxxxx' ZMD0001 06160004 * 28 = NOPASSWD 06161000 * 32 = YES 06162000 * 36 = Execute delayed V NET,... command 06163000 VNET DS 0C V NET,... commands go here 06164000 ORG *+LVINACT length of V NET,... commands 06165000 ./ ENDUP /* //* //* Assemble //* //SMPASM EXEC SMPASM,M=IEECVXIT //ASM.SYSIN DD DISP=(OLD,DELETE),DSN=*.UPDATE.SYSUT2 //* //* Receive and apply //* //RECAPP EXEC SMPAPP,COND=(0,NE) //SMPPTFIN DD * ++USERMOD(ZMD0001). ++VER(Z038) FMID(EBB1102) PRE(TMVS805) SUP(ZJW0006). ++MOD(IEECVXIT) TXLIB(UMODOBJ). //SMPCNTL DD * REJECT S(ZMD0001). RESETRC. RECEIVE SELECT(ZMD0001). APPLY SELECT(ZMD0001). /* //