MSG TITLE 'DMKMSG (CP) VM/370 - RELEASE 6' 00001000 ISEQ 73,80 VALIDATE SEQUENCING OF INPUT @V200820 00002000 *. 00003000 * 00004000 * MODULE NAME - 00005000 * 00006000 * DMKMSG 00007000 * 00008000 * FUNCTION - 00009000 * 00010000 * TRANSMITS MESSAGES TO LOGGED ON USERS FOR THE MSG AND WNG 00011000 * COMMANDS. RECEIVES AND RETRANSMITS LINES FOR THE ECHO COMMAND. 00012000 * 00013000 * 00014000 * ATTRIBUTES - 00015000 * 00016000 * REENTRANT, PAGEABLE, CALLED VIA SVC 00017000 * 00018000 * 00019000 * ENTRY POINTS - 00020000 * 00021000 * DMKMSGMS - ENTRY FOR 'MSG' COMMAND 00022000 * DMKMSGSM - ENTRY FOR 'SMSG' COMMAND 00022500 * DMKMSGWN - ENTRY FOR 'WNG' COMMAND 00023000 * DMKMSGEC - ENTRY FOR THE ECHO COMMAND 00024000 * DMKMSGNH - ENTRY POINT FOR "MSGNOH" COMMAND 00024500 * 00025000 * 00026000 * ENTRY CONDITIONS - 00027000 * 00028000 * GPR9 - ADDRESS OF COMMAND LINE BUFFER 00029000 * GPR11 - ADDRESS OF THE USERS VMBLOK 00030000 * GPR12 - ADDRESS OF THE ENTRY POINT 00031000 * GPR13 - ADDRESS OF THE SAVEAREA 00032000 * 00033000 * 00034000 * EXIT CONDITIONS - 00035000 * 00036000 * NORMAL - 00037000 * GPR2 = 0 00038000 * 00039000 * ERROR - 00040000 * GPR2 = ERROR MESSAGE CODE NUMBER 00041000 * 00042000 * 00043000 * CALLS TO OTHER ROUTINES - 00044000 * 00045000 * DMKSCNFD - LOCATE ARGUMENTS IN THE COMMAND LINE 00046000 * DMKSCNAU - FIND VMBLOK OF USERID SPECIFIED 00047000 * DMKQCNWT - TO OUTPUT MESSAGES TO THE TERMINAL 00048000 * DMKFREE - TO AQUIRE FREE CORE FOR OUTPUT BUFFERS 00049000 * DMKFRET - RETURN OUTPUT BUFFERS TO FREE CORE 00050000 * DMKERMSG - SEND ERROR MESSAGES TO THE TERMINAL. 00051000 * DMKQCNRD - READ FROM TERMINAL. 00052000 * DMKCVTDB - CONVERT A NUMBER FROM DECIMAL TO BINARY 00053000 * DMKCVTBD CONVERT BINARY TO DECIMAL 00053050 * DMKLOKSW - SWITCH TO ANOTHER VMBLOK IF SYSTEM IS AP-MODE 00053100 * DMKLOCKQ - OBTAIN LOCKBLOK TO KEEP RECEIVER FOR ERROR MSG 00053200 * DMKLOCKD - RELEASE LOCKBLOK AFTER ERROR MSG WRITTEN 00053300 * 00054000 * 00055000 * TABLES/WORKAREAS - 00056000 * 00057000 * NONE 00058000 * 00059000 * 00060000 * REGISTER USAGE - 00061000 * 00062000 * GPR0 - ARGUMENT LENGTH (RETURNED BY DMKSCNFD) 00063000 * GPR1 - ADDRESS OF ARGUMENT (RETURNED BY DMKSCNFD) 00064000 * GPR2 - PARAMETERS PASSED TO CALLED ROUTINES 00065000 * GPR3 - INPUT BUFFER POINTER 00066000 * GPR4 - INPUT BUFFER COUNT 00067000 * GPR5 - WORK REGISTER 00068000 * GPR6 - WORK REGISTER 00069000 * GPR7 - BAL REGISTER 00070000 * GPR8 - ADDRESS OF RDEVBLOK 00071000 * GPR9 - ADDRESS OF COMMAND LINE BUFFER 00072000 * GPR10 - ADDRESS OF VMBLOKS 00073000 * GPR11 - ADDRESS OF USERS VMBLOK 00074000 * GPR12 - BASE REGISTER 00075000 * GPR13 - ADDRESS OF SAVEAREA 00076000 * GPR14 - LINKAGE REGISTER 00077000 * GPR15 - LINKAGE REGISTER 00078000 * 00079000 * 00080000 * NOTES - 00081000 * 00082000 * NONE 00083000 * 00084000 * 00085000 * OPERATION - 00086000 * 00087000 * THIS MODULE HANDLES THE 'WNG', 'MSG', 'SMSG', AND 'ECHO' 00088000 * COMMANDS. 00088500 * THESE ARE DESCRIBED IN SEPARATE COMMAND 00089000 * PROLOGUES BELOW. 00090000 * 00091000 * 00092000 * MESSAGES - 00093000 * 00094000 * NONE 00095000 * 00096000 *. 00097000 EJECT 00098000 COPY OPTIONS 00098100 COPY LOCAL OPTIONS 00098200 SPACE 2 00098300 DMKMSG START 00099000 SPACE 00100000 MODID DC CL8'DMKMSG' 00101000 SPACE 00102000 USING PSA,R0 00103000 USING BUFFER,R9 00104000 USING VMBLOK,R11 00105000 USING SAVEAREA,R13 00106000 SPACE 00107000 EXTRN DMKCVTDB 00108000 EXTRN DMKCVTBD @VA09994 00108500 EXTRN DMKQCNRD 00109000 EXTRN DMKCVTDT @V202420 00110000 EXTRN DMKSCNAU 00111000 EXTRN DMKSCNFD 00112000 EXTRN DMKERMSG 00113000 EXTRN DMKVMCFC @V60C2B8 00113500 EXTRN DMKLOCKQ,DMKLOCKD @VA12684 00113750 EJECT 00114000 *. 00115000 * SUBROUTINE NAME - 00116000 * 00117000 * DMKMSGWN 00118000 * 00119000 * FUNCTION - 00120000 * 00121000 * USED TO TRANSMIT HIGH PRIORITY MESSAGES TO A SPECIFIED 00122000 * USER OR ALL USERS CURRENTLY LOGGED ON. 00123000 * 00124000 * COMMAND FORMAT - 00125000 * 00126000 * +-------+---------------------------+ 00127000 * | WNG | USERID MESSAGE TEXT | 00128000 * | W | OPERATOR | 00129000 * | | ALL | 00130000 * +-------+---------------------------+ 00131000 * 00132000 * OPERATION - 00133000 * 1. SET A FLAG TO INDICATE A WNG OPERATION AND THEN GO TO 00134000 * CODE COMMON TO BOTH WNG AND MSG. THIS WILL BE DESCRIBED IN 00135000 * THE PROLOG FOR MSG. 00136000 * 00137000 * RESPONSES - NONE 00138000 * 00139000 * ERROR MESSAGES - 00140000 * DMKMSG020E USERID MISSING OR INVALID 00141000 * DMKMSG045E (USERID) NOT LOGGED ON 00142000 * DMKMSG057W (USERID) NOT RECEIVING; DISCONNECTED 00143000 * DMKMSG057W (USERID) NOT RECEIVING; MSG OFF 00144000 * DMKMSG057W (USERID) NOT RECEIVING; WNG OFF 00145000 *. 00146000 SPACE 2 00147000 DMKMSGWN RELOC , SEND A WARNING TO ONE OR ALL USERS @V200820 00148000 SPACE 00149000 MVI SAVEWRK1,VMWNGON REMEMBER THAT THIS IS A WARNING 00150000 B MSGCOM CONTINUE 00151000 EJECT 00151050 DMKMSGNH RELOC , SEND MESSAGE WITHOUT HEADER @V60C2BE 00151100 SPACE 00151150 * 00151200 * SUBROUTINE NAME - DMKMSGNH 00151250 * 00151300 * FUNCTION: 00151350 * 00151400 * TRANSMIT A MESSAGE TO A SPECIFIED USERID, AS FOR "MSG" 00151450 * EXCEPT THAT THE HEADER PREFIXED TO THE INPUT TEXT 00151500 * BY "MSG" IS NOT SENT. THIS COMMAND SENDS ONLY THE 00151550 * TEXT SUPPLIED BY THE COMMAND INVOKER. 00151600 * 00151650 SPACE 00151700 MVI SAVEWRK1,VMMSGON+VMMTEXT THIS IS A MESSAGE TEXT @V60C2BE 00151750 B MSGCOM JOIN COMMON CODE @V60C2BE 00151800 EJECT 00152000 *. 00152020 * SUBROUTINE NAME - 00152040 * 00152060 * DMKMSGSM 00152080 * 00152100 * FUNCTION - 00152120 * 00152140 * USED TO TRANSMIT A MESSAGE IN MACHINE READABLE FORMAT 00152160 * WITHIN A BUFFER TO ANY USER CURRENTLY LOGGED ON. 00152180 * 00152200 * COMMAND FORMAT - 00152220 * 00152240 * +-------+---------------------------+ 00152260 * | SMSG | USERID MESSAGE TEXT | 00152280 * | SM | | 00152300 * +-------+---------------------------+ 00152320 * 00152340 * OPERATION - 00152360 * 1. SET A FLAG TO INDICATE A SMSG OPERATION AND THEN GO TO 00152380 * CODE COMMON WITHIN DMKMSGMS. 00152400 * 2. FIND USERID TO RECEVIE MESSAGE 00152420 * 3. CHECK FOR SPECIAL MESSAGE TO HIMSELF 00152440 * 4. GET POINTER TO AND LENGTH OF MESSAGE TEXT 00152460 * 5. GET SPACE FOR VMCF PARM LIST AND SENDX BUFFER 00152480 * 6. BUILD VMCF MESSAGE PARM LIST 00152500 * 7. MOVE MESSAGE TEXT INTO SENDX BUFFER 00152520 * 8. CALL DMKVMCFC TO SENDX THE VMCF SPECIAL MESSAGE 00152540 * 9. CHECK FOR ERRORS FROM DMKVMCFC AND RETURN TO CALLER 00152560 * 00152580 * 00152600 * RESPONSES - NONE 00152620 * 00152640 * ERROR MESSAGES - 00152660 * DMKMSG020E USERID MISSING OR INVALID 00152680 * DMKMSG045E (USERID) NOT LOGGED ON 00152700 * DMKMSG057W (USERID) NOT RECEIVING; DISCONNECTED 00152720 * DMKMSG057W (USERID) NOT RECEIVING; SMSG OFF 00152740 * DMKMSG057W (USERID) NOT RECEIVING; NOT AUTHORIZED 00152760 * DMKMSG810E VMCF SPECIAL MESSAGE LIMIT EXCEEDED 00152780 *. 00152800 SPACE 2 00152820 DMKMSGSM RELOC , SEND MESSAGE WITHIN A BUFFER TO 00152840 * ANY SPECIFIED USER 00152860 MVI SAVEWRK1,VMSMSGON REMEMBER THIS IS SPECIAL MSG @V60C2B8 00152880 B MSGCOM CONTINUE @V60C2B8 00152900 EJECT 00152920 *. 00153000 * SUBROUTINE NAME - 00154000 * 00155000 * DMKMSGMS 00156000 * 00157000 * FUNCTION - 00158000 * 00159000 * TRANSMITS MESSAGES TO SPECIFIED USER(S) THAT ARE 00160000 * LOGGED ON THE SYSTEM. 00161000 * 00162000 * COMMAND FORMAT - 00163000 * 00164000 * +-------+--------------------------+ 00165000 * | MSG | USERID MESSAGE TEXT | 00166000 * | M | OPERATOR | 00167000 * | | ALL | 00168000 * +-------+--------------------------+ 00169000 * 00170000 * OPERATION - 00171000 * 00172000 * 1. CALL DMKSCNFD TO LOCATE ARGUMENT. IF NONE IS FOUND, CALL 00173000 * DMKERMSG TO SEND ERROR MESSAGE DMKMSG020E. 00174000 * 2. IF ARGUMENT = 'ALL', GO TO STEP 7. IF IS 'OP', GO TO 00175000 * STEP 6. ELSE CALL DMKSCNAU TO LOCATE THE USERID VMBLOK. 00176000 * IF VMBLOK IS NOT FOUND, CALL DMKERMSG TO SEND ERROR 00177000 * MESSAGE DMKMSG045E. 00178000 * 3. LOAD ENDING VMBLOK ADDRESS. 00179000 * 4. COMPUTE THE BEGINNING AND ENDING ADDRESSES OF THE MESSAGE 00180000 * IN THE COMMAND LINE. CALL DMKFREE TO OBTAIN STORAGE FOR 00181000 * A MESSAGE BUFFER. PUT MESSAGE AND HEADER INTO THE BUFFER. 00182000 * 5. IF THE USER IS NOT RECEIVING OR IS DISCONNECTED, CALL 00183000 * DMKERMSG TO SEND ERROR MESSAGE DMKMSG057W. IF THE USER 00184000 * IS LOGGED ON AND RECEIVING MESSAGES, SET UP FOR MSG OR 00185000 * WNG DEPENDING ON THE COMMAND AND CALL DMKQCNWT TO SEND 00186000 * THE MESSAGE. 00187000 * IF MORE MESSAGES ARE TO BE SENT, GET THE NEXT VMBLOK 00188000 * AND REPEAT THIS STEP. IF FINISHED, GO TO STEP 8. 00189000 * 6. GET OPERATORS VMBLOK AND GO TO STEP 3. 00190000 * 7. IF THE 'ALL' PARAMETER IS NOT LEGAL FOR THIS USER, CALL 00191000 * DMKERMSG TO SEND ERROR MESSAGE DMKMSG003E. IF OK, GO TO 00192000 * STEP 4. 00193000 * 8. CALL DMKFRET TO RETURN THE BUFFER TO STORAGE AND THEN 00194000 * EXIT. 00195000 * 00196000 * RESPONSES - NONE 00197000 * 00198000 * ERROR MESSAGES- 00199000 * DMKMSG003E INVALID OPTION - (OPTION) 00200000 * DMKMSG020E USERID MISSING OR INVALID 00201000 * DMKMSG045E (USERID) NOT LOGGED ON 00202000 * DMKMSG057W (USERID) NOT RECEIVING; DISCONNECTED 00203000 * DMKMSG057W (USERID) NOT RECEIVING; MSG OFF 00204000 * DMKMSG057W (USERID) NOT RECEIVING; WNG OFF 00205000 *. 00206000 EJECT 00207000 DMKMSGMS RELOC , SEND A MESSAGE TO ONE OR ALL USERS @V200820 00208000 XC SAVEWRK1,SAVEWRK1 CLEAR WORK AREA FOR FLAGS HRC101DK 00209190 OI SAVEWRK1,VMMSGON REMEMBER THAT THIS IS A MESSHRC101DK 00209380 OI SAVEWRK1+2,NHILIGHT+NALARM HRC101DK 00209570 SPACE 2 00210000 MSGCOM CALL DMKSCNFD SCAN FOR USER TO RECEIVE THE MESSAGE 00211000 BNZ MSG020 GO SEND ERROR MESSAGE 00212000 STM R0,R1,SAVEWRK8 SAVE LENGTH AND ADDRESS FOR LATER 00213000 LA R0,MSGWASZE SIZE OF WORK AREA IN DW'S @VA12684 00213100 CALL DMKFREE OBTAIN STORAGE FOR WORK AREA @VA12684 00213200 ST R1,SAVEWRK6 HOLD ADDRESS OF WORK AREA @VA12684 00213300 LR R6,R1 ADDRESS OF WORK AREA @VA12684 00213400 USING MSG1,R6 WORK AREA ADDRESSABILITY @VA12684 00213500 XC MSG1,MSG1 CLEAR WORK AREA @VA12684 00213600 DROP R6 @VA12684 00213700 LM R0,R1,SAVEWRK8 RESTORE REGS R0 - R1 @VA12684 00213800 C R0,F2 ARGUMENT TWO CHARACTERS OR MORE ??? 00214000 BL MSGCKAST CAN'T BE OPERATOR OR ALL IF BR. 00215000 LR R2,R0 LENGTH TO GPR2 00216000 BCTR R2,0 MINUS ONE FOR 'EX' 00217000 EX R2,MSGCMPOP IS THIS 'OP' REQUEST ???? 00218000 BE MSGCPO BRANCH IF IT IS 00219000 CLC 0(4,R1),=C'ALL ' IS IT A MESSAGE TO ALL USERS ? 00220000 BE MSGALL BRANCH IF YES 00221000 B MSGUSEID MUST BE USERID 00222000 MSGCKAST EQU * CHECK FOR MESSAGE TO USER HIMSELF@V200820 00223000 SLR R10,R10 SET END TRIGGER @VA07788 00223500 CLI 0(R1),C'*' DO WE HAVE AN ASTERISK ??? 00224000 BNE MSGUSEID NO - FIND RECEIVER'S VMBLOK @V60C2B8 00224400 TM SAVEWRK1,VMSMSGON SPECIAL MESSAGE?? @V60C2B8 00224800 BO PROCLOG YES - SEND SPM TO HIMSELF @V60C2B8 00225200 B MSGFOR SEND REGULAR MSG TO HIMSELF @V60C2B8 00225600 MSGUSEID CALL DMKSCNAU FIND USERID VMBLOK ADDRESS 00226000 BC 4,MSG045 USERID NOT LOGGED ON @VM08681 00227000 BC 2,MSG020 USERID MISSING OR INVALID @VM08681 00228000 TM VMRSTAT-VMBLOK(R1),VMLOGOFF USER LOGGING OFF? @VA09531 00228020 BO MSG045 YES,LOGOFF @VA09531 00228040 TM VMOSTAT-VMBLOK(R1),VMKILL USER KILLED? @VA09531 00228060 BO MSG045 YES,KILLED @VA09531 00228080 SWTCHVM LOCK THIS VMBLOK @V407508 00229100 SLR R10,R10 SET END TRIGGER @VA01513 00232000 PROCLOG TM VMOSTAT,VMKILL HEADED FOR THE CLIFF? @V60C2B8 00233000 BO OPROFF SO INFORM THE SENDER @VA01513 00234000 TM SAVEWRK1,VMSMSGON WAS IT SPECIAL MESSAGE? @V60C2B8 00234010 BNO MSGFOR NO - BRANCH AROUND SPM CODE @V60C2B8 00234020 MVC SAVEWRK4(8),VMUSER SAVE USERID TO RECV SPM @V60C2B8 00234030 CLI VMSPMFLG,VMSPMON IS USER RECEIVING SPM'S? @V60C2B8 00234040 BE PROCSM YES - PROCESS SPM @V60C2B8 00234050 MVI SAVEWRK6,HEXZERO FIELD DELIMITER @V60C2B8 00234060 LA R1,=CL14' SMSG OFF ' NOT RECVING SPM'S @V60C2B8 00234070 BAL R7,MSGSNDE USER NOT RECEIVING SPM MESSAGES @V60C2B8 00234080 B RETURN RETURN TO CALLER @V60C2B8 00234090 PROCSM EQU * PROCESS SPECIAL MESSAGE @V60C2B8 00234100 L R1,ASYSVM GET ADDRESS OF SYSTEM VMBLOK @V60C2B8 00234110 SWTCHVM LOCK SYSTEM VMBLOK @V60C2B8 00234120 LM R3,R4,BUFNXT GET SPM TEXT POINTER AND COUNT @V60C2B8 00234130 BCTR R4,0 -1, BUFNXT POINTS TO A BLANK @VA09275 00234135 LTR R4,R4 IS COUNT ZERO? @V60C2B8 00234140 BNP RETURN YES - RETURN TO CALLER @V60C2B8 00234150 XC BUFCNT,BUFCNT SHOW WE USED THE WHOLE BUFFER @VA09275 00234153 LA R3,1(,R3) POINT TO 1ST CHARACTER OF TEXT @VA09275 00234156 LR R2,R4 SAVE MESSAGE LENGTH FOR LATER USE@V60C2B8 00234160 LA R0,VMCMLEN+7(R4) GET SENDX EXT INT BUF LEN @V60C2B8 00234170 SRL R0,3 CONVERT TO DOUBLE WORDS @V60C2B8 00234180 LR R4,R0 SAVE FOR LATER FRET @V60C2B8 00234190 CALL DMKFREE GO GET SPM BUFFER @V60C2B8 00234200 USING VMCMHDR,R1 00234210 ST R1,SAVEWRK3 SAVE SPM BUFFER ADDRESS @V60C2B8 00234220 MVI VMCMEFLG,HEXZERO ZERO OUT RETURN CODE FIELD @V60C2B8 00234230 LA R0,VMCPSENX SENDX SUBFUNCTION CODE VALUE @V60C2B8 00234240 STCM R0,3,VMCMFUNC FILL IN VMCF SUBFUNCTION CODE @V60C2B8 00234250 LA R0,VMCMLEN(R1) POINT TO START OF MSG TXT @V60C2B8 00234260 ST R0,VMCMVADA STORE BUFFER PTR IN VMCF P-LIST @V60C2B8 00234270 ST R2,VMCMLENA STORE TXT LEN IN P-LIST @V60C2B8 00234280 STCK VMCMUSE CLOCK VALUE - UNIQUE MSGID @V60C2B8 00234290 MVC VMCMMID(4),VMCMUSE+3 UNIQUE SMGID FOR SPM @V60C2B8 00234300 L R15,SAVER11 GET SPM SENDER'S VMBLOK @V60C2B8 00234310 DROP R11 00234320 USING VMBLOK,R15 00234330 MVC VMCMUSE(8),VMUSER SAVE SENDER ID IN LIST @V60C2B8 00234340 DROP R15 00234350 USING VMBLOK,R11 00234360 MVC VMCMUSER(8),SAVEWRK4 USERID TO RECV SPM @V60C2B8 00234370 LR R5,R2 GET MSG TXT LEN @V60C2B8 00234380 BCTR R5,0 SUBTRACT 1 FOR MOVE @V60C2B8 00234390 EX R5,SMSGMVC MOVE SPM TO OUTPUT BUFFER @V60C2B8 00234400 LA R2,VMCMLEN LENGTH OF P-LIST FOR VMCF CALL @V60C2B8 00234410 DROP R1 00234420 L R11,ASYSVM GET ADDRESS OF SYSTEM VMBLOK @V60C2B8 00234430 CALL DMKVMCFC SENDX THE VMCF SPM @V60C2B8 00234440 ST R2,SAVER2 SEND RETURN CODE TO CALLER @V60C2B8 00234450 CH R2,NOTAUTH WAS RECEIVER AUTHORIZED? @V60C2B8 00234460 BNE RETURN YES - RETURN TO CALLER @V60C2B8 00234470 SPACE 00234480 * OTHERWISE TELL SENDER - RECEIVER NOT VMCF AUTHORIZED 00234490 SPACE 00234500 LA R1,=CL14'NOT AUTHORIZED' SETUP MSG057 DATA @V60C2B8 00234510 BAL R7,MSGSNDE USER NOT RECEIVING - NOT AUTHOR @V60C2B8 00234520 B RETURN RETURN TO CALLER @V60C2B8 00234530 MSGFOR BAL R7,MSGFMT GET OUTPUT BUFFER AND FORMAT THE MESSAGE 00235000 MSGNXT BAL R7,MSGSND SEND THE MESSAGE IF THE USER IS RECEIVING 00236000 CL R10,SAVER11 MESSAGE FOR ALL USERS ? @VA01513 00237000 BNE MSGRET NOPE -- RETURN @VA01513 00238000 NEXTVM DS 0H GET THE NEXT VMBLOK @V407508 00239100 LR R1,R11 @VA09531 00239220 L R1,VMPNT-VMBLOK(,R1) GET NEXT VMBLOK ADDRESS @VA09531 00239240 NEXTVM2 DS 0H @VA09531 00239260 CR R10,R1 WAS THAT THE LAST MESSAGE? @V407508 00239300 BE MSGRET YES, RETURN TO THE CALLER @V407508 00239400 TM VMRSTAT-VMBLOK(R1),VMLOGOFF USER LOGGING OFF? @VA09531 00239410 BO NEXTVM3 YES,LOGOFF @VA09531 00239418 TM VMOSTAT-VMBLOK(R1),VMKILL USER KILLED? @VA09531 00239426 BO NEXTVM3 YES,KILLED @VA09531 00239434 B NEXTVM4 SWAP VMBLOK @VA09531 00239442 NEXTVM3 DS 0H @VA09531 00239450 L R1,VMPNT-VMBLOK(,R1) GET NEXT VMBLOK @VA09531 00239458 B NEXTVM2 CONTINUE VALIDITY CHECK @VA09531 00239466 NEXTVM4 DS 0H @VA09531 00239474 SWTCHVM LOCK THIS VMBLOK @V407508 00239500 TM VMRSTAT,VMLOGOFF HEADED FOR THE CLIFF? @VA01513 00244000 BO NEXTVM YES, GET NEXT @VA01513 00245000 TM VMOSTAT,VMKILL MAKE DOUBLE SURE @VA01513 00246000 BZ MSGNXT NOPE, GO SEND MSG @VA01513 00247000 B NEXTVM YUP, TRY SOMEBODY ELSE @VA01513 00248000 MSGRET LR R0,R4 LOAD THE BUFFER SIZE 00249000 L R1,SAVEWRK3 LOAD THE MSG BUFFER ADDRESS @V407508 00249100 CALL DMKFRET RETURN THE OUTPUT BUFFER TO FREE STORA 00250000 RETURN DS 0H RETURN TO CALLER @V407508 00251100 L R1,SAVEWRK6 ADDRESS OF WORK AREA @VA12684 00251110 LTR R1,R1 WAS A WORK AREA OBTAINED ? @VA12684 00251120 BZ MSGEXIT NO, JUST EXIT @VA12684 00251130 LA R0,MSGWASZE SIZE OF WORK AREA @VA12684 00251140 CALL DMKFRET RELEASE WORK AREA STORAGE @VA12684 00251150 MSGEXIT DS 0H @VA12684 00251160 L R1,SAVER11 GET CALLERS VMBLOK ADDRESS @V407508 00251200 SWTCHVM LOCK CALLERS VMBLOK @V407508 00251300 EXIT 00254000 SPACE 3 00255000 MSGCPO DS 0H MSG IS FOR OPERATOR @V407508 00256100 L R1,ASYSOP GET OPERATORS VMBLOK ADDRESS @V407508 00256200 TM VMRSTAT-VMBLOK(R1),VMLOGOFF USER LOGGING OFF? @VA09531 00256220 BO MSG045 YES,LOGOFF @VA09531 00256240 TM VMOSTAT-VMBLOK(R1),VMKILL USER KILLED? @VA09531 00256260 BO MSG045 YES,KILLED @VA09531 00256280 SWTCHVM LOCK OPERATORS VMBLOK @V407508 00256300 L R10,VMPNT GET POINTER TO NEXT VMBLOK 00259000 LTR R10,R10 IS OPERATOR'S VMBLOK IN THE CHAIN ? 00260000 BZ OPROFF OPERATOR NOT ON @VA01513 00261000 TM VMRSTAT,VMLOGOFF DOOMED BY ANY CHANCE? @VA01513 00262000 BO OPROFF YES, NOT REALLY HERE @VA01513 00263000 B PROCLOG GO CHECK IF USER LOGGING OFF @V60C2B8 00264000 OPROFF EQU * @VA01513 00266000 L R1,SAVER11 GET CALLERS VMBLOK ADDRESS @V407508 00267100 SWTCHVM LOCK CALLERS VMBLOK @V407508 00267200 B MSG045 AND GO GIVE ERROR MESSAGE 00269000 SPACE 2 00270000 MSGALL EQU * MESSAGE OR WARNING TO ALL USERS @V200820 00271000 TM VMCLEVEL,VMCLASSA+VMCLASSB ALLOWED TO SAY 'ALL'@V200820 00272000 BZ MSG003 NO -- INVALID OPTION@V200820 00273000 LR R10,R11 STOP WHEN BACK TO SENDER 00274000 OI SAVEWRK1+2,MALLOK ALL OK TO USE HRC101DK 00274300 NI SAVEWRK1+2,255-NALARM OK TO USE HRC101DK 00274600 B MSGFOR CONTINUE 00275000 EJECT 00276000 MSGFMT LM R3,R4,BUFNXT LOAD INPUT BUFFER POINTER AND COUNT 00277000 LTR R4,R4 IS THE COUNT ALREADY ZERO ? 00278000 BNP RETURN YES - RETURN TO CALLER 00279000 LR R2,R3 SAVE STARTING ADDRESS OF MESSAGE 00280000 MSGFMTL EQU * SCAN TO LOGICAL END OF MSG LINE @V200820 00281000 CLI 0(R3),X'1D' SCAN FOR UNDESIRABLE CHARACTER @VA08728 00281200 BNE MSGFMTL1 NO, DO NOT CHANGE @VA08728 00281400 MVI 0(R3),X'40' BLANK IT OUT @VA08728 00281600 MSGFMTL1 EQU * @VA08728 00281800 CLI 0(R3),X'15' LOGICAL LINE END CHARACTER ? @V200820 00282000 BE MSGFMTE YES,COMPUTE THE MESSAGE LENGTH 00283000 LA R3,1(,R3) NO, POINT TO THE NEXT BYTE IN THE BUFFER 00284000 BCT R4,MSGFMTL SUBTRACT ONE FROM COUNT - BRANCH IF MORE 00285000 MSGFMTE STM R3,R4,BUFNXT SAVE UPDATED POINTER AND COUNT 00286000 SR R3,R2 SUBTRACT 1ST CHARACTER ADDRESS FROM LAST 00287000 BZ SETLEN SO SKIP THE SUBTRACT 00288000 BCTR R3,0 DECREMENT LENGTH BY 1 FOR MVC INSTRUCTION 00289000 SETLEN EQU * 00290000 LA R0,L'MSGHDR+L'MSGTRL+8(,R3) ADD HEADER + TRAILER + 8 00291000 SRL R0,3 CONVERT TO NUMBER OF DOUBLE WORDS 00292000 LR R4,R0 SAVE SIZE FOR LATER FRET 00293000 CALL DMKFREE GET A BUFFER FOR THE OUTPUT MESSAGE 00294000 MVC 0(L'MSGHDR,R1),MSGHDR MOVE IN MESSAGE HEADER 00295000 L R15,SAVER11 GET CALLER'S VMBLOK FOR A MOMENT@V202420 00296000 MVC MSGTYP-MSGHDR+9(8,R1),VMUSER-VMBLOK(R15) USERID@V202420 00297000 TM SAVEWRK1,VMWNGON IS THIS A WARNING ? 00298000 BZ MSGFMTM NO,LEAVE 'MSG' IN THE HEADER 00299000 MVC MSGTYP-MSGHDR(3,R1),=C'WNG ' MOVE 'WNG' INTO THE HEADER 00300000 MSGFMTM EX R3,MSGMVC MOVE THE MESSAGE TO THE OUTPUT BUFFER 00301000 LR R2,R1 START OF BUFFER FOR TIME-STAMP @V202420 00302000 SLR R1,R1 NO DATE WANTED @V202420 00303000 CALL DMKCVTDT TIME STAMP THE MESSAGE BUFFER @V202420 00304000 LR R1,R2 BUFFER ADDRESS BACK TO GR1 @V202420 00305000 LA R2,L'MSGHDR+1(R1,R3) POINT TO THE END OF THE MESSAGE 00306000 MVC 0(L'MSGTRL,R2),MSGTRL MOVE IN THE MESSAGE TRAILER 00307000 LA R0,L'MSGHDR+L'MSGTRL+1(,R3) LOAD THE MESSAGE LENGTH 00308000 STM R0,R1,SAVEWRK2 SAVE MSG LENGTH AND ADDRESS @V407508 00308100 IC R5,SAVEWRK1 LOAD THE MESSAGE / WARNING MASK 00309000 L R8,VMTERM GET TERMINAL ADDRESS HRC101DK 00309040 LTR R8,R8 IS THERE ONE? HRC101DK 00309080 BZR R7 NOPE - JUST LEAVE HRC101DK 00309120 USING RDEVBLOK,R8 HRC101DK 00309160 TM RDEVTYPC,CLASTERM TERMINAL TYPE ? HRC101DK 00309200 BZ *+12 NO, MUST BE A GRAF HRC101DK 00309240 TM RDEVTYPE,TYPBSC REMOTE GRAF HRC101DK 00309280 BZ *+8 NO, LEAVE IT HRC101DK 00309320 MVI 8(R1),C' ' REPLACE NEWLINE CHAR HRC101DK 00309360 DROP R8 HRC101DK 00309400 N R5,=A(VMMSGON+VMWNGON) LEAVE ON MSG AND WNG @VA13028 00309510 BR R7 RETURN 00310000 EJECT 00311000 MSGSND EX R5,MSGREC USER RECEIVING MESSAGES ?? @V200930 00312000 BZ MSGSNDN NO, TELL ISSUING USER @V200930 00313000 TM VMOSTAT,VMDISC USER DISCONNECTED ?? @V200930 00314000 BO MSGSNDN YES - GO INFORM THE SENDER @V202420 00315000 * SO MESSAGE WILL BE SPOOLED TO RECEIVERS CONSOLE 00316000 SNDMSG DS 0H @V200930 00317000 LM R0,R1,SAVEWRK2 RESTORE MSG LENGTH AND ADDR @V407508 00317100 L R2,=A(HOLDSCR+NORET+PRIORITY+ALARM) WNG PARMS HRC101DK 00318490 TM SAVEWRK1,VMWNGON IS THIS A WARNING ? 00319000 BO MSGSNDW YES, INTERRUPT THE RECEIVER 00320000 L R2,=A(HOLDSCR+NORET+ALARM) MSG PARMS HRC101DK 00321290 SPACE , HRC101DK 00321580 MSGSNDW EQU * SEND THE USER MESSAGE/WARNING @V202420 00322000 TM SAVEWRK1+2,NHILIGHT WANTS NO MSG HILIGHTING! HRC101DK 00322160 BO MSGNHILI SKIP IT HRC101DK 00322170 O R2,=A(HILIGHT) ELSE, TURN IT ON HRC101DK 00322180 SPACE , HRC101DK 00322190 MSGNHILI EQU * HRC101DK 00322200 STM R0,R1,SAVEWRK2 SAVE LENGTH AND ADDR OF BUFFER @V60C2BE 00322300 TM SAVEWRK1,VMMTEXT MESSAGE TEXT ONLY? @V60C2BE 00322450 BZ NOTNOH NO - BRANCH @V60C2BE 00322600 LA R15,L'MSGHDR+1 LENGTH OF HEADER TO BE SKIPPED @V60C2BE 00322750 AR R1,R15 PAST HDR TEXT @V60C2BE 00322900 LA R15,L'MSGTRL(,R15) DECR LENGTH BY TRAILER HRC017DK 00323000 SR R0,R15 LESS LENGTH OF HDR TEXT @V60C2BE 00323050 LA R2,NORET NO ALARM OR HILIGHT FOR MSGNOH HRC017DK 00323150 NOTNOH EQU * @V60C2BE 00323200 SPACE 00323350 O R2,=A(NOTRESP+NOTIME) SET MSG PARMS HRC101DK 00323590 CALL DMKQCNWT SEND MSG HRC101DK 00323680 LM R0,R1,SAVEWRK2 RESTORE LENGTH & ADDR OF BUFFER @V60C2BE 00323800 BR R7 RETURN 00324000 SPACE 2 00325000 MSGSNDN EQU * SEND MSG= DMKMSG057W @V200820 00326000 MVC SAVEWRK4(8),VMUSER MOVE USERID FOR DMKERMSG @V200820 00328000 MVI SAVEWRK6,X'00' FIELD DELIMITER @V200820 00329000 LA R1,=CL14' DISCONNECTED' MAYBE HE'S DISCONNECTED@V200820 00330000 TM VMOSTAT,VMDISC ?? @V200820 00331000 BO MSGSNDE YES - GO FILL IN VARIABLE DATA @V200820 00332000 LA R1,=CL14' MSG OFF ' MAYBE HE DOESN'T WANT T@V200820 00333000 TM SAVEWRK1,VMMSGON ?? @V200820 00334000 BO MSGSNDE YES - GO FILL IN VARIABLE DATA @V200820 00335000 LA R1,=CL14' WNG OFF ' MUST BE WARNING OFF @V200820 00336000 MSGSNDE EQU * @V200820 00337000 LM R5,R6,SAVEWRK8 SAVE LENGTH OF USERID @VA09531 00337500 MVC SAVEWRK6+1(14),0(R1) MOVE IN MESSAGE TRAILER@V200820 00338000 L R1,SAVER11 GET CALLERS VMBLOK ADDRESS @V407508 00338100 LR R8,R11 REMEMBER CURRENT VMBLOK ADDRESS @V407508 00338200 SWTCHVM LOCK CALLERS VMBLOK @V407508 00338300 LA R1,VMUSER-VMBLOK(,R8) LOCK DISCO USER @VA09531 00338450 CALL DMKLOCK @VA09531 00338600 LA R1,SAVEWRK4 START OF VARIABLE DATA FIELDS @V200820 00339000 LA R0,23 MAXIMUM LENGTH @V60C2B8 00340000 ICM R0,B'1110',MODID+3 MODULE I.D. FOR DMKERM @V200820 00341000 L R2,=X'80E60039' RETURN HERE, MSG= DMKMSG057W@V200820 00342000 CALL DMKERMSG SEND THE MESSAGE 00347000 N R2,XRIGHT16 SAVE ERROR CODE ONLY 00348000 ST R2,SAVER2 RETURN CODE TO CALLER 00349000 LA R1,VMUSER-VMBLOK(,R8) UNLOCK DISCO USER @VA09531 00350110 CALL DMKLOCKD @VA09531 00350120 LR R1,R8 @VA09531 00350130 IC R5,SAVEWRK1 RESTORE MASK @VA09531 00350140 SWTCHVM LOCK THIS VMBLOK @V407508 00350200 TM VMOSTAT,VMDISC MSG DUE TO DISCONNECTED ? @V200820 00354000 BCR 8,R7 NO -- JUST RETURN @V200820 00355000 EX R5,MSGREC ALSO NOT RECEIVING ? @V200820 00356000 BCR 8,R7 YES - RETURN @V200820 00357000 CLI VMSPMFLG,VMSPMON USER RECEIVING SP MSG? @V60C2B8 00357300 BNER R7 NO - RETURN TO SP MSG CODE @V60C2B8 00357600 B SNDMSG SEND MESSAGE ANYWAY @V200930 00358000 EJECT 00359000 *. 00360000 * 00361000 * SUBROUTINE NAME - 00362000 * 00363000 * DMKMSGEC 00364000 * 00365000 * FUNCTION - 00366000 * 00367000 * TEST TERMINAL OPERATION BY RETRANSMITTING ENTERED LINES 00368000 * THE NUMBER OF TIMES SPECIFIED. 00369000 * 00370000 * COMMAND FORMAT - 00371000 * 00372000 * +--------+--------+ 00373000 * | ECHO | | 00374000 * +--------+--------+ 00375000 * 00376000 * OPERATION - 00377000 * 00378000 * 1. CALL DMKSCNFD TO LOCATE THE NN OPERAND. 00379000 * IF NONE FOUND, ASSUME A VALUE OF 1. 00380000 * IF MORE THAN 2 DIGITS LONG, ASSUME DEFAULT VALUE. 00381000 * 2. IF A VALUE IS ENTERED, CALL DMKCVTDB TO CONVERT THE NUMBER 00382000 * TO BINARY AND SAVE IT IN SAVEWRK1. 00383000 * 3. CALL DMKQCNWT TO OUTPUT MESSAGE -'ECHO ENTERED: TO 00384000 * TERMINATE TYPE END'. 00385000 * 4. CALL DMKQCNWT TO SEND MESSAGE- 'ENTER LINE' AND THEN 00386000 * CALL DMKQCNRD TO READ THE LINE. 00387000 * 5. WHEN READ IS COMPLETE, TEST FOR THE WORD 'END' IN THE 00388000 * BUFFER IF END HAS BEEN ENTERED, EXIT.IF NOT CALL DMKQCNWT 00389000 * TO SEND THE LINE BACK TO THE TERMINAL. CONTINUE DOING THIS 00390000 * THE NUMBER OF TIMES SPECIFIED OR UNTIL THE ATTN KEY IS HIT. 00391000 * 6. WHEN TRANSMITTING IS COMPLETE, GO BACK TO STEP 4. 00392000 * 00393000 * RESPONSES - 00394000 * ECHO ENTERED: TO TERMINATE TEST TYPE END 00395000 * ENTER LINE 00396000 * 00397000 * ERROR MESSAGES - 00398000 * NONE 00399000 * 00400000 *. 00401000 EJECT 00402000 DMKMSGEC RELOC ECHO COMMAND PROCESSOR 00403000 MVC SAVEWRK4(1),VMMLEVEL SAVE LINEDIT BYTE 00404000 NI VMMLEVEL,255-VMMLINED TURN OFF LINE EDIT BIT 00405000 CALL DMKSCNFD LOCATE NN IF ANY 00406000 BNZ NNDEFLT BRANCH IF NONE FOUND 00407000 C R0,F2 COMPARE WITH MAX NO OF CHARS @VA00860 00408000 BH NNDEFLT BRANCH IF EXCESSIVE LENGTH @VA00860 00409000 CALL DMKCVTDB CONVERT NUMBER TO BINARY 00410000 BNZ NNDEFLT USE DEFAULT VALUE IF BAD NUMBER TYPED IN 00411000 LTR R1,R1 WAS ZERO COUNT SPECIFIED ???? 00412000 BZ NNDEFLT DEFAULT TO ONE IS IT WAS 00413000 ST R1,SAVEWRK1 STORE COUNT IN SAVEWRK1 00414000 B SENDHDR GO SEND HEADER LINE 00415000 NNDEFLT L R1,F1 LOAD VALUE OF ONE 00416000 ST R1,SAVEWRK1 STORE IT 00417000 SENDHDR LA R0,17 LOAD LENGTH OF BUFFER 00418000 CALL DMKFREE GET THE BUFFER FROM FREE STORAGE 00419000 LR R8,R1 POINT GPR8 TO BUFFER 00420000 LA R0,41 LOAD MESSAGE LENGTH 00421000 LA R1,ECHOHEAD ADDRESS OF MESSAGE 00422000 L R2,=A(NOTRESP) INDICATE NON-COMMAND MSG @V60C2B8 00422600 CALL DMKQCNWT,PARM=NORET(,R2) SEND HEADER LINE @V60C2B8 00423200 ECHOPROM LA R0,10 LENGTH OF PROMPT 00424000 LA R1,PROMPTER ADDRESS OF PROMPT MESSAGE 00425000 L R2,=A(NOTRESP) INDICATE NON-COMMAND MSG @V60C2B8 00425600 CALL DMKQCNWT,PARM=NORET(,R2) SEND PROMPT @V60C2B8 00426200 LA R0,130 LOAD MAX LINE LENGTH ALLOWING FOR 2 *00427000 BYTE SLOP AREA 00428000 LR R1,R8 POINT TO BUFFER 00429000 CALL DMKQCNRD GO READ LINE WITH NO UPPER CASE OR EDIT 00430000 B *+4(R2) GPR 2 CONTAINS RETURN CODE 00431000 B CKEND RC = 0 00432000 B ECHOPROM RC = 4 --- ATTN --- 00433000 B ECHOPROM RC = 8 --- ATTN --- 00434000 B ECHOEXIT RC = 12 -- POWER OFF -- 00435000 SPACE 00436000 CKEND CL R0,F3 IF THREE CHARACTERS - MIGHT BE 'END' 00437000 BNE NOTEND BYPASS CHECK IF OTHER THAN THREE 00438000 MVC SAVEWRK2(3),0(R1) MOVE WORD TO SAVEWRK AREA 00439000 OC SAVEWRK2(3),BLANKS MAKE CHAR. UPPERCASE 00440000 CLC SAVEWRK2(3),=C'END' WAS END SPECIFIED ? 00441000 BE ECHOEXIT YES - GO EXIT 00442000 NOTEND EQU * 00443000 TM VMOSTAT,VMKILL TEST IF USER TO BE FORCED OFF? @VA11792 00443100 BO ECHOEXIT IF SO, EXIT @VA11792 00443200 L R4,SAVEWRK1 LOAD LINE COUNT 00444000 ECHOWRIT L R2,=A(NOTRESP) INDICATE NON-COMMAND MSG @V60C2B8 00444600 CALL DMKQCNWT ECHO LINE @V60C2B8 00445200 B *+4(R2) GPR 2 CONTAINS RETURN CODE 00446000 BCT R4,ECHOWRIT RC = 0 -- CONTINUE -- 00447000 B ECHOPROM RC = 4 -- ATTN OR LINE CNT = 0 -- 00448000 B ECHOPROM RC = 8 -- ATTN -- 00449000 SPACE 00450000 * IF RETURN CODE EQUAL 12 , EXIT 00451000 SPACE 00452000 ECHOEXIT LA R0,17 LENGTH OF BUFFER 00453000 LR R1,R8 BUFFER ADDRESS 00454000 CALL DMKFRET RETURN BUFFER TO FREE STORAGE 00455000 MVC VMMLEVEL(1),SAVEWRK4 RESTORE LINE EDIT BIT 00456000 B RETURN GO EXIT 00457000 SPACE 00458000 ECHOHEAD DC CL41'ECHO ENTERED ; TO TERMINATE TEST TYPE-END' 00459000 PROMPTER DC CL10'ENTER LINE' 00460000 EJECT 00461000 MSG003 LA R2,3 ERROR CODE 00462000 B CALLERM .... 00463000 SPACE 00464000 MSG020 LA R2,20 ERROR CODE 00465000 B NOVAR .... 00466000 SPACE 00467000 MSG045 LA R2,45 ERROR CODE 00468000 LM R0,R1,SAVEWRK8 RELOAD LENGTH AND ADDRESS OF BAD ARG. 00469000 B CALLERM .... 00470000 SPACE 00471000 MSG810 LA R2,810 ERROR CODE @V60C2B8 00471250 B NOVAR .... @V60C2B8 00471500 SPACE 00471750 NOVAR SLR R1,R1 ZERO PARM REG 00472000 CALLERM ICM R0,14,MODID+3 INSERT MODULE ID 00473000 CALL DMKERMSG SEND ERROR MESSAGE 00474000 * 00475000 * DMKERMSG WILL RETURN DIRECTLY TO DMKCFM -- NOT HERE 00476000 * 00477000 SPACE 3 00478000 MSGMVC MVC L'MSGHDR(0,R1),0(R2) MOVE MESSAGE TO OUTPUT BUFFER 00479000 SMSGMVC MVC VMCMLEN(0,R1),0(R3) SPM TO OUTPUT BUFFER @V60C2B8 00479500 MSGREC TM VMMLEVEL,X'00' IS USER RECEIVING MESSAGES OR WARNINGS 00480000 MSGCMPOP CLC 0(0,R1),=C'OPERATOR ' EXECUTED COMPARE 00481000 SPACE 2 00482000 HEXZERO EQU X'00' CLEAR OUT VMCF PARM LIST FIELDS @V60C2B8 00482200 MSGLIMIT DC H'10' EXCEEDED VMCF MESSAGE LIMIT @V60C2B8 00482400 NOTAUTH DC H'5' RECEIVER NOT VMCF AUTHORIZED @V60C2B8 00482600 SPACE 3 00482800 MSGHDR DS CL29 LENGTH OF MESSAGE HEADER HRC101DK 00483490 ORG MSGHDR 00484000 DC C'HH:MM:SS' MESSAGE TIME STAMP @V202420 00485000 DC X'1540' CR BLANK HRC101DK 00486490 MSGTYP DC CL19'MSG FROM : ' 00487000 MSGTRL DC X'40' BLANK HRC101DK 00488090 EJECT 00489000 LTORG 00490000 EJECT 00491000 COPY EQU 00492000 PSA 00493000 COPY CONBUF 00494000 COPY VMCBLOKS @V60C2B8 00494500 COPY SAVE 00495000 COPY VMBLOK 00496000 END DMKMSG @V200820 00497000