*COPY ACCTOFF 00001000 * R0020DMK - INITIALIZE FIELDS SO THAT USER ACCOUNTING CAN BE DONE AT 00002000 * QUEUE DROP TIME RATHER THAN EACH TIME THRU THE DISPATCHER. 00003000 * R0026DMK - PUT SUPPORT IN FOR PUNCHING ACCOUNTING CARDS UNDER A 00004000 * DIFFERENT USER ID. 00005000 **************************************************************** 00006000 * 00007000 * ENTRY POINT TO FILL IN A USER CARD 00008000 * 00009000 **************************************************************** 00010000 USERCARD DS 0H @V4M0203 00012100 L R15,=V(DMKTMRPT) GET VMVTIME CONVERT ROUTINE @V4M0203 00012600 BALR R14,R15 GET TOTAL PROBLEM TIME USED @V4M0203 00013100 * AND, FOR AP-SUPPORT, CAUSE VMTTIME 00013600 * IN THE VMBLOK TO BE BROUGHT UP 00014100 * TO DATE WITH THE SEPARATE CPU- AND 00014600 * APU-SPECIFIC VMTTIME REGISTERS IN 00015100 * THE MP-BLOK 00015600 SRDL R0,12 ROUND TO MICRO-SECONDS @V4M0203 00016100 D R0,=F'1000' CONVERT TO MILI-SECONDS @V4M0203 00016600 ST R1,ACNTVTIM PROBLEM TIME USED IN MILI-SECONDS@V4M0203 00017100 LR R3,R1 SAVE V-TIME @V4M0203 00017600 LM R0,R1,=X'7FFFFFFFFFFFF000' CALC. TOT. SUP. TIME @V4M0203 00018100 SL R1,VMTTIME+4 GET LOW ORDER VALUE OF SUPV. TIME@V4M0203 00018600 BC 8+2+1,*+8 BR. ON NO-CARRY @V4M0203 00019100 SL R0,F1 RE-ADJUST FOR CARRY @V4M0203 00019600 SL R0,VMTTIME GET HI ORDER VALUE OF SUPV. TIME @V4M0203 00020100 SRDL R0,12 ROUND TO MICRO-SECONDS @V4M0203 00020600 D R0,=F'1000' CONVERT TO MILI-SECONDS @V4M0203 00021100 ALR R3,R1 ADD V-TIME TO SUPERVISOR TIME FOR T-TIME 00025000 ST R3,ACNTTIME TOTAL (V+S) TIME IN MILLSECONDS 00026010 MVC ACNTPGRD(8),VMPGREAD SET UP THE NUMBER OF PAGE *00027000 READS AND WRITES 00028000 MVC ACNTIOCT(16),VMIOCNT SET UP THE NUMBER OF VIRTUAL *00029000 SIO'S AND SPOOL COUNT FOR THE PUNCH *00030000 PRINTER AND THE READER. 00031000 MVC ACNTCODE,=C'01' SET UP THE IDENTIFICATION CODE FOR *00032000 THE USER ACCOUNTING CARD 00033000 L R7,VMTIMEON GET THE USERS LOGON TIME (TOD CK WORD 0) 00034000 B SETUP GO SET UP THE REST OF THE CARD 00035000 SPACE 3 00036000 SPACE 00037000 EJECT 00038000 SPACE 3 00039000 **************************************************************** 00040000 * 00041000 * ENTRY POINT TO FILL IN A DEVICE CARD 00042000 * 00043000 ***************************************************************** 00044000 SPACE 00045000 USING RDEVBLOK,R1 00046000 DEVCARD L R1,VDEVREAL POINT TO THE REAL DEV 00047000 MVC ACNTDEVC(2),RDEVTYPC SET UP THE DEV CLASS AND TYPE 00048000 MVC ACNTDEVC+2(2),RDEVMDL SET UP MODEL AND FEATURE ALSO 00049000 L R7,RDEVTMAT SET UP THE TIME ATTACHED (TOD CK WORD 0) 00050000 DROP R1 00051000 LH R1,=C'02' SET UP THE ACCOUNT CODE FOR A DEDICATED *00052000 DEVICE CARD 00053000 TM VDEVTYPC,CLASDASD IS THIS A DASD DEVICE 00054000 BZ STCODE NO- BRANCH THIS IS A DEDICATED DEVICE 00055000 TM VDEVFLAG,VDEVTDSK IS THIS A T-DISK 00056000 BZ STCODE NO- BRANCH THIS IS A DEDICATED DASD DEV 00057000 L R7,VDEVTMAT SET UP THE TIME ATTACHED (TOD CK WORD 0) 00058000 MVC ACNTNCYL,VDEVBND SET UP THE NUM OF CYLINDERS OF *00059000 TDISK SPACE USED BY THIS USER 00060000 LH R1,=C'03' SET UP THE IDENTIFICTION CODE FOR THE *00062000 T-DISK ACCOUNTING CARD 00063000 STCODE STH R1,ACNTCODE SET UP THE ACCOUNTING CODE IN THE CARD 00064000 SPACE 3 00065000 ***************************************************************** 00066000 * 00067000 * SUBROUTINE TO FILL IN THE USERID, ACCOUNT NUMBER, 00068000 * STOP AND CONNECT TIMES. 00069000 * 00070000 ***************************************************************** 00071000 SPACE 3 00072000 SETUP EQU * 00073000 ICM R1,15,VMACOUNT GET THE ADDRESS OF ACCOUNTING 00074000 * BUFFER 00075000 BZ SETUP1 IF ZERO, GO MOVE USER ID. INTO BLOCK 00076000 USING ACCTBLOK,R1 SETUP ADDRESSABILITY FOR THE 00077000 * ACCOUNTING BLOCK 00078000 MVC ACNTUSER(16),ACCTUSER MOVE THE USER ID. AND ACCOUNT 00079000 * NUMBER INTO BUFFER 00080000 MVI ACNTCODE,X'C3' SET THE ACCOUNT CODE TO C_. 00081000 B SETUP2 GO SETUP DATE 00082000 DROP R1 DROP BASE REGISTER FOR ACCOUNTING BLOCK 00083000 SETUP1 EQU * 00084000 MVC ACNTUSER,VMUSER SET UP THE USER ID 00085000 MVC ACNTNUM,VMACNT THE ACCOUNT NUMBER ALSO 00086000 SETUP2 EQU * 00087000 MVC ACNTSTOP(2),DATE * SET UP THE DATE 00088000 MVC ACNTSTOP+2(2),DATE+3 * 00089000 MVC ACNTSTOP+4(2),DATE+6 * 00090000 LM R0,R1,DMKSYSCK GET TOD CLOCK VALUE IN R0 AND R1 00091000 SL R1,TODATE+4 * SUBTRACT CORRECT TIME AT MIDNIGHT 00092000 BC 11,*+8 * 00093000 SL R0,=F'1' * 00094000 SL R0,TODATE * 00095000 SRDL R0,12 GET NUMBER OF MICROSECONDS PAST MIDNIGHT 00096000 D R0,=F'1000000' GET NUMBER OF SECONDS PAST MIDNIGHT 00097000 SR R0,R0 IGNORE REMAINDER 00098000 D R0,=F'3600' GET NUMBER OF HOURS PAST MIDNIGHT 00099000 CVD R1,SAVEWRK2 * CONVERT NUMBER OF 00100000 UNPK ACNTSTOP+6(2),SAVEWRK2(8) * HOURS TO DECIMAL 00101000 OI ACNTSTOP+7,X'F0' * 00102000 LR R1,R0 GET REMAINDER FROM LAST DEVIDE 00103000 SR R0,R0 CLEAR 00104000 D R0,=F'60' GET NUMBER OF MINUTES PAST THIS HOUR 00105000 CVD R1,SAVEWRK2 * CONVERT NUMBER OF 00106000 UNPK ACNTSTOP+8(2),SAVEWRK2(8) * MINUTES TO DECIMAL 00107000 OI ACNTSTOP+9,X'F0' * 00108000 CVD R0,SAVEWRK2 ** CONVERT NUMBER OF 00109000 UNPK ACNTSTOP+10(2),SAVEWRK2(8) * SECONDS TO DEVIMAL 00110000 OI ACNTSTOP+11,X'F0' * 00111000 L R6,DMKSYSCK PICK UP THE FIRST WORD OF THE TOD CLOCK 00112000 SR R6,R7 SUB THE START TIME (FROM THE CALLER) 00113000 SR R7,R7 * COMPUTE THE NUMBER OF SEC OF 00114000 SRDL R6,12 * CONNECT TIME FOR THIS ACCOUNTING 00115000 D R6,=F'1000000' * CARD. 00116000 ST R7,ACNTCONT * 00117000 BR R5 RETURN TO THE CALLING ROUTINE 00118000 EJECT 00119000