Table of Contents

DMSSQS Source

References

Source Listing

DMSSQS.ASSEMBLE.txt
  1. SQS TITLE 'DMSSQS (CMS) VM/370 - RELEASE 6' 00001000
  2. SPACE 2 00002000
  3. *. 00003000
  4. * 00004000
  5. * 00005000
  6. * MODULE NAME: 00006000
  7. * 00007000
  8. * DMSSQS (SOQSAM - QUEUED SEQUENTIAL ACCESS METHOD) 00008000
  9. * 00009000
  10. * FUNCTION: 00010000
  11. * 00011000
  12. * TO ANALYZE RECORD FORMAT AND SET UP THE BUFFERS 00012000
  13. * ACCORDINGLY FOR GET, PUT AND PUTX REQUESTS. 00013000
  14. * 00014000
  15. * ATTRIBUTES: 00015000
  16. * 00016000
  17. * REENTRANT, NUCLEUS RESIDENT 00017000
  18. * 00018000
  19. * ENTRY POINTS: 00019000
  20. * DMSSQSGT - OS GET MACRO 00020000
  21. * DMSSQSPT - OS PUT MACRO 00021000
  22. * DMSSQSUP - OS GET AND PUTX MACROES FOR QSAM UPDATE 00022000
  23. * 00023000
  24. * ENTRY CONDITIONS: 00024000
  25. * 00025000
  26. * MUST BE CALLED BY OS GET, PUT OR PUTX MACRO 00026000
  27. * 00027000
  28. * EXIT CONDITIONS: 00028000
  29. * 00029000
  30. * NORMAL CONTROL IS RETURNED TO USER WITH REGISTERS 00030000
  31. * SPECIFIED AS IN THE OS DATA MANAGEMENT SERVICES 00031000
  32. * MANUAL 00032000
  33. * 00033000
  34. * ERRORS: CONTROL IS PASSED TO DMSSCTCE TO HANDLE ERRORS 00034000
  35. * 00035000
  36. * CALLS TO OTHER ROUTINES: 00036000
  37. * 00037000
  38. * DMSSEB, DMSSCT 00038000
  39. * 00039000
  40. * EXTERNAL REFERENCES: 00040000
  41. * 00041000
  42. * FCBSECT, OPSECT, NUCON, IHADCB 00042000
  43. * 00043000
  44. * TABLES/WORKAREAS: 00044000
  45. * 00045000
  46. * NONE 00046000
  47. * 00047000
  48. * REGISTER USAGE: 00048000
  49. * 00049000
  50. * R0,R1,R4-R10,R12,R14,R15 WORK 00050000
  51. * R2 DCB 00051000
  52. * R3 DMSSQS BASE 00052000
  53. * R13 SAVE AREA 00053000
  54. * 00054000
  55. * OPERATION: 00055000
  56. * 00056000
  57. * INITIALIZATION 00057000
  58. * 00058000
  59. * OSIOTYPE AND IOBECBPT ARE SET TO INDICATE ACCESS 00059000
  60. * METHOD AND FCB ADDRESS RESPECTIVELY. THEN, IF 00060000
  61. * THE DUMMY OPTION IS NOT SPECIFIED IN THE FCB, A 00061000
  62. * BRANCH IS TAKEN TO GETTER, PUTTER OR PUTXER 00062000
  63. * DEPENDING ON WHETHER THE REQUEST IS A GET, PUT OR 00063000
  64. * PUTX RESPECTIVELY. IF DUMMY IS SPECIFIED IN THE FCB, 00064000
  65. * CONTROL IS PASSED TO QSAMDUMY. 00065000
  66. * 00066000
  67. * GETTER 00067000
  68. * 00068000
  69. * AFTER FCBIOSW AND IOBIOFLG ARE SET TO INDICATE 00069000
  70. * INPUT IN PROCESS, DCB FIELDS DCBMACF AND DCBRECFM 00070000
  71. * ARE ANALYZED TO DETERMINE THE TYPE OF MODE DESIRED 00071000
  72. * - MOVE OR LOCATE - AND THE RECORD FORMAT. IF THE 00072000
  73. * MODE IS MOVE, THE USER SPECIFIED 'MOVE TO' ADDRESS 00073000
  74. * IS STORED IN DEBTCBAD. BOTH MODES CONTINUE BY 00074000
  75. * DETERMINING WHETHER IT IS CALLED FROM CLOSE 00075000
  76. * (DMSSOP). IF SO, A CHECK IS MADE TO DETERMINE 00076000
  77. * WHETHER THE UPDATE FLAG (IOBUBD) IN THE "IOBIOFLG" 00077000
  78. * IS ON INDICATING A "PUTX" ISSUED ON THE LAST 00078000
  79. * BLOCK. 00079000
  80. * 00080000
  81. * IF THE UPDATE FLAG IS NOT ON, CONTROL IS RETURNED 00081000
  82. * TO CLOSE. 00082000
  83. * 00083000
  84. * IF THE UPDATE FLAG IS ON, CONTROL IS PASSED TO THE 00084000
  85. * ROUTINE "GETXER" TO REWRITE THE LAST BLOCK BEFORE 00085000
  86. * RETURNING TO CLOSE. (SEE "GETXER" BELOW). 00086000
  87. * 00087000
  88. * IF NOT CALLED BY CLOSE, A CHECK IS MADE TO 00088000
  89. * DETERMINE WHETHER AN "END OF BLOCK" CONDITION 00089000
  90. * EXISTS. 00090000
  91. * 00091000
  92. * IF "END OF BLOCK" CONDITION DOES EXIST, A CHECK 00092000
  93. * IS MADE OF THE UPDATE FLAG TO DETERMINE WHETHER A 00093000
  94. * RECORD IN THE JUST COMPLETED BLOCK WAS UPDATED. 00094000
  95. * IF SO, "GETXER" RECEIVES CONTROL TO REWRITE THE 00095000
  96. * LAST BLOCK; (SEE "GETXER" BELOW). ROUTINE "SETEOB" 00096000
  97. * THEN RECEIVES CONTROL TO GET THE NEXT BUFFER FROM 00097000
  98. * THE POOL; (SEE "SETEOB" BELOW). 00098000
  99. * 00099000
  100. * UPON RETURN FROM "SETEOB", THE APPROPRIATE "FCB" 00100000
  101. * FIELDS ARE UPDATED AND A CALL IS MADE TO DMSSEB TO 00101000
  102. * FILL THE NEW BUFFER WITH THE NEXT BLOCK. 00102000
  103. * 00103000
  104. * UPON RETURN, THE "FCBITEM" COUNT IS UPDATED, AND 00104000
  105. * THE "ECB" IS CHECKED FOR AN ERROR. IF ONE EXISTS, 00105000
  106. * CONTROL IS PASSED TO DMSSCT (CHECK SIMULATION). 00106000
  107. * 00107000
  108. * AFTER IT IS DETERMINED THAT THERE IS A RECORD IN THE 00108000
  109. * BUFFER, THE RECORD IS DEBLOCKED FROM THE BUFFER AND, IF 00109000
  110. * THE RECFM IS VARIABLE OR UNDEFINED, DCBLRECL IS SET TO THE 00110000
  111. * LENGTH OF THE RECORD. IF THE MODE IS LOCATE, CONTROL 00111000
  112. * IS RETURNED TO THE USER WITH THE ADDRESS OF THE RECORD. IF 00112000
  113. * THE MODE IS MOVE, THE RECORD IS MOVED TO THE ADDRESS 00113000
  114. * PROVIDED BY THE USER AND CONTROL IS RETURNED TO THE USER. 00114000
  115. * 00115000
  116. * PUTTER 00116000
  117. * 00117000
  118. * RECEIVES CONTROL FROM "PUT" MACRO INSTRUCTION. 00118000
  119. * AFTER "FCBIOSW" AND "IOBIOFLG" ARE SET TO INDICATE 00119000
  120. * OUTPUT IN PROGRESS, A CHECK IS MADE TO DETERMINE 00120000
  121. * WHETHER THIS CALL WAS MADE FROM CLOSE. 00121000
  122. * 00122000
  123. * IF NOT CALLED FROM CLOSE AND THE MODE IS LOCATE, 00123000
  124. * AND THIS IS THE FIRST "PUT" CALL, THE ADDRESS OF 00124000
  125. * THE FIRST BUFFER IS PLACED IN REGISTER 1 AND 00125000
  126. * CONTROL IS RETURNED TO THE USER. 00126000
  127. * 00127000
  128. * IF CALLED FROM CLOSE, A CHECK IS MADE TO SEE IF A PUT 00128000
  129. * IS NECESSARY. IF NOT, CONTROL IS RETURNED TO THE USER. 00129000
  130. * IF A PUT IS NECESSARY, THE POINTERS ARE SETUP TO WRITE 00130000
  131. * A SHORT BLOCK. 00131000
  132. * 00132000
  133. * IF OTHER THAN THE FIRST "PUT" CALL, IT IS 00133000
  134. * DETERMINED WHETHER THE CURRENT BUFFER HAS 00134000
  135. * SUFFICIENT SPACE FOR ANOTHER RECORD. IF IT HAS, 00135000
  136. * REGISTER 1 IS UPDATED TO THE ADDRESS OF THE NEXT 00136000
  137. * RECORD WITHIN THE CURRENT BUFFER AND CONTROL IS 00137000
  138. * RETURNED TO THE CALLER. IF THE CURRENT BUFFER IS 00138000
  139. * FULL, A CALL IS MADE TO DMSSEB TO WRITE THE 00139000
  140. * CURRENT BUFFER TO THE FILE. 00140000
  141. * 00141000
  142. * UPON RETURN FROM DMSSEB THE "ECB" IS CHECKED FOR 00142000
  143. * ERROR INDICATION AND IF ONE EXISTS CONTROL IS 00143000
  144. * PASSED TO DMSSCT (CHECK SIMULATION). IF NO ERROR 00144000
  145. * CONDITION EXISTS THE "FCBITEM" COUNT IS UPDATED TO 00145000
  146. * REFLECT THE LAST BLOCK WRITTEN. 00146000
  147. * 00147000
  148. * ROUTINE "SETEOB" THEN RECEIVES CONTROL TO GET THE 00148000
  149. * NEXT BUFFER FROM THE POOL; (SEE "SETEOB" BELOW). 00149000
  150. * IF LOCATE IS SPECIFIED, CONTROL IS RETURNED TO THE 00150000
  151. * USER. IF MOVE MODE IS SPECIFIED, THE ROUTINE MOVEMODE 00151000
  152. * IS USED TO MOVE THE RECORD INTO THE BUFFER AND CONTROL 00152000
  153. * IS RETURNED TO THE USER. 00153000
  154. * 00154000
  155. * 00155000
  156. * PUTXER 00156000
  157. * 00157000
  158. * RECEIVES CONTROL FROM "PUTX" MACRO INSTRUCTION. 00158000
  159. * SETS THE UPDATE FLAG ("IOBUPD") IN THE "IOBIOFLG" 00159000
  160. * FIELD OF THE IOB TO INDICATE THAT THE CURRENT 00160000
  161. * BLOCK HAS BEEN UPDATED AND THEREFORE WILL BE 00161000
  162. * REWRITTEN AT "END OF BLOCK" TIME. RETURNS 00162000
  163. * CONTROL TO THE USER. 00163000
  164. * 00164000
  165. * GETXER 00165000
  166. * 00166000
  167. * RECEIVES CONTROL FROM ROUTINE "GETTER" AT "CLOSE" 00167000
  168. * TIME OR "END OF BLOCK" TIME WHEN THE UPDATE FLAG 00168000
  169. * (IOBUPD) HAS BEEN SET IN THE "IOBIOFLG" BY A 00169000
  170. * PREVIOUS "PUTX" CALL. 00170000
  171. * 00171000
  172. * THE "FCBIOSW" AND "IOBIOFLG" ARE CHANGED FROM A 00172000
  173. * "GET" CALL TO A "PUT" CALL. THE "FCBITEM" COUNT 00173000
  174. * IS RESET TO THE FIRST RECORD OF THE CURRENT BLOCK. 00174000
  175. * 00175000
  176. * DMSSEB IS CALLED TO REWRITE THE UPDATED BLOCK. 00176000
  177. * 00177000
  178. * UPON RETURN, THE "ECB" IS CHECKED FOR AN ERROR 00178000
  179. * CONDITION. IF ONE EXISTS, A CALL IS MADE TO 00179000
  180. * DMSSCT (CHECK SIMULATION). IF NO ERROR INDICATION, 00180000
  181. * THE "FCBITEM" COUNT IS RESTORED TO THE NEXT BLOCK, 00181000
  182. * THE "FCBIOSW" AND "IOBIOFLG" ARE RESET TO INDICATE 00182000
  183. * THE "GET" CALL AND IF NOT "CLOSE" TIME, CONTROL IS 00183000
  184. * RETURNED TO ROUTINE "GETTER". IF "CLOSE" TIME 00184000
  185. * CONTROL IS RETURNED TO DMSSOP (CLOSE). 00185000
  186. * 00186000
  187. * SETEOB 00187000
  188. * 00188000
  189. * RECEIVES CONTROL FROM ROUTINES "GETTER" OR 00189000
  190. * "PUTTER" AT "END OF BLOCK" TIME. 00190000
  191. * 00191000
  192. * DCB AND IOB ADDRESSES ARE UPDATED TO POINT TO THE 00192000
  193. * NEXT BUFFER IN THE POOL AND CONTROL IS RETURNED TO 00193000
  194. * THE CALLING ROUTINE. 00194000
  195. * 00195000
  196. * MOVEMODE 00196000
  197. * 00197000
  198. * MOVES THE RECORD FROM THE 00198000
  199. * USER BUFFER TO THE SYSTEM BUFFER IN THE CASE OF 00199000
  200. * "PUT" AND FROM THE SYSTEM BUFFER TO THE USER 00200000
  201. * BUFFER IN THE CASE OF "GET". IT THEN RETURNS 00201000
  202. * CONTROL TO THE CALLING ROUTINE. 00202000
  203. * 00203000
  204. * QSAMDUMY 00204000
  205. * 00205000
  206. * QSAMDUMY FIRST CHECKS TO DETERMINE IF A GET OR 00206000
  207. * A PUT WAS ISSUED. IF A GET WAS ISSUED, AN END OF FILE 00207000
  208. * ERROR CODE IS SET AND CONTROL IS PASSED TO DMSSCTCE. 00208000
  209. * IF A PUT WAS ISSUED, CONTROL IS RETURNED TO THE USER 00209000
  210. * WITH THE ADDRESS OF THE NEXT RECORD AREA IN REGISTER 00210000
  211. * ONE. 00211000
  212. *. 00212000
  213. EJECT 00213000
  214. * 00214000
  215. DMSSQS START X'0' 00215000
  216. ENTRY DMSSQSGT,DMSSQSPT,DMSSQSUP 00216000
  217. EJECT 00217000
  218. *********************************************************************** 00218000
  219. * * 00219000
  220. * QSAM INPUT/OUTPUT ROUTINES SIMULATORS: GET, PUT * 00220000
  221. * * 00221000
  222. *********************************************************************** 00222000
  223. SPACE 00223000
  224. * QSAM "GET" ENTRY POINT 00224000
  225. DMSSQSGT EQU * GET ROUTINE ENTRY POINT 00225000
  226. USING *,R15 00226000
  227. STM R14,R12,12(R13) SAVE REGS IN CALLING ROUTINE SAVE 00227000
  228. LA R4,C'G' IOTYPE = "GET" 00228000
  229. LA R15,TOGETHER PLAY GAMES 00229000
  230. BR R15 00230000
  231. DROP R15 00231000
  232. * QSAM "PUT" ENTRY POINT 00232000
  233. DMSSQSPT EQU * PUT ROUTINE ENTRY POINT 00233000
  234. USING *,R15 00234000
  235. STM R14,R12,12(R13) SAVE REGS IN CALLING ROUTINE SAVE TR 00235000
  236. LA R4,C'P' IOTYPE = "PUT" 00236000
  237. LA R15,TOGETHER JOIN FORCES 00237000
  238. BR R15 00238000
  239. DROP R15 00239000
  240. * QSAM UPDATE ENTRY POINT (GET,PUTX) 00240000
  241. DMSSQSUP EQU * 00241000
  242. USING *,R15 00242000
  243. B GETX GO TO "GET" UPDATE ENTRY POINT 00243000
  244. PUTX STM R14,R12,12(R13) SAVE REGISTERS 00244000
  245. LA R4,C'X' "PUTX", MAKE IOTYPE = "PUTX" 00245000
  246. GOTO LA R15,TOGETHER 00246000
  247. BR R15 GO TO COMMON ROUTINE 00247000
  248. GETX STM R14,R12,12(R13) SAVE REGISTERS 00248000
  249. LA R4,C'G' IOTYPE = "GET" 00249000
  250. B GOTO 00250000
  251. DROP R15 00251000
  252. SPACE 00252000
  253. TOGETHER DS 0H COMMON INITIALIZATION SEQUENCE 00253000
  254. USING *,R15 00254000
  255. L R3,AQSAM SET COMMON ADDRESSABILITY 00255000
  256. DROP R15 00256000
  257. USING DMSSQS,R3 00257000
  258. USING NUCON,R0 00258000
  259. USING IHADCB,R2 00259000
  260. USING FCBSECT,R11 00260000
  261. LR R2,R1 GET V(DCB) 00261000
  262. L R11,DCBDEBAD GET ADDR OF DEB 00262000
  263. SH R11,=AL2(IHADEB-FCBINIT) GET ADDR OF FCB 00263000
  264. L R15,AOPSECT POINT TO OPSECT 00264000
  265. USING OPSECT,R15 00265000
  266. STC R4,OSIOTYPE SET METHOD TYPE 00266000
  267. LA R4,IOBECB SET QSAM ECB 00267000
  268. ST R4,IOBECBPT 00268000
  269. CLI FCBDEV,0 IS THIS A DUMMY CMSCB 00269000
  270. BE QSAMDUMY YES, GO TO DUMMY ROUTINE 00270000
  271. CLI OSIOTYPE,C'G' "GET" CALL? 00271000
  272. BE GETTER YES 00272000
  273. CLI OSIOTYPE,C'X' IS IT "PUTX"? 00273000
  274. BE PUTXER YES, GO TO PUTX ROUTINE 00274000
  275. B PUTTER NO, THEN GO TO PUT ROUTINE 00275000
  276. SPACE 3 00276000
  277. * 00277000
  278. * THIS ROUTINE HANDLES DCB'S WITH DUMMY CMSCB'S 00278000
  279. * 00279000
  280. QSAMDUMY CLI OSIOTYPE,C'G' IS THIS A GET 00280000
  281. BNE PUTDUMY NO, THIS IS A DUMMY PUT 00281000
  282. MVC IOBECB(4),=XL4'4200000C' SET EOF CODE IN ECB 00282000
  283. B CKFORERR GO TO CHECK ROUTINE 00283000
  284. PUTDUMY TM DCBRECFM,FXD FIXED OR VAR. ? @VA04605 00284000
  285. BO SETUPFXD GO SET UP FOR FIXED @VA04605 00284070
  286. L R1,DCBBUFCB GET BUFFER CTRL BLOCK ADDR. @VA04605 00284140
  287. L R1,0(R1) ADDR. OF FIRST BUFFER @VA04605 00284210
  288. LA R1,4(R1) PLUS RDW @VA04605 00284280
  289. B UPDRECAD UPDATE RECORD ADDR. @VA04605 00284350
  290. SETUPFXD L R1,DCBRECAD GET ADDR. OF NEXT RECORD AREA@VA04605 00284420
  291. L R7,DCBEOBAD GET END OF BLOCK ADDR. @VA04605 00284490
  292. CR R1,R7 RECAD = EOBAD ? (FOR PL/1) @VA04605 00284560
  293. BE RESETRAD YES, RESET TO START OF BLOCK@VA04605 00284630
  294. TM DCBMACRF+1,LOC ARE WE DOING DUMMY LOCATE @VA08068 00284720
  295. BO UPDRECAD YES THEN UPDT RECAD @VA08068 00284740
  296. AH R1,DCBLRECL UPDATE TO NEXT RECORD @VA09543 00284750
  297. CR R1,R7 NOW AT END OF BLOCK ? @VA04605 00284770
  298. BNL RESETRAD YES, RESET TO START OF BLOCK @VA04605 00284840
  299. UPDRECAD ST R1,DCBRECAD STORE NEW RECORD ADDR IN DCB @VA04605 00284910
  300. B RETP RETURN TO USER 00285000
  301. RESETRAD EQU * 00285100
  302. TM DCBMACRF+1,LOC ARE WE DOING DUMMY LOCATE @VA08068 00285200
  303. BO RETP IF YES THEN NO EOB COND @VA08068 00285300
  304. SH R1,DCBBLKSI BACK UP TO START OF BUF @VA08068 00285400
  305. B UPDRECAD UPDATE RECORD ADDR AND RETURN@VA04605 00285666
  306. DROP R15 00286000
  307. EJECT 00287000
  308. * THE FOLLOWING CODE SIMULATES THE QSAM UPDATE (GL,PL) "PUTX" CALL 00289000
  309. * BY MARKING THE BUFFER FOR WRITING AT THE NEXT "EOB" CONDITION ON 00290000
  310. * A CALL TO "GET". 00291000
  311. SPACE 00292000
  312. PUTXER OI DCBOFLGS,PREVIOUS SET WRITE BIT @VA04694 00293000
  313. OI IOBIOFLG,IOBUPD INDICATE "PUTX" AT NEXT "EOB" 00294000
  314. B RETX GO TO RETURN 00295000
  315. SPACE 00296000
  316. * "GETXER" DOES THE ACTUAL REWRITE OF THE BLOCK AT THE NEXT "EOB" 00297000
  317. * TIME....AND THEN RETURNS TO NORMAL GET CODE. 00298000
  318. SPACE 00299000
  319. GETXER DS 0H 00300000
  320. OI IOBIOFLG,IOBOUT CHANGE TO OUTPUT 00301000
  321. NI IOBIOFLG,255-IOBIN 00302000
  322. OI FCBIOSW,FCBIOWR CHANGE TO WRITE 00303000
  323. NI FCBIOSW,255-FCBIORD 00304000
  324. LH R7,FCBITEM PICK UP FCB ITEM COUNT 00305000
  325. N R7,HALFWORD 00306000
  326. SH R7,FCBCOUT RESET TO 1ST RECORD OF CURRENT BLOCK 00307000
  327. STH R7,FCBITEM UPDATE ITEM COUNT 00308000
  328. L R14,DCBBUFCB GET ADDR. BUF. CONTROL BLOCK 00309000
  329. L R14,0(,R14) GET ADDR. OF CURRENT BUFFER 00310000
  330. LH R7,DCBLRECL LENGHT OF CURRENT OR NEXT RECORD 00311000
  331. N R7,HALFWORD 00312000
  332. LM R4,R5,DCBEOBAD ADDR. OF END OF BUFFER 00313000
  333. MVC FCBOP(2),0(R5) ALLIGN RDW 00314000
  334. TM FCBIOSW,FCBCLOSE DURING CLOSE? 00315000
  335. BNO PUTXLOC NO 00316000
  336. SR R1,R1 00317000
  337. SR R6,R6 00318000
  338. LR R1,R7 GET LRECL IN REG. 1 00319000
  339. LH R6,FCBOP GET RDW 00320000
  340. TM DCBRECFM,FXD FIXED? 00321000
  341. BO FXCLOSE YES 00322000
  342. AR R5,R6 ADD LRECL 00323000
  343. SR R5,R14 GET BYTE SIZE 00324000
  344. CH R5,=H'4' IS IT ZERO? 00325000
  345. BE GETXEND YES, RETURN 00326000
  346. B PUTXVB 00327000
  347. FXCLOSE EQU * 00328000
  348. AR R5,R1 ADD LRECL 00329000
  349. SR R5,R14 GET RECORD LENGHT 00330000
  350. BZ GETXEND ZERO, RETURN 00331000
  351. TM DCBRECFM,UND UNDEFINED RECORDS? 00332000
  352. BO PUTXBUF PUT OUT RECORD V0307 00333000
  353. CH R5,DCBBLKSI IS BUFFER FULL? 00334000
  354. BE UNDSIZE2 YES 00335000
  355. LR R6,R5 SAVE RECORD LENGHT 00336000
  356. SR R4,R4 00337000
  357. DR R4,R7 GET FCBCOUT 00338000
  358. STH R5,FCBCOUT STORE IT 00339000
  359. LR R7,R6 SET LENGHT 00340000
  360. B PUTXBUF GO WRITE IT 00341000
  361. PUTXLOC EQU * 00342000
  362. TM DCBOFLGS,PREVIOUS FIRST WRITE? 00343000
  363. BO PXLOC1 NO 00344000
  364. OI DCBOFLGS,PREVIOUS INDICATE FIRST WRITE DONE 00345000
  365. MVC FCBBYTE+2(2),DCBLRECL SAVE LENGHT 00346000
  366. PXLOC1 EQU * 00347000
  367. TM DCBRECFM,BLK BLOCKED RECORDS? 00348000
  368. BO PXLOCBLK YES 00349000
  369. UNDSIZE2 EQU * 00350000
  370. L R7,FCBBYTE GET LRECL 00351000
  371. TM DCBRECFM,UND UNDEFINED? 00352000
  372. BO PUTXBUF YES 00353000
  373. LH R7,DCBBLKSI RECFM = UNBLOCKED 00354000
  374. TM DCBRECFM,FXD FIXED? 00355000
  375. BO PUTXBUF YES 00356000
  376. MVC FCBOP+4(2),4(R14) ALLIGN RDW 00357000
  377. LH R7,FCBOP+4 GET RDW 00358000
  378. LA R7,4(R7,R0) ACCOUNT FOR BLOCK DESCRIPTOR 00359000
  379. PXLOC4 EQU * 00360000
  380. STH R7,FCBOP+4 ALLIGN BDW 00361000
  381. MVC 0(2,R14),FCBOP+4 SET BDW 00362000
  382. XC 2(2,R14),2(R14) ZERO OUT 2ND HALF OF BDW @VA04100 00362500
  383. PUTXBUF EQU * 00363000
  384. ST R7,FCBBYTE SET BLOCK LENGHT 00364000
  385. ST R14,FCBBUFF SET BLOCK ADDR. 00365000
  386. L R15,=V(DMSSEB) LOAD ADDR. OF EOB ROUT. 00366000
  387. BALR R14,R15 00367000
  388. USING *,R14 00368000
  389. L R3,AQSAM 00369000
  390. BAL R15,CKFORERR GO CHECK FOR ERROR 00370000
  391. DROP R14 00371000
  392. USING DMSSQS,R3 00372000
  393. LH R6,FCBITEM LOAD FCBITEM COUNT 00373000
  394. N R6,HALFWORD TO THE NEXT 00374000
  395. AH R6,FCBCOUT BLOCK AND 00375000
  396. STH R6,FCBITEM STORE IT 00376000
  397. GETXEND EQU * 00377000
  398. TM FCBIOSW,FCBCLOSE DURING CLOSE? 00378000
  399. BO RETP YES , RETURN TO CLOSE 00379000
  400. OI FCBIOSW,FCBIORD RESET FLAGS TO INDICATE THE 00380000
  401. OI IOBIOFLG,IOBIN "GET" WE'RE REALLY DOING 00381000
  402. NI FCBIOSW,255-FCBIOWR ........... 00382000
  403. NI IOBIOFLG,255-IOBOUT-IOBUPD TURN OFF UPDATE FLAG 00383000
  404. B GET1D GO FINISH "GET" 00384000
  405. PXLOCBLK EQU * 00385000
  406. TM DCBRECFM,FXD FIXED OR UNDEFINED? 00386000
  407. BZ PXLVB NO, VARIABLE 00387000
  408. AR R5,R7 ADD LRECL 00388000
  409. LR R6,R5 SAVE BUFFER ADDR. 00389000
  410. SR R5,R14 GET ACTUAL LENGHT 00390000
  411. TM DCBRECFM,UND IS IT UNDEFUNED? 00391000
  412. BO UNDSIZE2 YES 00392000
  413. CH R5,DCBBLKSI RECORD LENGHT = TO BLOCK SIZE? 00393000
  414. BE UNDSIZE2 YES 00394000
  415. MVC 0(4,R6),=XL4'61FFFF61' SET EOF INDICATOR 00395000
  416. CLI FCBDSMD+1,C'4' MODE 4? 00396000
  417. BE UNDSIZE2 YES 00397000
  418. LR R6,R5 SAVE LENGHT 00398000
  419. SR R4,R4 00399000
  420. DR R4,R7 GET FCBCOUT 00400000
  421. STH R5,FCBCOUT STORE IT 00401000
  422. LR R7,R6 GET BUFFER LENGHT 00402000
  423. B PUTXBUF GO WRITE IT 00403000
  424. PXLVB EQU * 00404000
  425. AH R5,FCBOP ADD RDW FOR EOB 00405000
  426. SR R5,R14 GET LENGHT 00406000
  427. PUTXVB EQU * 00407000
  428. LR R7,R5 PUT LENGHT IN REG. 7 00408000
  429. B PXLOC4 GO PUT IT OUT 00409000
  430. EJECT 00410000
  431. * 00411000
  432. * PERFORM BOOKKEEPING FOR "GET" EXECUTION 00412000
  433. * 00413000
  434. GETTER OI FCBIOSW,FCBIORD SIGNAL INPUTTING 00414000
  435. OI IOBIOFLG,IOBIN SIGNAL INPUT 00415000
  436. NI IOBIOFLG,255-IOBOUT AVOID CONFUSION 00416000
  437. NI DCBOFLGS,255-PREVIOUS TURN OFF WRITE BIT 00417000
  438. GET1A TM DCBMACRF,LOC LOCATE MODE? TR 00418000
  439. BO GET1B YES. LOCATE MODE 00419000
  440. ST R0,DEBTCBAD SET USER "MOVE-TO" ADDRESS 00420000
  441. GET1B TM FCBIOSW,FCBCLOSE DURING CLOSE? 00421000
  442. BNO GET1C NO 00422000
  443. TM IOBIOFLG,IOBUPD UPDATE FLAG ON? 00423000
  444. BO GETXER YES, GO DO "PUTX" 00424000
  445. B RETP NO CLOSE TIME UPDATES, RETURN 00425000
  446. GET1C LM R4,R5,DCBEOBAD A(END-OF-BLOCK), A(LAST RECORD) 00426000
  447. AH R5,DCBLRECL A(LAST REC) + L'LAST REC = A(NEXT REC) 00427000
  448. CR R4,R5 IF A(EOB) GT A(NEXT RECD), THEN 00428000
  449. BNH GET1C1 NO END OF BLOCK - ELSE BRANCH @VA10035 00429050
  450. TM DCBRECFM,VAR VARIABLE FILE ? @VA10035 00429100
  451. BNO GOT NO , NOT EOB @VA10035 00429150
  452. CLC FCBREAD+2(2),=XL2'0012' MINIMUM BLKSIZE ? @VA10035 00429200
  453. BNE GOT NO,CORRECT LENGTH @VA10035 00429250
  454. GET1C1 EQU * END OF BLOCK @VA10035 00429300
  455. TM IOBIOFLG,IOBUPD UPDATE FLAG ON? 00430000
  456. BO GETXER YES, EOB "PUTX" 00431000
  457. GET1D BAL R14,SETEOB HANDLE EOB CONDITION 00432000
  458. * FILL UP A BUFFER 00433000
  459. * (IF RECFM=V, ALLOW FOR BDW) 00434000
  460. GOGET EQU * GO GET A FILLED BUFFER 00435000
  461. ST R5,FCBBUFF SET BUFFER ADDRESS FOR CMS PLIST 00436000
  462. LH R15,DCBBLKSI GET INTENDED LENGTH OF RECORD 00437000
  463. ST R15,FCBBYTE SET LENGTH IN CMS PLIST 00438000
  464. L R15,=V(DMSSEB) GET V(END-OF-BLOCK ROUTINE) 00439000
  465. BALR R14,R15 00440000
  466. USING *,R14 00441000
  467. L R3,AQSAM REGAIN BASE REG 00442000
  468. DROP R14 00443000
  469. USING DMSSQS,R3 00444000
  470. * VERIFY COMPLETION CODE AND CLEAN ERROR CODE 00445000
  471. LH R6,FCBITEM GET FCB ITEM COUNT 00446000
  472. N R6,HALFWORD 00447000
  473. AH R6,FCBCOUT ADD BLOCK JUST READ 00448000
  474. C R6,=X'00010000' DOES COUNT OVERFLOW HALFWORD @VA09696 00448008
  475. BL GET1E NO, CONTINUE @VA09696 00448016
  476. XR R6,R6 CLEAR REGISTER FOR DIVIDE @VA09696 00448024
  477. L R7,FCBREAD GET ACTUAL NUM OF BYTES READ @VA09696 00448032
  478. LH R8,FCBRECL GET LOGICAL RECORD LENGTH @VA09696 00448040
  479. N R8,HALFWORD CLEAR TOP OF REGISTER @VA09696 00448048
  480. DR R6,R8 CALC ITEMS IN LAST BLOCK @VA09696 00448056
  481. LH R6,FCBITEM PICK UP ITEM COUNT @VA09696 00448064
  482. N R6,HALFWORD CLEAR TOP OF REGISTER @VA09696 00448072
  483. AR R6,R7 ADD COUNT OF ITEMS JUST READ @VA09696 00448080
  484. GET1E EQU * @VA09696 00448088
  485. CLC DCBFDAD+5(3),=XL3'00FFF8' END OF FILE? @VA02735 00448100
  486. BNE NOSTR NO , THEN STORE ITEM NUMBER @VA02735 00448200
  487. TM DCBCIND2,X'80' IS THIS UPDATE MODE? @VA05025 00448230
  488. BO NOSTR YES,THEN NO NEED TO FORCE EOF @VA05025 00448260
  489. MVC FCBITEM,=XL2'FFF8' SET EOF FOR NEXT READ @VA02735 00448300
  490. B STOR @VA02735 00448400
  491. NOSTR STH R6,FCBITEM UPDATE FCB ITEM COUNT @VA02735 00449000
  492. STOR L R6,FCBREAD GET NO BYTES READ @VA02735 00450000
  493. AR R6,R5 ADD THIS TO CURRENT POINTER 00451000
  494. ST R6,FCBOP ALLIGN THIS NO. 00452000
  495. MVC DCBEOBAD+1(3),FCBOP+1 UPDATE END OF BUFFER ADDR 00453000
  496. L R5,DCBRECAD GET ADDR OF RECORD 00454000
  497. LA R15,GOT SET RETURN ADDR 00455000
  498. CKFORERR EQU * 00456000
  499. L R6,IOBECBPT GET V(IOB) 00457000
  500. CLI 3(R6),X'00' IS ERROR CODE ZERO 00458000
  501. BCR 8,R15 RETURN TO CALLING RTN 00459000
  502. L R15,=V(DMSSCTCE) NOT ZERO, TAKE ERROR EXIT 00460000
  503. L R12,=V(DMSSCTCK) GET BASE REG FOR CHECK RTN 00461000
  504. BR R15 GO TO ERROR RTN 00462000
  505. * PASS RECORD AND COMPUTE SOME VARIABLES 00463000
  506. GOT EQU * EOB CONDITION SATISFIED 00464000
  507. TM DCBRECFM,UND UNDEFINED RECORD FORMAT? 00465000
  508. BO RUND YES 00466000
  509. TM DCBRECFM,VAR VARIABLE RECORD FORMAT? 00467000
  510. BO RVAR YES. 00468000
  511. * RECORD FORMAT = "FIXED" 00469000
  512. RFXD DS 0H 00470000
  513. B GIVERECD (LRECL) HAS BEEN SET 00471000
  514. * RECORD FORMAT = "UNDEFINED" 00472000
  515. RUND DS 0H 00473000
  516. MVC DCBLRECL(2),FCBREAD+2 SET LRECL = BLOCK READ 00474000
  517. B GIVERECD GET SIZE FOR MOVE 00475000
  518. * RECORD FORMAT = "VARIABLE" 00476000
  519. RVAR DS 0H 00477000
  520. MVC DCBLRECL(2),0(R5) SET LRECL FROM RECORD 00478000
  521. GIVERECD EQU * PASS RECORD BACK TO USER PROGRAM 00479000
  522. L R1,IOBECBPT GET V(IOB) @VM03048 00480000
  523. LH R6,DCBLRECL GET LRECL @V201122 00480100
  524. LTR R6,R6 IS IT POSITIVE @V201122 00480200
  525. BP GETSIZE YES, CONTINUE @V201122 00480300
  526. MVI 3(R1),8 NO, LENGTH ERROR @V201122 00480400
  527. B CKFORERR GO TO ERROR ROUTINE @V201122 00480500
  528. GETSIZE N R6,HALFWORD CLEAR FIRST TWO BYTES 00481000
  529. TM DCBMACRF,LOC LOCATE MODE? 00482000
  530. LR R1,R5 SET RECORD LOCATION 00483000
  531. ST R5,DCBRECAD RESET VALUES 00484000
  532. BO RETP RETURN. LOCATE MODE. 00485000
  533. L R7,DEBTCBAD A(USER MOVE-TO LOCATION ) 00486000
  534. LR R1,R7 USER WORKAREA FOR MOVE MODE @VA09791 00486500
  535. BAL R14,MOVEMODE MOVE THE RECORD TO USER BUFFER 00487000
  536. B RETP RETURN TO PROCESSING PROGRAM 00488000
  537. EJECT 00489000
  538. * 00490000
  539. * MOVE THE RECORD 00491000
  540. * 00492000
  541. SPACE 00493000
  542. * REGISTER ASSIGNMENTS: 00494000
  543. * R6=L'RECORD R7=A("TO") R5=A("FROM") R14=A(RETURN) 00495000
  544. MOVEMODE DS 0H HEAD 'EM UP; MOVE 'EM OUT! 00496000
  545. MV1 SH R6,HALF256+2 N'BYTES-TO-BE-MOVED GT 256? 00497000
  546. BM LT256 NO 00498000
  547. MVC 0(256,R7),0(R5) MOVE 256 BYTES OD THE RECORD 00499000
  548. BCR 8,R14 L'RECORD = 256 BYTES 00500000
  549. HALF256 LA R7,256(R7,R0) INCREMENT "MOVE-TO" LOCATION 00501000
  550. LA R5,256(,R5) INCREMENT "MOVE-FROM" LOCATION 00502000
  551. B MV1 MOVE ANOTHER CHUNK 00503000
  552. LT256 AH R6,HALF256+2 RESTORE THE TRUTH 00504000
  553. BCTR R6,0 PLAY GAMES 00505000
  554. EX R6,MOVEREC MOVE ALONG 00506000
  555. BR R14 RETURN 00507000
  556. MOVEREC MVC 0(*-*,R7),0(R5) MOVE THE RECORD 00508000
  557. SPACE 3 00509000
  558. * 00510000
  559. * "END-OF-BLOCK" CONDITIONS EXIST. GET NEW BUFFER FROM POOL. 00511000
  560. * 00512000
  561. * UPON ENTRY: 00513000
  562. * C(DCBBUFCB)=A(BUFCB) BUFCB: A(CURRENT BUFFER),H'BUFNO',H'BUFL' 00514000
  563. * C(IOBNXTAD)=A(NEXT VALID BUFFER TO-BE-USED) 00515000
  564. * C(IOBSTART)=X'ID OF NEXT BUFFER',AL3(INITIAL BUFFER IN BLOCK) 00516000
  565. * DURING: 00517000
  566. * THE "NEXT" BUFFER BECOMES THE "CURRENT" BUFFER. 00518000
  567. * THE "CURRENT" BUFFER + BUFL = "NEXT" BUFFER. 00519000
  568. * THE ID + 1 = THE ID OF THE "NEXT" BUFFER THAT WILL BE USED. 00520000
  569. * IF ID > BUFNO, ID IS SET = 1; AND C(IOBNXTAD)=C(IOBSTART). 00521000
  570. SETEOB DS 0H GET NEW BUFFER 00522000
  571. L R7,DCBBUFCB GET V(BUFFER CONTROL BLOCK) 00523000
  572. SR R10,R10 00526000
  573. IC R10,IOBSTART GET N'BUFFER TO BE USED 00527000
  574. LR R4,R10 GET NO. OF BUFFER V0206 00527100
  575. BCTR R4,R0 PREPARE FOR MULTIPLY V0206 00527200
  576. MH R4,DCBBUFL GET RELATIVE ADDR OF BUFFER V0206 00527300
  577. L R5,IOBSTART GET ADDR OF START OF BUFFER V0206 00527400
  578. LA R5,0(R4,R5) GET ACTUAL ADDR OF BUFFER V0206 00527500
  579. ST R5,DCBRECAD SET A(NEXT BUFFER AS NEXT RECORD) 00528000
  580. ST R5,0(,R7) SET A(BUFFER TO BE USED) INTO BUFCB 00529000
  581. LR R0,R5 00530000
  582. AH R0,DCBBUFL GET A(END BUFF+1)=A(NEXT BUFFER) 00531000
  583. LR R4,R0 SET A(END-OF-BUFFER TO BE USED) 00532000
  584. ST R4,FCBOP 00533000
  585. MVC DCBEOBAD+1(3),FCBOP+1 00534000
  586. HALF1 LA R10,1(R10,R0) GET N'NEXT BUFFER IN CHAIN TO BE USED 00536000
  587. CH R10,4(,R7) HAS BUFNO BEEN EXCCEDED? 00537000
  588. BNH SET1 NO. DO NOT RESET CHAIN OF BUFFERS 00538000
  589. LA R10,1 NEXT BUFF WILL BE FIRST BUFF IN POOL 00539000
  590. SET1 STC R10,IOBSTART SET N'NEXT BUFFER = 1. 00541000
  591. TM DCBRECFM,FXD RECFM=FXD,UND? 00542000
  592. BCR 1,R14 YES 00543000
  593. XC 0(8,R5),0(R5) CLEAR BDW AND RDW @VA12285 00543500
  594. LA R5,4(,R5) VAR. SKIP OVER BDW 00544000
  595. ST R5,DCBRECAD RESET RECAD 00545000
  596. SH R5,HALF4+2 00546000
  597. BR R14 00547000
  598. * 00548000
  599. * RETURN TO PROCESSING PROGRAM 00549000
  600. * 00550000
  601. RETP EQU * HATE TO SEE YA GO.... 00551000
  602. ST R1,24(,R13) 00552000
  603. RETX EQU * 00553000
  604. LM R14,R12,12(R13) RESTORE REGISTERS 00554000
  605. BR R14 00555000
  606. EJECT 00556000
  607. * 00557000
  608. * QSAM SIMULATION OF A MARVELOUS "PUT" FUNCTION 00558000
  609. * 00559000
  610. PUTTER OI IOBIOFLG,IOBOUT SIGNAL OUTPUT 00560000
  611. NI IOBIOFLG,255-IOBIN AVOID CONFUSION 00561000
  612. OI FCBIOSW,FCBIOWR SIGNAL OUTPUTTING 00562000
  613. PUT1A L R14,DCBBUFCB GET A(BUFFER CONTROL BLOCK) 00563000
  614. L R14,0(,R14) GET A(CURRENT BUFFER) 00564000
  615. LH R7,DCBLRECL L'CURRENT OR NEXT RECORD 00565000
  616. N R7,HALFWORD 00566000
  617. LM R4,R5,DCBEOBAD A(END-OF-BUFFER) 00567000
  618. LA R4,0(,R4) CLEAR HIGH ORDER BYTE V0206 00567100
  619. MVC FCBOP(2),0(R5) ALLIGN RDW 00568000
  620. TM FCBIOSW,FCBCLOSE DURING CLOSING? 00569000
  621. BNO CKMODE NO, GO CHECK MODE 00570000
  622. SR R1,R1 ZERO REG 1 00571000
  623. SR R6,R6 ZERO REG 6 00572000
  624. TM DCBMACRF+1,LOC LOCATE MODE? 00573000
  625. BZ CKRECFM NO, CHECK RECFM 00574000
  626. TM DCBRECFM,VAR RECFM= VAR OR UND? V0206 00574100
  627. BNO FXDCLOSE NO, DON'T ADD TO RECAD V0206 00574200
  628. LR R1,R7 GET LRECL 00575000
  629. LH R6,FCBOP GET RDW 00576000
  630. CKRECFM TM DCBRECFM,FXD RECFM FIXED? 00577000
  631. BO FXDCLOSE YES 00578000
  632. AR R5,R6 ADD LRECL IF ANY 00579000
  633. SR R5,R14 GET BYTE SIZE 00580000
  634. CH R5,=H'4' IS SIZE EQUAL TO FOUR 00581000
  635. BE RETP YES, THEN RETURN 00582000
  636. B PUTVB PUT BLOCK 00583000
  637. FXDCLOSE AR R5,R1 ADD LRECL IF ANY 00584000
  638. LR R6,R5 SAVE BUFFER ADDR 00585000
  639. SR R5,R14 GET RECORD LENGTH 00586000
  640. BZ RETP IF ZERO RETURN 00587000
  641. TM DCBRECFM,UND IF RECFM UNDEFINED, WRITE RECORD 00588000
  642. BO UNDSIZE YES, WRITE RECORD @VA14923 00589110
  643. CH R5,DCBBLKSI IS BUFFER FULL 00590000
  644. BE UNDSIZE YES, WRITE RECORD 00591000
  645. MVC 0(4,R6),=XL4'61FFFF61' SET EOF INDICATOR 00592000
  646. CLI FCBDSMD+1,C'4' IS THIS A P4 FILE 00593000
  647. BE UNDSIZE YES, WRITE RECORD 00594000
  648. LR R6,R5 SAVE LENGTH 00595000
  649. SR R4,R4 ZERO REG 4 00596000
  650. DR R4,R7 GET FCBCOUT 00597000
  651. STH R5,FCBCOUT FILL IN FCBCOUT 00598000
  652. LR R7,R6 GET BUFFER LENGTH 00599000
  653. B PUTBUF WRITE BUFFER 00600000
  654. CKMODE EQU * 00601000
  655. TM DCBMACRF+1,LOC LOCATE MODE? 00602000
  656. BZ PUTMOVE NO. MOVE MODE 00603000
  657. PUTLOC EQU * QSAM-PUT-LOCATE. HAVE FUN! 00604000
  658. TM DCBOFLGS,PREVIOUS IS THIS THE FIRST PUT EVER? 00605000
  659. BO PLOC1 NO. THERE HAVE BEEN OTHERS 00606000
  660. OI DCBOFLGS,PREVIOUS INDICATE THIS OUTPUT 00607000
  661. CR R5,R4 IS BUFFER FULL V0206 00608000
  662. BL SAVELREC NO, RETURN TO CALLER V0206 00608100
  663. PLOC1 TM DCBRECFM,BLK SUBSEQUENT PUTS. BLOCK RECORDS? 00609000
  664. BO PLOCBLK YES. 00610000
  665. UNDSIZE L R7,FCBBYTE GET LRECL OF UND RECORD 00611000
  666. PLOCUBLK EQU * UNBLOCKED. EOB EXISTS AFTER EVERY PUT 00612000
  667. TM DCBRECFM,UND IS RECFM UNDEFINED 00613000
  668. BNO NOUND NO, CONTINUE @VA03362 00614100
  669. LR R15,R14 GET A(CURRENT BUFFER) @VA03362 00614200
  670. SR R15,R4 LESS PREV. BUFFER @VA03362 00614300
  671. LTR R15,R15 CORRECT BUFFER? @VA03362 00614400
  672. BM PUTBUF NO,THEN PUT AS IS @VA03362 00614500
  673. SR R7,R15 CALCULATE UNDEF. LENGTH @VA03362 00614600
  674. B PUTBUF PUT THAT BUFFER @VA03362 00614700
  675. NOUND LH R7,DCBBLKSI FOR RECFM=UNBLOCKED @VA03362 00614800
  676. TM DCBRECFM,FXD RECFM=FIXED/UNDEFINED 00616000
  677. BO PUTBUF YES. GO OUTPUT PREVIOUS RECORD 00617000
  678. XC BD6(RDRES,R14),BD6(R14) ZERO 2 BYTES OF RDW @VA06228 00617500
  679. PLOC3 MVC FCBOP+4(2),4(R14) ALLIGN RDW 00618000
  680. LH R7,FCBOP+4 GET RDW 00619000
  681. HALF4 LA R7,4(R7,R0) ACCOUNT FOR BLOCK-DESCRIPTOR-WORD 00620000
  682. PLOC4 STH R7,FCBOP+4 ALLIGN BDW 00621000
  683. MVC 0(2,R14),FCBOP+4 SET BDW 00622000
  684. XC 2(2,R14),2(R14) ZERO OUT 2ND HALF OF BDW @VA04100 00622500
  685. PUTBUF EQU * OUTPUT CURRENT FILLED BLOCK 00623000
  686. ST R7,FCBBYTE SET BLOCK LENGTH FOR CMS PLIST 00624000
  687. ST R14,FCBBUFF SET BLOCK LOCATION 00625000
  688. PUT2 L R15,=V(DMSSEB) GET V(END-OF-BLOCK ROUTINE) 00626000
  689. BALR R14,R15 00627000
  690. USING *,R14 00628000
  691. L R3,AQSAM REGAIN ADDRESSABILITY 00629000
  692. BAL R15,CKFORERR CHECK FOR ERROR 00630000
  693. DROP R14 00631000
  694. USING DMSSQS,R3 00632000
  695. LH R6,FCBITEM GET FCB ITEM COUNT 00633000
  696. N R6,HALFWORD 00634000
  697. AH R6,FCBCOUT ADD BLOCK JUST WRITTEN 00635000
  698. STH R6,FCBITEM UPDATE ITEM COUNT 00636000
  699. TM FCBIOSW,FCBCLOSE DURING CLOSING? 00637000
  700. BO RETP YES, RETURN 00638000
  701. BAL R14,SETEOB GET FRESH BUFFER 00639000
  702. SAVELREC MVC FCBBYTE+2(2),DCBLRECL SAVE LRECL OF THIS PUT 00640000
  703. TM FCBIOSW,FCBPVMB PUT-MOVE-VAR-BLK? 00641000
  704. BO PVMB2 YES 00642000
  705. LR R1,R5 GET RETURN BUFFER ADDR V0206 00642050
  706. TM DCBRECFM,VAR RECFM= VAR OR UND V0206 00642100
  707. BO PUTRET RETURN TO CALLER V0206 00642150
  708. TM DCBMACRF+1,LOC IS THIS A PUT LOCATE V0206 00642200
  709. BZ RETP NO, RETURN TO CALLER V0206 00642250
  710. AH R5,DCBLRECL POINT RECAD TO NEXT RECORD ADDR V0206 00642300
  711. ST R5,DCBRECAD SET RECORD ADDRESS POINTER V0206 00642350
  712. B RETP RETURN TO CALLER V0206 00642400
  713. PUTLRET EQU * @VA09591 00642550
  714. SR R5,R7 ADDRESS(END OF CURRENT RECORD) @VA09591 00642700
  715. XC 0(4,R5),0(R5) CLEAR NEXT POSSIBLE RDW @VA09591 00642850
  716. PUTRET EQU * RETURN TO PROCESSING PROGRAM 00643000
  717. L R1,DCBRECAD GET A(BUFFER FOR NEXT RECORD) 00644000
  718. B RETP 00645000
  719. PLOCBLK EQU * BLOCKED. VERIFY EOB CONDITIONS 00646000
  720. TM DCBRECFM,FXD FIXED/UNDEFINED? 00647000
  721. BZ PLVB NO. VARIABLE. 00648000
  722. PLFB EQU * PUT-LOCATE-BLOCKED-FIXED/UNDEFINED 00649000
  723. LR R1,R5 SETUP RETURN REG V0213 00649100
  724. AR R5,R7 A(LAST REC)+L'LAST REC=A(NEXT REC) 00650000
  725. ST R5,DCBRECAD SET A(NEXT RECORD) 00651000
  726. CR R4,R5 VERIFY THAT NEXT REC FITS CURRENT BUF 00653000
  727. BNL RETP RETURN TO CALLER V0213 00654000
  728. PLOC2 LH R7,DCBBLKSI USE BLOCK SIZE FOR 00655000
  729. B PUTBUF NO. PUT THIS BUFF; THEN EOB 00656000
  730. PLVB EQU * PUT-LOCATE-BLOCKED-VARIABLE 00657000
  731. XC RD2(RDRES,R5),RD2(R5) ZERO 2 BYTES OF RDW @VA06228 00657500
  732. AH R5,FCBOP ADD RDW 00658000
  733. ST R5,DCBRECAD SET A(NEXT RECORD) 00659000
  734. AR R5,R7 A(NEXT REC)+EST L'NEXT REC=A(NEXT+1 REC) 00660000
  735. CR R4,R5 VERIFY THAT NEXT REC FITS CURR BUF 00661000
  736. BNL PUTLRET YES, NEXT RECORD WILL FIT @VA09591 00662000
  737. SR R5,R7 GET A(END-OF-CURRENT BUFFER) 00663000
  738. SR R5,R14 GET L'BUFFER FOR BDW 00664000
  739. PUTVB EQU * 00665000
  740. LR R7,R5 00666000
  741. B PLOC4 PUT BLOCK / EOB 00667000
  742. PUTMOVE EQU * QSAM-PUT-MOVE 00668000
  743. OI DCBOFLGS,PREVIOUS INDICATE LSAT OPERATION OUTPUT 00669000
  744. ST R0,DEBTCBAD SAVE USERS V(BUFFER) 00670000
  745. TM DCBRECFM,BLK BLOCKED? 00671000
  746. BO PMOVBLK YES. 00672000
  747. PMOVUBLK EQU * UNBLOCKED. EOB ON EVERY PUT 00673000
  748. TM DCBRECFM,FXD RECFM=FIXED/UNDEFINED? 00674000
  749. BZ PMVU NO. VARIABLE. 00675000
  750. PMFU EQU * PUT-MOVE-UNBLOCKED-FIXED/UNDEFINED 00676000
  751. LR R6,R7 00677000
  752. LR R7,R5 00678000
  753. LR R5,R0 00679000
  754. LR R0,R14 00680000
  755. BAL R14,MOVEMODE MOVE RECORD INTO BUFFER 00681000
  756. LR R14,R0 00682000
  757. LH R7,DCBLRECL GET LRECL OF RECORD 00683000
  758. TM DCBRECFM,UND RECFM=UNDEFINED? @VA03362 00684100
  759. BO PUTBUF YES, THEN PUT BUFFER @VA03362 00684200
  760. B NOUND NO, NOT UNDEFINED @VA03362 00684300
  761. PMVU EQU * PUT-MOVE-UNBLOCKED-VARIABLE 00685000
  762. LR R7,R5 R7=A(RECAD)=A("TO") 00686000
  763. LR R5,R0 A(FROM BUFFER) 00687000
  764. MVC FCBOP(2),0(R5) ALLIGN RDW 00688000
  765. LH R6,FCBOP GET RDW 00689000
  766. N R6,HALFWORD 00690000
  767. LR R0,R14 00691000
  768. BAL R14,MOVEMODE MOVE RECORD 00692000
  769. LR R14,R0 00693000
  770. XC BD6(RDRES,R14),BD6(R14) ZERO 2 BYTES OF RDW @VA06228 00693500
  771. MVC FCBOP+4(2),4(R14) ALLIGN RDW 00694000
  772. LH R6,FCBOP+4 GET RDW 00695000
  773. LA R6,4(,R6) ACCOUNT FOR THE BDW 00696000
  774. STH R6,FCBOP+4 ALLIGN BDW 00697000
  775. MVC 0(2,R14),FCBOP+4 SET BDW 00698000
  776. XC 2(2,R14),2(R14) ZERO OUT 2ND HALF OF BDW @VA04100 00698500
  777. LR R7,R6 00699000
  778. B PUTBUF PUT CURRENT BUFFER/EOB 00700000
  779. PMOVBLK EQU * QSAM-PUT-MOVE-BLOCKED 00701000
  780. TM DCBRECFM,FXD RECFM=FIXED/UNDEFINED? 00702000
  781. BZ PVMB NO. VARIABLE. 00703000
  782. PFMB EQU * PUT-MOVE-BLOCKED-FIXED/UNDEFINED 00704000
  783. LR R6,R7 GET L'RECORD (=DCBLRECL) 00705000
  784. LR R7,R5 A(TO) (=DCBRECAD, A OF NEXT REC) 00706000
  785. LR R5,R0 A(FROM) 00707000
  786. LR R0,R14 00708000
  787. BAL R14,MOVEMODE MOVE THEE RECORD. IT WILL ALWAYS FIT. 00709000
  788. LR R14,R0 00710000
  789. L R5,DCBRECAD A(CURRENT RECORD) 00711000
  790. AH R5,DCBLRECL A(NEXT RECORD) 00712000
  791. ST R5,DCBRECAD FILL IN RECORD ADDR 00713000
  792. AH R5,DCBLRECL ADD LRECL 00714000
  793. CR R4,R5 VERIFY THAT NEXT REC FITS CURR BUF 00715000
  794. BNL PUTRET YES. BUFF WILL ACCOMMODATE NEXT REC 00716000
  795. B PLOC2 PUT BUFFER/EOB 00717000
  796. PVMB EQU * PUT-MOVE-BLOCKED-VARIABLE 00718000
  797. LR R7,R0 A(USER RECORD, RDW) 00719000
  798. MVC FCBOP(2),0(R7) ALLIGN RDW 00720000
  799. AH R5,FCBOP ADD RDW 00721000
  800. CR R4,R5 VERIFY FITAGE INTO CURRENT BUFFER 00722000
  801. ST R5,DCBRECAD SET A(NEXT RECORD) 00723000
  802. BNL PVMB1 IT FITS. MOVE INTO BUFFER. 00724000
  803. SH R5,FCBOP SUBTRACR RDW 00725000
  804. SR R5,R14 A(END LAST REC)-A(BUFFER)=LL OF BDW 00726000
  805. OI FCBIOSW,FCBPVMB SIGNAL PUT-MOVE-VAR-BLK 00727000
  806. B PUTVB PUT BUFFER 00728000
  807. PVMB2 NI FCBIOSW,255-FCBPVMB 00729000
  808. LA R7,4(R5) SKIP OVER BDW 00730000
  809. LR R14,R7 SAVE RECORD ADDR 00731000
  810. L R5,DEBTCBAD GET ADDR OF USER RECORD 00732000
  811. MVC FCBOP(2),0(R5) ALLIGN RDW 00733000
  812. LH R6,FCBOP GET RDW 00734000
  813. AR R14,R6 GET ADDR FOR NEXT RECORD 00735000
  814. LR R1,R7 GET ADDR OF OUTPUT BUFFER @VA03887 00735100
  815. ST R14,DCBRECAD SET ADDR OF NEXT RECORD 00736000
  816. BAL R14,MOVEMODE MOVE THE RECORD *** 00737000
  817. XC RD2(RDRES,R1),RD2(R1) ZERO 2 BYTES OF RDW @VA06228 00737500
  818. B RETP LEAVE US @VA03887 00738100
  819. PVMB1 EQU * RECORD WILL FIT INTO CURRENT BUFFER 00739000
  820. LH R6,FCBOP GET RDW 00740000
  821. LR R7,R5 A(TO) (=DCBRECAD) 00741000
  822. SR R7,R6 GET RECORD ADDR 00742000
  823. LR R5,R0 A(FROM) 00743000
  824. LR R1,R7 GET ADDR OF OUTPUT BUFFER @VA03887 00743100
  825. BAL R14,MOVEMODE 00744000
  826. XC RD2(RDRES,R1),RD2(R1) ZERO 2 BYTES OF RDW @VA06228 00745000
  827. B RETP LEAVE US @VA03887 00745100
  828. EJECT 00746000
  829. * 00747000
  830. * SOME VALUES FOR THE CAUSE 00748000
  831. * 00749000
  832. SPACE 00750000
  833. AQSAM DC A(DMSSQS) BASE ADDRESS 00751000
  834. HALFWORD DC F'65535' CONSTANT X'0000FFFF' @VA06228 00751200
  835. RDRES EQU 2 RESERVED BYTES OF RDW @VA06228 00751400
  836. RD2 EQU 2 RDW+2 FOR BLOCKED RECORDS @VA06228 00751600
  837. BD6 EQU 6 BDW+6 FOR UNBLOCKED RECORDS @VA06228 00751800
  838. LTORG 00752100
  839. EJECT 00753000
  840. PRINT GEN 00754000
  841. * 00755000
  842. * PRESENTING THE DUMMIES ... 00756000
  843. * 00757000
  844. SPACE 00758000
  845. IO 00759000
  846. EJECT 00760000
  847. NUCON 00761000
  848. EJECT 00762000
  849. DCBD DSORG=(PS) 00763000
  850. EJECT 00764000
  851. CMSCB 00765000
  852. EJECT 00766000
  853. EJECT 00767000
  854. REGEQU 00768000
  855. END 00769000