Table of Contents

DMKCKS Source

References

Source Listing

DMKCKS.ASSEMBLE.txt
  1. CKS TITLE 'DMKCKS (CP) VM/370 - RELEASE 6' 00001000
  2. DMKCKS CSECT @V304235 00002000
  3. * 00003000
  4. * 00004000
  5. * MODULE NAME - 00005000
  6. * 00006000
  7. * DMKCKS 00007000
  8. * 00008000
  9. * CONTENTS - 00009000
  10. * 00010000
  11. * DMKCKSPL - CHECKPOINT A CHANGE IN SPOOL FILE STATUS 00011000
  12. * DMKCKSWM - RECOVER SPOOL FILE DATA AND ALLOCATION BLOCKS FROM 00012000
  13. * THE CHECKPOINT RECORDS PREVIOUSLY RECORDED 00013000
  14. * DMKCKSIN - INITIALIZE CHECKPOINT CYLINDER TO PRESENT STATUS 00014000
  15. * 00015000
  16. * DATA AREAS DEFINED AS ENTRY POINTS - 00016000
  17. * 00017000
  18. * DMKCKSMP - VIRTUAL ADDRESS IN SYSTEM VM SPACE OF MAP OF 00018000
  19. * CHECKPOINT CYLINDER 00019000
  20. * 00020000
  21. EJECT 00021000
  22. COPY OPTIONS @V304298 00022000
  23. EJECT 00023000
  24. ENTRY DMKCKSMP @V304298 00024000
  25. EXTRN DMKSYSCH,DMKSYSCN,DMKQCNSY @V304235 00025000
  26. EXTRN DMKPTRUL @V304298 00026000
  27. EXTRN DMKLOCKQ,DMKLOCKD @V304298 00027000
  28. EXTRN DMKPGTVR @V304298 00028000
  29. EXTRN DMKPGTTU @V304298 00029000
  30. EXTRN DMKSYSOW,DMKSYSOC @V304298 00030000
  31. EXTRN DMKPGTVG,DMKSCNRU @V304298 00031000
  32. EXTRN DMKRPAGT,DMKRPAPT @V304298 00032000
  33. EXTRN DMKSCNRD @V304298 00033000
  34. EXTRN DMKRSPID @V304298 00034000
  35. EXTRN DMKRSPHQ @V304298 00035000
  36. EXTRN DMKERMSG @V304298 00036000
  37. EXTRN DMKLOCKT,DMKCVTBD @VM03200 00037000
  38. EXTRN DMKQNTBL 3800 IMAGE LIBRARIES @V60B9BA 00037100
  39. SPACE 4 00038000
  40. USING PSA,R0 @V304298 00039000
  41. USING SFBLOK,R7 @V304298 00040000
  42. USING VMBLOK,R11 @V304298 00041000
  43. USING SAVEAREA,R13 @V304298 00042000
  44. EJECT 00043000
  45. * 00044000
  46. * SUBROUTINE NAME - 00045000
  47. * 00046000
  48. * DMKCKSPL 00047000
  49. * 00048000
  50. * FUNCTION - 00049000
  51. * 00050000
  52. * CHECKPOINT ANY ALTERATIONS IN THE SPOOL FILE SETUP SO THAT 00051000
  53. * THE RECOVERY ROUTINE CAN GET THEM IF WARM START FAILS. 00052000
  54. * 00053000
  55. * ATTRIBUTES - 00054000
  56. * 00055000
  57. * SERIALLY REUSABLE, PAGEABLE, CALLED VIA SVC 00056000
  58. * 00057000
  59. * ENTRY POINTS - 00058000
  60. * 00059000
  61. * DMKCKSPL 00060000
  62. * 00061000
  63. * ENTRY CONDITIONS - 00062000
  64. * 00063000
  65. * GPR1 = ADDRESS OF SHQBLOK IF CHGSHQ IS ON 00064000
  66. * GPR2 = PARM REGISTER SIGNIFYING THE OPTIONS DESIRED ON 00065000
  67. * THIS CHECKPOINT CALL. THEY ARE: 00066000
  68. * RDRCHN - THIS IS TO BE A READER SFBLOK 00067000
  69. * PCHCHN - THIS IS TO BE A PUNCH SFBLOK 00068000
  70. * PRTCHN - THIS IS TO BE A PRINT SFBLOK 00069000
  71. * ADDSFB - CREATE A NEW SFBLOK ON THE CHECKPOINT CYL 00070000
  72. * CHGSFB - CHANGE AN EXISTING SFBLOK'S STATUS 00071000
  73. * DELSFB - DELETE AN SFBLOK FROM THE CHECKPOINT CYL 00072000
  74. * OPNSFB - THIS IS AN OPEN CONSOLE FILE 00073000
  75. * ACTSFB - IT IS CURRENTLY BEING PRINTED OR PUNCHED 00074000
  76. * CHGRDV - CHANGE STATUS OF GIVEN RDEVBLOK 00075000
  77. * CHGSHQ - CHANGE STATUS OF GIVEN SHQBLOK 00076000
  78. * GPR7 = ADDRESS OF SFBLOK TO BE CHECKPOINTED 00077000
  79. * GPR8 = ADDR OF RDEVBLOK IF ACTSFB OR CHGRDV IS ON 00078000
  80. * GPR12 = BASE ADDRESS OF DMKCKSPL 00079000
  81. * GPR13 = ADDRESS OF STANDARD SAVEAREA 00080000
  82. * 00081000
  83. * EXIT CONDITIONS - 00082000
  84. * 00083000
  85. * IF EVERYTHING SUCCEEDS, THEN RETURN IS MADE TO THE CALLER 00084000
  86. * WITH CONDITION CODE 0 AND REGISTER 15 EQUAL TO 0. 00085000
  87. * OTHERWISE, CHECKPOINTING IS STOPPED, THE CHECKPOINT 00086000
  88. * CYLINDER INVALIDATED AND RETURN IS MADE TO THE CALLER 00087000
  89. * AS IN THE NO ERROR SITUATION. 00088000
  90. * 00089000
  91. * CALLS TO OTHER ROUTINES - 00090000
  92. * DMKLOCKQ - LOCK THE DMKCKSPL ROUTINE OR WAIT IF 00091000
  93. * ALREADY LOCKED 00092000
  94. * DMKSCNRU - FIND REAL DEVICE BLOCK OF IPL DEVICE 00093000
  95. * DMKPTRAN - GET THE MAP IN CORE 00094000
  96. * DMKPTRUL - UNLOCK THE MAP PAGE 00095000
  97. * DMKLOCKD - UNLOCK THE DMKCKSPL ROUTINE 00096000
  98. * DMKPGTVG - GET VIRTUAL ADDRESS FOR SLOT BUFFER 00097000
  99. * DMKRPAGT - READ INTO CORE A SLOT PAGE 00098000
  100. * DMKRPAPT - WRITE A SLOT PAGE TO DASD 00099000
  101. * DMKPGTVR - RELEASE THE VIRTUAL PAGE FOR THE SLOT BUFFER 00100000
  102. * 00101000
  103. * 00102000
  104. * EXTERNAL REFERENCES - 00103000
  105. * 00104000
  106. * SYSIPLDV - ADDRESS OF SYSTEM IPL DEVICE 00105000
  107. * DMKRSPID - CURRENT SPOOL FILE ID NUMBER 00106000
  108. * DMKRSPHQ - ADDRESS OF SHQBLOK CHAIN 00107000
  109. * 00108000
  110. * TABLES WORKAREAS - 00109000
  111. * 00110000
  112. * NONE 00111000
  113. * 00112000
  114. * REGISTER USAGE - 00113000
  115. * 00114000
  116. * GPR0 = DASD ADDRESS OF PAGE (CCPD FORM) 00115000
  117. * GPR1 = VIRT ADDRESS OF PAGE BUFFER 00116000
  118. * GPR2 = READ ADDRESS OF PAGE BUFFER (ALSO FILE ID) 00117000
  119. * GPR3 = PAGE NUMBER OF SLOT FROM FINDSLOT 00118000
  120. * GPR4 = DISP WITHIN PAGE OF SLOT FROM FINDSLOT 00119000
  121. * GPR5 = POINTER TO MAP ENTRY FOR SLOT FROM FINDSLOT 00120000
  122. * GPR6 = INTERNAL BAL REGISTER 00121000
  123. * GPR7 = ADDRESS OF SFBLOK 00122000
  124. * GPR8 = ADDR OF RDEVBLOK 00123000
  125. * GPR9 = 00124000
  126. * GPR10 = 00125000
  127. * GPR11 = ADDRESS OF VMBLOK 00126000
  128. * GPR12 = DMKCKS MODULE BASE 00127000
  129. * GPR13 = ADDRESS OF STANDARD SAVE AREA 00128000
  130. * GPR14 = BALR RETURN ADDRESS 00129000
  131. * GPR15 = BALR BRANCH ADDRESS 00130000
  132. * 00131000
  133. * OPERATION - 00132000
  134. * 00133000
  135. * 1. IF CHECKPOINTING HAS TERMINATED RETURN TO CALLER. 00134000
  136. * 00135000
  137. * 2. FIND THE CCPD OF THE CHECKPOINT CYLINDERS AND THEN LOCK 00136000
  138. * THE MAP OF THE CYLINDERS IN REAL CORE VIA TRANS. 00137000
  139. * 00138000
  140. * 2A. IF THE CHGSHQ FUNCTION IS SPECIFIED, THEN 00139000
  141. * LOOK FOR SHQBLOK SLOTS (X'AAAA' IN MAP) AND TRY TO 00140000
  142. * FIND THE ONE WITH THE GIVEN USERID. IF FOUND, 00141000
  143. * CHANGE IT TO THE GIVEN ONE OR DELETE IT IF 00142000
  144. * DELSFB IS SET. IF THE GIVEN SHQBLOK IS NOT FOUND, 00143000
  145. * THEN GET AN EMPTY SLOT AND MOVE A NEW SHQBLOK INTO IT. 00144000
  146. * IF THE DELSFB FUNCTION IS SPECIFIED AND THE SLOT 00145000
  147. * IS NOT FOUND, IGNORE THE REQUEST. 00146000
  148. * THEN GO TO STEP 6. 00147000
  149. * 00148000
  150. * 3. IF THE DELETE FUNCTION IS SPECIFIED, THEN FIND THE SLOT 00149000
  151. * FROM THE MAP. IF NOT FOUND, THEN GO TO STEP 6. IF 00150000
  152. * FOUND, PUT X'FFFF' INTO THE MAP ENTRY AND X'FFFFFFFF' 00151000
  153. * INTO THE SLOT ITSELF. THEN WRITE THE SLOT PAGE 00152000
  154. * TO DASD AND GO TO STEP 6. 00153000
  155. * 00154000
  156. * 4. IF THE CHANGE FUNCTION IS SPECIFIED, THEN FIND THE SLOT 00155000
  157. * FROM THE MAP. IF NOT FOUND, THEN ABEND. IF 00156000
  158. * FOUND THEN GET THE SLOT PAGE INTO REAL CORE 00157000
  159. * AND UPDATE THE SFBLOK TO ITS NEW VALUES 00158000
  160. * AND WRITE THE SLOT PAGE TO DASD AND GO TO STEP 6. 00159000
  161. * 00160000
  162. * 5. IF IT IS THE ADD FUNCTION,THEN 00161000
  163. * FIND AN EMPTY SLOT FROM THE MAP, 00162000
  164. * READ THE SLOT PAGE INTO REAL CORE, FILL THE SLOT WITH 00163000
  165. * THE NEW SFBLOK, WRITE THE SLOT PAGE TO DASD AND 00164000
  166. * GO TO STEP 6. 00165000
  167. * 00166000
  168. * 5A. IF IT IS THE CHGRDV FUNCTION, THEN FIND THE ENTRY FOR 00167000
  169. * THAT DEVICE, OR IF THERE IS NONE, CREATE ONE, 00168000
  170. * AND UPDATE THE RDEVSTAT,RDEVFLAG, AND 00169000
  171. * RDEVCLAS FIELDS FOR THAT DEVICE. 00170000
  172. * IF IT IS A 3800 PRINTER, THEN ALSO CHECKPOINT 00170100
  173. * THE CURRENT IMAGE LIBRARY, CURRENT TRANSLATE 00170200
  174. * TABLE TO USE FOR THE SEPARATOR PAGE AND CURRENT 00170300
  175. * FCB TO USE FOR THE SEPARATOR PAGE. 00170400
  176. * THEN GO TO STEP 6. 00171000
  177. * 00172000
  178. * 6. UNLOCK THE MAP PAGE VIA DMKPTRUL. 00173000
  179. * 00174000
  180. * 7. UNLOCK THIS ROUTINE SO OTHERS CAN USE IT 00175000
  181. * 00176000
  182. * 8. SET G15 TO 0 AND COND CODE TO 0 AND RETURN TO CALLER 00177000
  183. * 00178000
  184. * 00179000
  185. EJECT 00180000
  186. DC CL8'DMKCKS' @V304298 00181000
  187. DMKCKSPL RELOC @V304298 00182000
  188. CLI DMKCKSSW,CKPTSTOP ARE WE CHECKPOINTING @V304235 00183000
  189. BE EXIT0 EXIT IF NOT @V304298 00184000
  190. LA R1,CKSLOCK LOCK THE ROUTINE @V304298 00185000
  191. CALL DMKLOCKQ OR WAIT UNTIL UNLOCKED @V304298 00186000
  192. CLI DMKCKSSW,CKPTSTOP ARE WE STILL CHECKPOINTING @V304235 00187000
  193. BE EXITA EXIT IF NOT @V304298 00188000
  194. XC SAVEWRK1,SAVEWRK1 CLEAR WORK AREAS @V304298 00189000
  195. XC SAVEWRK2(32),SAVEWRK2 SAME AS ABOVE @V304298 00190000
  196. ICM R1,B'1111',DMKCKSMP DO WE HAVE A MAP ? @V304298 00191000
  197. BZ CKSABN1 ABEND IF NOT @V304298 00192000
  198. MVC CODSLOT(1),CKPTDVCD GET DEVICE CODE @VM02131 00193000
  199. BAL R6,CKSINITM GET CHECKPOINT MAP ..... @VM02131 00194000
  200. TM PARM1,CHGSHQ/256 IS IT A SHQBLOK CHANGE ? @V304235 00195000
  201. BZ CKSPL1 XFER IF NOT @V304298 00196000
  202. L R3,RADDMAP START AT BEGINNING OF MAP @V304298 00197000
  203. LOOPSHQ LH R2,MAPSHQ CODE FOR SHQBLOK @V304235 00198000
  204. DROP R7 @V304298 00199000
  205. USING SHQBLOK,R7 @V304298 00200000
  206. L R7,SAVER1 POINT TO SHQBLOK @V304298 00201000
  207. BAL R6,FINDSLOT FIND A SHQBLOK @V304298 00202000
  208. BZ SPLSHQ1 XFER IF FOUND @V304298 00203000
  209. TM PARM2,DELSFB WAS IF DELETE ? @V304235 00204000
  210. BO CKSEXIT EXIT IF SO @V304298 00205000
  211. B SPLSHQ3 FIND AN EMPTY SLOT @V304298 00206000
  212. SPLSHQ1 STC R3,PAGSLOT GET PAGE FOR THE SLOT @V304298 00207000
  213. STCM R3,B'1100',CYLSLOT GET CYLINDER FOR SLOT @V304298 00208000
  214. BAL R6,GETSLOT READ IT INTO CORE @V304298 00209000
  215. AL R4,RADDSLOT POINT TO SLOT @V304298 00210000
  216. CLC SHQUSER,SHQUSER-SHQBLOK(R4) DO THEY MATCH? @V304298 00211000
  217. BE SPLSHQ2 XFER IF SO @V304298 00212000
  218. BAL R6,PUTSLOT NEEDED FOR NORMAL SEQUENCE @V304298 00213000
  219. LA R3,2(,R5) START AT NEXT SLOT @V304298 00214000
  220. B LOOPSHQ AND TRY AGAIN @V304298 00215000
  221. SPLSHQ2 TM PARM2,DELSFB IS IT A DELETE FUNCTION ? @V304235 00216000
  222. BO CKSPLA XFER IF SO @V304298 00217000
  223. MVC 4(SHQBSIZE*8-4,R4),SHQBLOK+4 MOVE IN THE NEW ONE@V304298 00218000
  224. BAL R6,PUTSLOT WRITE IT OUT @V304298 00219000
  225. B CKSEXIT AND EXIT @V304298 00220000
  226. SPLSHQ3 LH R2,MAPFREE FIND AN EMPTY SLOT @V304235 00221000
  227. BAL R6,FINDSLOT GO TO IT @V304298 00222000
  228. BNZ MSG400I ERROR - IF CKPT AREA IS FULL @VM03037 00223000
  229. STC R3,PAGSLOT SAVE ITS PAGE LOCATION @V304298 00224000
  230. STCM R3,B'1100',CYLSLOT GET CYLINDER FOR SLOT @V304298 00225000
  231. BAL R6,GETSLOT READ IT INTO CORE @V304298 00226000
  232. AL R4,RADDSLOT POINT TO IT @V304298 00227000
  233. MVC 0(L'SLOTSHQ,R4),SLOTSHQ CODE FOR SHQBLOK @V304235 00228000
  234. MVC 4(SHQBSIZE*8-4,R4),SHQBLOK+4 MOVE IT IN @V304298 00229000
  235. BAL R6,PUTSLOT WRITE IT OUT @V304298 00230000
  236. MVC 0(L'MAPSHQ,R5),MAPSHQ SET UP THE MAP ENTRY @V304235 00231000
  237. B CKSEXIT AND EXIT @V304298 00232000
  238. DROP R7 @V304298 00233000
  239. USING SFBLOK,R7 @V304298 00234000
  240. SPACE 00235000
  241. CKSPL1 DS 0H @V304298 00236000
  242. TM PARM2,DELSFB IS IT THE DELETE FUNCTION ? @V304235 00237000
  243. BZ CKSPL2 XFER IF NOT @V304298 00238000
  244. LH R2,SFBFILID GET SPOOL FILE ID @V304298 00239000
  245. BAL R6,FINDSLOT FIND THE SLOT FOR THIS SFBLOK @V304298 00240000
  246. BNZ CKSEXIT FORGET IT IF NOT FOUND @V304298 00241000
  247. STC R3,PAGSLOT SAVE THE PAGE NUMBER OF SLOT @V304298 00242000
  248. STCM R3,B'1100',CYLSLOT GET CYLINDER FOR SLOT @V304298 00243000
  249. BAL R6,GETSLOT BRING IT INTO CORE @V304298 00244000
  250. AL R4,RADDSLOT POINT TO THE SLOT @V304298 00245000
  251. CLC SFBFILID,SFBFILID-SFBLOK(R4) DO THEY MATCH ? @V304298 00246000
  252. BNE CKSABN2 ABEND IF NOT @V304235 00247000
  253. CKSPLA MVC 0(L'SLOTFREE,R4),SLOTFREE INVALIDATE THE SLOT@V304235 00248000
  254. BAL R6,PUTSLOT WRITE AND RELEASE SLOT PAGE @V304298 00249000
  255. MVC 0(L'MAPFREE,R5),MAPFREE MARK THE MAP AS EMPTY @V304235 00250000
  256. L R15,=A(DMKSYSCN) @V304235 00251000
  257. LH R2,0(R15) GET CURRENT MAP COUNT @V304235 00252000
  258. BCTR R2,0 DECREMENT IT ............. @V304235 00253000
  259. STH R2,0(R15) AND SAVE NEW VALUE @V304235 00254000
  260. TM DMKCKSSW,MSG90ISU 90% MSG ISSUED YET ?? @V304235 00255000
  261. BZ CKSEXIT IF NOT, NO NEED TO CHECK ON IT @V304235 00256000
  262. CH R2,SLOT90R REACHED RESET VALUE YET ?? @V304235 00257000
  263. BH CKSEXIT NO, NOTHING TO DO IN THAT CASE @V304235 00258000
  264. NI DMKCKSSW,255-MSG90ISU ELSE RESET IT @V304235 00259000
  265. B CKSEXIT RETURN TO CALLER @V304298 00260000
  266. SPACE 2 00261000
  267. CKSPL2 TM PARM2,CHGSFB REQUESTING A CHANGE FUNCTION ? @V304235 00262000
  268. BZ CKSPL4 XFER IF NOT @V304298 00263000
  269. LH R2,SFBFILID GET THE SPOOL FILE ID @V304298 00264000
  270. BAL R6,FINDSLOT FIND SLOT FOR THIS SFBLOK @V304298 00265000
  271. BNZ CKSPL4B ASSUME ADD FUNCTION IF NOT FOUND @V304235 00266000
  272. STC R3,PAGSLOT SAVE PAGE NUMBER OF SLOT @V304298 00267000
  273. STCM R3,B'1100',CYLSLOT GET CYLINDER FOR SLOT @V304298 00268000
  274. BAL R6,GETSLOT BRING SLOT INTO CORE @V304298 00269000
  275. AL R4,RADDSLOT POINT TO THE SLOT @V304298 00270000
  276. CLC SFBFILID,SFBFILID-SFBLOK(R4) DO THEY MATCH ? @V304298 00271000
  277. BNE CKSABN2 ABEND IF NOT @V304235 00272000
  278. TM PARM2,RDRCHN+PRTCHN+PCHCHN HAS TYPE CHANGED ? @V304235 00273000
  279. BZ CKSPL2A XFER IF NOT @V304298 00274000
  280. MVC 0(1,R4),PARM2 MOVE IN THE TYPE @V304235 00275000
  281. B CKSPL3 CONTINUE @V304298 00276000
  282. CKSPL2A NI 0(R4),RDRCHN+PRTCHN+PCHCHN ISOLATE THE TYPE @V304298 00277000
  283. OC 0(1,R4),PARM2 SAVE THE FILE STATUS @V304235 00278000
  284. CKSPL3 MVC 4(SFBSIZE*8-4,R4),SFBLOK+4 MOVE IN THE SFBLOK @V304298 00279000
  285. TM 0(R4),ACTSFB IS IT ACTIVE ON A REAL DEVICE ? @V304298 00280000
  286. BZ CKSPL3A XFER IF NOT @V304298 00281000
  287. USING RDEVBLOK,R8 @V304298 00282000
  288. L R8,SAVER8 RESTORE CALLER'S RDEVBLOK @V304298 00283000
  289. CALL DMKSCNRD GET ADDR OF DEVICE (CCU) @V304298 00284000
  290. STH R1,2(,R4) SAVE IT IN SLOT @V304298 00285000
  291. MVC SFBRECS-SFBLOK(4,R4),RDEVCLAS MOVE IN THE CLASS @V304298 00286000
  292. DROP R8 @V304298 00287000
  293. CKSPL3A DS 0H @V304298 00288000
  294. BAL R6,PUTSLOT WRITE AND RELEASE SLOT PAGE @V304298 00289000
  295. B CKSEXIT RETURN TO CALLER @V304298 00290000
  296. SPACE 2 00291000
  297. CKSPL4 TM PARM2,ADDSFB IS IT AN ADD FUNCTION @V304235 00292000
  298. BZ CKSPL5 XFER IF NOT @V304298 00293000
  299. CKSPL4A DS 0H @V304298 00294000
  300. LH R2,SFBFILID GET THE SPOOL FILE ID @V304298 00295000
  301. BAL R6,FINDSLOT ALREADY EXIST ? @V304298 00296000
  302. BNZ CKSPL4B XFER IF NOT FOUND(NORMAL) @V304298 00297000
  303. L R15,=A(DMKRSPID) GET CURRENT FILE ID @V304298 00298000
  304. LH R6,0(R15) LOAD IT @V304298 00299000
  305. STH R6,SFBFILID CHANGE THE ID OF THE CURRENT @V304298 00300000
  306. * SFBLOK 00301000
  307. LA R6,1(,R6) INCREMENT IT @V304298 00302000
  308. C R6,MAXFILE GREATER THAN PERMISSABLE MAX ?? @V304235 00303000
  309. BNH CKSPL4AA IF NOT, CONTINUE @V304235 00304000
  310. LA R6,1 ELSE, RESET ID NUMBER TO 1 @V304235 00305000
  311. CKSPL4AA STH R6,0(R15) AND SAVE IT FOR THE NEXT GUY @V304235 00306000
  312. B CKSPL4A TRY AGAIN @V304298 00307000
  313. CKSPL4B DS 0H @V304298 00308000
  314. LH R2,MAPFREE FIND AN EMPTY MAP SLOT @V304235 00309000
  315. BAL R6,FINDSLOT ... @V304298 00310000
  316. BNZ MSG400I ERROR IF EMPTY SLOT NOT FOUND @VM03037 00311000
  317. STC R3,PAGSLOT SAVE PAGE NUMBER OF SLOT @V304298 00312000
  318. STCM R3,B'1100',CYLSLOT GET CYLINDER FOR SLOT @V304298 00313000
  319. BAL R6,GETSLOT BRING IT INTO CORE @V304298 00314000
  320. AL R4,RADDSLOT POINT TO THE SLOT @V304298 00315000
  321. MVC 0(1,R4),PARM2 SAVE THE TYPE @V304235 00316000
  322. MVC 4(SFBSIZE*8-4,R4),SFBLOK+4 MOVE IN THE SFBLOK @V304298 00317000
  323. BAL R6,PUTSLOT WRITE AND RELEASE SLOT PAGE @V304298 00318000
  324. MVC 0(2,R5),SFBFILID MOVE SPOOL ID INTO MAP @V304298 00319000
  325. B CKSEXIT RETURN TO CALLER @V304298 00320000
  326. SPACE 2 00321000
  327. CKSPL5 TM PARM1,CHGRDV/256 IS IT REAL DEVICE CHANGE ? @V304235 00322000
  328. BZ CKSABN3 ABEND IF NOT @V304235 00323000
  329. USING RDEVBLOK,R8 @V304298 00324000
  330. L R8,SAVER8 CALLER'S RDEVBLOK @V304298 00325000
  331. CALL DMKSCNRD GET DEVICE ADDRESS (CCU) @V304298 00326000
  332. LA R2,X'E00' GET MAP CODE FOR RDV ENTRY @V304298 00327000
  333. SLL R2,4 GET IT IN POSITION @V304298 00328000
  334. OR R2,R1 MOVE IN CCU @V304298 00329000
  335. BAL R6,FINDSLOT FIND ITS SLOT @V304298 00330000
  336. BZ CKSPL6 XFER IF FOUND @V304298 00331000
  337. LR R9,R2 SAVE R2 @V304298 00332000
  338. LH R2,MAPFREE GET AN EMPTY MAP SLOT @V304235 00333000
  339. BAL R6,FINDSLOT GO TO IT @V304298 00334000
  340. BNZ MSG400I ERROR IF EMPTY SLOT NOT FOUND @VM03037 00335000
  341. LR R2,R9 RESTORE R2 @V304298 00336000
  342. STH R2,0(,R5) PUT IN MAP ENTRY @V304298 00337000
  343. CKSPL6 STC R3,PAGSLOT SAVE PAGE NUMBER OF SLOT @V304298 00338000
  344. STCM R3,B'1100',CYLSLOT GET CYLINDER FOR SLOT @V304298 00339000
  345. LR R9,R1 SAVE DEVICE ADDRESS @V304298 00340000
  346. BAL R6,GETSLOT BRING IT IN @V304298 00341000
  347. AL R4,RADDSLOT POINT TO THE SLOT @V304298 00342000
  348. MVC 0(L'SLOTDEV,R4),SLOTDEV CODE FOR REAL DEVICE @V304235 00343000
  349. STH R9,4(,R4) DEVICE ADDRESS @V304298 00344000
  350. MVC 6(2,R4),RDEVSTAT SAVE RDEVSTAT & RDEVFLAG @V304298 00345000
  351. MVC 8(4,R4),RDEVCLAS MOVE IN THE CLASS(ES) @V304298 00346000
  352. CLI RDEVTYPE,TYP3800 IS IT A 3800 PRINTER ? @V60B9BA 00346500
  353. BNE CKSPL6A XFER IF NOT @V60B9BA 00346600
  354. MVC 12(8,R4),RDEVIMAG CKPT THE IMAGE LIBRARY @V60B9BA 00346700
  355. MVC 20(4,R4),RDEVXSEP CKPT THE CHAR ARR TBL FOR SEP @V60B9BA 00346800
  356. MVC 24(1,R4),RDEVFSEP CKPT THE FCB FOR SEP PAGE @V60B9BA 00346900
  357. CKSPL6A BAL R6,PUTSLOT WRITE & RELEASE SLOT PAGE @V60B9BA 00347000
  358. B CKSEXIT RETURN TO CALLER @V304298 00348000
  359. SPACE 2 00349000
  360. CKSEXIT L R2,RADDMAP GET REAL ADDRESS OF MAP @VA09218 00350500
  361. CALL DMKPTRUL UNLOCK THE MAP PAGE @V304298 00351000
  362. EXITA LA R1,CKSLOCK UNLOCK THE ROUTINE @V304298 00352000
  363. CALL DMKLOCKD ... @V304298 00353000
  364. EXIT0 SR R15,R15 GET R15=0 @V304298 00354000
  365. LTR R15,R15 GET CC=0 @V304298 00355000
  366. EXIT , RETURN @V304298 00356000
  367. EJECT 00357000
  368. CKSABN1 ABEND 1 MAP NOT ALLOCATED @V304298 00358000
  369. CKSABN2 ABEND 2 SLOT AND MAP DO NOT MATCH @V304235 00359000
  370. CKSABN3 ABEND 3 NO FUNCTION SPECIFIED @V304235 00360000
  371. EJECT 00361000
  372. * 00362000
  373. * SUBROUTINE NAME - 00363000
  374. * 00364000
  375. * DMKCKSIN 00365000
  376. * 00366000
  377. * FUNCTION - 00367000
  378. * 00368000
  379. * INITIALIZE THE CHECKPOINT AFTER A SUCCESSFUL WARM START 00369000
  380. * FROM THE STANDARD RECOVERY PROCEDURE OR 00370000
  381. * AFTER A COLD START. 00371000
  382. * 00372000
  383. * ATTRIBUTES - 00373000
  384. * 00374000
  385. * SERIALLY REUSABLE, PAGEABLE, CALLED VIA SVC FROM DMKCPI 00375000
  386. * 00376000
  387. * ENTRY POINTS - 00377000
  388. * 00378000
  389. * DMKCKSIN 00379000
  390. * 00380000
  391. * ENTRY CONDITIONS - 00381000
  392. * 00382000
  393. * NONE 00383000
  394. * 00384000
  395. * EXIT CONDITIONS - 00385000
  396. * 00386000
  397. * THE CHECKPOINT CYLINDER HAS BEEN INITIALIZED. 00387000
  398. * 00388000
  399. * CALLS TO OTHER ROUTINES 00389000
  400. * 00390000
  401. * DMKPGTVG - GET A VIRTUAL PAGE FOR THE MAP OR SLOT PAGE 00391000
  402. * DMKSCNRU - FIND DEVICE BLOCK FOR IPL DEVICE 00392000
  403. * DMKPTRAN - GET VIRTUAL PAGES INTO REAL CORE 00393000
  404. * DMKPTRUL - UNLOCK THE REAL PAGE FOR THE MAP 00394000
  405. * 00395000
  406. * EXTERNAL REFERENCES - 00396000
  407. * 00397000
  408. * SYSIPLDV - ADDRESS OF SYSTEM IPL DEVICE 00398000
  409. * DMKRSPPR - ANCHOR FOR PRINTER FILE CHAIN 00399000
  410. * DMKRSPPU - ANCHOR FOR PUNCH FILE CHAIN 00400000
  411. * DMKRSPRD - ANCHOR FOR READER FILE CHAIN 00401000
  412. * 00402000
  413. * TABLES AND WORKAREAS - 00403000
  414. * 00404000
  415. * ANCHRTBL - TABLE OF SPOOL FILE CHAIN ANCHORS 00405000
  416. * 00406000
  417. * REGISTER USAGE - 00407000
  418. * 00408000
  419. * GPR0 = DASD ADDRESS OF PAGE IN CCPD FORM 00409000
  420. * GPR1 = VIRTUAL ADDRESS OF PAGE BUFFER 00410000
  421. * GPR2 = REAL ADDRESS OF PAGE BUFFER 00411000
  422. * GPR3 = POINTER TO SLOT ON CHECKPOINT CYLINDER 00412000
  423. * GPR4 = INCREMENT FOR LOOPING THRU SLOTS 00413000
  424. * GPR5 = COMPARAND 00414000
  425. * GPR6 = INTERNAL BAL REGISTER 00415000
  426. * GPR7 = POINTER TO SFBLOK 00416000
  427. * GPR8 = POINTER TO LIST OF SPOOL FILE CHAIN ANCHORS 00417000
  428. * GPR9 = POINTER TO MAP ENTRY 00418000
  429. * GPR10 = PAGE NUMBER BEING UPDATED 00419000
  430. * GPR11 = ADDRESS OF VMBLOK 00420000
  431. * GPR12 = DMKCKS MODULE BASE 00421000
  432. * GPR13 = ADDRESS OF STANDARD SAVE AREA 00422000
  433. * GPR14 = BALR RETURN REGISTER 00423000
  434. * GPR15 = BALR BRANCH REGISTER 00424000
  435. * 00425000
  436. * OPERATION - 00426000
  437. * 00427000
  438. * 1. IF A MAP PAGE HAS BEEN ALLOCATED, THEN JUST EXIT SINCE 00428000
  439. * DMKCKSWM HAS DONE THE INITIALIZATION PREVIOUSLY. 00429000
  440. * IF NOT, THEN ALLOCATE ONE, LOCK IT IN REAL CORE, 00430000
  441. * AND LOCATE THE CHECKPOINT CYLINDERS. 00431000
  442. * 00432000
  443. * 2. LOOP THROUGH EACH SLOT ON THE CHECKPOINT CYLINDERS 00433000
  444. * AND FILL IN AN SFBLOK IF THERE ARE STILL SOME REMAINING, 00434000
  445. * AND INVALIDATE THE REST. WHILE DOING THIS, FILL THE 00435000
  446. * MAP ENTRIES WITH THE SPOOL FILE ID. WHEN FINISHED, 00436000
  447. * INSERT A DELIMITER AFTER THE LAST VALID SFBLOK ENTRY. 00437000
  448. * 00438000
  449. * 3. UNLOCK THE MAP PAGE AND RETURN TO CALLER. 00439000
  450. * 00440000
  451. EJECT 00441000
  452. DMKCKSIN RELOC @V304298 00442000
  453. ICM R1,B'1111',DMKCKSMP DO WE HAVE A MAP YET ? @V304298 00443000
  454. BNZ EXIT0 EXIT, DMKCKSWM HAS DONE IT ALL @V304298 00444000
  455. LA R1,CKSLOCK LOCK ROUTINE @VM02131 00445000
  456. CALL DMKLOCKQ (AS A FLAG IN CASE OF ERRORS) @VM02131 00446000
  457. BAL R6,CKSINIT SET UP PROGRAM CONSTANTS @V304235 00447000
  458. LR R9,R2 SAVE SLOT MAP ADDRESS @VM02131 00448000
  459. MVC 0(L'MAPEND,R2),MAPEND FLAG END OF MAP @VM02131 00449000
  460. CALL DMKPGTVG GET A VIRTUAL PAGE ADDRESS @VM02131 00450000
  461. ST R1,VPAGSLOT AND SAVE IT ........ @VM02131 00451000
  462. TRANS 2,1,OPT=(BRING,DEFER,LOCK,SYSTEM) @VM02131 00452000
  463. ST R2,RADDSLOT SAVE REAL PAGE ADDRESS @VM02131 00453000
  464. LR R3,R2 STARTING SLOT ADDRESS @VM02131 00454000
  465. LH R4,ENTRYSIZ INCREMENT @VM02131 00455000
  466. LA R5,36*SFBSIZE*8-1(,R3) COMPARAND @VA12674 00456100
  467. CKSIN0 MVC 0(L'SLOTFREE,R3),SLOTFREE FLAG SLOT AS EMPTY @VM02131 00457000
  468. BXLE R3,R4,CKSIN0 CONTINUE .......... @VM02131 00458000
  469. LR R5,R9 MAP ADDRESS HERE FOR EXITING @VM02131 00459000
  470. SPACE 00460000
  471. CKSIN1 EQU * @VM02131 00461000
  472. BAL R6,NEXTCYL GET NEXT RECORD @VM02131 00462000
  473. B CKSIN2 XFER IF DONE @VM02131 00463000
  474. LM R0,R1,CCPDSLOT GET CCPD FOR THIS PAGE @VM02131 00464000
  475. CALL DMKRPAPT,PARM=SYSTEM WRITE IT OUT @VM02131 00465000
  476. BZ CKSIN1 CONTINUE IF NO PROBLEMS @VM02131 00466000
  477. B MSG915E OOPS ....... I/O ERROR @VM02131 00467000
  478. EJECT 00468000
  479. CKSIN2 EQU * @VM02131 00469000
  480. L R2,RADDSLOT UNLOCK SLOT PAGE @VM02131 00470000
  481. CALL DMKPTRUL @VM02131 00471000
  482. BAL R6,PUTSLOT0 RELEASE VIRTUAL PAGE TOO ... @VM02131 00472000
  483. B CKSEXIT AND EXIT POST-HASTE ....... @VM02131 00473000
  484. EJECT 00474000
  485. * SUBROUTINE NAME - 00475000
  486. * 00476000
  487. * DMKCKSWM 00477000
  488. * 00478000
  489. * FUNCTION - 00479000
  490. * 00480000
  491. * RECOVER SPOOL FILE INFORMATION FROM A PREVIOUSLY 00481000
  492. * CHECKPOINTED SESSION. THIS INFORMATION INCLUDES ALL 00482000
  493. * CLOSED PRINTER AND PUNCH FILES, AND OPENED READER FILES. 00483000
  494. * 00484000
  495. * ATTRIBUTES - 00485000
  496. * 00486000
  497. * SERIALLY REUSABLE, PAGEABLE, CALLED VIA SVC FROM DMKWRM 00487000
  498. * 00488000
  499. * ENTRY POINTS - 00489000
  500. * 00490000
  501. * DMKCKSWM 00491000
  502. * 00492000
  503. * ENTRY CONDITIONS - 00493000
  504. * 00494000
  505. * GPR2 = PARAMETER PASSED TO DMKWRM BY DMKCPI 00495000
  506. * 00496000
  507. * EXIT CONDITIONS - 00497000
  508. * 00498000
  509. * THE CHECKPOINTED SPOOL FILES HAVE BEEN QUEUED UP ON THEIR 00499000
  510. * PROPER QUEUES AND THEIR SFBLOKS HAVE BEEN PROPERLY 00500000
  511. * INITIALIZED FOR SUBSEQUENT OPERATION. 00501000
  512. * 00502000
  513. * CALLS TO OTHER ROUTINES - 00503000
  514. * 00504000
  515. * DMKFREE - GET CORE FOR AN SFBLOK 00505000
  516. * DMKPGTVG - GET A VIRTUAL PAGE FOR THE MAP, SLOT, OR 00506000
  517. * SPOOL FILE DASD BUFFER PAGE 00507000
  518. * DMKPGTVR - RELEASE SYSTEM V.M. SPACE 00508000
  519. * DMKSCNRU - FIND DEVICE BLOCK FOR IPL DEVICE 00509000
  520. * DMKPTRAN - GET VIRTUAL PAGES INTO REAL CORE 00510000
  521. * DMKPTRUL - UNLOCK THE VIRTUAL PAGES 00511000
  522. * DMKRPAGT - READ IN A DASD BUFFER PAGE 00512000
  523. * 00513000
  524. * EXTERNAL REFERENCES - 00514000
  525. * 00515000
  526. * SYSIPLDV - ADDRESS OF SYSTEM IPL DEVICE 00516000
  527. * DMKRSPPR - ANCHOR FOR PRINTER FILE CHAIN 00517000
  528. * DMKRSPPU - ANCHOR FOR PUNCH FILE CHAIN 00518000
  529. * DMKRSPRD - ANCHOR FOR READER FILE CHAIN 00519000
  530. * DMKQNTBL - ANCHOR FOR 3800 IMAGE LIBRARIES 00519100
  531. * 00520000
  532. * TABLES AND WORKAREAS - 00521000
  533. * 00522000
  534. * ANCHRTBL - TABLE OF SPOOL FILE CHAIN ANCHORS 00523000
  535. * 00524000
  536. * REGISTER USAGE - 00525000
  537. * 00526000
  538. * GPR0 = DASD ADDRESS OF PAGE IN CCPD FORM 00527000
  539. * GPR1 = VIRTUAL ADDRESS OF PAGE BUFFER 00528000
  540. * GPR2 = REAL ADDRESS OF PAGE BUFFER 00529000
  541. * GPR3 = POINTER TO SLOT ON CHECKPOINT CYLINDER 00530000
  542. * GPR4 = INCREMENT FOR LOOPING THRU SLOTS 00531000
  543. * GPR5 = COMPARAND 00532000
  544. * GPR6 = INTERNAL BAL REGISTER 00533000
  545. * GPR7 = POINTER TO SFBLOK 00534000
  546. * GPR8 = ADDR OF FILE CHAIN ANCHORS 00535000
  547. * GPR9 = POINTER TO MAP ENTRY 00536000
  548. * GPR10 = PAGE NUMBER BEING UPDATED 00537000
  549. * GPR11 = ADDRESS OF VMBLOK 00538000
  550. * GPR12 = DMKCKS MODULE BASE 00539000
  551. * GPR13 = ADDRESS OF STANDARD SAVE AREA 00540000
  552. * GPR14 = BALR RETURN REGISTER 00541000
  553. * GPR15 = BALR BRANCH REGISTER 00542000
  554. * 00543000
  555. * OPERATION - 00544000
  556. * 00545000
  557. * 1. IF THE MAP PAGE HAS ALREADY BEEN ALLOCATED, ABEND. 00546000
  558. * OTHERWISE, GET A VIRTUAL PAGE FOR THE MAP AND 00547000
  559. * SAVE IT IN DMKCKSMP. THEN ALLOCATE A VIRTUAL PAGE 00548000
  560. * FOR THE CHECKPOINT PAGES AND FOR SPOOL FILE 00549000
  561. * DASD BUFFERS AND LOCK ALL THESE PAGES IN REAL CORE 00550000
  562. * 00551000
  563. * 2. GET NEXT(OR FIRST) SLOT IN CORE. IF NO MORE SLOTS 00552000
  564. * THEN GO TO STEP 9. OTHERWISE, CONTINUE. 00553000
  565. * 00554000
  566. * 3. IF THE SLOT IS EMPTY, REFLECT THIS IN THE MAP ENTRY FOR 00555000
  567. * THE SLOT AND GO TO STEP 2. OTHERWISE, CONTINUE. 00556000
  568. * 00556100
  569. * 3A. IF IT IS A REAL DEVICE BLOCK ENTRY, UPDATE THE REAL 00556200
  570. * DEVICE BLOCK WITH THE CURRENT STATUS. IN THE CASE 00556300
  571. * OF A 3800 PRINTER, UPDATE THE IMAGE LIBRARY NAME, 00556400
  572. * PARAMETERS FOR PRINTING THE SEPARATOR PAGE, AND THEN 00556500
  573. * UPDATE THE ACTIVITY COUNT IN THE IMAGE LIBRARY 00556600
  574. * NAMED SYSTEM ENTRY. 00556700
  575. * 00557000
  576. * 4. INITIALIZE THE SFBLOK IN THE SLOT ENTRY FOR CLOSED 00558000
  577. * PRINTER AND PUNCH FILES, ALSO FOR OPENED READER FILES. 00559000
  578. * 00560000
  579. * 5. CALL DMKFREE TO GET SPACE FOR THE SFBLOK AND MOVE THE 00561000
  580. * SFBLOK INTO IT AND THEN CHAIN IT TO THE PROPER CHAIN. 00562000
  581. * 00563000
  582. * 6. MARK THE MAP ENTRY WITH THE PROPER SPOOL FILE ID. 00564000
  583. * 00565000
  584. * 7. IF THE FILE HAD ONLY ONE DASD BUFFER PAGE, MARK THAT 00566000
  585. * CCPD AS BEING ALLOCATED IN THE RECBLOK CHAIN, WRITE OUT 00567000
  586. * SLOT PAGE AND GO TO STEP 2. 00568000
  587. * OTHERWISE, CONTINUE. 00569000
  588. * 00570000
  589. * 8. READ IN EACH DASD BUFFER PAGE FOR THE FILE AND SET UP A 00571000
  590. * RECBLOK ALLOCATION FOR EACH OF THESE PAGES. THE 00572000
  591. * NEXT ONE IS GOTTEN FROM THE CHAIN IN THE PREVIOUS ONE. 00573000
  592. * EACH ONE OF THESE DASD BUFFERS MUST BE VALIDATED BEFORE 00574000
  593. * BEING USED. IF IT IS NOT VALID, TRUNCATE THE FILE AT 00575000
  594. * THE PREVIOUS PAGE AND SO MARK SFBLAST IN THE SFBLOK. 00576000
  595. * THEN GO TO STEP 2. 00577000
  596. * 00578000
  597. * 9. RELEASE ALL DASD AND VIRTUAL PAGES FOR THE SLOT PAGE 00579000
  598. * AND THE DASD BUFFER PAGE. THEN UNLOCK THE MAP PAGE AND 00580000
  599. * RETURN TO CALLER. 00581000
  600. * 00582000
  601. EJECT 00583000
  602. DMKCKSWM RELOC @V304298 00584000
  603. ICM R1,B'1111',DMKCKSMP IS THERE A MAP YET ? @V304298 00585000
  604. BNZ CKSABN1 ABEND IF SO @V304298 00586000
  605. BAL R6,CKSINIT SET UP PROGRAM CONSTANTS @V304235 00587000
  606. CALL DMKPGTVG GET VIRTUAL PAGE FOR DASD BUFFER @V304298 00588000
  607. ST R1,VPAGBUFF SAVE IT @V304298 00589000
  608. L R9,RADDMAP MAP START @V304298 00590000
  609. ST R9,TOPSLOT SAVE POSSIBLE LOC OF DELIMITER @V304298 00591000
  610. SPACE 00592000
  611. CKSWM1 EQU * @VM02131 00593000
  612. BAL R6,NEXTCYL GET NEXT CYLINDER ADDRESS @VM02131 00594000
  613. B CKSWM9 XFER IF END OF CHECKPOINT AREA @VM02131 00595000
  614. BAL R6,GETSLOT GO TO IT @V304298 00596000
  615. L R3,RADDSLOT SLOT ADDRESS @V304298 00597000
  616. CLC CYLSLOT(2),CKSSTART FIRST CYLINDER ? @V304298 00598000
  617. BNE CKSWM1A XFER IF NOT @V304298 00599000
  618. CLI PAGSLOT,X'01' FIRST PAGE ? @V304298 00600000
  619. BNE CKSWM1A XFER IF NOT @V304298 00601000
  620. CLC 0(4,R3),ZEROES VALID CHECKPOINT DATA ? @V304298 00602000
  621. BE MSG917E XFER IF NOT @V304298 00603000
  622. CKSWM1A DS 0H @V304298 00604000
  623. LH R4,ENTRYSIZ INCREMENT @V304298 00605000
  624. LA R5,36*SFBSIZE*8-1(,R3) COMPARAND @VA12674 00606100
  625. CKSWM2 CLC 0(L'SLOTFREE,R3),SLOTFREE INVALID SLOT ? @V304235 00607000
  626. BNE CKSWM2B XFER IF NOT @V304298 00608000
  627. MVC 0(L'MAPFREE,R9),MAPFREE MARK INVALID IN THE MAP @V304235 00609000
  628. LA R9,2(,R9) NEXT ENTRY @V304298 00610000
  629. CKSWM2A LR R15,R9 SEE IF BEYOND END @V304298 00611000
  630. SL R15,RADDMAP GET DISPLACEMENT @V304298 00612000
  631. C R15,=F'4094' INTO NEXT PAGE ? @V304298 00613000
  632. BL CKSWM7 NO @V408246 00614100
  633. BAL R6,PUTSLOT YES, OUTPUT PAGE @V408246 00614600
  634. B CKSWM9 AND FINISH @V408246 00615100
  635. EJECT 00616000
  636. * HERE WE PROCESS REAL DEVICE CHANGE ENTRIES 00617000
  637. CKSWM2B DS 0H @V304298 00618000
  638. L R15,=A(DMKSYSCN) @V304235 00619000
  639. LH R14,0(R15) GET CURRENT MAP ENTRY COUNT @V304235 00620000
  640. LA R14,1(,R14) ADD ONE TO IT ..... @V304235 00621000
  641. STH R14,0(R15) AND SAVE UPDATED VALUE @V304235 00622000
  642. USING RDEVBLOK,R8 @V304298 00623000
  643. CLC 0(L'SLOTDEV,R3),SLOTDEV IS IT A REAL DEVICE @V304235 00624000
  644. * STATUS ? 00625000
  645. BNE CKSWM2G XFER IF NOT @V304298 00626000
  646. LH R1,4(,R3) GET REAL DEVICE BLOK OF @V304298 00627000
  647. CALL DMKSCNRU SPOOLING DEVICE @V304298 00628000
  648. BZ CKSWM2B1 XFER IF IT IS STILL THERE @V304298 00629000
  649. CKSWM2B0 MVC 0(L'SLOTFREE,R3),SLOTFREE MAKE THE SLOT INVALID @VM02131 00630000
  650. L R15,=A(DMKSYSCN) ADJUST CURRENT MAP @V304235 00631000
  651. LH R14,0(R15) COUNT ...... @V304235 00632000
  652. BCTR R14,0 ........ @V304235 00633000
  653. STH R14,0(R15) AND SAVE IT @V304235 00634000
  654. B CKSWM2 FINISH PROCESSING INVALID SLOT @V304298 00635000
  655. CKSWM2B1 DS 0H @V304298 00636000
  656. SWITCH MAKE SURE WE ARE ON THE IO PROCESSOR @V4075A0 00636100
  657. TM 6(R3),RDEVDISA DEVICE OFFLINE ? @V304298 00637000
  658. BZ CKSWM2C XFER IF NOT @V304298 00638000
  659. OI RDEVSTAT,RDEVDISA SO MARK IT @V304298 00639000
  660. CKSWM2C MVC RDEVCLAS(4),8(R3) MOVE IN THE DEVICE CLASS(ES) @V304298 00640000
  661. TM 7(R3),RDEVDRAN DEVICE DRAINED ? @V304298 00641000
  662. BNZ CKSWM2D XFER IF SO (DEFAULT IS DRAIN) @V304298 00642000
  663. TM PARM2,DRAIN WAS DRAIN REQUESTED ? @V304235 00643000
  664. BO CKSWM2D XFER IF SO @V304298 00644000
  665. NI RDEVFLAG,255-RDEVDRAN MARK IT NOT DRAINED @V304298 00645000
  666. CKSWM2D DS 0H @V304298 00646000
  667. CLI RDEVTYPE,TYP3800 IS IT A 3800 PRINTER ? @V60B9BA 00646325
  668. BNE CKSWM2E XFER IF NOT @V60B9BA 00646350
  669. MVC RDEVIMAG,12(R3) GET THE CURRENT IMAGE LIBRARY@V60B9BA 00646375
  670. MVC RDEVXSEP,20(R3) GET THE CURRENT CHAR ARR TBL @V60B9BA 00646400
  671. MVC RDEVFSEP,24(R3) GET FCB FOR SEP PAGE @V60B9BA 00646425
  672. TM RDEVFLAG,RDEVDRAN IS THE 3800 DRAINED ? @V60B9BA 00646450
  673. BO CKSWM2E XFER IF SO @V60B9BA 00646475
  674. L R1,=A(DMKQNTBL) START OF 3800 IMAGE LIBS @V60B9BA 00646500
  675. LTR R1,R1 ARE THERE ANY ? @V60B9BA 00646525
  676. BZ CKSWM2D2 DRAIN THE DEVICE IF NOT @V60B9BA 00646550
  677. TRANS 2,1,OPT=(BRING,DEFER,SYSTEM) GET IT IN @V60B9BA 00646575
  678. LR R14,R2 POINT TO EACH SYSTEM ENTRY @V60B9BA 00646600
  679. USING NPRTBL,R14 ADDRESSIBILITY @V60B9BA 00646625
  680. CKSWM2D0 CLC RDEVIMAG,NPRNAME IS THIS THE ONE ? @V60B9BA 00646650
  681. BNE CKSWM2D1 XFER IF NOT @V60B9BA 00646675
  682. SR R15,R15 ZERO IT @VA10616 00646700
  683. IC R15,NPRCNT CURRENT COUNT @V60B9BA 00646725
  684. LA R15,1(R15) PLUS ONE @V60B9BA 00646750
  685. STC R15,NPRCNT SAVE THE NEW COUNT @V60B9BA 00646775
  686. B CKSWM2E CONTINUE ONWARD @V60B9BA 00646800
  687. CKSWM2D1 AL R14,NPRPNT NEXT ONE @V60B9BA 00646825
  688. CLC NPRPNT,ZEROES IS THIS DUMMY LAST ENTRY? @V60B9BA 00646850
  689. BNE CKSWM2D0 XFER IF NOT @V60B9BA 00646875
  690. CKSWM2D2 OI RDEVFLAG,RDEVDRAN MARK DEVICE DRAINED SINCE @V60B9BA 00646900
  691. * WE CAN'T FIND THE IMG LIB @V60B9BA 00646925
  692. DROP R14 NO LONGER NEEDED @V60B9BA 00646950
  693. SPACE 00646975
  694. CKSWM2E MVC 0(2,R9),4(R3) FILL IN THE MAP ENTRY @V60B9BA 00647000
  695. OI 0(R9),X'E0' SPECIAL CODE @V304298 00648000
  696. B CKSWM2H ADVANCE TO NEXT ENTRY @VM02131 00649000
  697. SPACE 3 00650000
  698. * HERE WE PROCESS CHECKPOINTED SPOOL HOLD QUEUE BLOCKS 00651000
  699. CKSWM2G DS 0H @V304298 00652000
  700. CLC 0(L'SLOTSHQ,R3),SLOTSHQ IS IT A SHQBLOK ? @V304235 00653000
  701. BNE CKSWM3 XFER IF NOT @V304298 00654000
  702. LA R0,SHQBSIZE GET CORE FOR SHQBLOK @V304298 00655000
  703. CALL DMKFREE GO TO IT @V304298 00656000
  704. MVC 4(SHQBSIZE*8-4,R1),4(R3) MOVE IT IN @V304298 00657000
  705. L R7,=A(DMKRSPHQ) GET ANCHOR FOR SHQ CHAIN @V304298 00658000
  706. MVC 0(4,R1),0(R7) WE POINT TO PREVIOUS FIRST @V304298 00659000
  707. ST R1,0(R7) WE ARE NOW FIRST @V304298 00660000
  708. MVC 0(L'MAPSHQ,R9),MAPSHQ FILL IN THE MAP ENTRY @V304235 00661000
  709. CKSWM2H LA R9,2(,R9) ADVANCE TO NEXT MAP ENTRY @VA04454 00662000
  710. ST R9,TOPSLOT NEW POSSIBLE DELIMITER @V304298 00663000
  711. B CKSWM2A TEST FOR END @V304298 00664000
  712. EJECT 00665000
  713. * HERE WE PROCESS THE CHECKPOINTED SFBLOK 00666000
  714. CKSWM3 DS 0H @V304298 00667000
  715. DROP R7 TEMPORARILY @V304298 00668000
  716. USING SFBLOK,R3 JUST FOR THE TIME BEING @V304298 00669000
  717. NI SFBFLAG,X'FF'-(SFBINUSE+SFBEOF+SFBOPEN) @V304298 00670000
  718. * RESET THE FILE STATUS 00671000
  719. TM 0(R3),ACTSFB WAS IT BEING PRINTED ? @V304298 00672000
  720. BNZ CKSWM3C XFER IF SO @V304298 00673000
  721. CKSWM3A TM 0(R3),OPNSFB WAS IT AN OPEN CONSOLE FILE ? @VM02131 00674000
  722. BZ CKSWM3B XFER IF NOT @V304298 00675000
  723. TM SFBFLAG2,SFBMON IS THIS A MONITOR SFB @VA07888 00675100
  724. BZ CKSWM3A1 NO, ONLY MONITOR AND CONSOLE @VA07888 00675200
  725. * FILES ARE CHECKPOINTED 'OPEN' 00675300
  726. MVC SFBDIST(8),=C' ' YES CLEAN UP DIST CODE @VA07888 00675400
  727. * SINCE DMKCKP DIDNT GET A CHANCE 00675500
  728. B CKSWM3B AND SKIP USER HOLD SETTING @VA07888 00675600
  729. CKSWM3A1 EQU * @VA07888 00675700
  730. OI SFBFLAG,SFBUHOLD PUT IT IN USER HOLD @V304298 00676000
  731. CKSWM3B XC SFBRECS,SFBRECS CLEAR THE FIELD @V304298 00677000
  732. CKSWM3C LA R0,SFBSIZE GET SIZE OF SFBLOK @V304298 00678000
  733. CALL DMKFREE GET CORE FOR ONE SFBLOK @V304298 00679000
  734. LR R7,R1 SAVE ITS ADDRESS @V304298 00680000
  735. DROP R3 WE NEED IT NO LONGER @V304298 00681000
  736. USING SFBLOK,R7 BACK TO NORMAL @V304298 00682000
  737. MVC SFBLOK(SFBSIZE*8),0(R3) MOVE IN THE DATA @V304298 00683000
  738. TM 0(R3),ACTSFB WAS IT ACTIVE ? @V304298 00684000
  739. BZ CKSWM3D XFER IF NOT @V304298 00685000
  740. LH R1,2(,R3) GET DEVICE ADDRESS @V304298 00686000
  741. LR R2,R7 SAVE IT ACROSS CALL @V304298 00687000
  742. CALL DMKSCNRU GET RDEVBLOK @V304298 00688000
  743. LR R7,R2 RESTORE R7 @V304298 00689000
  744. BZ CKSWM3C1 XFER IF DEVICE STILL THERE @V304298 00690000
  745. OI SFBFLAG,SFBRECER ALLOCATION INCOMPLETE @V304298 00691000
  746. B CKSWM3D CHAIN THE SFBLOK @V304298 00692000
  747. CKSWM3C1 DS 0H @V304298 00693000
  748. SWITCH MAKE SURE WE ARE ON THE IO PROCESSOR @V4075A0 00693100
  749. MVC RDEVCLAS(4),SFBRECS GET THE DEVICE CLASS @V304298 00694000
  750. OI SFBFLAG,SFBRECER INDICATE ALLOC INCOMPLETE @V304298 00695000
  751. OI SFBFLAG2,SFBRSTRT INDICATE RESTARTED @V304298 00696000
  752. TM RDEVSTAT,RDEVDISA DEVICE OFFLINE ? @V304298 00697000
  753. BO CKSWM3D CHAIN IT IF SO @V304298 00698000
  754. TM RDEVFLAG,RDEVDRAN BEING DRAINED ? @V304298 00699000
  755. BO CKSWM3D CHAIN IT IF SO @V304298 00700000
  756. ST R7,RDEVSPL STORE IN RDEVBLOK @V304298 00701000
  757. MVI 0(R7),X'FF' INDICATE SFBLOK @V304298 00702000
  758. XC SFBRECS,SFBRECS CLEAR FIELD @V304298 00703000
  759. B CKSWM4A CONTINUE @V304298 00704000
  760. CKSWM3D XC SFBRECS,SFBRECS CLEAR FIELD @V304298 00705000
  761. TM 0(R3),OPNSFB WAS IT OPEN? @V304298 00706000
  762. BZ CKSWM3F XFER IF NOT @V304298 00707000
  763. MVC SFBCOPY,F1+2 MAKE IT ONE COPY @V304298 00708000
  764. CKSWM3F DS 0H @V304298 00709000
  765. DROP R8 @V304298 00710000
  766. EJECT 00711000
  767. * NOW CHAIN IT TO THE PROPER ANCHOR 00712000
  768. L R8,ARSPPR ASSUME PRINTER FILE @V304298 00713000
  769. TM 0(R3),PRTCHN IS IT A PRINT FILE ? @V304298 00714000
  770. BO CKSWM4 XFER IF SO @V304298 00715000
  771. L R8,ARSPPU ASSUME PUNCH FILE @V304298 00716000
  772. TM 0(R3),PCHCHN IS IT A PUNCH FILE ? @V304298 00717000
  773. BO CKSWM4 XFER IF SO @V304298 00718000
  774. L R8,ARSPRD IT IS A READER FILE @V304298 00719000
  775. CKSWM4 MVC SFBPNT,0(R8) PUT NEW ONE AT @V304298 00720000
  776. ST R7,0(,R8) TOP OF CHAIN @V304298 00721000
  777. SPACE 2 00722000
  778. * AT THIS POINT WE START ALLOCATING THE DASD BUFFERS 00723000
  779. CKSWM4A TM SFBFLAG,SFBDUMP SYSTEM DUMP ? @V304298 00724000
  780. BNO CKSWM4AA NO...SKIP VMDUMP CHECK @V67CAH7 00725000
  781. CLI SFBMISC1+1,C'V' YES...IS IT A VMDUMP @V67CAH7 00725200
  782. BNE CKSWM6E SPECIAL HANDLING FOR CPDUMP @V67CAH7 00725400
  783. CKSWM4AA DS 0H @V67CAH7 00725600
  784. MVC CCPDBUFF(4),SFBSTART INITIALIZE TO FIRST PAGE @V304298 00726000
  785. MVC PREVBUFF(4),ZEROES INITIALIZE @VA07106 00726050
  786. CKSWM5P TM 0(R3),OPNSFB OPEN SPOOL OR MONITOR FILE @VA07888 00734200
  787. BZ CKSWM5 NO, WON'T RECOUNT RCDS @VA07888 00734400
  788. XC SFBRECNO,SFBRECNO CLEAR OLD CNT BEFORE START @VA07888 00734600
  789. CKSWM5 LM R0,R1,CCPDBUFF GET THE NEXT BUFFER IN CORE @V304298 00735000
  790. CALL DMKRPAGT,PARM=SYSTEM+BRING+LOCK GO TO IT @V304298 00736000
  791. BNZ MSG916E XFER IF BAD IO @V304298 00737000
  792. ST R2,RADDBUFF SAVE ITS REAL ADDRESS @V304298 00738000
  793. TM 0(R3),OPNSFB WAS IT AN OPEN FILE ? @V304298 00739000
  794. BO CKSWM5B XFER IF SO @V304298 00740000
  795. L R1,CCPDBUFF ALLOCATE THE PAGE @V304298 00741000
  796. USING SPLINK,R2 ADDRESSABILITY @VA07106 00741050
  797. CLC PREVBUFF(4),SPPREPAG BACK POINTER O.K. ?? @VA07106 00741150
  798. BNE CKSWM6A1 NO, DELETE THIS FILE @VA07106 00741250
  799. ST R1,PREVBUFF REMEMBER FOR NEXT DASD PAGE @VA07106 00741350
  800. BAL R6,ALOCIT GO TO IT @V304298 00742000
  801. L R2,RADDBUFF POINT TO BUFFER @V304298 00744000
  802. * WITH BOTH ACTIVE AND INACTIVE FILES, SPNXTPAG FOR THE LAST 00745000
  803. * PAGE TO BE ALLOCATED POINTS TO SFBSTART. 00746000
  804. * WHEN THIS PAGE HAS BEEN ALLOCATED, WE ARE DONE. 00747000
  805. TM SFBFLAG2,SFBMON IS THIS A MONITOR FILE? @V50A2B5 00747100
  806. BNO CKSWM5AA NO, CONTINUE @V50A2B5 00747200
  807. CLC CCPDBUFF(4),SFBLAST IS THIS THE LAST PAGE @V50A2B5 00747300
  808. BE CKSWM6C YES, CONTINUE @V50A2B5 00747400
  809. CKSWM5AA EQU * @V50A2B5 00747500
  810. CLC SPNXTPAG(4),SFBSTART ARE WE DONE ? @V304298 00748000
  811. BE CKSWM6C XFER IF SO @V304298 00749000
  812. CKSWM5A MVC CCPDBUFF(4),SPNXTPAG READ IN THE NEXT PAGE @V304298 00750000
  813. B CKSWM5 AND GO TO IT @V304298 00751000
  814. EJECT 00752000
  815. * AN OPEN FILE MUST BE CHECKED MORE CAREFULLY 00753000
  816. CKSWM5B L R2,RADDBUFF POINT TO THE DASD BUFFER @V304298 00754000
  817. CLC SFBFILID,SPFILID FILE ID OK AS CHECKPOINTED ? @V60B9BA 00755000
  818. BNE CKSWM6 XFER IF NOT @V304298 00756000
  819. CLC SFBTIME(6),SPTIME OTHER FIELD MATCH UP ? @V60B9BA 00757000
  820. BNE CKSWM6 XFER IF NOT @V304298 00758000
  821. SPACE 2 00759000
  822. * THE PAGE IS VALID 00760000
  823. L R1,CCPDBUFF ALLOCATE THIS DASD PAGE @V304298 00761000
  824. CLC PREVBUFF(4),SPPREPAG BACK POINT O.K. ?? @VA07106 00761050
  825. BNE CKSWM6A1 NO, DELETE THE FILE @VA07106 00761150
  826. ST R1,PREVBUFF SAVE FOR POSSIBLE LAST BUFFER @V304298 00762000
  827. BAL R6,ALOCIT GO TO IT @V304298 00763000
  828. * CALCULATE NUMBER OF RECORDS IN OPEN SPOOL FILE 00764000
  829. L R15,SFBRECNO LOAD PRESENT VALUE @V304298 00765000
  830. AL R15,SPRECNUM INCREMENT NUM IN BUFFER @V304298 00766000
  831. ST R15,SFBRECNO SAVE THE NEW VALUE @V304298 00767000
  832. * CONSOLE FILE WILL CYCLE BACK TO FIRST PAGE EVEN THOUGH OPEN. 00768000
  833. CLC SPNXTPAG(4),SFBSTART IS THIS THE LAST PAGE @V304298 00769000
  834. * OF A CONSOLE FILE ? 00770000
  835. BNE CKSWM5C XFER IF NOT @V304298 00771000
  836. MVC SFBLAST(4),CCPDBUFF SET UP THE LAST PAGE @V304298 00772000
  837. B CKSWM6C AND TRY NEXT SLOT @V304298 00773000
  838. CKSWM5C DS 0H @V304298 00774000
  839. MVC CCPDBUFF(4),SPNXTPAG SET UP FOR NEXT PAGE @V304298 00775000
  840. CLC SPNXTPAG,ZEROES IS THERE ONE ? @V304298 00776000
  841. BNE CKSWM5 YES, SO READ IT IN @V304298 00777000
  842. SPACE 2 00778000
  843. * WE GOT TO AN INVALID PAGE 00779000
  844. CKSWM6 MVC SFBLAST(4),PREVBUFF PREVIOUS ONE IS THE END @V304298 00780000
  845. * WE NOW READ THAT LAST PAGE BACK IN SO THAT WE CAN UPDATE ITS 00781000
  846. * SPNXTPAG AND THEN WRITE IT BACK OUT. 00782000
  847. * BUT FIRST CHECK IF THE INVALID PAGE WAS THE FIRST PAGE 00783000
  848. * IF SO, THEN THE FILE IS NO GOOD AND MUST BE DELETED 00784000
  849. CLC CCPDBUFF(4),SFBSTART WAS IT THE FIRST ONE ? @V304298 00785000
  850. BNE CKSWM6B XFER IF NOT @V304298 00786000
  851. CKSWM6A1 L R8,ARSPPR ASSUME IT'S ON THE PRINT CHAIN @V304298 00787000
  852. C R7,0(R8) IS IT ? @V304298 00788000
  853. BE CKSWM6A XFER IF SO @V304298 00789000
  854. L R8,ARSPPU ASSUME THE PUNCH CHAIN @V304298 00790000
  855. C R7,0(R8) IS IT ? @V304298 00791000
  856. BE CKSWM6A XFER IF SO @V304298 00792000
  857. L R8,ARSPRD ASSUME READER CHAIN @V304298 00793000
  858. C R7,0(R8) IS IT ? @V304298 00794000
  859. BE CKSWM6A XFER IF SO @V304298 00795000
  860. ABEND 4 SOMETHING IS WRONG @V304235 00796000
  861. EJECT 00797000
  862. CKSWM6A MVC 0(4,R8),SFBPNT DELETE FROM THE CHAIN @V304298 00798000
  863. LA R0,SFBSIZE SIZE OF THE SFBLOK @V304298 00799000
  864. LR R1,R7 ADDRESS OF SFBLOK @V304298 00800000
  865. CALL DMKFRET FRET ITS CORE @V304298 00801000
  866. B CKSWM2B0 ADJUST CURRENT MAP ETC ..... @VM02131 00802000
  867. EJECT 00803000
  868. CKSWM6B DS 0H @V304298 00804000
  869. MVC CCPDBUFF(4),SFBLAST THE PAGE TO READ IN @V304298 00805000
  870. LM R0,R1,CCPDBUFF GET LAST PAGE INTO CORE @V304298 00806000
  871. CALL DMKRPAGT,PARM=SYSTEM+BRING+LOCK GO TO IT @V304298 00807000
  872. BNZ MSG916E XFER IF BAD IO @V304298 00808000
  873. ST R2,RADDBUFF SAVE ITS REAL ADDRESS @V304298 00809000
  874. MVC SPNXTPAG(4),SFBSTART MOVE IN THE NEW VALUE @V304298 00810000
  875. CALL DMKRPAPT,PARM=SYSTEM WRITE IT OUT @V304298 00811000
  876. BNZ MSG916E XFER IF BAD IO @V304298 00812000
  877. CKSWM6C DS 0H @VA14548 00813100
  878. CLC CCPDBUFF(4),SFBLAST IS THIS REALLY A COMPLETE @VA14548 00813200
  879. * FILE? 00813300
  880. BNE CKSWM6A1 NOT COMPLETE DELETE THIS FILE. @VA14548 00813400
  881. CLC SPNXTPAG(4),SFBSTART DOUBLE CHECK COMPLETE @VA14548 00813500
  882. * FILE FOR SAFETY. 00813600
  883. BNE CKSWM6A1 NOT COMPLETE DELETE THIS FILE. @VA14548 00813700
  884. DROP R2 00813800
  885. NI 0(R3),X'FF'-(OPNSFB+ACTSFB) CLEAR THESE FLAGS @VA14548 00813900
  886. * CLEAR THESE FLAGS 00815000
  887. MVC 4(SFBSIZE*8-4,R3),SFBLOK+4 REINITIALIZE THE @V304298 00816000
  888. * CHECKPOINTED SFBLOK 00817000
  889. MVC 0(2,R9),SFBFILID SET UP THE MAP @V304298 00818000
  890. LA R9,2(,R9) NEXT SLOT ENTRY @V304298 00819000
  891. ST R9,TOPSLOT NEW POSSIBLE DELIMITER @V304298 00820000
  892. * MAINTAIN HIGHEST SPOOL FILE ID 00821000
  893. CLC SPOOLID,SFBFILID IS NEW ONE HIGHER ? @V304298 00822000
  894. BH CKSWM6D XFER IF NOT @V304298 00823000
  895. MVC SPOOLID,SFBFILID MOVE IN NEW HIGHEST @V304298 00824000
  896. CKSWM6D DS 0H @V304298 00825000
  897. B CKSWM2A TEST FOR END @V304298 00826000
  898. EJECT 00827000
  899. * CODE FOR ALLOCATING THE BUFFERS OF A DUMP SPOOL FILE 00828000
  900. * SINCE THESE ARE NOT CHAINED TOGETHER AS IS NORMAL, BUT 00829000
  901. * ARE CONTIGUOUS FROM FIRST PAGE TO LAST PAGE, THE ALLOCATION 00830000
  902. * OF DASD BUFFERS MUST BE HANDLED AS A SPECIAL CASE. 00831000
  903. CKSWM6E L R1,SFBSTART GET STARTING CCPD @V304298 00832000
  904. LR R15,R1 SET UP THE COMPARAND @V304298 00833000
  905. LA R8,X'FF' MASK FOR DEVICE CODE @V304298 00834000
  906. N R8,SFBSTART ISOLATE DEVICE CODE @V304298 00835000
  907. L R1,=A(DMKSYSOC) GET NUMBER OF OWNED DEVICES @VA07295 00835050
  908. CL R8,0(R1) WITHIN RANGE ? @VA07295 00835150
  909. BNL MSG916E NO,BAD DEVICE CODE @VA07295 00835250
  910. LR R1,R15 RESTORE R1 WITH COMPARAND @VA07295 00835350
  911. SLL R8,3 GET DEV CODE TIMES 8 @V304298 00836000
  912. A R8,=A(DMKSYSOW) POINT TO OWNED LIST ENTRY @V304298 00837000
  913. LA R0,OWNDVSER-OWNDLIST(,R8) POINT TO VOLID @V304298 00838000
  914. LH R8,OWNDRDEV-OWNDLIST(,R8) POINT TO RDEVBLOK @V304298 00839000
  915. LTR R8,R8 IS VOLUME MOUNTED? @V304298 00840000
  916. BM MSG912W ERROR DMKCKS912W @V305435 00841000
  917. SLL R8,3 CONVERT TO BYTE INDEX @V304298 00842000
  918. A R8,ARIODV REALLY GET THE RDEVBLOK @V304298 00843000
  919. USING RDEVBLOK,R8 @V304298 00844000
  920. TM RDEVFLAG,RDEVPREF PAGING ONLY VOLUME ? @VA07295 00844050
  921. BO MSG916E YES,MUST BE BAD DEVICE CODE @VA07295 00844150
  922. ICM R15,B'0010',=AL1(57) PAGES FOR A 3330 @V304298 00845000
  923. CLI RDEVTYPE,TYP3330 IS IT A 3330 ? @V304298 00846000
  924. BE CKSWM6E1 XFER IF SO @V304298 00847000
  925. ICM R15,B'0010',=AL1(120) PAGES FOR A 3350 @V304498 00848000
  926. CLI RDEVTYPE,TYP3350 IS IT A 3350 ? @V304498 00849000
  927. BE CKSWM6E1 XFER IF SO @V304498 00850000
  928. ICM R15,B'0010',=AL1(96) Pages for a 3375 HRC106DK 00850100
  929. CLI RDEVTYPE,TYP3375 Is it a 3375 ? HRC106DK 00850200
  930. BE CKSWM6E1 Xfer if so HRC106DK 00850300
  931. ICM R15,B'0010',=AL1(150) Pages for a 3380 HRC106DK 00850400
  932. CLI RDEVTYPE,TYP3380 Is it a 3380 ? HRC106DK 00850500
  933. BE CKSWM6E1 Xfer if so HRC106DK 00850600
  934. ICM R15,B'0010',=AL1(32) PAGES FOR A 2314 @V304298 00851000
  935. CLI RDEVTYPE,TYP2314 IS IT A 2314 ? @V304298 00852000
  936. BE CKSWM6E1 XFER IF SO @V304298 00853000
  937. ICM R15,B'0010',=AL1(24) THEN IT'S A 2305 OR 3340 @V304298 00854000
  938. CKSWM6E1 DS 0H @V304298 00855000
  939. LA R14,X'100' INCREMENT ONE PAGE AT A TIME @V304298 00856000
  940. LOOP6E STM R14,R15,HOLDR14 SAVE ACROSS CALL @V304298 00857000
  941. BAL R6,ALOCIT GO ALLOCATE THE PAGE @V304298 00858000
  942. LM R14,R15,HOLDR14 RESTORE REGS @V304298 00859000
  943. CL R1,SFBLAST IS THIS THE END ? @V304298 00860000
  944. BNL CKSWM6C TRY NEXT SLOT IF SO @V304298 00861000
  945. BXLE R1,R14,LOOP6E ALLOCATE NEXT PAGE @V304298 00862000
  946. SRL R1,16 CYL NUM TO LOW ORDER @V304298 00863000
  947. LA R1,1(,R1) GO TO NEXT CYL @V304298 00864000
  948. SLL R1,8 GET READY FOR @V304298 00865000
  949. LA R1,1(,R1) .. PAGE 1 ON THE CYLINDER @V304298 00866000
  950. SLL R1,8 MAKE ROOM FOR DEVICE CODE @V304298 00867000
  951. IC R1,SFBSTART+3 SAME DEV CODE AS BEFORE @V304298 00868000
  952. LR R15,R1 SET UP THE COMPARAND @V304298 00869000
  953. LA R8,X'FF' MASK FOR DEVICE CODE @V304298 00870000
  954. N R8,SFBSTART ISOLATE DEVICE CODE @V304298 00871000
  955. SLL R8,3 GET DEV CODE TIMES 8 @V304298 00872000
  956. A R8,=A(DMKSYSOW) POINT TO OWNED LIST ENTRY @V304298 00873000
  957. LA R0,OWNDVSER-OWNDLIST(,R8) POINT TO VOLID @V304298 00874000
  958. LH R8,OWNDRDEV-OWNDLIST(,R8) POINT TO RDEVBLOK @V304298 00875000
  959. LTR R8,R8 IS VOLUME MOUNTED? @V304298 00876000
  960. BM MSG912W ERROR IF NOT @V305435 00877000
  961. SLL R8,3 CONVERT TO BYTE INDEX @V304298 00878000
  962. A R8,ARIODV REALLY GET THE RDEVBLOK @V304298 00879000
  963. USING RDEVBLOK,R8 @V304298 00880000
  964. ICM R15,B'0010',=AL1(57) PAGES FOR A 3330 @V304298 00881000
  965. CLI RDEVTYPE,TYP3330 IS IT A 3330 ? @V304298 00882000
  966. BE CKSWM6E2 XFER IF SO @V304298 00883000
  967. ICM R15,B'0010',=AL1(120) PAGES FOR A 3350 @V304498 00884000
  968. CLI RDEVTYPE,TYP3350 IS IT 3350 ? @V304498 00885000
  969. BE CKSWM6E2 XFER IF SO @V304498 00886000
  970. ICM R15,B'0010',=AL1(96) Pages for a 3375 HRC106DK 00886100
  971. CLI RDEVTYPE,TYP3375 Is it 3375 ? HRC106DK 00886200
  972. BE CKSWM6E2 Xfer if so HRC106DK 00886300
  973. ICM R15,B'0010',=AL1(150) Pages for a 3380 HRC106DK 00886400
  974. CLI RDEVTYPE,TYP3380 Is it 3380 ? HRC106DK 00886500
  975. BE CKSWM6E2 Xfer if so HRC106DK 00886600
  976. ICM R15,B'0010',=AL1(32) PAGES FOR A 2314 @V304298 00887000
  977. CLI RDEVTYPE,TYP2314 IS IT A 2314 ? @V304298 00888000
  978. BE CKSWM6E2 XFER IF SO @V304298 00889000
  979. ICM R15,B'0010',=AL1(24) THEN IT'S A 2305 OR 3340 @V304298 00890000
  980. CKSWM6E2 DS 0H @V304298 00891000
  981. B LOOP6E GO DO THE NEXT CYLINDER @V304298 00892000
  982. SPACE 2 00893000
  983. CKSWM7 BXLE R3,R4,CKSWM2 TRY NEXT SLOT @V304298 00894000
  984. CKSWM8 BAL R6,PUTSLOT WRITE & RELEASE SLOT PAGE @V304298 00895000
  985. B CKSWM1 EXAMINE NEXT CHECKPOINT PAGE @V304298 00896000
  986. SPACE 3 00897000
  987. CKSWM9 L R9,TOPSLOT GET DELIMITER LOCATION @V304298 00898000
  988. MVC 0(L'MAPEND,R9),MAPEND DELIMIT MAP ....... @VM02131 00899000
  989. LM R0,R1,CCPDBUFF GET DASD AND VIRT ADDR @V304298 00900000
  990. SR R0,R0 CLEAR PARM REGISTER @V304298 00901000
  991. CALL DMKRPAGT,PARM=SYSTEM RELEASE STORAGE PAGE @V304298 00902000
  992. CALL DMKPGTVR RELEASE VIRT PAGE FOR DASD BUFFER@V304298 00903000
  993. LR R2,R9 RADD OF MAP PAGE @V304298 00904000
  994. CALL DMKPTRUL UNLOCK THE MAP PAGE @V304298 00905000
  995. L R15,=A(DMKRSPID) ADDR OF NEW SPOOL FILE ID @V304298 00906000
  996. LH R14,SPOOLID GET OUR HIGHEST @V304298 00907000
  997. LA R14,1(,R14) ADD ONE TO IT @V304298 00908000
  998. CH R14,=H'9900' MAX SPOOL FILE ID ? @VA07575 00908100
  999. BNH *+8 NO - OK ! @VA07575 00908200
  1000. LA R14,1 RESET TO ONE @VA07575 00908300
  1001. STH R14,0(R15) MAKE THAT THE NEW ONE @V304298 00909000
  1002. L R15,=A(DMKSYSCN) .. @V304235 00910000
  1003. LH R14,0(R15) GET COUNT OF SLOTS IN USE @V304235 00911000
  1004. CH R14,SLOT90P 90 % FULL ?? @V304235 00912000
  1005. BL EXIT0 RETURN TO CALLER IF NOT @V304235 00913000
  1006. BAL R6,MSG401I ELSE, LET OPERATOR KNOW .... @V304235 00914000
  1007. B EXIT0 RETURN TO CALLER @V304298 00915000
  1008. EJECT 00916000
  1009. *********************************************************************** 00917000
  1010. * 00918000
  1011. * GETSLOT - 00919000
  1012. * BRING THE SLOT SPECIFIED BY CCPDSLOT INTO CORE AND LOCK IT 00920000
  1013. * 00921000
  1014. *********************************************************************** 00922000
  1015. SPACE 00923000
  1016. GETSLOT CALL DMKPGTVG GET VIRT ADDR FOR SLOT @V304298 00924000
  1017. ST R1,VPAGSLOT SAVE IT @V304298 00925000
  1018. LM R0,R1,CCPDSLOT GET DASD AND VIRT ADDR @V304298 00926000
  1019. CALL DMKRPAGT,PARM=BRING+SYSTEM+LOCK @V304298 00927000
  1020. BNZ MSG915E PERM IO ERROR @V304298 00928000
  1021. ST R2,RADDSLOT SAVE REAL ADDRESS @V304298 00929000
  1022. CLI FFS,X'FF' SET CC=0 @V304298 00930000
  1023. BR R6 RETURN @V304298 00931000
  1024. SPACE 3 00932000
  1025. *********************************************************************** 00933000
  1026. * 00934000
  1027. * PUTSLOT - 00935000
  1028. * WRITE AND RELEASE THE SLOT PAGE JUST GOTTEN 00936000
  1029. * 00937000
  1030. *********************************************************************** 00938000
  1031. SPACE 00939000
  1032. PUTSLOT LM R0,R1,CCPDSLOT GET DASD AND VIRT ADDR @V304298 00940000
  1033. CALL DMKRPAPT,PARM=SYSTEM WRITE IT OUT @V304298 00941000
  1034. BNZ MSG915E PERMANENT IO ERROR @V304298 00942000
  1035. PUTSLOT0 SR R0,R0 CLEAR PARM REG @VM02131 00943000
  1036. CALL DMKRPAGT,PARM=SYSTEM RELEASE STORAGE PAGE @V304298 00944000
  1037. CALL DMKPGTVR RELEASE VIRTUAL PAGE @V304298 00945000
  1038. CLI FFS,X'FF' SET CC=0 @V304298 00946000
  1039. BR R6 RETURN @V304298 00947000
  1040. EJECT 00948000
  1041. *********************************************************************** 00949000
  1042. * 00950000
  1043. * FINDSLOT - 00951000
  1044. * THIS ROUTINE TAKES AS INPUT A SPOOL FILE ID AND RETURNS 00952000
  1045. * THE CYLINDER AND PAGE NUMBER AND DISPLACEMENT OF 00953000
  1046. * THE SPECIFIED SLOT. 00954000
  1047. * INPUT - 00955000
  1048. * GPR2 = SPOOL FILE ID 00956000
  1049. * = -1 IF WE WANT FIRST EMPTY SLOT 00957000
  1050. * OUTPUT - 00958000
  1051. * GPR3 = CYLINDER AND PAGE NUMBER OF SLOT (CCCCPPPP) 00959000
  1052. * GPR4 = DISPLACEMENT OF SLOT WITHIN PAGE 00960000
  1053. * GPR5 = POINTER TO MAP ENTRY FOR THE SLOT 00961000
  1054. * CC = 0 IF SLOT FOUND 00962000
  1055. * CC = 1 IF SLOT NOT FOUND(GPR 3,4,5 UNPREDICTABLE) 00963000
  1056. * GPR15 IS ALWAYS UNPREDICTABLE 00964000
  1057. * 00965000
  1058. *********************************************************************** 00966000
  1059. SPACE 00967000
  1060. FINDSLOT DS 0H @V304298 00968000
  1061. LA R4,2 INCREMENT @V304298 00969000
  1062. CLM R2,B'0011',MAPSHQ LOOKING FOR SHQBLOK ? @V304235 00970000
  1063. BE FSL2 XFER IF SO @V304298 00971000
  1064. L R3,RADDMAP SLOT ENTRY @V304298 00972000
  1065. FSL2 LA R5,4092(R3) COMPARAND @V304298 00973000
  1066. GETENTRY CLM R2,B'0011',0(R3) DO WE HAVE A MATCH ? @V304298 00974000
  1067. BE FNDSLOT XFER IF SO @V304298 00975000
  1068. CLC 0(L'MAPEND,R3),MAPEND IS IT THE END ? @V304235 00976000
  1069. BE ATEND XFER IF SO @V304298 00977000
  1070. BXLE R3,R4,GETENTRY TRY NEXT @V304298 00978000
  1071. ATEND CLM R2,B'0011',MAPFREE REQUEST FOR EMPTY MAP SLOT ? @V304235 00979000
  1072. BNE FSLOTRT1 RETURN CC=1 IF NOT @V304298 00980000
  1073. CR R3,R5 AT PHYSICAL END OF MAP ? @V304298 00981000
  1074. BH FSLOTRT1 IF SO, RETURN CC=1 @V304298 00982000
  1075. MVC 0(L'MAPFREE,R3),MAPFREE MARK MAP SLOT EMPTY @V304235 00983000
  1076. MVC 2(L'MAPEND,R3),MAPEND FLAG NEW END OF MAP @V304235 00984000
  1077. FNDSLOT DS 0H IF HERE, WE FOUND THE SLOT @V304298 00985000
  1078. CLM R2,B'0011',MAPFREE LOOKING FOR EMPTY SLOT ?? @V304235 00986000
  1079. BNE FNDSLOT1 NO, CONTINUE @V304235 00987000
  1080. L R15,=A(DMKSYSCN) @V304235 00988000
  1081. LH R4,0(R15) GET CURRENT MAP COUNT @V304235 00989000
  1082. LA R4,1(,R4) ADD 1 TO IT @V304235 00990000
  1083. STH R4,0(R15) AND SAVE UPDATED VALUE @V304235 00991000
  1084. TM DMKCKSSW,MSG90ISU 90 % MSG ISSUED YET ?? @V304235 00992000
  1085. BO FNDSLOT1 YES, NO NEED TO CHECK ON IT NOW @V304235 00993000
  1086. CH R4,SLOT90P HIT 90% MARK YET ?? @V304235 00994000
  1087. BL FNDSLOT1 NO, CONTINUE @V304235 00995000
  1088. ST R6,SAVREG SAVE R6 OVER CALL @V304235 00996000
  1089. BAL R6,MSG401I LET OPER KNOW WE ARE 90% FULL @V304235 00997000
  1090. L R6,SAVREG RESTORE REG 6 @V304235 00998000
  1091. FNDSLOT1 DS 0H @V304235 00999000
  1092. LR R15,R3 SET UP PTR TO MAP ENTRY(TEMP) @V304298 01000000
  1093. SL R3,RADDMAP GET THE SLOT NUMBER - 1 @V304298 01001000
  1094. SRL R3,1 ... @V304298 01002000
  1095. LR R5,R3 ... @V304298 01003000
  1096. C R5,MAXSLOTS BIGGER THAN MAXIMUM ? @V304298 01004000
  1097. BNL FSLOTRT1 IF SO, RETURN CC=1 @V304298 01005000
  1098. SR R4,R4 GET PAGE AND @V304298 01006000
  1099. D R4,SLOTPPAG ... DISPLACEMENT @V304298 01007000
  1100. MH R4,ENTRYSIZ DISPLACEMENT IN PAGE @V304298 01008000
  1101. ST R4,SAVREG SAVE IT TEMPORARILY @V304235 01009000
  1102. SR R4,R4 ZERO IT FOR THE NEXT DIVIDE @V304298 01010000
  1103. D R4,PAGPCYL GET CYL AND PAGE @V304298 01011000
  1104. LR R3,R5 CYLINDER NUMBER @V304298 01012000
  1105. AH R3,CKSSTART GET ABSOLUTE CYLINDER NUMBER @V304298 01013000
  1106. SLL R3,16 GET IT IN POSITION @V304298 01014000
  1107. OR R3,R4 PAGE NUMBER - 1 @V304298 01015000
  1108. AL R3,F1 INCREMENT PG NUMBER, LEAVE CYL @VA05106 01016100
  1109. L R4,SAVREG RESTORE DISPLACEMENT @V304235 01017000
  1110. LR R5,R15 PUT IT IN PERMANENT PLACE @V304298 01018000
  1111. TM FNDSLOT,0 SET CC=0 @V304298 01019000
  1112. BR R6 RETURN @V304298 01020000
  1113. FSLOTRT1 TM *,X'FF' SET CC=1 @V304298 01021000
  1114. BR R6 RETURN @V304298 01022000
  1115. EJECT 01023000
  1116. *********************************************************************** 01024000
  1117. * 01025000
  1118. * CKSINIT - 01026000
  1119. * THIS ROUTINE GETS A VIRTUAL PAGE ADDRESS FOR AND BRINGS 01027000
  1120. * IN THE CHECKPOINT SLOT MAP. THE FOLLOWING PROGRAM 01028000
  1121. * CONSTANTS ARE ALSO DEVELOPED HERE: 01029000
  1122. * 01030000
  1123. * MAXSLOTS - MAX NUMBER OF SLOTS AVAILABLE FOR CHECKPOINT 01031000
  1124. * USE 01032000
  1125. * SLOT90P - NUMBER OF SLOTS WHICH MUST BE IN USE BEFORE 01033000
  1126. * ISSUING DMKCKS401I (CHECKPOINT CYL 90% FULL) 01034000
  1127. * SLOT90R - NUMBER OF SLOTS WHICH MUST BE AVAILABLE AFTER 01035000
  1128. * DMKCKS401I HAS BEEN ISSUED BEFORE ISSUING IT 01036000
  1129. * AGAIN < C(SLOT90P)-24 > 01037000
  1130. * R10 - INTIALIZED TO 1ST CHECKPOINT RECORD FOR CALLS 01038000
  1131. * TO ROUTINE 'NEXTCYL'. 01039000
  1132. * 01040000
  1133. * THIS SUBROUTINE IS CALLLED BY DMKCKSIN AND DMKCKSWM. 01041000
  1134. * NO ERROR CONDITIONS ARE RETRUN BY THIS ROUTINE. 01042000
  1135. * 01043000
  1136. * CKSINITM - 01044000
  1137. * ROUTINE TO READ IN AND LOCK THE CHECKPOINT SLOT MAP. 01045000
  1138. * THIS ROUTINE IS CAALED BY DMKCKSPL. 01046000
  1139. * 01047000
  1140. **************************************************************** 01048000
  1141. SPACE 01049000
  1142. CKSINIT DS 0H @V304235 01050000
  1143. XC SAVEWRK2(32),SAVEWRK2 CLEAR WORK AREAS @V304235 01051000
  1144. CALL DMKPGTVG GET VIRTUAL PAGE FOR MAP @V304235 01052000
  1145. ST R1,DMKCKSMP SAVE IT FOR EVERYBODY @V304235 01053000
  1146. L R1,=A(DMKSYSCH) ADDRESS OF CHECKPOINT CYLINDER @V304235 01054000
  1147. MVC CKSSTART(4),0(R1) SAVE CHECKPOINT CYLINDERS @V304235 01055000
  1148. ST R6,SAVREG SAVE RETURN ADDRESS OVER CALL @V304235 01056000
  1149. LH R1,4(,R1) Get CUU of CKP area volume HRC075DK 01057000
  1150. CALL DMKSCNRU LOCATE RDEVBLOK @V304235 01058000
  1151. L R6,SAVREG RESTORE RETURN ADDRESS @V304235 01059000
  1152. USING RDEVBLOK,R8 @V304235 01060000
  1153. MVC CODSLOT(1),RDEVCODE+1 MOVE IN DEVICE CODE @V304235 01061000
  1154. MVC CKPTDVCD(1),RDEVCODE+1 SAVE IT @VM02131 01062000
  1155. LA R15,57 ASSUME IT IS A 3330 @V304235 01063000
  1156. CLI RDEVTYPE,TYP3330 IS IT ? @V304235 01064000
  1157. BE CSLOT0 XFER IF SO @V304235 01065000
  1158. LA R15,120 ASSUME IT IS A 3350 @V304498 01066000
  1159. CLI RDEVTYPE,TYP3350 IS IT ? @V304498 01067000
  1160. BE CSLOT0 XFER IF SO @V304498 01068000
  1161. LA R15,96 Assume it is a 3375 HRC106DK 01068100
  1162. CLI RDEVTYPE,TYP3375 Is it ? HRC106DK 01068200
  1163. BE CSLOT0 Xfer if so HRC106DK 01068300
  1164. LA R15,150 Assume it is a 3380 HRC106DK 01068400
  1165. CLI RDEVTYPE,TYP3380 Is it ? HRC106DK 01068500
  1166. BE CSLOT0 Xfer if so HRC106DK 01068600
  1167. LA R15,32 ASSUME IT IS A 2314 @V304235 01069000
  1168. CLI RDEVTYPE,TYP2314 IS IT ? @V304235 01070000
  1169. BE CSLOT0 XFER IF SO @V304235 01071000
  1170. LA R15,24 THEN IT IS A 2305 OR 3340 @V304235 01072000
  1171. CSLOT0 ST R15,PAGPCYL PAGES PER CYL FOR IPL DEVICE @V304235 01073000
  1172. LH R1,CKSEND ENDING CHECKPOINT CYLINDER @V304235 01074000
  1173. SH R1,CKSSTART STARTING CYLINDER @V304235 01075000
  1174. LA R1,1(,R1) NUMBER OF CHECKPOINT CYLS @V304235 01076000
  1175. MR R14,R1 NUMBER OF PAGES OF CHECKPOINT @V304235 01077000
  1176. ST R15,MAXPAG SAVE IT @V304235 01078000
  1177. MH R15,SLOTPPAG+2 GET MAXIMUM NUM OF SLOTS @V304235 01079000
  1178. C R15,MAXSLOTS GT PERMISSABLE MAX ? @V304235 01080000
  1179. BNL CSLOT1 IF SO, WE ALREADY HAVE MAX VALUE @V304235 01081000
  1180. ST R15,MAXSLOTS SAVE NEW MAX SLOT VALUE @V304235 01082000
  1181. L R15,MAXSLOTS GET MAXIMUM NUM OF SLOTS @V304235 01083000
  1182. SR R14,R14 CALC 90% VALUE @V304235 01084000
  1183. D R14,F10 . @V304235 01085000
  1184. L R14,MAXSLOTS .. @V304235 01086000
  1185. SR R14,R15 ... @V304235 01087000
  1186. STH R14,SLOT90P .... @V304235 01088000
  1187. S R14,F24 VALUE WE MUST REACH BEFORE @V304235 01089000
  1188. STH R14,SLOT90R RE-ISSUING 90% MSG @V304235 01090000
  1189. CSLOT1 L R2,=A(DMKSYSCN) @ OF SLOT MAP USAGE COUNT @V304235 01091000
  1190. XC 0(2,R2),0(R2) ZERO IT OUT TO BE SURE @V304235 01092000
  1191. DROP R8 @V304235 01093000
  1192. SR R10,R10 STARTING PAGE NUMBER - 1 @VM02131 01094000
  1193. ICM R10,B'1100',CKSSTART STARTING CYLINDER @VM02131 01095000
  1194. SPACE 01096000
  1195. CKSINITM EQU * @VM02131 01097000
  1196. L R1,DMKCKSMP GET MAP @V304235 01098000
  1197. TRANS 2,1,OPT=(BRING,DEFER,LOCK,SYSTEM) @V304235 01099000
  1198. ST R2,RADDMAP SAVE ITS REAL ADDRESS @V304235 01100000
  1199. BR R6 RETURN TO CALLER @V304235 01101000
  1200. EJECT 01102000
  1201. *********************************************************************** 01103000
  1202. * 01104000
  1203. * NEXTCYL - 01105000
  1204. * THIS ROUTINE UPDATES THE 'CCPD' TO THE NEXT LOGICAL 01106000
  1205. * CHECKPOINT RECORD. 01107000
  1206. * 01108000
  1207. * INPUT - R10=CCPP 01109000
  1208. * CC = CURRENT CYLINDER NUMBER 01110000
  1209. * PP = CURRENT PAGE NUMBER 01111000
  1210. * 01112000
  1211. * OUTPUT - R10 -> NEXT LOGICAL RECORD 01113000
  1212. * LOCATIONS CYLSLOT & PAGSLOT UPDATED 01114000
  1213. * 01115000
  1214. * EXIT CONDITIONS - 01116000
  1215. * R6+4 - NEXT RECORD VALID 01117000
  1216. * R6+0 - NEXT RECORD INVALID 01118000
  1217. * (OUT OF RANGE OF CHECKPOINT CYL) 01119000
  1218. * 01120000
  1219. *********************************************************************** 01121000
  1220. SPACE 01122000
  1221. NEXTCYL DS 0H @VM02131 01123000
  1222. NEXTCYL0 AL R10,F1 NEXT PAGE @VM02131 01124000
  1223. CLM R10,B'0011',PAGPCYL+2 FINISHED THIS CYLINDER? @VM02131 01125000
  1224. BNH NEXTCYL1 XFER IF NOT @VM02131 01126000
  1225. SRL R10,16 CYL NUM IN LOW ORDER @VM02131 01127000
  1226. LA R10,1(,R10) GO TO NEXT CYL @VM02131 01128000
  1227. CH R10,CKSEND ARE WE PAST THE LAST CYL? @VM02131 01129000
  1228. BHR R6 EXIT IF SO @VM02131 01130000
  1229. SLL R10,16 GET IT BACK IN POSITION @VM02131 01131000
  1230. B NEXTCYL0 START LOOP AGAIN @VM02131 01132000
  1231. SPACE 01133000
  1232. NEXTCYL1 EQU * @VM02131 01134000
  1233. STC R10,PAGSLOT GET THE PAGE IN CORE @VM02131 01135000
  1234. STCM R10,B'1100',CYLSLOT GET CYLINDER NUMBER @VM02131 01136000
  1235. B 4(R6) RETURN @VM02131 01137000
  1236. EJECT 01138000
  1237. *********************************************************************** 01139000
  1238. * 01140000
  1239. * ALOCIT - 01141000
  1240. * THIS SUBROUTINE SETS UP THE ALLOCATION BLOCKS FOR ALL 01142000
  1241. * SPOOL FILE DASD BUFFERS. 01143000
  1242. * INPUT - 01144000
  1243. * GPR1 = CCPD FOR THE PAGE TO BE ALLOCATED 01145000
  1244. * OUTPUT - 01146000
  1245. * THE GIVEN PAGE HAS ITS ALLOCATION BLOCKS SET UP 01147000
  1246. * NOTES - 01148000
  1247. * REGISTERS 0, 8, 14 AND 15 ARE USED BY THIS ROUTINE 01149000
  1248. * AS IS SAVEWRK1. 01150000
  1249. *********************************************************************** 01151000
  1250. ALOCIT LA R8,X'FF' MASK TO STRIP ALL BUT DEVICE CODE@V304298 01152000
  1251. NR R8,R1 DEVICE CODE IN REG 8 @V304298 01153000
  1252. ST R1,SAVEWRK1 SAVE IT FOR LATER @VA07295 01153050
  1253. L R1,=A(DMKSYSOC) GET NUMBER OF OWNED DEVICES @VA07295 01153150
  1254. CL R8,0(R1) WITHIN RANGE ? @VA07295 01153250
  1255. BNL MSG916E NO,BAD DEVICE CODE @VA07295 01153350
  1256. SLL R8,3 DEVICE CODE TIMES 8 @V304298 01154000
  1257. A R8,=A(DMKSYSOW) POINT TO OWNED LIST ENTRY @V304298 01155000
  1258. LA R0,OWNDVSER-OWNDLIST(,R8) POINT TO VOLID @V304298 01156000
  1259. LH R8,OWNDRDEV-OWNDLIST(,R8) POINT TO RDEVBLOK @V304298 01157000
  1260. LTR R8,R8 IS THE VOLUME MOUNTED ? @V304298 01158000
  1261. BM MSG912W ERROR IF NOT @V305435 01159000
  1262. SLL R8,3 CONVERT TO BYTE INDEX @V304298 01160000
  1263. A R8,ARIODV REALLY POINT TO IT @V304298 01161000
  1264. * WE NOW HAVE THE RDEVBLOK 01162000
  1265. L R1,SAVEWRK1 RESTORE R1 @VA07295 01163050
  1266. USING RDEVBLOK,R8 @V304298 01164000
  1267. TM RDEVFLAG,RDEVPREF PAGING ONLY VOLUME ? @VA07295 01164050
  1268. BO MSG916E YES,MUST BE BAD DEVICE CODE @VA07295 01164150
  1269. USING RECBLOK,R14 @V304298 01165000
  1270. L R14,RDEVRECS GET THE RECBLOK CHAIN @V304298 01166000
  1271. LOOPREC LTR R14,R14 IS THERE ANOTHER RECBLOK ? @V304298 01167000
  1272. BZ NEWCYL MUST ALLOCATE ANOTHER CYL NOW @V304298 01168000
  1273. CLM R1,B'1100',RECCYL IS IT FOR THIS CYLINDER ? @V304298 01169000
  1274. BE ALOCPAG GO ALLOCATE THE PAGE @V304298 01170000
  1275. L R14,RECPNT GET NEXT RECBLOK @V304298 01171000
  1276. B LOOPREC SEE IF THIS IS THE ONE @V304298 01172000
  1277. DROP R14 @V304298 01173000
  1278. SPACE 3 01174000
  1279. * IF WE GET HERE, THEN A NEW RECBLOK MUST BE CREATED FOR A 01175000
  1280. * NEWLY ALLOCATED CYLINDER, GPR 8 HAS THE RDEVBLOK 01176000
  1281. * RDEVALLN HAS ADDR OF ALLOCATION RECD CREATED BY DMKCPI 01177000
  1282. * +----+--+--+--+--+--+--+--+--+ 01178000
  1283. * |CYLS|00|01|02|03|04|- |- |FF| 01179000
  1284. * +----+--+--+--+--+--+--+--+--+ 01180000
  1285. SPACE 01181000
  1286. NEWCYL LA R0,RDEVSER POINT TO VOLID @VM03200 01182000
  1287. L R15,RDEVALLN POINTER TO ALLOCATION RECORD @VM03200 01183000
  1288. LTR R15,R15 ANY ALLOCATION DATA ? @V304298 01184000
  1289. BZ MSG912W PROBABLY NOT MOUNTED @V305435 01185000
  1290. SRL R1,16 SHIFT CYL NUM TO LOW ORDER @V304298 01186000
  1291. CH R1,0(R15) CYL NUMBER VALID ( < MAXCYL) ? @VA08528 01186100
  1292. BH MSG916E NO, BAD CYLINDER NUMBER @VA08528 01186200
  1293. LA R14,2(R1,R15) POINT TO CORRECT CYLINDER BYTE @V304298 01187000
  1294. CLI 0(R14),0 IS IS ALREADY ALLOCATED ? @V304298 01188000
  1295. BE TMPALLOC NO, MARK TEMP IN USE @VM00019 01189000
  1296. CLI 0(R14),TEMP IS IT ALREADY ALLOCATED? @VM00019 01189100
  1297. BNE MSG903E NO GOOD IF ALREADY ALLOCATED @VM00019 01189200
  1298. TMPALLOC MVI 0(R14),ALLOC MARK AS TEMP ALLOCATED @VM00019 01189300
  1299. SPACE 2 01191000
  1300. * BUILD A RECBLOK FOR THE NEWLY ALLOCATED CYLINDER 01192000
  1301. LA R0,RECSIZE LENGTH OF RECBLOK @V304298 01193000
  1302. CALL DMKFREE GET STORAGE @V304298 01194000
  1303. USING RECBLOK,R1 TEMPORARILY @V304298 01195000
  1304. ST R8,RECPNT SAVE R8 TEMPORARILY @V304298 01196000
  1305. MVC RECCYL,SAVEWRK1 MOVE IN THE CYL NUMBER @V304298 01197000
  1306. MVI RECUSED,X'00' NO PAGES IN USE YET @V304298 01198000
  1307. LA R15,57 ASSUME A 3330 @V304298 01199000
  1308. CLI RDEVTYPE,TYP3330 IS IT ? @V304298 01200000
  1309. BE NEWRECB XFER IF SO @V304298 01201000
  1310. LA R15,120 ASSUME A 3350 @V304498 01202000
  1311. CLI RDEVTYPE,TYP3350 IS IT A 3350 ? @V304498 01203000
  1312. BE NEWRECB XFER IF SO @V304498 01204000
  1313. LA R15,96 Assume a 3375 HRC106DK 01204100
  1314. CLI RDEVTYPE,TYP3375 Is it a 3375 ? HRC106DK 01204200
  1315. BE NEWRECB Xfer if so HRC106DK 01204300
  1316. LA R15,150 Assume a 3380 HRC106DK 01204400
  1317. CLI RDEVTYPE,TYP3380 Is it a 3380 ? HRC106DK 01204500
  1318. BE NEWRECB Xfer if so HRC106DK 01204600
  1319. LA R15,32 ASSUME A 2314 @V304298 01205000
  1320. CLI RDEVTYPE,TYP2314 IS IT ? @V304298 01206000
  1321. BE NEWRECB XFER IF SO @V304298 01207000
  1322. LA R15,24 THEN IT IS A 2305 OR 3340 @V304298 01208000
  1323. NEWRECB DS 0H @V304298 01209000
  1324. STC R15,RECMAX MAX NUMBER OF PAGES @V304298 01210000
  1325. LR R8,R15 SAVE NUMBER OF PAGES @V304498 01212000
  1326. LM R14,R15,FFS SET UP BIT MAP @V304498 01213000
  1327. CH R8,=H'64' 'Small' no. of pages per cyl.? HRC106DK 01214100
  1328. BL SMALLPPC Use the beginning of RECMAP HRC106DK 01214600
  1329. CH R8,=H'128' 'Medium' no. of pages per cyl.? HRC106DK 01215100
  1330. BL MIDPPC Use the middle of RECMAP HRC106DK 01215600
  1331. SH R8,=H'128' Get rid of bits accounted for HRC106DK 01216100
  1332. XC RECMAP(16),RECMAP Clear start, middle of RECMAP HRC106DK 01216600
  1333. SRDL R14,0(R8) Insert one zero per avail. page HRC106DK 01217100
  1334. STM R14,R15,RECMAP+16 Set up end of RECMAP HRC106DK 01217600
  1335. B MAPFIN RECMAP completely set up HRC106DK 01218100
  1336. MIDPPC SH R8,=H'64' Get rid of bits accounted for HRC106DK 01218600
  1337. STM R14,R15,RECMAP+16 Set all bits at end of RECMAP HRC106DK 01219100
  1338. SRDL R14,0(R8) Insert one zero per avail. page HRC106DK 01219600
  1339. STM R14,R15,RECMAP+8 Set up middle of RECMAP HRC106DK 01220100
  1340. XC RECMAP(8),RECMAP Clear beginning of RECMAP HRC106DK 01220600
  1341. B MAPFIN RECMAP completely set up HRC106DK 01221100
  1342. SMALLPPC STM R14,R15,RECMAP+16 Set all bits at end of RECMAP HRC106DK 01221600
  1343. STM R14,R15,RECMAP+8 Set all bits in RECMAP middle HRC106DK 01222100
  1344. SRDL R14,0(R8) Insert one zero per avail. page HRC106DK 01222600
  1345. STM R14,R15,RECMAP Set up beginning of RECMAP HRC106DK 01223100
  1346. MAPFIN EQU * @V304498 01226000
  1347. L R8,RECPNT RESTORE REG 8 @V304298 01227000
  1348. L R14,=A(DMKPGTTU) INCREMENT TOTAL CYLS IN USE @V304298 01228000
  1349. L R15,0(,R14) GET IT @V304298 01229000
  1350. LA R15,1(R15) INCREMENT IT @V304298 01230000
  1351. ST R15,0(,R14) STORE IT @V304298 01231000
  1352. SPACE 2 01232000
  1353. * NOW CHAIN THE RECBLOK INTO THE RDEVRECS CHAIN 01233000
  1354. DROP R1 @V304298 01234000
  1355. USING RECBLOK,R14 BACK TO NORMAL @V304298 01235000
  1356. LR R14,R1 SAVE RECBLOK ADDRESS @V304298 01236000
  1357. SR R1,R1 CLEAR IT @V304298 01237000
  1358. CH R1,RECCYL ALLOCATING ON CYL 0 ? @V304298 01238000
  1359. BNE CHAINIT NO --WE'RE ALL SET THEN @V304298 01239000
  1360. IC R1,RECMAX GET NUMBER OF RECORDS PER TRACK @V304498 01240000
  1361. CLI RECMAX,64 Is this a 'large' device? HRC106DK 01241100
  1362. BNH OTHERDEV Reserve only three pages HRC106DK 01242100
  1363. MVI RECMAP,B'11110000' MARK PAGES AS ALLOCATED @V304498 01243000
  1364. SL R1,F4 ADJUST THE RECORD COUNT @V304498 01244000
  1365. B SAVETOT SAVE NEW RECORD COUNT @V304498 01245000
  1366. OTHERDEV MVI RECMAP,B'11100000' MARK FIRST 3 PAGES ALLOCATED @V304498 01246000
  1367. SL R1,F3 ADJUST THE RECORD COUNT @V304498 01247000
  1368. SAVETOT STC R1,RECMAX STORE THE NEW COUNT @V304498 01248000
  1369. SPACE 2 01249000
  1370. * CHAIN THIS RECBLOK INTO THE RDEVRECS CHAIN IN PROPER ORDER. 01250000
  1371. * THIS ORDER IS BASED ON DISTANCE OF CYLINDER FROM 01251000
  1372. * CENTER OF DISK. 01252000
  1373. CHAINIT L R1,RDEVALLN GET ALOCBLOK @V304298 01253000
  1374. LH R0,0(,R1) NUMBER OF CYLINDERS @V304298 01254000
  1375. SRL R0,1 GET MIDDLE CYLINDER @V304298 01255000
  1376. STH R0,MIDCYL SAVE IT @V304298 01256000
  1377. SH R0,RECCYL GET CURRENT DISPLACEMENT @V304298 01257000
  1378. LPR R0,R0 MAKE IT POSITIVE @V304298 01258000
  1379. STH R0,CURDISP SAVE IT @V304298 01259000
  1380. LA R1,RDEVRECS PREVIOUS RECBLOK @V304298 01260000
  1381. L R15,RDEVRECS POINT TO FIRST RECBLOK @V304298 01261000
  1382. B LOOPIT6 MAKE THE TEST @V304298 01262000
  1383. LOOPIT5 LH R0,RECCYL-RECBLOK(,R15) GET DISP OF THIS RECBLOK@V304298 01263000
  1384. SH R0,MIDCYL SUBTRACT MIDDLE CYLINDER @V304298 01264000
  1385. LPR R0,R0 MAKE IT POSITIVE @V304298 01265000
  1386. CH R0,CURDISP IS IT BIGGER THAN OURS ? @V304298 01266000
  1387. BH CHAINT IF SO, GO CHAIN IT @V304298 01267000
  1388. LR R1,R15 NEW PREVIOUS RECBLOK @V304298 01268000
  1389. L R15,RECPNT-RECBLOK(,R15) NEXT RECBLOK ON CHAIN @V304298 01269000
  1390. LOOPIT6 LTR R15,R15 ARE WE AT THE END YET ? @V304298 01270000
  1391. BNZ LOOPIT5 XFER IF NOT @V304298 01271000
  1392. SPACE 01272000
  1393. CHAINT ST R15,RECPNT WE POINT TO NEXT RECBLOK @V304298 01273000
  1394. ST R14,RECPNT-RECBLOK(,R1) PREVIOUS POINTS TO US @V304298 01274000
  1395. L R1,SAVEWRK1 RESTORE CCPD TO REG 1 @V304298 01275000
  1396. SPACE 4 01276000
  1397. * NOW WE ALLOCATE THE PAGE ON THE GIVEN CYLINDER 01277000
  1398. * AT THIS POINT GPR 14 POINTS TO THE RECBLOK IN QUESTION 01278000
  1399. * IN ADDITION, REGISTER 1 HAS THE CCPD TO BE ALLOCATED 01279000
  1400. ALOCPAG DS 0H @V304298 01280000
  1401. SR R15,R15 CLEAR WORKL REGISTER @V304298 01281000
  1402. IC R15,RECUSED GET NUMB OF RECDS IN USE @V304298 01282000
  1403. CLC RECUSED(1),RECMAX ARE WE AT MAXIMUM OR ABOVE @V304298 01283000
  1404. * IT ? 01284000
  1405. BNL MSG916E SOMETHING WRONG IF SO @V304298 01285000
  1406. LA R15,1(,R15) INCREMENT RECS IN USE @V304298 01286000
  1407. STC R15,RECUSED SAVE IT @V304298 01287000
  1408. SPACE 2 01288000
  1409. * GET THE PAGE NUMBER ISOLATED 01289000
  1410. SRL R1,8 PAGE IN LOW ORDER OF R1 @V304298 01290000
  1411. N R1,F255 GET RID OF CYLINDER @V304298 01291000
  1412. BCTR R1,0 PAGE NUMBER RELATIVE TO ZERO @V304298 01292000
  1413. LR R0,R1 INTO REG 0 FOR SHIFTING @V304298 01293000
  1414. SRDL R0,3 DIVIDE BY 8 @V304298 01294000
  1415. SRL R1,29 GET REMAINDER @V304298 01295000
  1416. IC R1,ALLOCTBL(R1) GET BIT MASK TO ALLOCATE @V304298 01296000
  1417. LA R15,RECMAP START OF PAGE MAP @V304298 01297000
  1418. ALR R15,R0 POINT TO BYTE CONTAINING BIT @V304298 01298000
  1419. EX R1,TEST ALREADY ALLOCATED ? @V304298 01299000
  1420. BNZ MSG916E SOMETHING WRONG IF SO @V304298 01300000
  1421. EX R1,ALLOCATE ALLOCATE THE PAGE @V304298 01301000
  1422. L R1,SAVEWRK1 RESTORE REGISTER 1 @V304298 01302000
  1423. BR R6 RETURN WITH PAGE ALLOCATED @V304298 01303000
  1424. EJECT 01304000
  1425. * 01305000
  1426. * ERROR MESSAGES AND WAIT STATES 01306000
  1427. * 01307000
  1428. SPACE 2 01308000
  1429. MSG400I EQU * CHECKPOINT AREA IS FULL @VM03037 01309000
  1430. MVI DMKCKSSW,CKPTSTOP STOP CHECKPOINTING @VA08189 01309500
  1431. LA R2,400 ERROR CODE .... @V304235 01310000
  1432. LA R1,CKPTTXT @ VARIABLE TEXT @V304235 01311000
  1433. LA R0,CKPTMSGL LENGTH OF VARIABLE TEXT @V304235 01312000
  1434. BAL R15,PUTMSGI DISPLAY ERROR MESSAGE @VM03037 01313000
  1435. * NOW INVALIDATE THE CHECKPOINT CYLINDER 01314000
  1436. SPACE 01315000
  1437. STOP1 MVI DMKCKSSW,CKPTSTOP STOP CHECKPOINTING @VM02131 01316000
  1438. MVC CYLSLOT(2),CKSSTART FIRST CYLINDER @V304235 01317000
  1439. MVI PAGSLOT,X'01' FIRST PAGE @V304235 01318000
  1440. BAL R6,GETSLOT BRING IT INTO CORE @V304235 01319000
  1441. L R4,RADDSLOT ADDRESSIBILITY @V304235 01320000
  1442. MVC 0(4,R4),ZEROES INVALIDATE IT @V304235 01321000
  1443. BAL R6,PUTSLOT WRITE IT BACK TO DASD @V304235 01322000
  1444. B MSG919E @V304235 01323000
  1445. SPACE 01324000
  1446. MSG401I EQU * CHECKPOINT SPACE 90 % FULL @V304235 01325000
  1447. LA R2,401 ERROR CODE @V304235 01326000
  1448. LA R1,CKPTTXT VARIABLE PORTION OF TEXT @V304235 01327000
  1449. LA R0,CKPTMSGL LENGTH OF VARIABLE PORTION @V304235 01328000
  1450. BAL R15,PUTMSGI DISPLAY MSG ... @V304235 01329000
  1451. OI DMKCKSSW,MSG90ISU IND 90% MSG ISSUED @VM02131 01330000
  1452. BR R6 RETURN TO CALLER @V304235 01331000
  1453. SPACE 01332000
  1454. MSG903E EQU * ALLOC ON NON-TEMP CYLINDER @V304235 01333000
  1455. LA R2,903 ERROR CODE @V304235 01334000
  1456. XC SAVEWRK7(L'SAVEWRK7*3),SAVEWRK7 MSG AREA @VM03200 01335000
  1457. LR R15,R0 ADDRESS OF VOLID @VM03200 01336000
  1458. MVC SAVEWRK7(L'RDEVSER),RDEVSER-RDEVSER(R15) VOLID @VM03200 01337000
  1459. CALL DMKCVTBD CONVERT CYL. NUMBER TO DECIMAL @VM03200 01338000
  1460. STCM R1,7,SAVEWRK9 SAVE CYLINDER NUMBER @VM03200 01339000
  1461. LA R1,SAVEWRK7 ADDRESS OF ERROR MESSAGE @VM03200 01340000
  1462. LA R0,L'SAVEWRK7*3 AND ITS LENGTH @VM03200 01341000
  1463. BAL R15,PUTMSGW DISPLAY MSG @V304235 01342000
  1464. B CNSWAIT @V304235 01343000
  1465. SPACE 01344000
  1466. MSG912W EQU * VOLUME NOT MOUNTED FOR ALLOC @V304235 01345000
  1467. LA R2,912 ERROR CODE @V304235 01346000
  1468. XC SAVEWRK7(L'SAVEWRK7*2),SAVEWRK7 CLEAR MSG AREA @V304298 01347000
  1469. LR R15,R0 ADDRESS OF VOLID @VM03200 01348000
  1470. MVC SAVEWRK7(L'RDEVSER),RDEVSER-RDEVSER(R15) SV VOLI@V304298 01349000
  1471. LA R1,SAVEWRK7 ADDRESS OF VARIABLE DATA @VM03200 01350000
  1472. LA R0,L'RDEVSER LENGTH OF MESSAGE @VM03200 01351000
  1473. BAL R15,PUTMSGW DISPLAY MSG @V304235 01352000
  1474. B CNSWAIT @V304235 01353000
  1475. EJECT 01354000
  1476. SPACE 01355000
  1477. MSG915E EQU * PERM I/O ERROR ON CKPT CYL @V304235 01356000
  1478. BAL R6,PUTSLOT0 FREE UP VM SPACE AND CCPD @VM02131 01357000
  1479. LA R2,915 ERROR CODE @V304235 01358000
  1480. SR R1,R1 @V304235 01359000
  1481. BAL R15,PUTMSGE @V304235 01360000
  1482. LA R1,CKSLOCK ADDRESS OF ROUTINE LOCK @V304235 01361000
  1483. CALL DMKLOCKT IS THE LOCK ON ? @V304235 01362000
  1484. BZ STOP2 WE ARE RECOVERING IF NOT @V304235 01363000
  1485. CLI DMKCKSSW,CKPTSTOP TRYING TO INVALIDATE CKPT @VM02131 01364000
  1486. BE MSG919E CYL ?, IF SO, JUST SEND MESSAGE @VM02131 01365000
  1487. B STOP1 ELSE, INVALIDATE CKPT CYL FIRST @VM02131 01366000
  1488. STOP2 TM PARM2,CKPT IS IT 'CKPT' OPTION ? @VM02131 01367000
  1489. BO CNSWAIT NO - LOAD DISABLE WAIT STATE PSW @VM03268 01368000
  1490. * WE ARE ONLY CALLED FROM GETSLOT AND PUTSLOT 01369000
  1491. * SET CC¬=0 AND RETURN VIA GPR 6 01370000
  1492. CLI PAGSLOT,X'01' ERROR OCCURRING ON FIRST PAGE ? @VM02131 01371000
  1493. BNE CKSWM1 NO ..., CONTINUE WITH "FORCE" @VM02131 01372000
  1494. CLC CYLSLOT(2),CKSSTART WAS IT RECORD 1 ?? @VM02131 01373000
  1495. BNE CKSWM1 NO ..., CONTINUE WITH "FORCE" @VM02131 01374000
  1496. B CNSWAIT ELSE, END IT ALL ............. @VM02131 01375000
  1497. SPACE 01376000
  1498. MSG916E EQU * ERROR ALLOCATING A FILE @V304235 01377000
  1499. LA R2,916 ERROR CODE @V304235 01378000
  1500. SR R1,R1 @V304235 01379000
  1501. BAL R15,PUTMSGE DISPLAY MSG @V304235 01380000
  1502. MVI DMKCKSSW,CKPTSTOP STOP CHECKPOINTING @V304235 01381000
  1503. TM PARM2,FORCE IS IT A FORCE ? @V304235 01382000
  1504. BO CKSWM6A1 DELETE THE FILE IF SO @V304235 01383000
  1505. B CNSWAIT OTHERWISE, LOAD DISABLE PSW @V303250 01384000
  1506. SPACE 01385000
  1507. MSG917E EQU * CHECKPOINT CYL INVALID @V304235 01386000
  1508. LA R2,917 ERROR CODE @V304235 01387000
  1509. SR R1,R1 @V304235 01388000
  1510. BAL R15,PUTMSGE DISPLAY MSG @V304235 01389000
  1511. CALL DMKQCNSY WAIT FOR OUPUT TO COMPLETE HRC035DK 01390190
  1512. LA R2,8 HRC035DK 01390380
  1513. ST R2,SAVER2 HRC035DK 01390570
  1514. B CKSEXIT HRC035DK 01390760
  1515. SPACE 01391000
  1516. MSG919E EQU * CHECKPOINT TERMINATED @V304235 01392000
  1517. LA R2,919 ERROR CODE @V304235 01393000
  1518. SR R1,R1 @V304235 01394000
  1519. BAL R15,PUTMSGE DISPLAY MSG @V304235 01395000
  1520. B CKSEXIT EXIT TO CALLER @V304235 01396000
  1521. SPACE 01397000
  1522. CNSWAIT EQU * @V304235 01398000
  1523. CALL DMKQCNSY WAIT FOR OUPUT TO COMPLETE @V304235 01399000
  1524. LPSW PSW00E DISABLE WAIT STATE @VM03268 01400000
  1525. EJECT 01401000
  1526. PUTMSGE O R2,MSGTYPE SET PARMS FOR 'E' TYPE MSG @V304235 01402000
  1527. B PUTMSG @V304235 01403000
  1528. PUTMSGW O R2,MSGTYPW SET PARMS FOR 'W' TYPE MSG @V304235 01404000
  1529. B PUTMSG @V304235 01405000
  1530. PUTMSGI O R2,MSGTYPI SET PARMS FOR 'I' TYPE MSG @V304235 01406000
  1531. SPACE 01407000
  1532. PUTMSG ICM R0,B'1110',DMKCKS+3 MODULE ID @V304235 01408000
  1533. ST R15,SAVREG15 SAVE RETURN @ @V304235 01409000
  1534. CALL DMKERMSG @V304235 01410000
  1535. L R15,SAVREG15 RESTORE RETURN @ @V304235 01411000
  1536. BR R15 RETURN @V304235 01412000
  1537. SPACE 01413000
  1538. PSW00E DS 0D @V304298 01414000
  1539. DC X'000A00000000000E' WAIT STATE CODE E @V304298 01415000
  1540. EJECT 01416000
  1541. COPY SAVE @V304298 01417000
  1542. DMKCKS CSECT , @V304298 01418000
  1543. EJECT 01419000
  1544. *********************************************************************** 01420000
  1545. * 01421000
  1546. * CONSTANTS AND WORK AREAS 01422000
  1547. * 01423000
  1548. *********************************************************************** 01424000
  1549. SPACE 01425000
  1550. RADDMAP EQU SAVEWRK2 REAL ADDR OF MAP BUFFER @V304298 01426000
  1551. PARM1 EQU SAVER2+2 PARMS PASSED BY CALLER @V304235 01427000
  1552. PARM2 EQU SAVER2+3 PARMS PASSED BY CALLER @V304235 01428000
  1553. SPACE 1 01429000
  1554. * ADDITIONAL BITS DEFINED IN 'PARM2' 01430000
  1555. FORCE EQU X'40' 'FORCE' A CHECKPOINT/RESTART @V304235 01431000
  1556. CKPT EQU X'20' RESTART FROM CHECKPOINT CYLINDER @V304235 01432000
  1557. WARMAUTO EQU X'10' AUTOMATIC WARM START RECOVERY @V304235 01433000
  1558. SHUTDOWN EQU X'08' SHUTDOWN THE SYSTEM @V304235 01434000
  1559. DRAIN EQU X'04' 'DRAIN' THE SPOOLING DEVICES @V304235 01435000
  1560. WARM EQU X'02' 'WARM' GIVEN FROM IPL'D FROM @V304235 01436000
  1561. * OPERATOR 01437000
  1562. COLD EQU X'01' CLEAR THE WARM/CHECKPOINT @V304235 01438000
  1563. * CYLINDERS 01439000
  1564. TEMP EQU X'08' TEMP SPACE @VM00019 01439100
  1565. ALLOC EQU X'80' ALLOCATE TEMPORARILY @VM00019 01439200
  1566. SPACE 1 01440000
  1567. SPACE 01441000
  1568. CCPDSLOT EQU SAVEWRK3 SLOT DASD ADDRESS @V304298 01442000
  1569. CYLSLOT EQU SAVEWRK3 CHECKPOINT CYLINDER NUMBER @V304298 01443000
  1570. PAGSLOT EQU SAVEWRK3+2 PAGE NUMBER OF SLOT @V304298 01444000
  1571. CODSLOT EQU SAVEWRK3+3 DEVICE CODE FOR SLOT @V304298 01445000
  1572. VPAGSLOT EQU SAVEWRK4 VIRT ADDR OF SLOT BUFFER @V304298 01446000
  1573. RADDSLOT EQU SAVEWRK5 REAL ADDR OF SLOT BUFFER @V304298 01447000
  1574. CCPDBUFF EQU SAVEWRK6 BUFFER DASD ADDRESS @V304298 01448000
  1575. CYLBUFF EQU SAVEWRK6 CHECKPOINT CYLINDER NUMBER @V304298 01449000
  1576. PAGBUFF EQU SAVEWRK6+2 PAGE NUMBER FOR BUFFER @V304298 01450000
  1577. CODBUFF EQU SAVEWRK6+3 DEVICE CODE FOR BUFFER @V304298 01451000
  1578. VPAGBUFF EQU SAVEWRK7 VIRT ADDR OF BUFFER @V304298 01452000
  1579. RADDBUFF EQU SAVEWRK8 READ ADDR OF BUFFER @V304298 01453000
  1580. SAVREG EQU SAVEWRK8 TEMP REG SAVE AREA FOR FINDSLOT @V304235 01454000
  1581. TOPSLOT EQU SAVEWRK9 LOCATION OF DELIMITER @V304298 01455000
  1582. SPACE 1 01456000
  1583. DS 0H @VM02131 01457000
  1584. MAPFREE DS 0XL2 MAP ENTRY HAS NOT BEEN ALLOCATED @VM02131 01458000
  1585. SLOTFREE DC X'FFFFFFFF' DASD SLOT ENTRY NOT ALLOCATED @VM02131 01459000
  1586. SLOTDEV DC X'EEEEEEEE' DASD SLOT CONTAINS REAL DEVICE @VM02131 01460000
  1587. MAPSHQ DS 0XL2 MAP USED FOR SPOOL HOLD QUEUE @VM02131 01461000
  1588. * INFO. 01462000
  1589. SLOTSHQ DC X'AAAAAAAA' DASD SLOT CONTAINS SPOOL HOLD @VM02131 01463000
  1590. * QUEUE BLOK 01464000
  1591. MAPEND DC X'FEFE' LAST MAP ENTRY ALLOCATED (END @VM02131 01465000
  1592. * OF LIST) 01466000
  1593. EJECT 01467000
  1594. CKPTSTOP EQU X'FF' TERMINATE RECORDING OF @V304235 01468000
  1595. CKPTTXT DC C'CHECKPOINT' VARIABLE PORTION OF MSG 400 & 401@V304235 01469000
  1596. CKPTMSGL EQU *-CKPTTXT @V304235 01470000
  1597. DS 0F @V304235 01471000
  1598. MSGTYPE DC X'B8C50000' - E TYPE MSG PARM FOR DMKERM @V304235 01472000
  1599. MSGTYPW DC X'B8E60000' - W TYPE MSG PARM FOR DMKERM @V304235 01473000
  1600. MSGTYPI DC X'B8C90000' - I TYPE MSG PARM FOR DMKERM @V304235 01474000
  1601. SAVREG15 DS F - REG SAVE AREA FOR PUTMSG @V304235 01475000
  1602. * CHECKPOINT RECORDS 01476000
  1603. MSG90ISU EQU X'F0' 90% FULL MSG ISSUED FLAG @V304235 01477000
  1604. SPACE 01478000
  1605. DMKCKSMP DC A(0) VADDR OF CKPNT CYL MAP @V304298 01479000
  1606. CKSSTART DC H'0' STARTING CHECKPOINT CYLINDER @V304298 01480000
  1607. CKSEND DC H'0' ENDING CHECKPOINT CYLINDER @V304298 01481000
  1608. PAGPCYL DC F'0' PAGES PER CYL FOR IPL DEVICE @V304298 01482000
  1609. SLOTPPAG DC F'36' SFBLOKS PER PAGE @VA12674 01483100
  1610. MAXPAG DC F'57' MAXIMUM PAGES FOR SLOTS @V304298 01484000
  1611. MAXSLOTS DC F'2048' MAX SFBLOKS THAT CAN BE STORED @V304298 01485000
  1612. ENTRYSIZ DC H'104' SFBSIZE*8 (SFBLOK IN BYTES) @VA12674 01486100
  1613. CYLNO DC H'202' CHECKPOINT CYLINDER NUMBER @V304298 01487000
  1614. CKSLOCK DC CL8'<SPLCHK>' LOCK FOR THIS ROUTINE @V304298 01488000
  1615. MAXFILE DC F'9900' - MAX SPOOL FILE ID NUMBER @V304235 01489000
  1616. SLOT90P DC AL2(2048-(2048/10)) 90% OF MAX NUMBER OF SLOTS @V304235 01490000
  1617. SLOT90R DC AL2(2048-(2048/10)-24) 90% MSG GRACE VALUE .. @V304235 01491000
  1618. * THE ABOVE FIGURE IS THE NUMBER OF SLOTS THAT 01492000
  1619. * MUST BE REACHED AFTER A 90% FULL CONDITION IS 01493000
  1620. * REACHED BEFORE WE WILL AGAIN ISSUE DMKCKS401I. 01494000
  1621. * THIS SHOULD PREVENT THE OPERATOR FROM BEING 01495000
  1622. * INUNDATED WITH MESSAGES WHILE SPOOL FILE 01496000
  1623. * ACTIVITY IS OCCURING AROUND THE 90% MARK. 01497000
  1624. PREVBUFF DS F CCPD OF PREVIOUS VALID DASD @V304298 01498000
  1625. * BUFFER FOR OPEN SPOOL FILE 01499000
  1626. HOLDR14 DS F TEMP SAVE FOR REGS 14 & 15 @V304298 01500000
  1627. HOLDR15 DS F ACROSS CALL TO ALOCIT FOR DUMP @V304298 01501000
  1628. SPOOLID DC H'0' MAINTAIN HIGHEST ID HERE @V304298 01502000
  1629. MIDCYL DS H SAVE THE MIDDLE CYLINDER FOR @V304298 01503000
  1630. * ALOCIT 01504000
  1631. CURDISP DS H SAVE CURR. DISPL. FOR ALOCIT @V304298 01505000
  1632. EJECT 01506000
  1633. SPACE 4 01507000
  1634. ALLOCTBL EQU * BIT MAP WHOSE ENTRIES ARE LOCATED@V304298 01508000
  1635. * BY INDEXING FROM THE REMAINDER AFTER 01509000
  1636. * GETTING THE BYTE DISPLACEMENT INTO 01510000
  1637. * ALOCMAP FOR THE CYLINDER TO BE 01511000
  1638. * ALLOCATED 01512000
  1639. DC X'8040201008040201' @V304298 01513000
  1640. SPACE 01514000
  1641. TEST TM 0(R15),0 EXECUTED TO TEST IF PAGE @V304298 01515000
  1642. * HAS BEEN ALLOCATED PREMATURELY 01516000
  1643. SPACE 01517000
  1644. ALLOCATE OI 0(R15),0 EXECUTED TO MARK A PAGE @V304298 01518000
  1645. * AS ALLOCATED 01519000
  1646. SPACE 5 01520000
  1647. ENTRY DMKCKSSW @VM02131 01521000
  1648. DMKCKSSW DC X'00' SWITCH FOR CHECKPOINTING @VM02131 01522000
  1649. CKPTDVCD DC X'00' DEVICE CODE FOR CHECKPOINT CYL @VM02131 01523000
  1650. EJECT 01524000
  1651. SPACE 1 01525000
  1652. LTORG @VM03038 01526000
  1653. EJECT 01527000
  1654. SPACE 3 01528000
  1655. PSA @V304298 01529000
  1656. COPY SPOOL @V304298 01530000
  1657. COPY NPRTBL @V60B9BA 01530100
  1658. COPY VMBLOK @V304298 01531000
  1659. COPY EQU @V304298 01532000
  1660. COPY RBLOKS @V304298 01533000
  1661. COPY ALLOC @V304298 01534000
  1662. COPY DEVTYPES @V304298 01535000
  1663. END 01536000