User Tools

Site Tools


ibm:vm370-lib:copy:acctoff.copy_src

ACCTOFF Source

References

Source Listing

ACCTOFF.COPY.txt
  1. *COPY ACCTOFF 00001000
  2. * R0020DMK - INITIALIZE FIELDS SO THAT USER ACCOUNTING CAN BE DONE AT 00002000
  3. * QUEUE DROP TIME RATHER THAN EACH TIME THRU THE DISPATCHER. 00003000
  4. * R0026DMK - PUT SUPPORT IN FOR PUNCHING ACCOUNTING CARDS UNDER A 00004000
  5. * DIFFERENT USER ID. 00005000
  6. **************************************************************** 00006000
  7. * 00007000
  8. * ENTRY POINT TO FILL IN A USER CARD 00008000
  9. * 00009000
  10. **************************************************************** 00010000
  11. USERCARD DS 0H @V4M0203 00012100
  12. L R15,=V(DMKTMRPT) GET VMVTIME CONVERT ROUTINE @V4M0203 00012600
  13. BALR R14,R15 GET TOTAL PROBLEM TIME USED @V4M0203 00013100
  14. * AND, FOR AP-SUPPORT, CAUSE VMTTIME 00013600
  15. * IN THE VMBLOK TO BE BROUGHT UP 00014100
  16. * TO DATE WITH THE SEPARATE CPU- AND 00014600
  17. * APU-SPECIFIC VMTTIME REGISTERS IN 00015100
  18. * THE MP-BLOK 00015600
  19. SRDL R0,12 ROUND TO MICRO-SECONDS @V4M0203 00016100
  20. D R0,=F'1000' CONVERT TO MILI-SECONDS @V4M0203 00016600
  21. ST R1,ACNTVTIM PROBLEM TIME USED IN MILI-SECONDS@V4M0203 00017100
  22. LR R3,R1 SAVE V-TIME @V4M0203 00017600
  23. LM R0,R1,=X'7FFFFFFFFFFFF000' CALC. TOT. SUP. TIME @V4M0203 00018100
  24. SL R1,VMTTIME+4 GET LOW ORDER VALUE OF SUPV. TIME@V4M0203 00018600
  25. BC 8+2+1,*+8 BR. ON NO-CARRY @V4M0203 00019100
  26. SL R0,F1 RE-ADJUST FOR CARRY @V4M0203 00019600
  27. SL R0,VMTTIME GET HI ORDER VALUE OF SUPV. TIME @V4M0203 00020100
  28. SRDL R0,12 ROUND TO MICRO-SECONDS @V4M0203 00020600
  29. D R0,=F'1000' CONVERT TO MILI-SECONDS @V4M0203 00021100
  30. ALR R3,R1 ADD V-TIME TO SUPERVISOR TIME FOR T-TIME 00025000
  31. ST R3,ACNTTIME TOTAL (V+S) TIME IN MILLSECONDS 00026010
  32. MVC ACNTPGRD(8),VMPGREAD SET UP THE NUMBER OF PAGE *00027000
  33. READS AND WRITES 00028000
  34. MVC ACNTIOCT(16),VMIOCNT SET UP THE NUMBER OF VIRTUAL *00029000
  35. SIO'S AND SPOOL COUNT FOR THE PUNCH *00030000
  36. PRINTER AND THE READER. 00031000
  37. MVC ACNTCODE,=C'01' SET UP THE IDENTIFICATION CODE FOR *00032000
  38. THE USER ACCOUNTING CARD 00033000
  39. L R7,VMTIMEON GET THE USERS LOGON TIME (TOD CK WORD 0) 00034000
  40. B SETUP GO SET UP THE REST OF THE CARD 00035000
  41. SPACE 3 00036000
  42. SPACE 00037000
  43. EJECT 00038000
  44. SPACE 3 00039000
  45. **************************************************************** 00040000
  46. * 00041000
  47. * ENTRY POINT TO FILL IN A DEVICE CARD 00042000
  48. * 00043000
  49. ***************************************************************** 00044000
  50. SPACE 00045000
  51. USING RDEVBLOK,R1 00046000
  52. DEVCARD L R1,VDEVREAL POINT TO THE REAL DEV 00047000
  53. MVC ACNTDEVC(2),RDEVTYPC SET UP THE DEV CLASS AND TYPE 00048000
  54. MVC ACNTDEVC+2(2),RDEVMDL SET UP MODEL AND FEATURE ALSO 00049000
  55. L R7,RDEVTMAT SET UP THE TIME ATTACHED (TOD CK WORD 0) 00050000
  56. DROP R1 00051000
  57. LH R1,=C'02' SET UP THE ACCOUNT CODE FOR A DEDICATED *00052000
  58. DEVICE CARD 00053000
  59. TM VDEVTYPC,CLASDASD IS THIS A DASD DEVICE 00054000
  60. BZ STCODE NO- BRANCH THIS IS A DEDICATED DEVICE 00055000
  61. TM VDEVFLAG,VDEVTDSK IS THIS A T-DISK 00056000
  62. BZ STCODE NO- BRANCH THIS IS A DEDICATED DASD DEV 00057000
  63. L R7,VDEVTMAT SET UP THE TIME ATTACHED (TOD CK WORD 0) 00058000
  64. MVC ACNTNCYL,VDEVBND SET UP THE NUM OF CYLINDERS OF *00059000
  65. TDISK SPACE USED BY THIS USER 00060000
  66. LH R1,=C'03' SET UP THE IDENTIFICTION CODE FOR THE *00062000
  67. T-DISK ACCOUNTING CARD 00063000
  68. STCODE STH R1,ACNTCODE SET UP THE ACCOUNTING CODE IN THE CARD 00064000
  69. SPACE 3 00065000
  70. ***************************************************************** 00066000
  71. * 00067000
  72. * SUBROUTINE TO FILL IN THE USERID, ACCOUNT NUMBER, 00068000
  73. * STOP AND CONNECT TIMES. 00069000
  74. * 00070000
  75. ***************************************************************** 00071000
  76. SPACE 3 00072000
  77. SETUP EQU * 00073000
  78. ICM R1,15,VMACOUNT GET THE ADDRESS OF ACCOUNTING 00074000
  79. * BUFFER 00075000
  80. BZ SETUP1 IF ZERO, GO MOVE USER ID. INTO BLOCK 00076000
  81. USING ACCTBLOK,R1 SETUP ADDRESSABILITY FOR THE 00077000
  82. * ACCOUNTING BLOCK 00078000
  83. MVC ACNTUSER(16),ACCTUSER MOVE THE USER ID. AND ACCOUNT 00079000
  84. * NUMBER INTO BUFFER 00080000
  85. MVI ACNTCODE,X'C3' SET THE ACCOUNT CODE TO C_. 00081000
  86. B SETUP2 GO SETUP DATE 00082000
  87. DROP R1 DROP BASE REGISTER FOR ACCOUNTING BLOCK 00083000
  88. SETUP1 EQU * 00084000
  89. MVC ACNTUSER,VMUSER SET UP THE USER ID 00085000
  90. MVC ACNTNUM,VMACNT THE ACCOUNT NUMBER ALSO 00086000
  91. SETUP2 EQU * 00087000
  92. MVC ACNTSTOP(2),DATE * SET UP THE DATE 00088000
  93. MVC ACNTSTOP+2(2),DATE+3 * 00089000
  94. MVC ACNTSTOP+4(2),DATE+6 * 00090000
  95. LM R0,R1,DMKSYSCK GET TOD CLOCK VALUE IN R0 AND R1 00091000
  96. SL R1,TODATE+4 * SUBTRACT CORRECT TIME AT MIDNIGHT 00092000
  97. BC 11,*+8 * 00093000
  98. SL R0,=F'1' * 00094000
  99. SL R0,TODATE * 00095000
  100. SRDL R0,12 GET NUMBER OF MICROSECONDS PAST MIDNIGHT 00096000
  101. D R0,=F'1000000' GET NUMBER OF SECONDS PAST MIDNIGHT 00097000
  102. SR R0,R0 IGNORE REMAINDER 00098000
  103. D R0,=F'3600' GET NUMBER OF HOURS PAST MIDNIGHT 00099000
  104. CVD R1,SAVEWRK2 * CONVERT NUMBER OF 00100000
  105. UNPK ACNTSTOP+6(2),SAVEWRK2(8) * HOURS TO DECIMAL 00101000
  106. OI ACNTSTOP+7,X'F0' * 00102000
  107. LR R1,R0 GET REMAINDER FROM LAST DEVIDE 00103000
  108. SR R0,R0 CLEAR 00104000
  109. D R0,=F'60' GET NUMBER OF MINUTES PAST THIS HOUR 00105000
  110. CVD R1,SAVEWRK2 * CONVERT NUMBER OF 00106000
  111. UNPK ACNTSTOP+8(2),SAVEWRK2(8) * MINUTES TO DECIMAL 00107000
  112. OI ACNTSTOP+9,X'F0' * 00108000
  113. CVD R0,SAVEWRK2 ** CONVERT NUMBER OF 00109000
  114. UNPK ACNTSTOP+10(2),SAVEWRK2(8) * SECONDS TO DEVIMAL 00110000
  115. OI ACNTSTOP+11,X'F0' * 00111000
  116. L R6,DMKSYSCK PICK UP THE FIRST WORD OF THE TOD CLOCK 00112000
  117. SR R6,R7 SUB THE START TIME (FROM THE CALLER) 00113000
  118. SR R7,R7 * COMPUTE THE NUMBER OF SEC OF 00114000
  119. SRDL R6,12 * CONNECT TIME FOR THIS ACCOUNTING 00115000
  120. D R6,=F'1000000' * CARD. 00116000
  121. ST R7,ACNTCONT * 00117000
  122. BR R5 RETURN TO THE CALLING ROUTINE 00118000
  123. EJECT 00119000
ibm/vm370-lib/copy/acctoff.copy_src.txt ยท Last modified: 2023/08/06 13:36 by Site Administrator