Table of Contents

DMSREA Source

References

Source Listing

DMSREA.ASSEMBLE.txt
  1. REA TITLE 'DMSREA (CMS) VM/370 - RELEASE 6' 00001000
  2. ISEQ 73,80 00002000
  3. *. 00003000
  4. * MODULE NAME - DMSREA 00004000
  5. * 00005000
  6. * DESCRIPTIVE NAME - ERROR RECORD READ ROUTINE. 00006000
  7. * 00007000
  8. * COPYRIGHT - NONE 00008000
  9. * 00009000
  10. * CHANGE ACTIVITY - NOT APPLICABLE 00010000
  11. * 00011000
  12. * FUNCTION - 00012000
  13. * DMSREA IS AN INTERFACE MODULE FOR THE CMS CPEREP COMMAND. 00013000
  14. * DMSREA READS A SPECIFIED LOGICAL RECORD FROM THE VM/370 00014000
  15. * ERROR RECORDING CYLINDERS AND RETURNS IT TO THE CALLER. 00015000
  16. * THE CALLER SPECIFIES WHICH LOGICAL RECORD HE WANTS BY 00016000
  17. * PASSING A RECORD ADDRESS TO DMSREA. THE RECORD ADDRESS 00017000
  18. * FORMAT RESEMBLES THE STANDARD 5 BYTE CCHHR DISK ADDRESS 00018000
  19. * FORMAT, BUT IS A LITTLE DIFFERENT. THE FORMAT IS: 00019000
  20. * CCB0R 00020000
  21. * WHERE: 00021000
  22. * CC - IS THE RELATIVE DASD CYLINDER ADDRESS (RELATIVE TO 00022000
  23. * THE FIRST OF THE ERROR CYLINDERS, E.G., CC IS 00023100
  24. * X'0000', X'0001', ...,X'0008'). 00024100
  25. * B - IS THE NUMBER OF THE 4K BLOCK (OR PAGE) WITHIN THE 00025000
  26. * SPECIFIED DASD CYLINDER. 00026000
  27. * 0 - A BYTE OF ZERO. 00027000
  28. * R - LOGICAL RECORD NUMBER OF A RECORD WITHIN THE 00028000
  29. * SPECIFIED BLOCK. THE BLOCK CONTAINS VARIABLE LENGTH 00029000
  30. * RECORDS, EACH PRECEEDED BY THE STANDARD 4 BYTE RECORD 00030000
  31. * DESCRIPTOR WORD WHICH CONTAINS THE RECORD LENGTH. 00031000
  32. * SINCE RECORDS IN THE ERROR RECORDING CYLINDERS ARE 00032000
  33. * NEVER LESS THAN 24 BYTES IN LENGTH, THERE CANNOT BE 00033000
  34. * MORE THAN 255 RECORDS IN A BLOCK. RECORDS WITHIN 00034000
  35. * A BLOCK ARE NUMBERED 1 THRU M. 00035000
  36. * THE CCB0R ADDRESS IS NOT ONLY RECEIVED FROM THE CALLER, 00036000
  37. * BUT IS RETURNED TO HIM AFTERWARDS AS WELL, FOR REASONS 00037000
  38. * THAT WILL SOON BE APPARENT. SOMETIMES THE REQUESTED RECORD 00038000
  39. * DOES NOT EXIST OR CANNOT BE READ (DUE TO AN I/O ERROR). 00039000
  40. * IN THESE CASES, THE NEXT LOGICAL RECORD IS RETURNED TO THE 00040000
  41. * CALLER INSTEAD. AND IN THESE CASES THE CCB0R ADDRESS 00041000
  42. * RETURNED TO THE CALLER IS A CORRECTED CCB0R ADDRESS THAT 00042000
  43. * SHOWS WHAT RECORD WAS ACTUALLY GOTTEN. SOME EXAMPLES 00043000
  44. * WILL CLARIFY THIS. 00044000
  45. * 00045000
  46. * ASSUMPTIONS FOR EXAMPLES: 00046000
  47. * * EACH CYLINDER CONTAINS 10 (=X'0A') OF THE 4K BLOCKS. 00047000
  48. * * NO RECORDS WERE RECORDED IN THE 1ST (CC=X'0000') CYLINDER, 00048000
  49. * I.E., ALL 10 BLOCKS THERE ARE FLAGGED AS EMPTY. 00049000
  50. * * BLOCK 1 IN THE 2ND CYLINDER CONTAINS 7 RECORDS. 00050000
  51. * * BLOCK 2 IN THE 2ND CYLINDER IS FLAGGED AS UNREADABLE OR 00051000
  52. * EMPTY. 00052000
  53. * * BLOCK 3 IN THE 2ND CYLINDER CONTAINS 5 RECORDS. 00053000
  54. * * BLOCK 4 IN THE 2ND CYLINDER CONTAINS 3 RECORDS. 00054000
  55. * * THE REMAINING BLOCKS OF THE 2ND CYLINDER ARE EMPTY. 00055000
  56. * EXAMPLE 1: 00056000
  57. * THE CALLER PASSES X'0001030005' AS THE CCB0R ADDRESS. 00057000
  58. * THE REQUESTED RECORD 5 IN BLOCK 3 OF THE 2ND CYLINDER 00058000
  59. * EXISTS, SO THE REQUESTED RECORD IS RETURNED. AND THE 00059000
  60. * ORIGINAL CCB0R VALUE IS RETURNED UNCHANGED. 00060000
  61. * EXAMPLE 2: 00061000
  62. * THE CALLER WANTS TO READ THE NEXT SEQUENTIAL RECORD AFTER 00062000
  63. * THE ONE HE READ IN EXAMPLE 1. SO HE ADDS 1 TO THE R 00063000
  64. * VALUE OF THE CCB0R ADDRESS RETURNED IN EXAMPLE 1, GETTING 00064000
  65. * X'0001030006', WHICH HE NOW PASSES TO DMSREA. SINCE 00065000
  66. * THERE IS NO RECORD 6 IN BLOCK 3, DMSREA RETURNS THE NEXT 00066000
  67. * AVAILABLE RECORD WHICH IS RECORD 1 IN BLOCK 4. AND THE 00067000
  68. * RETURNED ADDRESS IS X'0001040001'. 00068000
  69. * EXAMPLE 3: 00069000
  70. * THE CALLER PASSES X'0001010008' AS THE CCB0R ADDRESS. 00070000
  71. * THERE IS NO RECORD 8 IN BLOCK 1, SO DMSREA TRIES TO GET 00071000
  72. * RECORD 1 FROM BLOCK 2, BUT BLOCK 2 IS FLAGGED AS 00072000
  73. * UNREADABLE, SO IT ADVANCES TO BLOCK 3 AND RETURNS RECORD 00073000
  74. * 1 OF BLOCK 3. THE RETURNED ADDRESS IS X'0001030001'. 00074000
  75. * EXAMPLE 4: 00075000
  76. * THE CALLER PASSES X'0000050005', ATTEMPTING TO READ 00076000
  77. * NON-EXISTENT DATA FROM THE EMPTY 1ST CYLINDER. DMSREA 00077000
  78. * SCANS THRU BLOCKS 5 THRU 10 OF THE 1ST CYLINDER, FINDING 00078000
  79. * NOTHING, AND THEN SWITCHES TO THE 2ND CYLINDER. THERE 00079000
  80. * IT FINDS AND RETURNS RECORD 1 OF BLOCK 1 AND RETURNS 00080000
  81. * THE ADDRESS X'0001010001'. 00081000
  82. * EXAMPLE 5: 00082000
  83. * THE CALLER PASSES X'00000B0001', ATTEMPTING TO READ FROM 00083000
  84. * THE 1ST CYLINDER, BUT BEYOND THE ALLOWED LIMIT OF 00084000
  85. * 10 (=X'0A') BLOCKS PER CYLINDER (AS ASSUMED FOR THIS 00085000
  86. * EXAMPLE). THIS IS NOT ALLOWED. THE RESULTS ARE 00086000
  87. * UNPREDICTABLE. (NOTE: THE CALLER IS NOT EXPECTED TO 00087000
  88. * KNOW HOW MANY BLOCKS ARE ALLOWED IN A CYLINDER ON A 00088000
  89. * PARTICULAR DEVICE. RATHER, IT IS EXPECTED THAT HE WILL 00089000
  90. * ONLY USE ADDRESSES THAT HAVE BEEN RETURNED TO HIM FROM 00090000
  91. * PRIOR CALLS TO DMSREA, WITH ONLY THE R FIELD CHANGED BY 00091000
  92. * HIM. AN EXCEPTION IS THAT HE IS PERMITTED TO MAKE UP 00092000
  93. * AN ADDRESS HIMSELF TO GET STARTED AT THE FIRST BLOCK 00093000
  94. * OF EITHER CYLINDER.) 00094000
  95. * EXAMPLE 6: 00095000
  96. * THE CALLER PASSES X'0001040004' REQUESTING A RECORD 00096000
  97. * FOLLOWING THE FINAL RECORD OF BLOCK 4, 2ND CYLINDER. 00097000
  98. * BLOCKS BEYOND BLOCK 4 ARE ALL EMPTY. DMSREA LOOKS FOR, 00098000
  99. * BUT FAILS TO FIND, A NEXT AVAILABLE RECORD IN THE 00099000
  100. * REMAINING BLOCKS. SO DSMREA RETURNS AN END-OF-FILE 00100000
  101. * INDICATION RATHER THAN A NEXT AVAILABLE RECORD. 00101000
  102. * EXAMPLE 7: 00102000
  103. * FORGET THE ASSUMPTIONS OF THE EARLIER EXAMPLES. ASSUME 00103000
  104. * NOW THAT ALL CYLINDERS ARE EMPTY. THE CALLER PASSES 00104100
  105. * X'0000010001' REQUESTING THE FIRST RECORD OF THE FIRST 00105000
  106. * CYLINDER. DMSREA READS THRU ALL CYLS LOOKING FOR 00106100
  107. * AN AVAILABLE RECORD AND FINALLY RETURNS AN END-OF-FILE 00107000
  108. * INDICATION RATHER THAN A RECORD. 00108000
  109. * 00109000
  110. * ATTRIBUTES - NON-REUSABLE, CMS USER AREA, ENTERED VIA CALL. 00110000
  111. * 00111000
  112. * ENTRY POINTS - DMSREA 00112000
  113. * 00113000
  114. * ENTRY CONDITIONS - 00114000
  115. * R1 = ADDRESS OF THE CCB0R DASD RECORD ADDRESS. 00115000
  116. * R13 = ADDRESS OF A STANDARD 72 BYTE SAVE AREA. 00116000
  117. * R14 = RETURN ADDRESS. 00117000
  118. * 00118000
  119. * EXIT CONDITIONS - 00119000
  120. * R0 = NON-ZERO: ADDRESS OF VARIABLE LENGTH RECORD BEING 00120000
  121. * RETURNED. FIRST 4 BYTES ARE THE RECORD DESCRIPTOR WORD 00121000
  122. * CONTAINING THE RECORD LENGTH. 00122000
  123. * R0 = ZERO: INDICATES END-OF-FILE; NO RECORD WAS AT OR BEYOND 00123000
  124. * THE INPUTTED ADDRESS. 00124000
  125. * R1 = ADDRESS OF THE (SOMETIMES CORRECTED) CCB0R DASD RECORD 00125000
  126. * ADDRESS. THIS IS IN A SEPARATE WORK AREA, NOT 00126000
  127. * OVERLAYING THE INPUTTED CCB0R. 00127000
  128. * R13 = SAME SAVE AREA ADDRESS. 00128000
  129. * R15 = 0; NOTHING UNUSUAL. 00129000
  130. * R15 = 4; AN EMPTY 4K BLOCK WAS SKIPPED. 00130000
  131. * R15 = 8; INPUTTED CCB0R ADDRESS CONTAINED INVALID CC VALUE. 00131000
  132. * R15 = 60; DMSIFC830E (I/O ERROR) 00132000
  133. * 00133000
  134. * CALLS TO OTHER ROUTINES - 00134000
  135. * DIAGNOSE CALLS TO CP AS BELOW: 00135000
  136. * DIAGNOSE CODE X'2C' = FIND RECORDING AREA ON SYSTEM DISK. 00136000
  137. * DIAGNOSE CODE X'30' = READ PAGE SIZE RECORD FROM ERROR 00137000
  138. * RECORDING CYLINDERS. 00138000
  139. * DMSERR - CALLED VIA MACRO SVC TO WRITE ERROR MESSAGE TO 00139000
  140. * THE CONSOLE. 00140000
  141. * 00141000
  142. * EXTERNAL REFERENCES - NONE. 00142000
  143. * 00143000
  144. * TABLES / WORK AREAS - 00144000
  145. * 4K OF STORAGE BEGINNING AT ABSOLUTE LOCATION X'21000' WILL BE 00145000
  146. * USED AS A BUFFER FOR THE BLOCKS OF ERROR RECORDS. 00146000
  147. * 00147000
  148. * MACROS - DMSERR, REGEQU 00148000
  149. * 00149000
  150. * REGISTER USAGE - 00150000
  151. * R0-R9 = SCRATCH 00151000
  152. * R10-R11 = SPARES, NOT PRESENTLY USED. 00152000
  153. * R12 = BASE 00153000
  154. * R13 = SAVE AREA ADDRESS 00154000
  155. * R14-R15 = SCRATCH 00155000
  156. * 00156000
  157. * NOTES - 00157000
  158. * THIS MODULE USES 4K OF (UNALLOCATED) STORAGE AT ABSOLUTE 00158000
  159. * LOCATION X'21000' AS A PAGE BUFFER IN WHICH TO READ THE 4K 00159000
  160. * BLOCKS OF ERROR RECORDS. 00160000
  161. * 00161000
  162. * SIGNIFICANT INTERNAL VARIABLES - 00162000
  163. * STARTCYL - FULLWORD CONTAINING STARTING CYLINDER AND DEVICE 00163000
  164. * CODE OF THE VM/370 ERROR RECORDING CYLINDERS AREA. 00164000
  165. * INITIALIZED ON THE FIRST CALL, IT REMAINS 00165000
  166. * UNCHANGED THEREAFTER. HAS 'VM/370 CONTROL PROGRAM 00166000
  167. * INTERNAL FORMAT'. 00167000
  168. * CYLCOUNT - HALFWORD CONTAINING THE NUMBER OF ERROR 00167100
  169. * RECORDING CYLINDERS. INITIALIZED ON THE 1ST 00167200
  170. * CALL, IT REMAINS UNCHANGED THEREAFTER. 00167300
  171. * AVAILBLK - FULLWORD CONTAINING ADDRESS (IN 'VM/370 CONTROL 00168000
  172. * PROGRAM INTERNAL FORMAT') OF THE LAST BLOCK READ 00169000
  173. * INTO THE 4K BUFFER. VALUE IS RETAINED FROM ONE 00170000
  174. * CALL TO THE NEXT. THE DATA REMAINS AVAILABLE IN 00171000
  175. * THE BUFFER. 00172000
  176. * RECNO - FULLWORD CONTAINING THE NUMBER OF THE LOGICAL 00173000
  177. * RECORD THAT WAS LAST REQUESTED FROM THE 4K BUFFER. 00174000
  178. * VALUE IS RETAINED FROM ONE CALL TO THE NEXT. IT 00175000
  179. * SAVES US FROM HAVING TO COUNT UP THRU ALL THE 00176000
  180. * LOGICAL RECORDS IN THE BUFFER. SAVING IS MAINLY 00177000
  181. * ACHIEVED WHEN SEQUENTIAL ACCESSING IS DONE. 00178000
  182. * RECADDR - FULLWORD CONTAINING THE STORAGE ADDRESS OF THE 00179000
  183. * PARTICULAR RECORD IN THE 4K BUFFER THAT IS 00180000
  184. * INDICATED BY 'RECNO' ABOVE. VALUE IS RETAINED 00181000
  185. * FROM ONE CALL TO THE NEXT. 00182000
  186. * 00183000
  187. * OPERATION - 00184000
  188. * 1. SAVE REGISTERS AS NECESSARY. SET R15 RETURN CODE TO 0. 00185000
  189. * 2. IF THIS IS NOT THE FIRST CALL TO DMSREA, GO TO 4. 00186000
  190. * 3. ISSUE DIAGNOSE X'2C' TO FIND THE START OF THE VM/370 00187000
  191. * ERROR RECORDING CYLINDERS. STORE RETURNED ADDRESS VALUE 00188000
  192. * IN 'STARTCYL'. 'AVAILBLK' IS INITIALLY ZERO; NON-EXISTENT 00189000
  193. * ZERO ADDRESS INSURES THAT IN CODE BELOW WE DO NOT GET 00190000
  194. * FOOLED INTO THINKING 4K BUFFER CONTAINS A BLOCK. 00191000
  195. * THROW 'FIRST TIME' SWITCH. STORE COUNT OF RECORD- 00192100
  196. * ING CYLINDERS IN 'CYLCOUNT'. 00192200
  197. * 4. CHECK CC PORTION OF INPUTTED CCB0R FOR VALID RANGE. 00193000
  198. * IF INVALID, GO TO 16. 00194000
  199. * 5. CONVERT CCB PORTION OF INPUTTED CCB0R ADDRESS TO A 00195000
  200. * 'VM/370 CONTROL PROGRAM INTERNAL FORMAT (CPIF)' ADDRESS. 00196000
  201. * 6. IF COMPUTED CPIF ADDRESS MATCHES VALUE IN 'AVAILBLK', 00197000
  202. * THEN DESIRED BLOCK IS ALREADY IN BUFFER, SO GO TO 11. 00198000
  203. * 7. SET 'RECNO' TO ZERO INDICATING WE HAVE NOT YET COUNTED UP 00199000
  204. * TO ANY PARTICULAR RECORD IN THE NEW BLOCK ABOUT TO BE 00200000
  205. * READ IN. SET 'AVAILBLK' TO ZERO (WE COULD ALMOST AS WELL 00201000
  206. * SET IT TO THE NEW CPIF ADDRESS SINCE WE ARE ABOUT TO 00202000
  207. * READ THAT BLOCK INTO THE BUFFER; BUT THE READ COULD FAIL 00203000
  208. * AND ZERO BEST INDICATES UNDEFINED STATE OF THE BUFFER). 00204000
  209. * ISSUE DIAGNOSE X'30' USING COMPUTED CPIF ADDRESS TO READ 00205000
  210. * THE ADDRESSED BLOCK. TEST CONDITION CODE SET BY DIAGNOSE: 00206000
  211. * CC=0: BLOCK WAS READ SUCCESSFULLY; GO TO 10. 00207000
  212. * CC=1: END OF CYLINDER, ADDRESSED BLOCK IS NON-EXISTENT; 00208000
  213. * GO TO 17. 00209000
  214. * CC=3: SPECIFIED CYLINDER IS OUTSIDE THE ERROR RECORDING 00210000
  215. * AREA; GO TO 16. 00211000
  216. * CC=2: I/O ERROR,BLOCK COULD NOT BE READ; FALL THRU TO 8. 00212000
  217. * 8. ISSUE MESSAGE DMSREA830E (I/O ERROR), SET CODE 60 FOR R15. 00213000
  218. * (WE CANNOT GET THE ADDRESSED RECORD, SO WE WILL TRY FOR 00214000
  219. * THE NEXT AVAILABLE RECORD INSTEAD.) 00215000
  220. * 9. PREPARE TO READ NEXT BLOCK AND USE FIRST RECORD IN IT: 00216000
  221. * ADD ONE TO BLOCK NUMBER IN CPIF ADDRESS; SET R VALUE OF 00217000
  222. * CCB0R TO RECORD 1; GO TO 7. 00218000
  223. * 00219000
  224. * 10. STORE CPIF ADDRESS IN 'AVAILBLK'. 00220000
  225. * IF THE BLOCK IS FLAGGED AS EMPTY, GO TO 9. 00221000
  226. * 11. (COMMENT: BLOCK SPECIFIED BY CPIF ADDRESS IS NOW IN THE 00222000
  227. * BUFFER AND DOES CONTAIN SOME RECORDS. 'RECNO' AND 00223000
  228. * 'RECADDR' EITHER POINT TO SOME RECORD IN THE BUFFER OR 00224000
  229. * 'RECNO' IS ZERO. R IN CCB0R SPECIFIES THE RECORD WE 00225000
  230. * WANT TO FIND IN THE BUFFER.) 00226000
  231. * IF 'RECNO' IS GREATER THAN R, SET 'RECNO' TO ZERO. 00227000
  232. * 12. IF 'RECNO' IS ZERO, SET IT TO ONE AND INITIALIZE 00228000
  233. * 'RECADDR' TO POINT TO FIRST RECORD IN BUFFER. 00229000
  234. * 13. (COMMENT: STEP THRU THE BUFFER INCREMENTING 'RECNO' 00230000
  235. * AND 'RECADDR' UNTIL 'RECNO' MATCHES R OR UNTIL THERE 00231000
  236. * ARE NO MORE RECORDS IN THE BUFFER.) 00232000
  237. * IF 'RECNO' EQUALS R, GO TO 14. 00233000
  238. * INCREMENT 'RECNO' BY ONE AND ADVANCE 'RECADDR' TO NEXT 00234000
  239. * RECORD, IF ANY. 00235000
  240. * IF 'RECADDR' IS BEYOND LAST RECORD IN BUFFER, GO TO 9. 00236000
  241. * OTHERWISE, LOOP TO 13 FOR ANOTHER ITERATION. 00237000
  242. * 00238000
  243. * 14. FROM THE CURRENT R AND CPIF ADDRESS, COMPUTE A CORRECTED 00239000
  244. * CCB0R VALUE TO BE RETURNED TO THE CALLER. PUT ADDRESS 00240000
  245. * OF CORRECTED CCB0R DATA IN R1. LOAD 'RECADDR' INTO R0. 00241000
  246. * 15. RESTORE REGISTERS (EXCEPT OUTPUT PARAMETER REGISTERS) AND 00242000
  247. * RETURN TO THE CALLER. 00243000
  248. * 00244000
  249. * 16. SET ERROR CODE IN R15 FOR INVALID CYLINDER. GO TO 15. 00245000
  250. * 00246000
  251. * 17. (COMMENT: END OF CYLINDER INDICATION WAS RECEIVED.) 00247000
  252. * SET R0 TO ZERO (INDICATES EOF TO CALLER IN CASE THIS 00248000
  253. * CYLINDER IS THE LAST CYLINDER). 00249000
  254. * IF CC PORTION OF CPIF ADDRESS INDICATES WE WERE ALREADY 00250000
  255. * ON THE FINAL CYLINDER, GO TO 15. 00251000
  256. * OTHERWISE ADVANCE TO NEXT CYLINDER: ADD 1 TO CC OF CPIF 00252000
  257. * ADDRESS; SET B OF CPIF ADDRESS TO BLOCK 1; SET R OF CCB0R 00253000
  258. * ADDRESS TO RECORD 1; 00254000
  259. * GO TO 7 (TO READ FIRST AVAILABLE RECORD IN NEXT CYLINDER). 00255000
  260. * 00256000
  261. * RESPONSES - NONE 00257000
  262. * 00258000
  263. * ERROR MESSAGES - DMSREA830E WITH RETURN CODE 60. 00259000
  264. *. 00260000
  265. EJECT 00261000
  266. DMSREA CSECT @V4085A8 00262000
  267. *********************************************************************** 00263000
  268. * 1. SAVE REGISTERS AS NECESSARY. SET R15 RETURN CODE TO 0. 00264000
  269. *********************************************************************** 00265000
  270. SR R15,R15 INITIALIZE RETURN CODE. @V4085A8 00266000
  271. STM R14,R12,SAVER14(R13) @V4085A8 00267000
  272. BALR R12,0 ESTABLISH ADDRESSABILITY. @V4085A8 00268000
  273. USING *,R12 @V4085A8 00269000
  274. SPACE 00270000
  275. *********************************************************************** 00271000
  276. * 2. IF THIS IS NOT THE FIRST CALL TO DMSREA, GO TO 4. 00272000
  277. *********************************************************************** 00273000
  278. FIRSTSW BC *-*,OPER4 BRANCH IF THIS IS NOT THE FIRST CALL.@V4085A8 00274000
  279. * (CONDITION CODE MASK WILL BE MODIFIED.) 00275000
  280. * FALL THRU IF THIS IS THE FIRST CALL TO DMSREA. 00276000
  281. SPACE 00277000
  282. *********************************************************************** 00278000
  283. * 3. ISSUE DIAGNOSE X'2C' TO FIND THE START OF THE VM/370 00279000
  284. * ERROR RECORDING CYLINDERS. STORE RETURNED ADDRESS VALUE 00280000
  285. * IN 'STARTCYL'. 'AVAILBLK' IS INITIALLY ZERO; NON-EXISTENT 00281000
  286. * ZERO ADDRESS INSURES THAT IN CODE BELOW WE DO NOT GET 00282000
  287. * FOOLED INTO THINKING 4K BUFFER CONTAINS A BLOCK. 00283000
  288. * THROW 'FIRST TIME' SWITCH. 00284000
  289. *********************************************************************** 00285000
  290. OI FIRSTSW+1,X'F0' THROW THE SWITCH. @V4085A8 00286000
  291. LA R2,CODE01 CODE X'01' FOR DIAGNOSE '2C' @V5088AA 00286100
  292. DC X'8323002C' DIAGNOSE RETURNS THE DISK @V5088AA 00287100
  293. * ADDR (IN VM/370 CONTROL PROGRAM INTERNAL 00288000
  294. * FORMAT) OF THE START OF THE ERROR 00289000
  295. * RECORDING AREA (IN R2) AND THE 00290100
  296. * NUMBER OF ERROR RECORDING 00290200
  297. * CYLINDERS (IN R3). 00290300
  298. N R2,BLKMASK CLEAR THE PAGE (OR BLOCK) NUMBER @V4085A8 00291000
  299. * BYTE TO X'00'. 00292000
  300. ST R2,STARTCYL SAVE CC0D PERMANENTLY FOR USE @V4085A8 00293000
  301. * DURING THIS CALL AND ALL LATER CALLS. 00294000
  302. STH R3,CYLCOUNT SAVE COUNT OF RECORDING CYLS @V5088AA 00294100
  303. * FOR USE DURING THIS CALL AND 00294200
  304. * ALL LATER CALLS. 00294300
  305. SPACE 00295000
  306. *********************************************************************** 00296000
  307. * 4. CHECK CC PORTION OF INPUTTED CCB0R FOR VALID RANGE. 00297000
  308. * IF INVALID, GO TO 16. 00298000
  309. *********************************************************************** 00299000
  310. OPER4 CLC 0(LENCC,R1),CYLCOUNT R1 (INPUT ARG) POINTS TO @V5088AA 00300100
  311. * CCB0R. 00301000
  312. BNL OPER16 ERROR--CC WAS GREATER THAN @V5088AA 00302100
  313. * NUMBER OF CYLINDERS AVAILABLE 00302200
  314. * FOR ERROR RECORDING 00302300
  315. SPACE 00303000
  316. *********************************************************************** 00304000
  317. * 5. CONVERT CCB PORTION OF INPUTTED CCB0R ADDRESS TO A 00305000
  318. * 'VM/370 CONTROL PROGRAM INTERNAL FORMAT (CPIF)' ADDRESS. 00306000
  319. *********************************************************************** 00307000
  320. MVC WANT0R,DISP0R(R1) MOVE INPUTTED 0R OF CCB0R TO @V4085A8 00308000
  321. * HALFWORD. 00309000
  322. MVC WANTCCBD,0(R1) MOVE INPUTTED CCB0 OF CCBOR TO @V4085A8 00310000
  323. * FULLWORD. 00311000
  324. CLI WANTCCBD+DISPB,X'00' CHECK B FIELD OF CCB0. @V4085A8 00312000
  325. BNE *+8 IT IS NON-0 WHICH IS ACCEPTABLE. @V4085A8 00313000
  326. * BLOCK 0 WAS REQUESTED BUT THERE IS NO SUCH THING. (THIS 00314000
  327. * SHOULDN'T REALLY HAPPEN, AT LEAST NOT IF DMSIFC IS THE CALLER) 00315000
  328. MVI WANTCCBD+DISPB,X'01' ADVANCE TO THE 1ST BLOCK. @V4085A8 00316000
  329. L R1,WANTCCBD LOAD CCB0 (CC IS RELATIVE OFFSET). @V4085A8 00317000
  330. A R1,STARTCYL ADD CC0D GETTING A TRUE CCBD @V4085A8 00318000
  331. * INTERNAL FORMAT DISK ADDRESS (CC ABSOLUTE). 00319000
  332. ST R1,WANTCCBD PUT BACK TRUE CCBD. @V4085A8 00320000
  333. SPACE 00321000
  334. *********************************************************************** 00322000
  335. * 6. IF COMPUTED CPIF ADDRESS MATCHES VALUE IN 'AVAILBLK', 00323000
  336. * THEN DESIRED BLOCK IS ALREADY IN BUFFER, SO GO TO 11. 00324000
  337. *********************************************************************** 00325000
  338. C R1,AVAILBLK COMPARE WANTED CCBD RECORD ADDR @V4085A8 00326000
  339. * WITH ADDR OF RECORD ALREADY IN BUFFER. 00327000
  340. BE OPER11 DESIRED BLOCK IS ALREADY IN BUFFER. @V4085A8 00328000
  341. SPACE 00329000
  342. *********************************************************************** 00330000
  343. * 7. SET 'RECNO' TO ZERO INDICATING WE HAVE NOT YET COUNTED UP 00331000
  344. * TO ANY PARTICULAR RECORD IN THE NEW BLOCK ABOUT TO BE 00332000
  345. * READ IN. SET 'AVAILBLK' TO ZERO (WE COULD ALMOST AS WELL 00333000
  346. * SET IT TO THE NEW CPIF ADDRESS SINCE WE ARE ABOUT TO 00334000
  347. * READ THAT BLOCK INTO THE BUFFER; BUT THE READ COULD FAIL 00335000
  348. * AND ZERO BEST INDICATES UNDEFINED STATE OF THE BUFFER). 00336000
  349. * ISSUE DIAGNOSE X'30' USING COMPUTED CPIF ADDRESS TO READ 00337000
  350. * THE ADDRESSED BLOCK. TEST CONDITION CODE SET BY DIAGNOSE: 00338000
  351. * CC=0: BLOCK WAS READ SUCCESSFULLY; GO TO 10. 00339000
  352. * CC=1: END OF CYLINDER, ADDRESSED BLOCK IS NON-EXISTENT; 00340000
  353. * GO TO 17. 00341000
  354. * CC=3: SPECIFIED CYLINDER IS OUTSIDE THE ERROR RECORDING 00342000
  355. * AREA; GO TO 16. 00343000
  356. * CC=2: I/O ERROR,BLOCK COULD NOT BE READ; FALL THRU TO 8. 00344000
  357. *********************************************************************** 00345000
  358. OPER7 SR R1,R1 @V4085A8 00346000
  359. ST R1,RECNO NO RECORDS COUNTED YET IN NEW BLOCK. @V4085A8 00347000
  360. ST R1,AVAILBLK INDICATES CONTENTS OF BLOCK BUFFER @V4085A8 00348000
  361. * ARE UNKNOWN. 00349000
  362. L R1,WANTCCBD INTERNAL DISK ADDR OF BLOCK TO READ@V4085A8 00350000
  363. L R2,PAGBUFAD ADDR OF BUFFER TO READ BLOCK INTO. @V4085A8 00351000
  364. DC X'83120030' DIAGNOSE READS PAGE OF ERROR RECS. @V4085A8 00352000
  365. BC 8,OPER10 CC=0, BLOCK WAS READ SUCCESSFULLY. @V4085A8 00353000
  366. BC 4,OPER17 CC=1, END OF CYLINDER, BLOCK NOT READ.@V4085A8 00354000
  367. BC 1,OPER16 CC=3, SPECIFIED CYLINDER IS OUTSIDE OF@V4085A8 00355000
  368. * THE ERROR RECORDING AREA. 00356000
  369. * FALL THRU. CC=2, I/O ERROR. 00357000
  370. SPACE 00358000
  371. *********************************************************************** 00359000
  372. * 8. ISSUE MESSAGE DMSREA830E (I/O ERROR), SET CODE 60 FOR R15. 00360000
  373. * (WE CANNOT GET THE ADDRESSED RECORD, SO WE WILL TRY FOR 00361000
  374. * THE NEXT AVAILABLE RECORD INSTEAD.) 00362000
  375. *********************************************************************** 00363000
  376. DMSERR NUM=830,LET=E,TEXT='I/0 ERROR READING A BLOCK OF RECORDX00364000
  377. S FROM THE ERROR RECORDING CYLINDERS',RENT=NO 00365000
  378. MVI SAVER15+3(R13),RC60 PUT RETURN CODE IN R15 IN @V4085A8 00366000
  379. * SAVE AREA. 00367000
  380. SPACE 00368000
  381. *********************************************************************** 00369000
  382. * 9. PREPARE TO READ NEXT BLOCK AND USE FIRST RECORD IN IT: 00370000
  383. * ADD ONE TO BLOCK NUMBER IN CPIF ADDRESS; SET R VALUE OF 00371000
  384. * CCB0R TO RECORD 1; GO TO 7. 00372000
  385. *********************************************************************** 00373000
  386. OPER9 L R1,WANTCCBD PRESENT DISK ADDRESS. @V4085A8 00374000
  387. AH R1,=Y(X'0100') ADD 1 TO B FIELD. (ADVANCE TO @V4085A8 00375000
  388. * NEXT BLOCK.) 00376000
  389. ST R1,WANTCCBD @V4085A8 00377000
  390. MVI WANT0R+1,X'01' RESET R TO RECORD 1 OF NEW BLOCK@V4085A8 00378000
  391. B OPER7 GO READ NEW BLOCK. @V4085A8 00379000
  392. SPACE 3 00380000
  393. *********************************************************************** 00381000
  394. * 10. STORE CPIF ADDRESS IN 'AVAILBLK'. 00382000
  395. * IF THE BLOCK IS FLAGGED AS EMPTY, GO TO 9. 00383000
  396. *********************************************************************** 00384000
  397. OPER10 ST R1,AVAILBLK RETAIN ADDR OF BLOCK CURRENTLY IN @V4085A8 00385000
  398. * BUFFER. 00386000
  399. USING EBLK,R2 LAYOUT OF BLOCK IN PAGE BUFFER. @V4085A8 00387000
  400. C R1,EBADDR DISK ADDRESS IN BLOCK ? @VA12074 00387300
  401. BNE OPER10D NO , BAD BLOCK @VA12074 00387600
  402. CLI EBEMPTY,X'00' IS BLOCK FLAGGED AS EMPTY? @V4085A8 00388000
  403. BE OPER10D YES, EMPTY. GO SET RETURN CODE, THEN @V4085A8 00389000
  404. * TRY NEXT BLOCK. 00390000
  405. LA R1,EBDATA-EBLK OFFSET TO START OF DATA AREA IN @V4085A8 00391000
  406. * BLOCK. 00392000
  407. CH R1,EBNXTAVL IS NEXT AVAILABLE BYTE THE 1ST BYTE@V4085A8 00393000
  408. * OF THE DATA AREA? 00394000
  409. DROP R2 @V4085A8 00395000
  410. BNE OPER10K NO, SO BLOCK DOES CONTAIN RECORDS. @V4085A8 00396000
  411. * YES, DATA AREA OF BLOCK IS EMPTY. SET RETURN CODE, THEN GO 00397000
  412. * TRY NEXT BLOCK. 00398000
  413. OPER10D CLI SAVER15+3(R13),X'00' TEST FOR EXISTING RC. @V4085A8 00399000
  414. BNE OPER9 THERE IS AN ERROR RETURN CODE ALREADY @V4085A8 00400000
  415. * SET. KEEP IT. 00401000
  416. MVI SAVER15+3(R13),RC4 STORE CODE FOR EMPTY BLOCK. @V4085A8 00402000
  417. B OPER9 GO TRY NEXT BLOCK. @V4085A8 00403000
  418. SPACE 00404000
  419. OPER10K DS 0H @V4085A8 00405000
  420. SPACE 00406000
  421. *********************************************************************** 00407000
  422. * 11. (COMMENT: BLOCK SPECIFIED BY CPIF ADDRESS IS NOW IN THE 00408000
  423. * BUFFER AND DOES CONTAIN SOME RECORDS. 'RECNO' AND 00409000
  424. * 'RECADDR' EITHER POINT TO SOME RECORD IN THE BUFFER OR 00410000
  425. * 'RECNO' IS ZERO. R IN CCB0R SPECIFIES THE RECORD WE 00411000
  426. * WANT TO FIND IN THE BUFFER.) 00412000
  427. * IF 'RECNO' IS GREATER THAN R, SET 'RECNO' TO ZERO. 00413000
  428. *********************************************************************** 00414000
  429. OPER11 L R1,RECNO POSSIBLE NUMBER OF A RECORD IN THE @V4085A8 00415000
  430. * BLOCK WHOSE ADDR IN THE BUFFER IS KNOWN FROM 00416000
  431. * A PREVIOUS ACCESS. 00417000
  432. CH R1,WANT0R IF RECNO IS BEYOND THE RECORD THAT WE@V4085A8 00418000
  433. * WANT, RECNO WILL BE OF NO HELP IN FINDING 00419000
  434. * THE WANTED RECORD. 00420000
  435. BNH OPER11B @V4085A8 00421000
  436. * PRESENTLY RECNO IS BEYOND THE RECORD WE WANT. RESET TO 00422000
  437. * SEARCH THRU THE BUFFER FROM THE BEGINNING. 00423000
  438. SR R1,R1 @V4085A8 00424000
  439. ST R1,RECNO RESET. @V4085A8 00425000
  440. OPER11B DS 0H @V4085A8 00426000
  441. SPACE 00427000
  442. *********************************************************************** 00428000
  443. * 12. IF 'RECNO' IS ZERO, SET IT TO ONE AND INITIALIZE 00429000
  444. * 'RECADDR' TO POINT TO FIRST RECORD IN BUFFER. 00430000
  445. *********************************************************************** 00431000
  446. L R2,PAGBUFAD ADDRESS OF PAGE BUFFER. @V4085A8 00432000
  447. USING EBLK,R2 BLOCK IN PAGE BUFFER. @V4085A8 00433000
  448. LTR R1,R1 TEST VALUE OF RECNO IN R1. @V4085A8 00434000
  449. BNZ OPER12F @V4085A8 00435000
  450. LA R1,1 SET RECNO TO 1. @V4085A8 00436000
  451. ST R1,RECNO @V4085A8 00437000
  452. LA R3,EBDATA ADDR OF 1ST RECORD IN BUFFER. @V4085A8 00438000
  453. ST R3,RECADDR @V4085A8 00439000
  454. OPER12F L R3,RECADDR SET UP R3 IN CASE WE GOT HERE VIA B.@V4085A8 00440000
  455. SPACE 00441000
  456. *********************************************************************** 00442000
  457. * 13. (COMMENT: STEP THRU THE BUFFER INCREMENTING 'RECNO' 00443000
  458. * AND 'RECADDR' UNTIL 'RECNO' MATCHES R OR UNTIL THERE 00444000
  459. * ARE NO MORE RECORDS IN THE BUFFER.) 00445000
  460. * IF 'RECNO' EQUALS R, GO TO 14. 00446000
  461. * INCREMENT 'RECNO' BY ONE AND ADVANCE 'RECADDR' TO NEXT 00447000
  462. * RECORD, IF ANY. 00448000
  463. * IF 'RECADDR' IS BEYOND LAST RECORD IN BUFFER, GO TO 9. 00449000
  464. * OTHERWISE, LOOP TO 13 FOR ANOTHER ITERATION. 00450000
  465. *********************************************************************** 00451000
  466. * NOTE: AT THIS POINT WE HAVE THE FOLLOWING REGISTER USAGE: 00452000
  467. * R1 - IS CARRYING THE VALUE OF RECNO. 00453000
  468. * R2 - HAS THE ADDRESS OF THE PAGE BUFFER AND A 'USING' OF 00454000
  469. * EBLK IS STILL IN EFFECT. 00455000
  470. * R3 - IS CARRYING THE VALUE OF RECADDR (ADDR OF RECORD IN 00456000
  471. * BUFFER THAT CORRESPONDS WITH RECNO). 00457000
  472. *********************************************************************** 00458000
  473. LA R6,1 INCREMENT OF 1 IN BXH INCREMENT REGISTER. @V4085A8 00459000
  474. LH R7,WANT0R R VALUE IN BXH COMPARAND REGISTER. @V4085A8 00460000
  475. LA R4,4 INCREMENT IN BXLE INCREMENT REGISTER. @V4085A8 00461000
  476. LR R5,R2 ADDR OF PAGE BUFFER... @V4085A8 00462000
  477. AH R5,EBNXTAVL PLUS OFFSET TO 1ST UNUSED BYTE IS @V4085A8 00463000
  478. * ADDR OF 1ST UNUSED BYTE. 00464000
  479. BCTR R5,0 LESS ONE IS ADDR FOR BXLE COMPARAND. @V4085A8 00465000
  480. DROP R2 @V4085A8 00466000
  481. SPACE 00467000
  482. RECLOOP BXH R1,R6,OPER13H PREMATURELY ADD ONE TO RECNO (IN @V4085A8 00468000
  483. * R1). IF GREATER THAN R (IN R7), 00469000
  484. * THEN RECNO IS R+1 AND WE HAVE FOUND THE 00470000
  485. * RECORD WE ARE LOOKING FOR, SO BRANCH OUT 00471000
  486. * OF LOOP AND DECREMENT RECNO WHICH WAS 00472000
  487. * INCREMENTED PREMATURELY. 00473000
  488. SR R10,R10 CLEAR @VA12074 00473250
  489. ICM R10,3,D2(R3) LENGTH OF NEXT RECORD @VA12074 00473500
  490. BZ OPER10D ZERO @VA12074 00473750
  491. * FALL THRU INDICATES RECNO WAS NOT UP TO RECORD R. RECNO HAS 00474000
  492. * ALREADY BEEN ADVANCED, SO NOW ADVANCE RECADDR TO KEEP UP 00475000
  493. * WITH RECNO. 00476000
  494. AH R3,D2(0,R3) ADVANCE RECADDR (IN R3) BY LENGTH @V4085A8 00477000
  495. * OF RECORD. 00478000
  496. BXLE R3,R4,RECLOOP ADVANCE RECADDR (IN R3) BY 4 @V4085A8 00479000
  497. * BYTES (4 IS INCREMENT IN R4) TO ACCOUNT 00480000
  498. * FOR THE LENGTH DESCRIPTOR WORD. IF NOT 00481000
  499. * AT OR BEYOND 'NEXT AVAILABLE BYTE' 00482000
  500. * (ADDRESS-1 IS IN R5), THEN BRANCH, THERE 00483000
  501. * ARE MORE RECORDS TO LOOK AT. 00484000
  502. SPACE 00485000
  503. * FALL THRU IF RECNO AND RECADDR ARE BEYOND LAST RECORD. THE 00486000
  504. * RECORD NUMBER REQUESTED AS R DOES NOT EXIST. 00487000
  505. B OPER9 GO READ NEXT BLOCK AND USE ITS 1ST RECORD@V4085A8 00488000
  506. SPACE 00489000
  507. OPER13H BCTR R1,0 DECREMENT RECNO WHICH WAS INCREMENTED @V4085A8 00490000
  508. * PREMATURELY. 00491000
  509. ST R1,RECNO GET RECNO VALUE FROM R1 BACK INTO FWD.@V4085A8 00492000
  510. ST R3,RECADDR GET RECADDR VALUE BACK INTO FULLWD. @V4085A8 00493000
  511. SPACE 00494000
  512. *********************************************************************** 00495000
  513. * 14. FROM THE CURRENT R AND CPIF ADDRESS, COMPUTE A CORRECTED 00496000
  514. * CCB0R VALUE TO BE RETURNED TO THE CALLER. PUT ADDRESS 00497000
  515. * OF CORRECTED CCB0R DATA IN R1. LOAD 'RECADDR' INTO R0. 00498000
  516. *********************************************************************** 00499000
  517. LR R0,R3 GET RECADDR INTO R0 FOR RETURN. @V4085A8 00500000
  518. L R1,WANTCCBD LOAD CCBD WHERE CC IS ABSOLUTE. @V4085A8 00501000
  519. S R1,STARTCYL SUBTRACT BASE CC FROM ABSOLUTE CC, @V4085A8 00502000
  520. * 0 FROM B, AND D FROM D GIVING: CCB0 WHERE 00503000
  521. * CC IS A RELATIVE CC. 00504000
  522. ST R1,WANTCCBD STORE CCB0. @V4085A8 00505000
  523. IC R1,WANT0R+1 LOAD R OF 0R... @V4085A8 00506000
  524. STC R1,WANT0R AND STORE IN 0 OF 0R MAKING RR. @V4085A8 00507000
  525. * WANTCCBD AND WANT0R (ADJACENT) NOW FORM CCB0RR WHERE THE 2ND 00508000
  526. * R IS SURPLUS. 00509000
  527. OPER15 DS 0H @VA10044 00509500
  528. LA R1,WANTCCBD ADDR OF CCB0R FOR OUTPUT. @V4085A8 00510000
  529. SPACE 00511000
  530. *********************************************************************** 00512000
  531. * 15. RESTORE REGISTERS (EXCEPT OUTPUT PARAMETER REGISTERS) AND 00513000
  532. * RETURN TO THE CALLER. 00514000
  533. *********************************************************************** 00515000
  534. LM R14,R15,SAVER14(R13) RESTORE REGISTERS @VA10044 00516000
  535. LM R2,R12,SAVER2(R13) @V4085A8 00517000
  536. BR R14 @V4085A8 00518000
  537. SPACE 3 00519000
  538. *********************************************************************** 00520000
  539. * 16. SET ERROR CODE IN R15 FOR INVALID CYLINDER. GO TO 15. 00521000
  540. *********************************************************************** 00522000
  541. OPER16 SR R0,R0 SET EOF IN CASE USER IGNORES CATASTROPHIC@V4085A8 00523000
  542. * ERROR CODE IN R15. 00524000
  543. MVI SAVER15+3(R13),RC8 ERR CODE IN R15 IN SAVE AREA@V4085A8 00525000
  544. B OPER15 GO EXIT. @V4085A8 00526000
  545. SPACE 3 00527000
  546. *********************************************************************** 00528000
  547. * 17. (COMMENT: END OF CYLINDER INDICATION WAS RECEIVED.) 00529000
  548. * SET R0 TO ZERO (INDICATES EOF TO CALLER IN CASE THIS 00530000
  549. * CYLINDER IS THE LAST CYLINDER). 00531000
  550. * IF CC PORTION OF CPIF ADDRESS INDICATES WE WERE ALREADY 00532000
  551. * ON THE FINAL CYLINDER, GO TO 15. 00533000
  552. * OTHERWISE ADVANCE TO NEXT CYLINDER: ADD 1 TO CC OF CPIF 00534000
  553. * ADDRESS; SET B OF CPIF ADDRESS TO BLOCK 1; SET R OF CCB0R 00535000
  554. * ADDRESS TO RECORD 1; 00536000
  555. * GO TO 7 (TO READ FIRST AVAILABLE RECORD IN NEXT CYLINDER). 00537000
  556. *********************************************************************** 00538000
  557. OPER17 SR R0,R0 TENTATIVELY SET EOF INDICATION FOR @V4085A8 00539000
  558. * EXIT IN CASE THIS IS FINAL CYLINDER. 00540000
  559. LH R1,STARTCYL CC OF STARTING CYLINDER @V5088AA 00541100
  560. AH R1,CYLCOUNT ADD NUMBER OF CYLINDERS @V5088AA 00541200
  561. BCTR R1,0 SUBTRACT ONE @V5088AA 00541300
  562. CH R1,WANTCCBD COMPARE ENDING CC OF RECORDING @V5088AA 00541400
  563. * AREA WITH THE CC PORTION OF 00541500
  564. * CURRENT CP INTERNAL FORMAT @. 00541600
  565. BNH OPER15 IF CURRENT CC IS NOT LOWER THAN@V5088AA 00544100
  566. * END OF RECORDING AREA, WE ARE 00544200
  567. * ON THE LAST CYLINDER 00544300
  568. * FALL THRU MEANS THERE IS ANOTHER CYLINDER YET. 00546000
  569. LH R1,WANTCCBD GET DESIRED 'CCBD' ADDRESS @V5088AA 00546100
  570. LA R1,1(0,R1) ADD 1 TO CC. @V4085A8 00547000
  571. STH R1,WANTCCBD CC PART OF CCBD IS UPDATED. @V4085A8 00548000
  572. MVI WANTCCBD+DISPB,X'01' SET B OF CCBD TO BLOCK 1. @V4085A8 00549000
  573. MVI WANT0R+1,X'01' SET R OF 0R TO RECORD 1. @V4085A8 00550000
  574. B OPER7 GO READ 1ST RECORD OF NEXT CYLINDER. @V4085A8 00551000
  575. SPACE 00552000
  576. *********************************************************************** 00553000
  577. DROP R12 @V4085A8 00554000
  578. SPACE 6 00555000
  579. PAGBUFAD DC A(X'21000') ADDRESS OF PAGE I/O BUFFER. @V4085A8 00556000
  580. BLKMASK DS 0F @V4085A8 00557000
  581. DC X'FFFF00FF' @V4085A8 00558000
  582. AVAILBLK DC F'0' CONTAINS ADDRESS (IN 'VM/370 CONTROL @V4085A8 00559000
  583. * PROGRAM INTERNAL FORMAT') OF THE LAST BLOCK READ 00560000
  584. * INTO THE 4K PAGE BUFFER. VALUE IS RETAINED FROM 00561000
  585. * ONE CALL TO THE NEXT. THE DATA REMAINS AVAILABLE 00562000
  586. * IN THE BUFFER. 00563000
  587. SPACE 3 00564000
  588. LTORG @V4085A8 00565000
  589. SPACE 3 00566000
  590. RECADDR DS A CONTAINS THE STORAGE ADDRESS OF THE @V4085A8 00567000
  591. * PARTICULAR RECORD IN THE 4K PAGE BUFFER THAT IS 00568000
  592. * INDICATED BY 'RECNO' BELOW. VALUE IS RETAINED FROM 00569000
  593. * ONE CALL TO THE NEXT. 00570000
  594. RECNO DS F CONTAINS THE NUMBER OF THE LOGICAL RECORD @V4085A8 00571000
  595. * THAT WAS LAST REQUESTED FROM THE 4K PAGE BUFFER. 00572000
  596. * VALUE IS RETAINED FROM ONE CALL TO THE NEXT. IT 00573000
  597. * SAVES US FROM HAVING TO COUNT UP THRU ALL THE LOGICAL 00574000
  598. * RECORDS IN THE BUFFER. SAVING IS MAINLY ACHIEVED 00575000
  599. * WHEN SEQUENTIAL ACCESSING IS DONE. 00576000
  600. STARTCYL DS F CONTAINS STARTING CYLINDER AND DEVICE CODE @V4085A8 00577000
  601. * OF THE VM/370 ERROR RECORDING CYLINDERS AREA. 00578000
  602. * INITIALIZED ON THE FIRST CALL, IT REMAINS UNCHANGED 00579000
  603. * THEREAFTER. HAS 'VM/370 CONTROL PROGRAM INTERNAL 00580000
  604. * FORMAT'. 00581000
  605. CYLCOUNT DS H CONTAINS NUMBER OF CYLINDERS AVAILABLE FOR @V5088AA 00581100
  606. * ERROR RECORDING. INITIALIZED ON THE FIRST 00581200
  607. * CALL, IT THEN REMAINS UNCHANGED. 00581300
  608. SPACE 3 00582000
  609. * THE FOLLOWING TWO FIELDS (WANTCCBD AND WANT0R) MUST BE 00583000
  610. * CONTIGUOUS. 00584000
  611. WANTCCBD DS F CONTAINS CCBD (I.E., INTERNAL DISK ADDRESS) @V4085A8 00585000
  612. * OF DESIRED RECORD. EXCEPT THAT FOR OUTPUT AT EXIT 00586000
  613. * TIME, IT IS CONVERTED TO CCB0 FORMAT. 00587000
  614. WANT0R DS H CONTAINS 0R OF DESIRED RECORD. EXCEPT THAT @V4085A8 00588000
  615. * FOR OUTPUT AT EXIT TIME THE R IS MOVED INTO THE 0 00589000
  616. * POSITION AND AS AN EXTENSION OF WANTCCBD IT 00590000
  617. * FORMS CCB0R. 00591000
  618. SPACE 3 00592000
  619. SAVER14 EQU 12 OFFSET TO R14 IN SAVE AREA. @V4085A8 00593000
  620. SAVER15 EQU SAVER14+4 OFFSET TO R15 IN SAVE AREA. @V4085A8 00594000
  621. SAVER0 EQU SAVER15+4 OFFSET TO R0 IN SAVE AREA. @V4085A8 00595000
  622. SAVER1 EQU SAVER0+4 OFFSET TO R1 IN SAVE AREA. @V4085A8 00596000
  623. SAVER2 EQU SAVER1+4 OFFSET TO R2 IN SAVE AREA. @V4085A8 00597000
  624. SPACE 00598000
  625. LENCC EQU 2 SYMBOLIC LENGTH OF CC FIELD. @V4085A8 00599000
  626. DISP0R EQU 3 DISPLACEMENT TO 0R IN CCB0R. @V4085A8 00600000
  627. LEN0R EQU 2 SYMBOLIC LENGTH OF 0R FIELD. @V4085A8 00601000
  628. DISPB EQU 2 DISPLACEMENT TO B IN CCB0R. @V4085A8 00602000
  629. D2 EQU 2 SYMBOLIC DISPLACEMENT. @V4085A8 00603000
  630. CODE01 EQU 1 CODE X'01' FOR DIAGNOSE '2C' @V5088AA 00603100
  631. SPACE 00604000
  632. RC60 EQU 60 USED AS AN ERROR RETURN CODE. @V4085A8 00605000
  633. RC4 EQU 4 USED AS AN ERROR RETURN CODE. @V4085A8 00606000
  634. RC8 EQU 8 USED AS AN ERROR RETURN CODE. @V4085A8 00607000
  635. SPACE 3 00608000
  636. EBLK DSECT DESCRIBES 4K BLOCK OF ERROR RECORDS IN BUFFER.@V4085A8 00609000
  637. EBADDR DS F DISK ADDRESS OF THIS BLOCK @VA12074 00610000
  638. EBNXTAVL DS H OFFSET (FROM START OF THIS BLOCK) TO THE NEXT@V4085A8 00611000
  639. * AVAILABLE SPACE, I.E., TO THE 1ST UNUSED BYTE IN BLK. 00612000
  640. EBEMPTY DS XL1 IF VALUE IS X'00' THEN PAGE IS EMPTY. @V4085A8 00613000
  641. DS XL1 @V4085A8 00614000
  642. EBDATA DS 0C @V4085A8 00615000
  643. SPACE 3 00616000
  644. REGEQU 00617000
  645. END 00618000