User Tools

Site Tools


ibm:vm370-lib:cms:dmssop.assemble_src

DMSSOP Source

References

Source Listing

DMSSOP.ASSEMBLE.txt
  1. SOP TITLE 'DMSSOP (CMS) VM/370 - RELEASE 6' 00001000
  2. SPACE 2 00002000
  3. *. 00003000
  4. * 00004000
  5. * 00005000
  6. * 00006000
  7. * 00007000
  8. * MODULE NAME: 00008000
  9. * 00009000
  10. * DMSSOP (SOOPCL) 00010000
  11. * 00011000
  12. * FUNCTION: 00012000
  13. * 00013000
  14. * TO PROCESS OS OPEN AND CLOSE MACROS. 00014000
  15. * 00015000
  16. * ATTRIBUTES: 00016000
  17. * 00017000
  18. * REENTRANT, NUCLEUS RESIDENT. 00018000
  19. * 00019000
  20. * ENTRY POINTS: 00020000
  21. * 00021000
  22. * DMSSOP19 - OPEN MACRO 00022000
  23. * DMSSOP22 - OPEN MACRO TYPE= J 00023000
  24. * DMSSOP20 - CLOSE MACRO 00024000
  25. * DMSSOP23 - CLOSE MACRO TYPE= T 00025000
  26. * 00026000
  27. * ENTRY CONDITIONS: 00027000
  28. * 00028000
  29. * DMSSOP19 - OPEN MACRO 00029000
  30. * DMSSOP22 - OPEN MACRO TYPE = J 00030000
  31. * DMSSOP20 - OS CLOSE MACRO 00031000
  32. * DMSSOP23 - OS CLOSE MACRO TYPE = T 00032000
  33. * 00033000
  34. * EXIT CONDITIONS: 00034000
  35. * 00035000
  36. * IF AN OPEN IS SUCCESSFUL, CONTROL IS RETURNED TO THE 00036000
  37. * USER WITH THE DCBOFLGS OPEN BIT ON. IF AN OPEN FAILS 00037000
  38. * FOR ONE OF THE REASONS LISTED BELOW, THE DCBOFLGS BIT 00038000
  39. * IS TURNED OFF. THE FOLLOWING MESSAGE IS TYPED ON THE 00039000
  40. * CONSOLE AND CONTROL IS RETURNED TO THE PROGRAM WHICH 00040000
  41. * ISSUED THE OPEN CALL. 00041000
  42. * 00042000
  43. * DMSSOP036E OPEN ERROR 'CODE' ON 'DCBDDNAME' 00043000
  44. * 00044000
  45. * CODES ON WHY AN OPEN MIGHT FAIL. 00045000
  46. * 00046000
  47. * 1. EITHER THE RDBACK OPTION OF OPEN IS SPECIFIED OR 00047000
  48. * THE DATA SET ORGANIZATION IS NOT BSAM, QSAM, 00048000
  49. * BPAM OR BDAM. 00049000
  50. * 00050000
  51. * 2. DEFAULT FILEDEF ISSUED BY OPEN FAILED. 00051000
  52. * 00052000
  53. * 3. RECFM DOES NOT AGREE WITH THE FORMAT OF THE EXISTING 00053000
  54. * FILE. ONE RECFM IS F AND THE OTHER IS V. 00054000
  55. * 00055000
  56. * 4. MISSING OR INVALID BLKSIZE. 00056000
  57. * 00057000
  58. * 5. BLKSIZE NOT CORRECT MULTIPLE OF LRECL. 00058000
  59. * 00059000
  60. * 6. RECFM IS FIXED AND LRECL DOES NOT AGREE WITH THE 00060000
  61. * RECORD LENGTH OF THE EXISITING FILE OR IF FILEMODE 00061000
  62. * IS 4 THE BLKSIZE DOES NOT AGREE WITH THE RECORD 00062000
  63. * LENGTH OF THE EXISTING FILE. 00063000
  64. * 00064000
  65. * 7. RECFM IS VARIABLE SPANNED AND EITHER FILEMODE IS NOT 00064800
  66. * 4 OR ACCESS METHOD IS NOT BSAM OR IS NOT QSAM WITH 00065500
  67. * GET LOCATE MODE. 00066200
  68. * 00067000
  69. * 8. ERROR SAVING BPAM DIRECTORY FOR UPDATE. 00068000
  70. * OR ERROR DOING FIND FOR MEMBER NAME SPECIFIED 00069000
  71. * IN FILEDEF COMMAND OR CMSCB. 00070000
  72. * 00071000
  73. * 9. THE DCB SPECIFIES OUTPUT, BDAM OR A KEY LENGTH 00072000
  74. * FOR AN OS DATA SET. 00073000
  75. * 00074100
  76. * 11. I/O OPTION 'UPDATE' IS INVALID FOR FILE FOUND ON 00074200
  77. * READ-ONLY DISK. 00074300
  78. * 00074400
  79. * 11. I/O OPTION 'UPDATE' IS INVALID FOR A FILE @VA12049 00074410
  80. * FOUND ON A READ-ONLY EXTENSION. OUTPUT FILE @VA12049 00074420
  81. * WITH DISP=MOD OR DSORG=PO MEANS UPDATE, SO @VA12049 00074430
  82. * IT MAY NOT EXIST ON READ-ONLY EXTENSION. @VA12049 00074440
  83. * @VA12049 00074450
  84. * 80. UNSUPPORTED OS DATA SET OR I/O ERROR ACCESSING 00074500
  85. * OS DISK. 00074600
  86. * 00077000
  87. * IF CLOSE ENCOUNTERS ANY ERRORS SAVING KEY OR PDS TABLES, 00078000
  88. * CONTROL IS PASSED TO DMSSCTCE TO PRINT A MESSAGE AND ABEND 00079000
  89. * THE USER. 00080000
  90. * 00081000
  91. * CALLS TO OTHER ROUTINES: 00082000
  92. * 00083000
  93. * DMSFLD, DMSSTT, DMSERS, DMSERR, DMSCPF, DMSTIO, DMSFNS, 00084000
  94. * GETMAIN, OPEN EXIT ROUTINE, PDSSAVE AND KEYSAVE IN DMSSVT, 00085000
  95. * GETPOOL, FIND, DMSSCTCE, DMSVIB, DMSVIP. 00086000
  96. * 00087000
  97. * EXTERNAL REFERENCES: 00088000
  98. * 00089000
  99. * NUCON, OPSECT, FCBSECT, IHADDCB, OSFST 00090000
  100. * 00091000
  101. * TABLES/WORKAREAS: 00092000
  102. * 00093000
  103. * NONE 00094000
  104. * 00095000
  105. * REGISTER USAGE: 00096000
  106. * 00097000
  107. * R10 SECOND BASE @VA08024 00098000
  108. * R0,R1,R4,R6-R9,R11,R14,R15 WORK @VA08024 00098500
  109. * R2 DCB 00099000
  110. * R3 OPSECT DSECT 00100000
  111. * R5 FCB 00101000
  112. * R12 BASE 00102000
  113. * R13 SAVE AREA 00103000
  114. * 00104000
  115. * OPERATION: OPEN (SVC22) AND OPENJ (SVC 19) 00105000
  116. * 00106000
  117. * INITIALIZATION 00107000
  118. * IOTYPE IS SET TO INDICATE OPEN OR OPENJ, UPON ENTRY TO 00108000
  119. * SOOPCL, AND THE ADDRESS OF THE CURRENT DCB IS OBTAINED 00109000
  120. * FROM THE LIST POINTED TO BY REGISTER 1. 00110000
  121. * 00111000
  122. * VSAM 00112000
  123. * IF ANY OR ALL OF THE CONTROL BLOCKS POINTED TO BY 00113000
  124. * THE ADDRESSES IN THE PLIST ARE ACB'S, A BALR IS 00114000
  125. * MADE TO THE OS VSAM INTERFACE AFTER COMPLETION OF 00115000
  126. * DCB PROCESSING. THE ADDRESS OF THE INTERFACE IS 00116000
  127. * OBTAINED FROM CVT+256( PRIOR TO THE FIRST CALL, 00117000
  128. * THIS CELL CONTAINS THE ADDRESS OF THE INTERFACE 00118000
  129. * BOOTSTRAP). 00119000
  130. * 00120000
  131. * A PARAMETER LIST IS CONSTRUCTED IN THE USER SAVE 00121000
  132. * AREA AS FOLLOWS: 00122000
  133. * 00123000
  134. * DC CL1'O' OPTION BYTE (C'O'-OPEN, 00124000
  135. * C'C'-CLOSE, C'T'-TCLOSE) 00125000
  136. * DC CL3'SOP' SOP IDENTIFIER 00126000
  137. * 00127000
  138. * UPON RETURN FROM DMSVIP, REGISTER 15 CONTAINS THE 00128000
  139. * RETURN CODE FROM THE DOS VSAM OPEN ROUTINE. 00129000
  140. * 00130000
  141. * 00131000
  142. * DETERMINATION OF ACCESS METHOD 00132000
  143. * THE DATA SET ORGANIZATION (DCBDSORG) SWITCH IS 00133000
  144. * CHECKED TO BE SURE IT IS EITHER PHYSICAL 00134000
  145. * SEQUENTIAL, PARTITIONED, OR DIRECT ACCESS 00135000
  146. * (EFFECTIVELY ELIMINATING ONLY ISAM). IF NONE OF 00136000
  147. * THE ABOVE, THE DCB WILL NOT BE OPENED. 00137000
  148. * 00138000
  149. * NEXT THE MACRO FORMAT FIELD (DCBMACRF) IS CHECKED 00139000
  150. * TO SEE WHICH ACCESS METHOD IS REQUESTED, AND THE 00140000
  151. * ACCESS METHOD INDICATOR (DCBCIND2) IS SET TO 00141000
  152. * SIGNAL QSAM OR BSAM. 00142000
  153. * 00143000
  154. * 00144000
  155. * QSAM 00145000
  156. * IF THE ACCESS METHOD IS QSAM, DCBMACRF IS TESTED 00146000
  157. * FOR A GET, UPDATE OR PUT REQUEST, AND THE RELEVANT ROUTINE 00147000
  158. * ADDRESS IS PLACED IN THE CORRESPONDING DCB ACCESS 00148000
  159. * FIELD (NOTE THAT GET, UPDATE AND PUT ARE IN THE CMS 00149000
  160. * ROUTINE DMSSQS) 00150000
  161. * 00151000
  162. * 00152000
  163. * BSAM 00153000
  164. * IF THE ACCESS METHOD IS BSAM, THE ADDRESS OF 00154000
  165. * DMSSBS IS PLACED IN DCB ACCESS FIELD; THE CHECK 00155000
  166. * ADDRESS IS PLACED IN THE DCB CHECK FIELD; AND IF 00156000
  167. * POINT IS REQUESTED, THE DMSSCT ADDRESS IS PLACED 00157000
  168. * IN THE DCBNOTE FIELD. 00158000
  169. * 00159000
  170. * 00160000
  171. * SETTING UP DCB FIELDS 00161000
  172. * AFTER THE RELEVANT QSAM OR BSAM PROCESSING, 00162000
  173. * THE CMSCB(FCB) CHAIN IS TESTED TO 00163000
  174. * SEE IF THERE IS A CMSCB FOR THIS DCB. THAT IS, IF 00164000
  175. * A FILEDEF COMMAND FOR THE RESPECTIVE DATA SET HAS 00165000
  176. * BEEN ISSUED. IF ONE DOES NOT EXIST, THE ASSUMPTION 00166000
  177. * IS MADE THAT THE USER HAS SET UP THE REQUIRED DCB 00167000
  178. * FIELDS, AND FILEDEF IS CALLED TO CREATE A CMSCB 00168000
  179. * WITH A FILENAME OBTAINABLE FROM LOCATION CMSNAME 00169000
  180. * (INITIALIZED AS 'FILE'), 00170000
  181. * A FILEMODE OF A1, AND A FILETYPE EQUAL TO THE DCB 00171000
  182. * DDNAME. AFTER A MATCHING CMSCB IS FOUND OR CREATED, 00172000
  183. * IT IS USED TO FILL IN VACANT ENTRIES IN THE 00173000
  184. * DCB. IF THE MACLIB CONCAT OPTION IS ON IN THE CMSCB, 00174000
  185. * OPEN CHECKS THE MACLIB NAMES IN THE GLOBAL LIST AND 00175000
  186. * FILLS IN THE ADDRESSES OF OS FSTS FOR ANY MACLIBS THAT 00176000
  187. * ARE ON OS DISKS. THE CMSCB OF THE 1ST MACLIB IN THE 00177000
  188. * GLOBAL LIST IS USED FOR CMSCB MERGING AND INITIAL- 00178000
  189. * IZATION. 00179000
  190. * 00180000
  191. * THE FOLLOWING TABLE SHOWS THE CMSCB FIELDS THAT 00181000
  192. * ARE USED TO COMPLETE DCB FILEDS NOT INITIALIZED BY 00182000
  193. * THE USER PRIOR TO ISSUING THE OPEN CALL. IT ALSO 00183000
  194. * SHOWS THE JFCBMASK BIT SETTING WHICH IS ON IF THE 00184000
  195. * ASSOCIATED CMSCB FIELD MUST BE USED. IF THE CMSCB 00185000
  196. * FIELDS ARE NOT SPECIFIED BY A FILEDEF 00186000
  197. * COMMAND, NO DEFAULTS WILL BE USED TO FILL IN THE 00187000
  198. * RESPECTIVE FIELDS OF THE CMSCB. 00188000
  199. * 00189000
  200. * _______________________________________ 00190000
  201. * | DCB || FCB | JFCBMASK | 00191000
  202. * |___________||____________|___________| 00192000
  203. * |-----------||------------|-----------| 00193000
  204. * | || | | 00194000
  205. * | DCBBLKSI || JFCBLKSI |+2 X'10' | 00195000
  206. * | DCBDSORG || JFCDSORG |+3 X'01' | 00196000
  207. * | DCBLRECL || JFCLRECL |+3 X'02' | 00197000
  208. * | DCBRECFM || JFCRECFM |+2 X'04' | 00198000
  209. * | DCBKEYLE || JFCKEYLE |+3 X'20' | 00199000
  210. * | DCBOPTCD || JFCOPTCD |+2 X'80' | 00200000
  211. * | DCBLIMCT || JFCLIMCT |+2 X'40' | 00201000
  212. * |___________||____________|___________| 00202000
  213. * 00203000
  214. * 00204000
  215. * SETTING UP A NEW CMSCB 00205000
  216. * 00206000
  217. * THIS ROUTINE IS ENTERED IF IT IS NECESSARY TO SET 00207000
  218. * UP AND INITIALIZE A NEW CMSCB FOR THE DCB 00208000
  219. * CURRENTLY BEING OPENED. IT ISSUES A FILEDEF 00209000
  220. * WITH THE FOLLOWING FIELDS FILLED IN: 00210000
  221. * 00211000
  222. * 00212000
  223. * ________________________________________________________ 00213000
  224. * | FIELD || CONTENT | DESCRIPTION | 00214000
  225. * |____________||_____________|__________________________| 00215000
  226. * |------------||-------------|--------------------------| 00216000
  227. * | FCBSECT || X'08' | INDICATES OPEN ACQUIRED | 00217000
  228. * | || | THIS CMSCB. | 00218000
  229. * | FCBDEV || X'14' | DISK DEFAULT | 00219000
  230. * | FCBDSNAM || FILENAME | CMS FILENAME ('FILE') | 00220000
  231. * | FCBDD || DCBDDNAM | CMS FILETYPE | 00221000
  232. * | FCBDSTYP || DCBDDNAM | CMS FILETYPE | 00222000
  233. * | FCBDSMD || FILEMODE | CMS FILEMODE ('A1') | 00223000
  234. * |____________||_____________|__________________________| 00224000
  235. * 00225000
  236. * 00226000
  237. * 00227000
  238. * 00228000
  239. * SETTING UP CONTROL BLOCK POINTERS 00229000
  240. * 00230000
  241. * AFTER THE CMSCB IS INITIALIZED, THE ADDRESS 00231000
  242. * POINTERS ARE SET TO LINK THE VARIOUS SIMULATED 00232000
  243. * CONTROL BLOCKS. 00233000
  244. * 00234000
  245. * 00235000
  246. * ___________________________________________________________ 00236000
  247. * | CONTROL | || | 00237000
  248. * | BLOCK | FIELD || CONTENTS AFTER COMPLETION | 00238000
  249. * |___________|___________||________________________________| 00239000
  250. * | | || | 00240000
  251. * | DCB | DCBDEBAD || DEB ADDRESS | 00241000
  252. * | DCB | DCBIOBAD || IOB ADDRESS | 00242000
  253. * | DCB | DCBIOBA || IOB ADDRESS | 00243000
  254. * | DCB | DCBIOBL || LENGTH IN DOUBLE WORDS OF IOB | 00244000
  255. * |___________|___________||________________________________| 00245000
  256. * | IOB | IOBDCBPT || DCB POINTER | 00246000
  257. * |___________|___________||________________________________| 00247000
  258. * | DEB | DEBDCBAD || DCB POINTER | 00248000
  259. * | DEB | DEBDEBID || X'0F' FLAG TO SHOW BLOCK IS DEB| 00249000
  260. * | DEB | DEBOPATB || OPEN OPTION BYTE | 00250000
  261. * |___________|___________||________________________________| 00251000
  262. * 00252000
  263. * 00253000
  264. * FILE VERIFICATION 00254000
  265. * 00255000
  266. * THE CMSCB DEVICE TYPE IS CHECKED AND IF THE TYPE IS 00256000
  267. * NOT DISK, OR IF THE FILE DOES NOT EXIST, CONTROL 00257000
  268. * PASSES TO EXITLIST. 00258000
  269. * 00259000
  270. * . IF THE CMSCB MOD OPTION IS NOT SPECIFIED AND THE 00260000
  271. * DCBDSORG OPTION = PS, AND THE FILE IS OPENED FOR 00261000
  272. * OUTPUT OR OUTIN, THE FILE IS ERASED AND CONTROL IS 00262000
  273. * PASSED TO EXITLIST. 00263000
  274. * 00264000
  275. * . IF THE CMSCB MOD OPTION IS SPECIFIED, THE ITEM NO. 00265000
  276. * IS SET TO POINT TO THE END OF THE FILE RATHER THAN 00266000
  277. * THE START OF THE FILE AND CONTROL IS PASSED TO EXITLIST. 00267000
  278. * 00268000
  279. * . IF THE CMSCB REFERS TO A DATA SET ON AN OS DISK 00269000
  280. * A CHECK IS MADE TO INSURE THAT THE DATA SET IS 00270000
  281. * ACCESSABLE AND THAT THE DCB DOES NOT SPECIFY OUTPUT, 00271000
  282. * BDAM OR A KEY LENGTH. IF ANY ERRORS ARE FOUND, ERROR 00272000
  283. * MESSAGE DMSSOP036E IS PRINTED AND THE DCB IS NOT 00273000
  284. * OPENED. IF DCBRECFM, DCBLRECL OR DCBBLKSI ARE NOT 00274000
  285. * FILLED IN, THEY ARE FILLED IN FROM THE OSFST FOR 00275000
  286. * THE DATA SET. 00276000
  287. * 00277000
  288. * . IF THE I/O PROCESSING OPTION SPECIFIES UPDATE FOR 00278100
  289. * A FILE FOUND ON A READ-ONLY DISK, ERROR MESSAGE 00278200
  290. * DMSSOP036E WILL BE PRINTED, AND THE DCB WILL NOT 00278300
  291. * BE OPENED. 00278400
  292. * 00283000
  293. * EXITLIST USER EXIT PROCESSING ROUTINE 00284000
  294. * 00285000
  295. * IF THE EXIT LIST FIELD (DCBEXLST) IS EMPTY, 00286000
  296. * CONTROL PASSES IMMEDIATELY TO VEROPEN - THE 00287000
  297. * VERIFICATION ROUTINE FOR RECORD FORMAT DEPENDENT 00288000
  298. * QUANTIFIERS. 00289000
  299. * 00290000
  300. * IF DCBEXLST CONTAINS A CODE OTHER THAN X'05', 00291000
  301. * CHECKING CONTINUES UNTIL AN END-OF-LIST TAG IS 00292000
  302. * FOUND, AT WHICH TIME CONTROL RETURNS TO VEROPEN, 00293000
  303. * OR UNTIL A X'05' IS FOUND, IN WHICH CASE THE 00294000
  304. * DCBOFLGS ARE LOCKED ON AND A BRANCH IS TAKEN TO 00295000
  305. * THE USER DCB EXIT PROCESSING ROUTINE. ON RETURN 00296000
  306. * EXIT CONDITIONS ARE RESTORED AND THE POSSIBLE 00297000
  307. * EXISTENCE OF FURTHER REQUESTS IS CHECKED. 00298000
  308. * 00299000
  309. * 00300000
  310. * VEROPEN VALIDATE CONTENTS OF RECORD 00301000
  311. * FORMAT DEPENDENT FIELDS 00302000
  312. * 00303000
  313. * VEROPEN CHECKS TO INSURE THAT DCBBLKSI IS NOT MISSING, 00304000
  314. * AND THAT IT IS A CORRECT MULTIPLE OF LRECL. IT ALSO 00305000
  315. * INSURES THAT DCBRECFM, DCBBLKSI AND DCBLRECL AGREE 00306000
  316. * WITH THE RECORD FORMAT AND RECORD LENGTH OF THE 00307000
  317. * CORRESPONDING DISK FILE IF IT EXISTS. IF ANY ERRORS 00308000
  318. * ARE ENCOUNTERED AS A RESULT OF THE ABOVE TESTS, THE 00309000
  319. * DCB IS NOT OPENED AND MESSAGE NO. DMSSOP036E IS 00310000
  320. * TYPED OUT AS LISTED ABOVE IN THE EXIT CONDITIONS. 00311000
  321. * IF DCBLRECL IS NOT FILLED IN, IT IS SET EQUAL TO 00312000
  322. * DCBBLKSI AND THE APPROPRIATE JFCBMASK BIT 00313000
  323. * IS TURNED ON. IF A BPAM WRITE IS SPECIFIED, PDSSAVE 00314000
  324. * IN DMSSVT IS CALLED TO SAVE THE PDS IN CASE OF 00315000
  325. * AN ABEND. IF A MEMBER NAME IS SPECIFIED IN THE 00316000
  326. * CMSCB FCBMEMBR FIELD (FILLED IN BY FILEDEF WITH 00317000
  327. * THE MEMBER OPTION), AN OS FIND MACRO IS ISSUED TO 00318000
  328. * POSITION THE FILE POINTER TO THE CORRECT MEMBER. IF 00319000
  329. * AN ERROR IS ENCOUNTERED ON THE CALL TO PDSSAVE OR 00320000
  330. * FIND MACRO, ERROR MSG DMSSOP036E IS PRINTED AND THE 00321000
  331. * DCB IS NOT OPENED. 00322000
  332. * 00323000
  333. * 00324000
  334. * BUFFPOOL 00325000
  335. * 00326000
  336. * IF THE USER SUPPLIES A BUFFER POOL, CONTROL IS PASSED TO 00327000
  337. * BUCN3. 00328000
  338. * IF USER DOES NOT SUPPLY A BUFFER POOL, PARAMETERS FOR 00329000
  339. * THE GETPOOL MACRO ARE SET UP BY EXAMINING DCBBUFNO 00330000
  340. * AND DCBBUFL AND A GETPOOL MACRO IS ISSUED IF DCBBUFNO IS 00331000
  341. * NOT ZERO. IF BUFNO IS NOT SPECIFIED AND THE ACCESS 00332000
  342. * METHOD IS NOT QSAM OR BDAM, CONTROL IS PASSED TO BUCN4. 00333000
  343. * IF THE ACCESS METHOD IS QSAM OR BDAM AND DCBBUFNO 00334000
  344. * OR DCBBUFL IS NOT FILLED IN, DCBBUFNO IS DEFAULTED TO TWO 00335000
  345. * AND DCBBUFL IS DEFAULTED TO DCBBLKSI. IF 00336000
  346. * DCBBLKSI IS LARGER THAN DCBBUFL, DCBBUFL IS SET EQUAL TO 00337000
  347. * DCBBLKSI. 00338000
  348. * 00339000
  349. * 00340000
  350. * BUCN3 00341000
  351. * 00342000
  352. * AFTER A BUFFER POOL HAS BEEN EITHER VERIFIED OR 00343000
  353. * OBTAINED, DCBRECAD, DCBEOBAD, IOBSTART AND IOBNXTAD 00344000
  354. * ARE INITIALIZED FOR LATER USE BY THE CMS QSAM (DMSSQS) 00345000
  355. * ROUTINE AND OR THE PROBLEM PROGRAMMER. 00346000
  356. * THE ADDRESS OF THE FIRST BUFFER 00347000
  357. * IN THE CHAIN IS STORED IN IOBSTART AND THE ADDRESS OF 00348000
  358. * FIRST BUFFER TO BE USED (SAME ADDRESS) IS STORED IN 00349000
  359. * DCBRECAD. IF THE METHOD IS QSAM AND THE FORMAT IS 00350000
  360. * VARIABLE, THE ADDRESS IS ADJUSTED TO ELIMINATE THE 00351000
  361. * BDW. 00352000
  362. * 00353000
  363. * THE SAME ADDRESS AS FOR IOBSTART IS PLACED IN 00354000
  364. * IOBNXTAD AS INITIAL CONDITION OF NEXT BUFFER AND IN 00355000
  365. * DCBEOBAD AS INITIAL END OF BLOCK CONDITION. 1 IS 00356000
  366. * INSERTED IN THE HIGH ORDER BYTE OF DCBEOBAD AS THE ID 00357000
  367. * OF THE NEXT BUFFER TO BE USED. 00358000
  368. * 00359000
  369. * IF THE ACCESS METHOD IS QSAM PUT-LOCATE MODE AND THERE 00360000
  370. * ARE TWO OR MORE BUFFERS, THE ADDRESS 00361000
  371. * OF THE NEXT BUFFER IS PLACED IN DCBEOBAD AND A TWO IS SET 00362000
  372. * IN IOBSTART AS THE ID OF THE NEXT BUFFER TO BE USED. 00363000
  373. * 00364000
  374. * BUCN4 00365000
  375. * 00366000
  376. * IF THE ACCESS METHOD IS QSAM OR IF DCBNCP IS ONE, CONTROL 00367000
  377. * IS PASSED TO OPENED. OTHERWISE, A NUMBER OF IOB'S EQUAL 00368000
  378. * TO DCBNCP ARE BUILT AND CHAINED TO THE FIRST IOB IN THE 00369000
  379. * CMSCB. 00370000
  380. * 00371000
  381. * 00372000
  382. * OPENED 00373000
  383. * 00374000
  384. * DCBOFLGS IS SET TO INDICATE THAT THE DCB HAS BEEN 00375000
  385. * OPENED SUCCESSFULLY AND RETURN IS TO INTSVC IF THERE 00376000
  386. * ARE NO MORE DCBS TO BE PROCESSED. OTHERWISE, CONTROL GOES 00377000
  387. * BACK TO COMOPEN. 00378000
  388. * 00379000
  389. * OPERATION: CLOSE (SVC 20) AND TCLOSE (SVC 23) 00380000
  390. * 00381000
  391. * INITIALIZATION 00382000
  392. * 00383000
  393. * IOTYPE IS SET TO INDICATE CLOSE OR TCLOSE. 00384000
  394. * 00385000
  395. * 00386000
  396. * VSAM 00387000
  397. * SEE DESCRIPTION UNDER OPEN (ABOVE). 00388000
  398. * 00389000
  399. * 00390000
  400. * COMCLOSE 00391000
  401. * 00392000
  402. * AFTER CHECKING TO MAKE SURE THAT THE PARTICULAR 00393000
  403. * DCB HAS ACTUALLY BEEN OPENED, THE ADDRESS OF THE 00394000
  404. * CMS CONTROL BLOCK IS OBTAINED FROM DCBDEBAD, 00395000
  405. * FCBIOSW IS SET TO INDICATE CLOSING IN PROCESS, AND 00396000
  406. * DCBOFLGS IS SET TO "BUSY". IF TCLOSE IS NOT 00397000
  407. * SPECIFIED AND IF THE KEY TABLE AND OR PDS FIELD OF THE 00398000
  408. * CMSCB IS NON ZERO, CONTROL IS PASSED TO KEYSAVE AND OR 00399000
  409. * PDSSAVE IN DMSSVT, DEPENDING ON WHICH FIELD IS FILLED IN. 00400000
  410. * KEYSAVE AND PDSSAVE FREE ASSOCIATED CORE TABLES AND SAVE 00401000
  411. * THE TABLES AT THE END OF THE DATA FILE. IF THERE ARE 00402000
  412. * ANY ERRORS SAVING THE TABLES, CONTROL IS PASSED TO 00403000
  413. * DMSSCTCE TO PRINT A MESSAGE AND ABEND THE USER. 00404000
  414. * IF THE ACCESS METHOD 00405000
  415. * USED IS QSAM, PUT-LOCATE, THE LAST RECORD MUST BE 00406000
  416. * OUTPUTTED AND CONTROL IS PASSED TO DMSSQS-PUT. IF 00407000
  417. * THE REQUESTED FILE DISPOSITION WAS LEAVE, FCBIOSW 00408000
  418. * IS SET TO INDICATE THIS. THEN THE FCBDEV IS 00409000
  419. * CHECKED FOR DEVICE TYPE CODE AND THE APPROPRIATE 00410000
  420. * ROUTINE IS BRANCHED TO: 00411000
  421. * 00412000
  422. * 00413000
  423. * TAPE 00414000
  424. * 00415000
  425. * IF THE DCBOFLGS WRITE BIT IS ON, A TAPE MARK IS WRITTEN, 00416000
  426. * OTHERWISE NOT. 00417000
  427. * IF THE FILE DISPOSITION WAS LEAVE, THE ROUTINE 00418000
  428. * GOES OFF TO CLOSE2--THE COMMON CLOSE ROUTINE. IF 00419000
  429. * NOT, THE TAPE IS REWOUND BEFORE GOING OFF TO THE 00420000
  430. * COMMON CLOSE ROUTINE. 00421000
  431. * 00422000
  432. * 00423000
  433. * DISK 00424000
  434. * 00425000
  435. * IF THE FCBPROC CLOSE BIT IS ON AND IF AN FCBPROC ROUTINE 00426000
  436. * EXISTS, CONTROL IS PASSED TO THE FCBPROC ROUTINE. IF THE 00427000
  437. * FILE MODE IS NOT 4 OR THE DCBOFLGS WRITE BIT IS NOT ON 00428000
  438. * OR UPDATE MODE IS SPECIFIED OR DSORG IS NOT PS OR THE 00429000
  439. * FILE IS NOT IN THE ACTIVE DISK TABLE, FINIS CLOSES THE 00430000
  440. * FILE AND CONTROL PASSES TO THE COMMON CLOSE ROUTINE. 00431000
  441. * OTHERWISE, THE NO. OF ITEMS IN THE FILE IS SET EQUAL 00432000
  442. * TO THE LAST ITEM WRITTEN, FINIS CLOSES THE FILE AND 00433000
  443. * CONTROL PASSES TO THE COMMON CLOSE ROUTINE. 00434000
  444. * 00435000
  445. * 00436000
  446. * 00437000
  447. * UNIT RECORD 00438000
  448. * 00439000
  449. * A CP CLOSE COMMAND IS ISSUED FOR THE DEVICE--PRINTER, 00440000
  450. * PUNCH OR READER--AND A BRANCH TAKEN TO COMMON CLOSE. 00441000
  451. * 00442000
  452. * 00443000
  453. * CONSOLE 00444000
  454. * 00445000
  455. * GO TO COMMON CLOSE 00446000
  456. * 00447000
  457. * 00448000
  458. * CLOSE2 00449000
  459. * 00450000
  460. * IF IOTYPE IS T, CONTROL IS PASSED TO CLOSED. 00451000
  461. * OTHERWISE, DCBMACR, DCBIFLG, DCBDDNAM, DCBLRECL, 00452000
  462. * DCBRECFM, DCBDSORG, DCBCIND2, DCBKEYLE, DCBDPTCD, 00453000
  463. * DCBIOBA, DCBIOBAD 00454000
  464. * AND DCBLIMCT ARE RESTORED TO THEIR STATUS BEFORE 00455000
  465. * OPEN. IF THE CMSCB FOR THE SPECIFIED DCB WAS 00456000
  466. * ACQUIRED BY OPEN AND IF THERE ARE NO OTHER OPEN 00457000
  467. * DCB'S USING THE CMSCB, THE CMSCB IS CLEARED. NEXT 00458000
  468. * CONTROL IS PASSED TO CLOSED. 00459000
  469. * 00460000
  470. * 00461000
  471. * CLOSED 00462000
  472. * 00463000
  473. * THE DCB LIST POINTER IS RESTORED AND, IF THIS WAS 00464000
  474. * THE LAST DCB, THE ROUTINE RETURNS TO THE USER. IF 00465000
  475. * NOT, THE ROUTINE RETURNS TO COMCLOSE AND PROCEEDS 00466000
  476. * TO CLOSE NEXT DCB. 00467000
  477. * 00468000
  478. *. 00469000
  479. EJECT 00470000
  480. SPACE 00471000
  481. DMSSOP START 0 IN THE BEGINNING ... 00472000
  482. USING DMSSOP,R12 00473000
  483. USING IHADCB,R2 00474000
  484. USING OPSECT,R3 00475000
  485. USING FCBSECT,R5 00476000
  486. USING NUCON,R0 00477000
  487. USING SSAVE,R13 00478000
  488. ENTRY DMSSOP19,DMSSOP22,DMSSOP20,DMSSOP23 00479000
  489. UPDT EQU X'80' UPDATE MODE 00480000
  490. SPAN EQU X'08' SPANNED RECFM 00481000
  491. QSAMDCB EQU X'01' QSAM DCB 00482000
  492. ACBID EQU X'A0' VSAM ACB IDENTIFIER @V305174 00483000
  493. EJECT 00484000
  494. *********************************************************************** 00485000
  495. * * 00486000
  496. * OOOOHHPPEEEEEEEEEEEENNNNN * 00487000
  497. * * 00488000
  498. *********************************************************************** 00489000
  499. SPACE 00490000
  500. * 00491000
  501. * OPEN A DCB - SVC 22. 00492000
  502. * 00493000
  503. DMSSOP22 DS 0H SVC 22 00494000
  504. USING *,R12 00495000
  505. LA R9,C'J' OSIOTYPE = "J" 00496000
  506. LA R11,COMOPEN 00497000
  507. B IOSETUP 00498000
  508. DROP R12 00499000
  509. SPACE 00500000
  510. * 00501000
  511. * OPEN A DCB - SVC 19. 00502000
  512. * 00503000
  513. DMSSOP19 EQU * SVC 19. 00504000
  514. USING *,R12 00505000
  515. LA R9,C'O' OSIOTYPE = "O" 00506000
  516. LA R11,COMOPEN CONTINUE OPEN @VA12049 00507000
  517. B IOSETUP AFTER SETUP @VA12049 00507100
  518. * 00507200
  519. * TEMPARARILY CLOSE A DCB - SVC 23. 00507300
  520. * 00507400
  521. DMSSOP23 DS 0H 00507500
  522. USING *,R12 00507600
  523. LA R9,C'T' OSIOTYPE = "T" 00507700
  524. LA R11,COMCLOSE 00507800
  525. B IOSETUP 00507900
  526. SPACE 3 00508000
  527. * 00508100
  528. * CLOSE A DCB - SVC 20. 00508200
  529. * 00508300
  530. DMSSOP20 DS 0H SVC 20. 00508400
  531. USING *,R12 00508500
  532. LA R9,C'C' OSIOTYPE = "C" 00508600
  533. LA R11,COMCLOSE CONTINUE CLOSE @VA12049 00508700
  534. * @VA12049 00508800
  535. * COMMON ENTRANCE INITIALIZATION ROUTINE @VA12049 00508900
  536. * @VA12049 00509000
  537. IOSETUP DS 0H @VA12049 00509100
  538. L R13,CURRSAVE POINT TO SYSTEM SAVE ARE@VA12049 00509200
  539. BALR R12,0 @VA12049 00509300
  540. USING *,R12 @VA12049 00509400
  541. L R3,AOPSECT V(I/O SECTION) @VA12049 00509500
  542. STC R9,OSIOTYPE SET TYPE INDICATOR @VA12049 00509600
  543. L R12,AIOMAN GET COMMON ADDRESSABILITY @VA12049 00509700
  544. LA R10,4095(R12) SECOND BASE REG SET UP @VA12049 00509800
  545. LA R10,1(R10) AT FIRST BASE REG PLUS 1K @VA12049 00509900
  546. ST R1,EGPR0 SAVE SVC PLIST POINTER @VA12049 00510000
  547. BR R11 RETURN TO CORRECT ROUTINE @VA12049 00510100
  548. AIOMAN DC A(DMSSOP) ADCON TO DMSSOP ENTRY @VA12049 00510200
  549. * @VA12049 00510300
  550. * ALL JOIN HANDS, AND COMMENCE OPENING .... 00511000
  551. * 00512000
  552. SPACE 00513000
  553. COMOPEN EQU * COMMON OPEN ROUTE 00514000
  554. USING DMSSOP,R12,R10 @VA12049 00515000
  555. L R2,0(,R1) GET V(CURRENT DCB) 00516000
  556. CLI 0(R2),ACBID ACB? @V305174 00517000
  557. BNE COMOP2 NO, PROCESS DCB @V305174 00518000
  558. OI TYPFLAG,TPFACB SET FLAG BIT @V305174 00519000
  559. TM 0(R1),EOL END OF LIST? @V305174 00520000
  560. BO RETURN YES @V305174 00521000
  561. LA R1,4(,R1) NO, POINT TO NEXT ADDRESS @V305174 00522000
  562. B COMOPEN AND CONTINUE @V305174 00523000
  563. COMOP2 ST R2,EGPR1 ST: AL1(OPT BYTE), AL3(DCB) @V305174 00524000
  564. ST R1,SAVER1 SAVE REG 1 00525000
  565. DMSFREE DWORDS=12,ERR=NROOM,TYPE=NUCLEUS,TYPCALL=BALR @VA04752 00526000
  566. MVC 0(96,R1),0(R2) @VA02963 00527000
  567. ST R1,DCBSAV SAVE ADDRESS TO FRET @VA02963 00528000
  568. L R1,SAVER1 RESTORE REG 1 @VA02963 00529000
  569. TM DCBOFLGS,GOODOPEN INVALID DUPLICATE OPEN? 00530000
  570. BO NOTOPEN YES, IGNORE THIS OPEN REQUEST V0213 00531000
  571. * IGNORE THE POSSIBLITY OF OPENING A NULL DATA SET 00532000
  572. MVI DCBOFLGS,X'00' SET DCBOFLGS BYTE TO ZERO 00533000
  573. OI DCBOFLGS,OPENBUSY SET BUSY=ON 00534000
  574. MVC SAVER15(8),DCBDDNAM 00535000
  575. LD F6,SAVER15 00536000
  576. MVC DCBIFLGS(1),DCBIFLG 00537000
  577. MVC DCBMACRF(2),DCBMACR 00538000
  578. XC DCBTIOT(2),DCBTIOT SET TIOT DISPLACEMENT AT ZERO 00539000
  579. * DETERMINE ACCESS METHOD DESIRED 00540000
  580. TM DCBDSORG,PS+PO+DA PHYSICAL SEQUENTIAL- PARTIONED 00541000
  581. LA R15,1 00542000
  582. BZ BADDCB NO. ERROR IN FILE ORGANZATION 00543000
  583. NI DCBCIND2,255-UPDT-QSAMDCB RESET INDICATORS 00544000
  584. TM 0(R1),X'0E' SETUP TO CHECK FOR RDBACK V0206 00545000
  585. BNZ CKOPENCD RDBACK NOT SPECIFIED V0206 00546000
  586. TM 0(R1),1 RDBACK SPECIFIED V0206 00547000
  587. BO BADDCB YES, THEN RETURN ERROR CODE V0206 00548000
  588. CKOPENCD TM 0(R1),X'04' SETUP TO CHECK FOR UPDATE V0206 00549000
  589. BNO CKMACRF NO,CONTINUE 00550000
  590. TM 0(R1),X'03' ARE ANY OTHER SWITCHES ON 00551000
  591. BNZ CKMACRF YES, CONTINUE 00552000
  592. OI DCBCIND2,UPDT SET UPDATE INDICATORS 00553000
  593. CKMACRF EQU * @VA08866 00554100
  594. TM DCBMACRF,DCBMRECP EXCP DCB @VA08866 00554200
  595. BO OP1 YES @VA08866 00554300
  596. TM DCBMACRF,QS IS THIS QSAM ? @VA08866 00554400
  597. BO QSAM YES, GO TO QSAM SETUP 00555000
  598. TM DCBMACRF+1,QS IS THIS QSAM? 00556000
  599. BO QSAM YES, GO TO QSAM SETUP 00557000
  600. BSAM EQU * BSAM: BASIC SEQUENTIAL ACCESS METHOD 00558000
  601. TM 0(R1),X'07' OUTPUT OR OUTIN SPECIFIED P3056 00559000
  602. BNO FILLDCB NO, FILL IN DCB P3056 00560000
  603. OI DCBOFLGS,PREVIOUS SET WRITE FLAG P3056 00561000
  604. FILLDCB EQU * FILL DCB I/O ADDRESSES P3056 00562000
  605. MVC DCBREAD+1(3),VBSAM 00563000
  606. MVC DCBCHECK+1(3),VCHECK 00564000
  607. OP2 MVC DCBNOTE+1(3),VNTPT 00565000
  608. B OP1 GET FCB 00566000
  609. QSAM EQU * QSAM: QUEUED SEQUENTIAL ACCESS METH 00567000
  610. OI DCBCIND2,QSAMDCB INDICATE THIS IS QSAM 00568000
  611. MVC DCBGET+1(3),VGET SETUP FOR GET 00569000
  612. TM 0(R1),X'0F' OPENNING FOR OUTPUT? 00570000
  613. BO QSAMPUT YES. 00571000
  614. TM 0(R1),X'04' OPENNING FOR UPDATE 00572000
  615. BNO OP1 NO, MUST BE GET 00573000
  616. MVC DCBPUT+1(3),VUPDATE QSAM UPDATE ENTRY (GL PL) 00574000
  617. B OP1 GO GET FCB 00575000
  618. QSAMPUT EQU * INDICATE QSAM-PUT. 00576000
  619. MVC DCBPUT+1(3),VPUT 00577000
  620. EJECT 00578000
  621. * SCAN FCBTABLE FOR CORRESPONDING FCB-DCB ENTRY 00579000
  622. SPACE 1 00580000
  623. OP1 DS 0H @VA02242 00581000
  624. LA R5,FCBFIRST ADDR OF FCB ANCHOR @VA02242 00582000
  625. OP1A DS 0H @VA02242 00583000
  626. ICM R5,B'0111',1(R5) ADDR OF NEXT FCB @VA02242 00584000
  627. BZ NOFCB BIF NONE LEFT @VA02242 00585000
  628. CD F6,FCBDD IS THIS DCB/FCM MATCH? @VA02242 00586000
  629. BNE OP1A BIF IF NOT @VA02242 00587000
  630. TM FCBINIT,FCBCATML IS CONCAT SPECIFIED? @VA02242 00588000
  631. BNO CKJFCB NO, CONTINUE OPEN @VA02242 00589000
  632. SPACE 1 00590000
  633. L R1,SAVER1 ADDR OF CURR DCB ADDR @VA02242 00591000
  634. LA R11,MACLIBL-8 GET ADDR MAC NAME LIST-8 @VM03203 00592000
  635. LA R4,MACDIRC-4 GET ADDR MAC FCB LIST-4 @VM03203 00593000
  636. TM FCBINIT,FCBDOSL CONCAT DOSLIB FCB ? @VM03203 00594000
  637. BNO OP1B NO, ASSUME MACLIB @VM03203 00595000
  638. LA R11,DOSLIBL-8 GET ADDR DOS NAME LIST-8 @VM03203 00596000
  639. LA R4,DOSDIRC-4 GET ADDR DOS FCB LIST-4 @VM03203 00597000
  640. OP1B CLI 8(R11),FF ANY LIBRARIES GLOBAL'D ? @VM03203 00598000
  641. BE NOTOPEN BRANCH DONT OPEN DCB @VA02242 00599000
  642. LNR R8,R5 ADDR OF LAST RESORT @VA02242 00600000
  643. XC 4(32,R4),4(R4) CLEAR FST POINTERS (IF ANY) @V305001 00601000
  644. SPACE 1 00602000
  645. CHKFCB DS 0H @VA02242 00603000
  646. CD F6,FCBDD DCB*FCB MATCH? @VA02242 00604000
  647. BNE NXTFCB BIF IF NOT @VA02242 00605000
  648. TM FCBINIT,FCBCATML IS CONCAT SPECIFIED? @VA02242 00606000
  649. BNO NXTFCB BIF NOT @VA02242 00607000
  650. CLC FCBDSNAM(8),0(R11) DOES FN EQ MAC NAME ENTRY? @VA02242 00608000
  651. BNE NXTFCB BRANCH IF NOT @VA02242 00609000
  652. TM FCBINIT,FCBDOSL IS IT CONCAT DOSLIB FCB ? @VM03203 00610000
  653. BO CHKDOSL YES, BRANCH... @VM03203 00611000
  654. CLC FCBDSTYP(8),=CL8'MACLIB' IS FT MACLIB? @VA02242 00612000
  655. BNE NXTFCB BRANCH IF NOT @VA02242 00613000
  656. B SETMODE BRANCH AROUND DOSLIB CODE.. @VM03203 00614000
  657. CHKDOSL CLC FCBDSTYP(8),=CL8'DOSLIB' IS FT DOSLIB ? @VM03203 00615000
  658. BNE NXTFCB BRANCH IF NOT @VM03203 00616000
  659. SPACE 1 00617000
  660. SETMODE MVI FCBDSMD,ASTERISK FORCE MODE TO '*' @V305066 00618000
  661. MVI FCBDSMD+1,C' ' FORCE MODE NUM TO ' ' @VA02242 00619000
  662. NI FCBINIT,255-FCBOS TURN OFF FCB OS SWITCH @VA02242 00620000
  663. SR R15,R15 CLEAN A REG @VA02242 00621000
  664. ST R15,FCBOSFST CLEAR OS FST POINTER @VA02242 00622000
  665. ST R15,FCBPDS CLEAR DIR POINTER @VA02242 00623000
  666. LA R1,FCBOP GET ADDR OF STATE PLIST @VA02242 00624000
  667. L R15,ASTATE GET ADDR OF STATE @VA02242 00625000
  668. BALR R14,R15 DO STATE @VA02242 00626000
  669. L R15,FCBOSFST LOAD OS FST POINTER @VA02242 00627000
  670. LTR R15,R15 IS THIS AN OS FCB? @VA02242 00628000
  671. BZ CHKSAVRG BIUF IF NOT @VA02242 00629000
  672. OI FCBINIT,FCBOS INDICATE OS FCB @VA02242 00630000
  673. ST R15,0(,R4) SAVE OS FST ADDRESS @VA02242 00631000
  674. MVI 0(R4),X'80' INDICATE OS MAC FCB @VA02242 00632000
  675. SPACE 1 00633000
  676. CHKSAVRG DS 0H @VA02242 00634000
  677. LTR R8,R8 IS THIS FIRST? @VA02242 00635000
  678. * MAC NAME/FCB MATCH? 00636000
  679. BH NXTFCB BIF IF NOT @VA02242 00637000
  680. LR R8,R5 SAVE ADDR OF THIS FCB @VA02242 00638000
  681. SPACE 1 00639000
  682. NXTFCB DS 0H @VA02242 00640000
  683. ICM R5,B'0111',1(R5) ADDR OF NEXT FCB @VA02242 00641000
  684. BNZ CHKFCB BIF SOME MORE LEFT @VA02242 00642000
  685. SPACE 1 00643000
  686. L R5,FCBFIRST ADDR OF FIRST FCB IN LIST @VA02242 00644000
  687. LA R4,4(,R4) ADDR OF NEXT MAC DIR ENTRY @VA02242 00645000
  688. LA R11,8(,R11) ADDR NEXT MAC NAME ENTRY @VA02242 00646000
  689. CLI 0(R11),X'FF' IS END OF MAC NAMES @VA02242 00647000
  690. BNE CHKFCB BIF NOT RESCAN FCB CHAIN @VA02242 00648000
  691. LPR R5,R8 ADDR OF MASTER FCB @VA02242 00649000
  692. B CKJFCB CONTINUE WITH OPEN @VA02242 00650000
  693. EJECT 00651000
  694. NOFCB DS 0H @VA02242 00652000
  695. MVC CMSOP(8),FILEDEF PREP FOR FILEDEF COMMAND @VA02242 00653000
  696. STD F6,FILENAME FILL IN DDNAME 00654000
  697. MVC FILETYPE(8),=CL8'DISK' FILL IN DEV TYPE AND MODE 00655000
  698. STD F6,FILEBYTE FILE IN FILE TYPE 00656000
  699. MVC FILEMODE(8),CMSNAME FILL IN DEFAULT NAME OF FILE 00657000
  700. LM R6,R7,SAVER1 SAVE THIS DOUBLE WORD 00658000
  701. MVC FILEREAD(24),NOCHNG FILL IN NOCHNG OPTION 00659000
  702. LA R1,PLIST GET ADDR OF PLIST 00660000
  703. SVC X'CA' ISSUE FILEDEF SVC 00661000
  704. DC AL4(*+4) 00662000
  705. STM R6,R7,SAVER1 RESTORE DOUBLE WORD 00663000
  706. LTR R15,R15 WAS FILEDEF SUCCESSFUL? 00664000
  707. LA R15,2 SET ERROR CODE 00665000
  708. BNZ BADDCB NO, THEN DO NOT OPEN DCB 00666000
  709. LPR R5,R0 SET UP CORRECT ADDR 00667000
  710. XI FCBSECT,X'08' INDICATE OPEN FCB 00668000
  711. CKJFCB EQU * 00669000
  712. NI FCBINIT,255-FCBOS TURN OFF FCB OS SWITCH @V201122 00670000
  713. LA R5,0(R5) CLEAR HIGH ORDER BYTE 00672000
  714. TM DCBMACRF,DCBMRECP EXCP DCB @VA08866 00672100
  715. BO TSECT YES @VA08866 00672200
  716. IC R15,FCBDCBCT GET NO. DCB'S USING THIS FCB 00673000
  717. LA R15,1(R15) UP THIS NO. BY ONE 00674000
  718. STC R15,FCBDCBCT SAVE NEW DCB COUNT 00675000
  719. * USE FCB ENTRIES TO FILL UNSPECIFIED DCB PARAMETERS 00676000
  720. TM FCBDEV,X'0C' IS THE DEVICE A CONSOLE? 00677000
  721. BNO TBLKSIZ NO, CONTINUE 00678000
  722. MVI DCBBUFNO,X'01' YES, SET UP SINGLE BUFFERING 00679000
  723. TBLKSIZ SR R11,R11 ZERO REG 11 00680000
  724. CH R11,DCBBLKSI IS BLKSI ZERO V0307 00681000
  725. BL TDSORG YES, CONTINUE 00682000
  726. CH R11,FCBBLKSZ IS BLKSI ZERO 00683000
  727. BE TDSORG YES, CONTINUE 00684000
  728. OI JFCBMASK+2,X'10' SET JFCBMASK 00685000
  729. MVC DCBBLKSI(2),FCBBLKSZ USE FCB ENTRY 00686000
  730. TDSORG CH R11,DCBDSORG WAS DSORG SPECIFIED 00687000
  731. BNZ TLRECL YES. 00688000
  732. CH R11,JFCDSORG IS DSORG ZERO 00689000
  733. BE TLRECL YES, CONTINUE 00690000
  734. MVC DCBDSORG(2),JFCDSORG USE USER SPECIFICATION 00691000
  735. OI JFCBMASK+3,X'01' 00692000
  736. TLRECL TM DCBDSORG,DA ACCESS METHOD= BDAM V0277 00693000
  737. BNO NOTBDAM NO, THEN CONTINUE @VA04226 00694000
  738. MVC DCBREL+1(2),FCBXTENT STORE NUM RECORDS IN DCB @VA04226 00695000
  739. * FIELD 00696000
  740. B TRECFM AND CONTINUE @VA04226 00697000
  741. NOTBDAM SR R4,R4 CLEAR REG 4 @VA04226 00698000
  742. IC R4,FCBDEV GET DEVICE CODE V0277 00699000
  743. SRL R4,2 GET DISPLACEMENT OF OS CODE V0277 00700000
  744. IC R4,DEVTYP(R4) GET OS DEVICE CODE V0277 00701000
  745. STC R4,DCBDEVT SET OS DCB DEVICE CODE V0277 00702000
  746. CLI FCBDEV,FCBDSK DASD DEVICE @VA06212 00703000
  747. BNE NOTDASD NO- BYPASS @VA06212 00704000
  748. SLR R4,R4 CLEAR R4 @VA06212 00705000
  749. ST R4,DCBDVTBL CLEAR @VA06212 00706000
  750. MVI DCBFDAD,X'00' INDICATE NO POINT V0277 00707000
  751. NOTDASD EQU * @VA06212 00708000
  752. CH R11,DCBLRECL IS LRECL ZERO V0307 00709000
  753. BL TRECFM YES, CHECK FOR RECFM V0277 00710000
  754. CH R11,FCBLRECL IS LRECL ZERO 00711000
  755. BE TRECFM YES, CONTINUE 00712000
  756. MVC DCBLRECL(2),FCBLRECL USE FCB ENTRY 00713000
  757. OI JFCBMASK+3,X'02' 00714000
  758. TRECFM TM DCBRECFM,X'FE' WAS RECFM SPECIFIED? @VA10680 00715000
  759. BNZ TKEYLE 00716000
  760. CLI FCBRECFM,X'00' IS RECFM ZERO 00717000
  761. BE TKEYLE YES, CONTINUE 00718000
  762. OI JFCBMASK+2,X'04' 00719000
  763. OC DCBRECFM(1),FCBRECFM USE FCB ENTRY @VA10680 00720000
  764. TKEYLE CLI DCBKEYLE,X'00' WAS KEYLE SPECIFIED 00721000
  765. BNE TOPTCD YES, CONTINUE 00722000
  766. CLI JFCKEYLE,X'00' IS KEYLE ZERO 00723000
  767. BE TOPTCD YES, CONTINUE 00724000
  768. MVC DCBDVTBL+4(1),JFCKEYLE NO, GET IT FROM JFCB 00725000
  769. OI JFCBMASK+3,X'20' SET JFCB MASK 00726000
  770. TOPTCD CLI DCBOPTCD,X'00' IS OPTCD SPECIFIED 00727000
  771. BNE TSECT YES, CONTINUE 00728000
  772. CLI JFCOPTCD,X'00' IS OPTCD ZERO 00729000
  773. BE TSECT YES, CONTINUE 00730000
  774. MVC DCBOPTCD(1),JFCOPTCD NO, GET IT FROM JFCB 00731000
  775. OI JFCBMASK+2,X'80' SET JFCB MASK 00732000
  776. TSECT EQU * SET PARAMETERS FOR CONTROL BLOCK SECT 00733000
  777. LA R4,IHADEB GET V(DEB) 00734000
  778. LA R7,IOBNXTAD GET IOB ADDR 00735000
  779. TM FCBDEV,X'E3' VERIFY VALID DEV CODE & MODULO 4 00736000
  780. BZ OP3 OK. 00737000
  781. MVI FCBDEV,FCBDSK DEFAULT TO DISK DATA SET 00738000
  782. OP3 NI FCBIOSW,FCBPROCO+FCBPROCC+FCBCASE CLEAR SWITCHES 00739000
  783. MVI IOBIOFLG,0 CLEAR I/O FLAGS V0307 00740000
  784. ST R4,DCBDEBAD 00741000
  785. ST R7,DCBIOBAD SAVE V(IOB) FOR CHAINED SCHEDULING 00742000
  786. TM DCBMACRF,DCBMRECP EXCP DCB @VA08866 00742100
  787. BO OPENED YES @VA08866 00742200
  788. ST R7,DCBIOBA STORE ADDR OF IOB IN DCB 00743000
  789. LA R7,(IOBEND-IOBIOFLG)/8 GET L'IOB IN DOUBLE WORDS 00744000
  790. STC R7,DCBIOBL 00745000
  791. ST R2,IOBDCBPT SET DCB POINTER INTO IOB AND DEB 00746000
  792. ST R2,DEBDCBAD 00747000
  793. MVI DEBDEBID,X'0F' SIGNAL: THIS HERE BLOCK IS A DEB 00748000
  794. MVC DEBOPATB(1),EGPR1 SAVE OPEN OPTION BYTE 00749000
  795. * VERIFY: OPEN FOR OUTPUT AT THE BEGIN OF A DATA SET 00750000
  796. XC FCBOP(8),FCBOP CLEAR FCBOP 00751000
  797. XC FCBITEM(18),FCBITEM CLEAR PART OF PLIST 00752000
  798. MVI FCBITEM+1,X'01' POINT TO ITEM ONE 00753000
  799. CKDEV XC FCBKEYS(8),FCBKEYS CLEAR TABLE ADDRESSES 00754000
  800. CLI FCBDEV,FCBDUM IS DEV DUMMY? @VA04566 00755000
  801. BE GETREG1 CHECK FOR EXIT LIST,DON'T STATE @VA04566 00756000
  802. CLI FCBDEV,FCBDSK IS DEVICE DISK 00757000
  803. BE DOSTATE YES, SEE IF FILE EXISTS 00758000
  804. XC FCBDSTYP(4),FCBDSTYP CLEAR PRINT BUFFER ADDR 00759000
  805. B GETREG1 CHECK FOR EXIT LIST 00760000
  806. DOSTATE LA R1,FCBOP GET ADDR OF STATE PLIST 00761000
  807. L R15,ASTATE BY CALLING STATE 00762000
  808. BALR R14,R15 00763000
  809. L R14,FCBOSFST GET OS FST ADDRESS @V201122 00764000
  810. LTR R14,R14 IS IT ZERO @V201122 00765000
  811. BNZ OSCHKS NO, THEN MUST BE OS FCB @V201122 00766000
  812. CH R15,OSRDERR ERROR ACCESSING OS DISK? @V201122 00767000
  813. BNL OSCHKS YES, THEN DON'T OPEN @V201122 00768000
  814. LTR R15,R15 WAS FILE FOUND @V201122 00769000
  815. BNZ CHKASTRK VALIDATE FILEMODE @VA07040 00770500
  816. L R8,SAVER1 GET PARAMETER LIST POINTER @VA07040 00771000
  817. L R14,FCBBUFF GET FST ADDRESS @VA07040 00771500
  818. TM BINZERO(R8),OPNWRITE WRITE OPERATION MANDATED? @VA07040 00772000
  819. BZ MUSBIN NO, CHECK FORMAT @VA07040 00772500
  820. USING FSTD,R14 FST ADDRESSABILITY 00772800
  821. TM FCBINIT,FCBDOSL+FCBCATML CONCATENATED LIBS ?? @VA13863 00772860
  822. BNZ YESLIB YES DON'T MESS WITH FILE MODE @VA13863 00772920
  823. MVC FCBDSMD(2),FSTFMODE WE FOUND IT SO SAVE IT @VA13863 00772980
  824. YESLIB EQU * @VA13863 00773040
  825. TM FSTFLAGS,FSTXWDSK AN EXTENSION OF R/W DISK @VA14488 00773100
  826. BO UPDATE YES, CHECK FOR UPDATE @VA12049 00773500
  827. TM FSTFLAGS,FSTRWDSK A R/W DISK? @VA07824 00774000
  828. BO MUSBIN YES, CHECK FORMAT @VA07040 00774500
  829. EXTDISK EQU * @VA07040 00775000
  830. TM BINZERO(R8),OPNOUT OUTPUT OR OUTIN? @VA07040 00775500
  831. BO CHKASTRK YES, CHECK FILEMODE @VA07040 00776000
  832. TM FSTFLAGS,FSTXRDSK AN EXTENSION ? @VA07824 00777000
  833. BNO GETREG1 NO - CONTINUE @VA07824 00777500
  834. L R15,AFVS FVS ADDRESS @VA07824 00778000
  835. L R15,STATER0-FVSECT(R15) POINT TO ACTUAL ADT @VA07824 00778500
  836. MVC FCBDSMD(1),ADTM-ADTSECT(R15) FILE'S ACTUAL MODE @VA07824 00779000
  837. B GETREG1 CONTINUE @VA07824 00779500
  838. DROP R14 DROP FST ADDRESSABILITY @VA07824 00780000
  839. MUSBIN TM DCBDSORG,PO BPAM DATA SET? @VA05159 00782000
  840. BO CKFORM YES, GO CHECK FORM 00783000
  841. TM JFCBIND2,X'80' IS MOD OPTION ON 00784000
  842. BO SETPTR YES, SET PTR 00785000
  843. TM 0(R8),X'07' IS FILE OPEN FOR OUT/IN? 00786000
  844. BNO CKFORM NO, GO CHECK FORMAT 00787000
  845. CKORG TM DCBDSORG,DA IS DIRECT ACCESS OPTION ON? 00788000
  846. BO CKFORM YES, GO CHECK FORM 00789000
  847. CLI FCBMEMBR,0 MEMBER NAME? @VA07442 00789300
  848. BNE GETREG1 YES, DO NOT ERASE FILE-- @VA07442 00789600
  849. L R15,AERASE GET ADDR OF ERASE RTN 00790000
  850. BALR R14,R15 ERASE FILE 00791000
  851. B GETREG1 GO TO EXITLIST @VA04335 00792000
  852. SETPTR L R1,SAVER1 GET PLIST @VA04335 00793000
  853. TM 0(R1),X'07' OUTPUT OR IN/OUT ? @VA04759 00794000
  854. BNO CKFORM NO, THEN DO NOT SET ITEM NUMBER @VA04335 00795000
  855. LH R15,26(R14) GET NO. ITEMS IN FILE @VA04335 00796000
  856. N R15,HALFWORD ALLIGN ITEM NO. V0206 00797000
  857. LA R15,1(R15) POINT TO NEXT ITEM V0206 00798000
  858. STH R15,FCBITEM SET ITEM NO. FOR EOF V0206 00799000
  859. CKFORM MVC FCBOP+2(6),30(R14) GET FORM AND LENGTH 00800000
  860. CLI FCBDSMD,C'*' IF MODE IS *, NO MODE NUMBER. @VA00893 00801000
  861. BE CKFSTM MODE IS * @VA09484 00802000
  862. MVC FCBDSMD+1(1),25(R14) MODE NO.= EXISTING MODE NO. P3056 00803000
  863. B GETREG1 RESTORE REG 1 AND GO @VA02169 00804000
  864. CKFSTM EQU * CHECK MODE IN FST @VA09484 00804100
  865. NI JFCBIND2,255-M4FLAG RESET MODE 4 FLAG FIRST @VA09484 00804200
  866. CLI 25(14),C'4' MODE IN FST = 4? @VA09484 00804300
  867. BNE GETREG1 NO, CONTINUE @VA09484 00804400
  868. OI JFCBIND2,M4FLAG YES,SET M4FLAG IN FCB @VA09484 00804500
  869. B GETREG1 GO TO EXITLIST @VA09484 00804600
  870. CHKASTRK CLI FCBDSMD,C'*' DON'T WANT * FOR UNDEFINED @VA02169 00805000
  871. BNE GETREG1 FILES @VA02169 00806000
  872. TM FCBINIT,FCBCATML UNLESS THIS DESCRIBES THE @VA02169 00807000
  873. BO GETREG1 CONCATENATED MACRO LIBES @VA02169 00808000
  874. MVC FCBDSMD(2),CA1 SET IT FOR AN A1 FILE @VA02169 00809000
  875. GETREG1 L R1,SAVER1 RESTORE REG 1 00810000
  876. B EXITLIST 00811000
  877. USING OSFST,R14 @V201122 00812000
  878. OSCHKS LTR R15,R15 ANY ERRORS FROM STATE @V201122 00813000
  879. LA R15,80 SET OPEN ERROR 80 @V201122 00814000
  880. BNZ BADDCB YES, DON'T OPEN DCB @V201122 00815000
  881. OI FCBINIT,FCBOS INDICATE FCB FOR OS DISK @V201122 00816000
  882. XC OSFSTCHR(5),OSFSTCHR CLEAR DISK ADDRESS POINTER @V201122 00817000
  883. LA R15,9 SET ERROR CODE 9 @V201122 00818000
  884. L R1,SAVER1 GET ADDRESS OF OPTION BITS @V201122 00819000
  885. TM 0(R1),X'0C' ANY OUTPUT SPECIFIED @V201122 00820000
  886. BNZ BADDCB YES, DON'T OPEN DCB @V201122 00821000
  887. TM DCBDSORG,DA BDAM SPECIFIED @V201122 00822000
  888. BNZ BADDCB YES, THEN DON'T OPEN DCB @V201122 00823000
  889. CLI DCBKEYLE,0 KEYLE= 0 @V201122 00824000
  890. BNE BADDCB NO, THEN INDICATE ERROR @V201122 00825000
  891. TM FCBINIT,FCBCATML CONCATIONATION SPECIFIED @V201122 00826000
  892. BO CKDSNRFM YES, DON'T FORCE FILE MODE @V201122 00827000
  893. MVI FCBDSMD+1,C'4' SET MODE NO. TO 4 @V201122 00828000
  894. CKDSNRFM TM DCBRECFM,UND RECFM SPECIFIED @V201122 00829000
  895. BNZ CKDSNLRL YES, CONTINUE @V201122 00830000
  896. MVC DCBRECFM(1),OSFSTRFM SET RECFM FROM DSCB @V201122 00831000
  897. OI JFCBMASK+2,X'04' INDICATE RECFM CHANGE @V201122 00832000
  898. CKDSNLRL SR R8,R8 CLEAR REG 8 FOR COMPARES @V201122 00833000
  899. CH R8,DCBLRECL DCBLRECL SPECIFIED @V201122 00834000
  900. BNZ CKDSNBLK NO, CHECK FOR BLKSI @V201122 00835000
  901. MVC DCBLRECL(2),OSFSTLRL+2 SET LRECL FROM DSCB @V201122 00836000
  902. OI JFCBMASK+3,X'02' INDICATE CHANGE @V201122 00837000
  903. CKDSNBLK CH R8,DCBBLKSI IS BLKSIXE SPECIFIED @V201122 00838000
  904. BNZ EXITLIST YES, CONTINUE @V201122 00839000
  905. MVC DCBBLKSI(2),OSFSTBLK SET BLKSI FROM DSCB @V201122 00840000
  906. OI JFCBMASK+2,X'10' INDICATE CHANGE @V201122 00841000
  907. B EXITLIST CHECK FOR EXIT ROUTINE @V201122 00842000
  908. DROP R14 @V201122 00843000
  909. UPDATE EQU * CHECK FOR UPDATE @VA12049 00843070
  910. USING FSTD,R14 FST ADDRESSABILITY @VA12049 00843140
  911. TM JFCBIND2,X'80' DISP=MOD ? @VA12049 00843210
  912. BO UPDTERR YES , UPDATE ERROR @VA12049 00843280
  913. TM DCBDSORG,PO PARTITIONED DATASET ? @VA12049 00843350
  914. BO UPDTERR YES, UPDATE ERROR @VA12049 00843420
  915. TM BINZERO(R8),OPNOUT OUTPUT OR OUTIN ? @VA12049 00843490
  916. BO CHKASTRK YES, NO ERROR @VA12049 00843560
  917. DROP R14 DROP FST ADDRESSABILITY @VA12049 00843630
  918. UPDTERR EQU * UPDATE ERROR @VA12049 00843700
  919. LA R15,11 OPEN ERROR CODE 11 @VA12049 00843770
  920. B BADDCB OPEN FAILS @VA12049 00843840
  921. EJECT 00844000
  922. * VERIFY LEGITAMATE RECFM-DEPENDENT QUANTITIRS 00845000
  923. VEROPEN EQU * PLAY BALL... 00846000
  924. TM DCBRECFM,UND IS DCBRECFM SPECIFIED? 00847000
  925. BNZ SETFORM YES, CONTINUE 00848000
  926. MVI DCBRECFM,UND NO, DEFAULT TO UNDEFINED 00849000
  927. OI JFCBMASK+2,X'04' SET JFCBMASK BIT 00850000
  928. CLI FCBOP+2,0 DOES FILE EXISTS P3056 00851000
  929. BE SETFORM NO, SET TO UND FORMAT P3056 00852000
  930. MVI DCBRECFM,VAR SET FORMAT TO VAR P3056 00853000
  931. CLI FCBOP+2,C'F' IS FILE MODE FIXED P3056 00854000
  932. BNE SETFORM NO, THEN USE VAR FORMAT P3056 00855000
  933. MVI DCBRECFM,FXD SET MODE TO FIXED P3056 00856000
  934. SETFORM MVI FCBFORM,C'F' SET FIXED FORM 00857000
  935. TM DCBRECFM,VAR IS RECFM VARIABLE 00858000
  936. BNO CKFST NO, GO CHECK FST 00859000
  937. MVI FCBFORM,C'V' SET VARIABLE FORM 00860000
  938. CKFST CLI FCBOP+2,X'00' DOES FILE EXIST 00861000
  939. BE CKDSORG NO, CONTINUE 00862000
  940. TM DCBDSORG,PO DSORG=PO? @V201122 00863000
  941. BNO CKRECFM NO, DON'T CHECK BLKSIZE @V201122 00864000
  942. TM DCBMACRF+1,X'20' WRITE SPECIFIED @V201122 00865000
  943. BNO CKRECFM NO, CONTINUE @V201122 00866000
  944. MVC DCBBLKSI(2),FCBOP+6 BLKSI MUST = FILE BLKSI @V201122 00867000
  945. CKRECFM EQU * @V201122 00868000
  946. CLC FCBFORM(1),FCBOP+2 DO RECFM'S MATCH 00869000
  947. BE CKDSORG YES, CONTINUE 00870000
  948. TM DCBRECFM,UND IS RECFM UNDEFINED 00871000
  949. LA R15,3 SET ERROR CODE 00872000
  950. BNO BADDCB NO, THEN SIGNAL ERROR 00873000
  951. MVC FCBFORM(1),FCBOP+2 SET FORMS EQUAL 00874000
  952. CKDSORG EQU * 00875000
  953. TM DCBDSORG,DA IS DA OPTION SPECIFIED 00876000
  954. BNO CKLNGTHS NO, CONTINUE V0277 00877000
  955. MVC FCBOP(3),DCBLRECL-1 SAVE LIMCT 00878000
  956. XC DCBLRECL(2),DCBLRECL CLEAR DCBLRECL 00879000
  957. CLC FCBOP(3),ZERO IS LIMCT OPTION SPECIFIED 00880000
  958. BNE CKLNGTHS NO, CONTINUE V0277 00881000
  959. CLC JFCLIMCT(3),ZERO IS LIMCT ZERO 00882000
  960. BE CKLNGTHS YES, CONTINUE V0277 00883000
  961. MVC FCBOP(3),JFCLIMCT GET IT FROM JFCB 00884000
  962. OI JFCBMASK+2,X'40' SET JFCB MASK 00885000
  963. CKLNGTHS EQU * 00886000
  964. MVC FCBCOUT(2),HALF1+2 SET BLOCKING TO ONE V0307 00887000
  965. LH R9,DCBBLKSI GET BLKSIZE 00888000
  966. HALF4 LA R15,4 SET ERROR CODE 00889000
  967. LH R11,MAXOS GET MAXIMUM OS BLOCKSIZE @VA04751 00890000
  968. CH R11,DCBBLKSI IS BLOCKSIZE TOO LARGE? @VA04751 00891000
  969. BL BADDCB BRANCH IF SO @VA04751 00892000
  970. TM DCBRECFM,FXD IS RECFORM VARIABLE? @VA04751 00893000
  971. BO NOTVAR BRANCH IF NOT @VA04751 00894000
  972. SR R11,R15 MAXIMUM LRECL 4 BYTES LESS @VA04751 00895000
  973. NOTVAR EQU * @VA04751 00896000
  974. CH R11,DCBLRECL IS LRECL TOO LARGE? @VA04751 00897000
  975. BL BADDCB BRANCH IF SO @VA04751 00898000
  976. SR R11,R11 SET REGISTER 11 TO ZERO @VA04751 00899000
  977. CR R11,R9 IS BLKSIZE SPECIFIED 00900000
  978. BL CKFXD YES, GO CHECK RECFM P3056 00901000
  979. LH R9,DCBLRECL GET LRECL P3056 00902000
  980. CR R11,R9 IS LRECL SPECIFIED P3056 00903000
  981. BL SETCLR YES, USE LRECL FOR BLKSI P3056 00904000
  982. LH R9,FCBOP+6 GET BLKSI OF FILE P3056 00905000
  983. CR R11,R9 DOES FILE EXISTS P3056 00906000
  984. BNL BADDCB NO, GO TYPE ERR MSG. P3056 00907000
  985. TM DCBRECFM,VAR RECFM VARIABLE ? @VA05077 00908000
  986. BNO SETCLR NO, BRANCH @VA05077 00909000
  987. CLI FCBDSMD,C'*' MODE SPECIFIED AS '*' ? @VA05077 00910000
  988. BNE CKMD4 NO, CHECK FOR MODE OF '4' @VA05077 00911000
  989. L R15,FCBBUFF GET FST @VA05077 00912000
  990. CLI 25(R15),C'4' IS MODE '4' ? @VA05077 00913000
  991. BNE UPDR9 NO, INCREMENT FILE BLKSIZE @VA05077 00914000
  992. B SETCLR YES, SKIP INCREMENT @VA05077 00915000
  993. CKMD4 CLI FCBDSMD+1,C'4' FCB MODE '4' ? @VA05077 00916000
  994. BE SETCLR YES, SKIP INCREMENT @VA05077 00917000
  995. UPDR9 LA R9,4(R9) V FILES MODE NE 4 BLOCK NOT SPECIFIED @VA05077 00918000
  996. * DEFAULT TO FILE BLKSIZE + 8 (RDW AND BDW) 4 HERE AND 4 LATER @VA05077 00919000
  997. SETCLR OI JFCBMASK+2,X'10' CLEAR BLKSI AT CLOSE P3056 00920000
  998. TM DCBRECFM,FXD IS RECFM FXD OR UND P3056 00921000
  999. BO SETBLKSI YES, LRECL= BLKSI P3056 00922000
  1000. LA R9,4(R9) NO,BLKSIZE = LRECL + 4 @VA02732 00923000
  1001. SETBLKSI STH R9,DCBBLKSI SET BLKSI P3056 00924000
  1002. CKFXD TM DCBRECFM,FXD IS FORMAT VAR P3056 00925000
  1003. BO CKLRECL NO, GO CHECK LRECL 00926000
  1004. SH R9,HALF4+2 SUBTRACT BDW WORD 00927000
  1005. CKLRECL CH R11,DCBLRECL IS LRECL SPECIFIED 00928000
  1006. BL GETLRECL YES, GO GET LRECL 00929000
  1007. STH R9,DCBLRECL NO, LRECL = BLKSI OR BLKSI- 4 00930000
  1008. OI JFCBMASK+3,X'02' SET JFCBMASK BIT 00931000
  1009. GETLRECL LH R11,DCBLRECL GET LRECL 00932000
  1010. TM DCBRECFM,UND IS RECFM UNDEFINED 00933000
  1011. BO SETSIZE YES, THEN BYPASS LRECL CHECKS 00934000
  1012. TM DCBRECFM,VAR+SPAN IS VARIABLE SPANNED SPECIFIED 00935000
  1013. BNO CKBLKING NO, GO CHECK BLOCKING 00936000
  1014. LA R15,7 SET ERROR CODE 00937000
  1015. TM DCBDSORG,PS IS DSORG PS 00940000
  1016. BNO BADDCB NO, THEN BAD DCB 00941000
  1017. TM DCBCIND2,QSAMDCB IS QSAM SPECIFIED 00942000
  1018. BNO CKFILMOD NO, CHECK FILEMODE @VA10560 00943200
  1019. CLI DCBMACRF,X'48' GET/LOCATE VBS? @VA10560 00943400
  1020. BNE BADDCB NO, MACRF NOT SUPPORTED @VA10560 00943600
  1021. CKFILMOD EQU * @VA10560 00943800
  1022. CLI FCBDEV,FCBTAP IS IT TAPE DEVICE @VA11433 00943850
  1023. BE SETSIZE YES, BYPASS SETTING FILEMOD @VA11433 00943900
  1024. CLI FCBDSMD+1,C'4' IS FILE MODE 4 00944000
  1025. BE SETSIZE YES, THEN CONTINUE P3056 00945000
  1026. CLC FCBOP+4(4),ZERO IS THIS A NEW FILE P3056 00946000
  1027. BNE BADDCB NO, THEN TYPE ERROR MSG. P3056 00947000
  1028. MVI FCBDSMD+1,C'4' YES, THEN SET MODE= 4 P3056 00948000
  1029. B SETSIZE BYPASS BLK CHECKING 00949000
  1030. CKBLKING LA R15,5 SET ERROR CODE 00950000
  1031. CLC DCBLRECL,DCBBLKSI IS LRECL LARGER THAN BLOCK @VA05960 00951000
  1032. BH BADDCB YES, THEN BAD DCB 00952000
  1033. BE RECFMT EQUAL - CHK FORMAT @VA05960 00953000
  1034. TM DCBRECFM,BLK IS BLOCKING SPECIFIED 00954000
  1035. BNO RECLOW NO, HOW LOW IS IT? @VA05960 00955000
  1036. SR R8,R8 ZERO R8 FOR DIVIDE 00956000
  1037. DR R8,R11 DIVIDE BLKSI BY LRECL 00957000
  1038. TM DCBRECFM,VAR IS RECFM VARIABLE V0020 00958000
  1039. BO CKDEVBLK YES, CHECK FOR BLOCKED RDR V0020 00959000
  1040. LTR R8,R8 REMAINDER? 00960000
  1041. BNZ BADDCB YES, THEN BAD DCB 00961000
  1042. CKDEVBLK CH R9,HALF1+2 IS BLOCKING SPECIFIED V0020 00962000
  1043. BE SETSIZE YES, THEN NO CHECKS NECESSARY 00963000
  1044. CLI FCBDEV,FCBCON IS CONSOLE BLOCKED 00964000
  1045. BE BADDCB YES, THEN ERROR 00965000
  1046. CLI FCBDEV,FCBRDR IS RDR BLOCKED 00966000
  1047. BE BADDCB YES, THEN PRINT ERROR MSG 00967000
  1048. TM DCBRECFM,VAR IS RECFM VARIABLE 00968000
  1049. BO SETSIZE YES, THEN DON'T SET BLOCKING COUNT 00969000
  1050. STH R9,FCBCOUT SET BLOCKING COUNT 00970000
  1051. B SETSIZE GO SET IT @VA05960 00971000
  1052. RECFMT TM DCBRECFM,VAR IS IT VARIABLE? @VA05960 00972000
  1053. BNO SETSIZE NO, MUST BE FIXED @VA05960 00973000
  1054. LA R11,8(R11) ADD 8 TO LRECL @VA05960 00974000
  1055. STH R11,DCBBLKSI AND SET BLOCK SIZE @VA05960 00975000
  1056. B SETSIZE AND GO SET IT @VA05960 00976000
  1057. RECLOW EQU * @VA09654 00976400
  1058. TM DCBRECFM,VAR LENGTH VARIABLE? @VA09654 00976800
  1059. BNO SETSIZE NO, FIXED-LENGTH RECORDS @VA09654 00977200
  1060. LA R11,4(R11) ADD 4 TO LRECL @VA09654 00977600
  1061. CH R11,DCBBLKSI DIFFERENCE LESS THAN 4? @VA05960 00978000
  1062. BH BADDCB YES, THAT IS AN ERROR @VA05960 00979000
  1063. SETSIZE MVC FCBBYTE+2(2),DCBBLKSI SET BUFFER AT BLKSI 00980000
  1064. LH R9,DCBLRECL GET LRECL 00981000
  1065. STH R9,FCBRECL SAVE DCBLRECL AT OPEN 00982000
  1066. CLI FCBDSMD,C'*' IS MODE AN ASTERISK? @VA04535 00983000
  1067. BNE CKAGAIN NO, THEN CHECK AGAIN @VA04535 00984000
  1068. L R8,FCBOP+4 SEE IF FILE EXISTS @VA04535 00985000
  1069. LTR R8,R8 DOES IT? @VA04535 00986000
  1070. BZ CKAGAIN NO, THEN CHECK AGAIN @VA04535 00987000
  1071. L R15,FCBBUFF GET FST @VA04535 00988000
  1072. CLI 25(R15),C'4' IS MODE 4? @VA04535 00989000
  1073. BNE CKAGAIN NO,CHECK AGAIN @VA04535 00990000
  1074. B USBLKSI YES, THEN USE BLOCKSIZE @VA04535 00991000
  1075. CKAGAIN CLI FCBDSMD+1,C'4' IS MODE 4? @VA04535 00992000
  1076. BNE CKOLDSIZ NO, THEN BRANCH @VA04535 00993000
  1077. USBLKSI MVC FCBCOUT(2),HALF1+2 SET FCBCOUT TO ONE @VA04535 00994000
  1078. LH R9,DCBBLKSI GET BLKSI 00995000
  1079. CKOLDSIZ N R9,HALFWORD CLEAR FIRST HALF OF REG 00996000
  1080. HALF6 LA R15,6 SET ERROR CODE 00997000
  1081. L R8,FCBOP+4 GET BLKSIZE OF FILE 00998000
  1082. LTR R8,R8 DOES FILE EXIST 00999000
  1083. BZ CKDA NO, GO CHECK DSORG 01000000
  1084. CR R8,R9 CHECK BLKSIZE OF FILE 01001000
  1085. BE CKDA OKAY, THEN GO CHECK DSORG 01002000
  1086. BL CKVAR FILE RECORD LENGTH LOW, GO CHECK VAR. @VA04986 01003000
  1087. TM DCBRECFM,UND IS THIS UNDEFINED RECFM ? @VA04986 01004000
  1088. BO CKDA YES, NOT AN ERROR CONDITION @VA04986 01005000
  1089. TM DCBDSORG,DA IF HIGH IS IT BDAM ? @VA04986 01006000
  1090. BNO BADDCB NO, ERROR @VA04986 01007000
  1091. TM DCBMACRF,X'10' YES, THEN MUST BE KEYED @VA04986 01008000
  1092. BNO BADDCB IF NOT, ERROR @VA04986 01009000
  1093. CKVAR EQU * 01010000
  1094. TM DCBRECFM,VAR IS RECFM VARIABLE 01011000
  1095. BNO BADDCB NO, THEN DCB BAD 01012000
  1096. CKDA TM DCBDSORG,DA IS DSORG DIRECT ACCESS 01013000
  1097. BNO CKMAC NO, CONTINUE V0277 01014000
  1098. MVC DCBLRECL-1(3),FCBOP RESTORE LIMCT 01015000
  1099. B BUFFPOOL GET BUFFER POOL @V201122 01016000
  1100. CKMAC EQU * V0277 01017000
  1101. TM DCBDSORG,PO ACCESS METHOD = BPAM V0277 01018000
  1102. BNO CKMEMBR NO, CHECK FOR MEMBER @V201122 01019000
  1103. TM FCBINIT,FCBCATML IS CONCATONATION SPECIFIED V0277 01020000
  1104. BO BUFFPOOL GO CHECK DCBBUFL @V201122 01021000
  1105. CKWRPDS TM DCBMACRF+1,X'20' WRITE SPECIFIED V0277 01022000
  1106. BNO CKMEMBR NO, CHECK FOR MEMBER @V201122 01023000
  1107. LCR R0,R3 INDICATE PDSSAVE CALL V0277 01024000
  1108. SVC 203 CALL PDSSAVE V0277 01025000
  1109. DC H'-3' V0277 01026000
  1110. LTR R15,R15 ANY ERRORS V0277 01027000
  1111. LA R15,8 SET OPEN ERROR CODE V0277 01028000
  1112. BNZ BADDCB YES, DON'T OPEN V0277 01029000
  1113. CKMEMBR CLI FCBMEMBR,0 MEMBER NAME SPECIFIED @V201122 01030000
  1114. BE BUFFPOOL NO, GET BUFFERS @V201122 01031000
  1115. TM FCBIOSW2,FCBMVPDS MOVE PDS SPECIFIED? @V201122 01032000
  1116. BO BUFFPOOL YES, BYPASS FIND @V201122 01033000
  1117. LA R2,0(R2) CLEAR HIGH ORDER BYTE @V201122 01034000
  1118. FIND (R2),FCBMEMBR,D POSITION TO MEMBER @V201122 01035000
  1119. LTR R15,R15 SUCCESSFUL ? @V201122 01036000
  1120. BZ BUFFPOOL YES, GET BUFFERS @VA09291 01037000
  1121. L R0,FCBPDS GET PDS ADDRESS @VA09291 01037200
  1122. LTR R0,R0 IS IT ZERO @VA09291 01037400
  1123. BZ BADFIND YES, DO NOT FRET @VA09291 01037600
  1124. SR R0,R0 CLEAR REG @VA09291 01037800
  1125. BCTR R0,R0 FRET PDS DIRECTORY CORE @VA09291 01038000
  1126. SVC 203 IN DMSSVT @VA09291 01038200
  1127. DC H'-3' SVC 203 ENTRY @VA09291 01038400
  1128. BADFIND EQU * @VA09291 01038600
  1129. LA R15,8 SET OPEN ERROR @VA09291 01038800
  1130. B BADDCB ISSUE ERROR MESSAGE @VA09291 01039000
  1131. EJECT 01040000
  1132. * PERFORM INDICATED "EXIT LIST" PROCESSING 01041000
  1133. EXITLIST L R15,DCBEXLST V(LIST OF ROUTINE ADDRESS) 01042000
  1134. LA R15,0(,R15) 01043000
  1135. LTR R15,R15 VALID LIST POINTER? 01044000
  1136. BZ VEROPEN NO. IGNOR& 01045000
  1137. EX1 TM 0(R15),X'0A' 01046000
  1138. BNZ EX2 IF ANY BAD BITS, TRY NEXT @VA02035 01047000
  1139. TM 0(R15),X'05' IS THERE A DCB EXIT LIST POINTER 01048000
  1140. BO EX3 YES, GO HANDLE IT 01049000
  1141. EX2 TM 0(R15),EOL "END-OF-LIST"? 01050000
  1142. BO VEROPEN YES. 01051000
  1143. LA R15,4(,R15) POINT T NEXT LIST ENTRY 01052000
  1144. B EX1 01053000
  1145. * 01054000
  1146. EX3 EQU * GO OFF TO USER'S EXIT DCB ROUTINE 01055000
  1147. NI DCBOFLGS,255-OPENLOCK SET LOCK = ON 01056000
  1148. L R13,USAVEPTR POINT TO USER SAVE AREA 01057000
  1149. L R9,DCBSAV SAVE CURRENT DCB SAVE AREA @VA10775 01057100
  1150. STM R0,R15,0(R13) SAVE PRESENT REGS 01058000
  1151. DMSKEY LASTUSER SET PSW KEY TO LAST USER KEY 01059000
  1152. L R15,4*R15(,R13) RESTORE R15 01060000
  1153. L R13,CURRSAVE RESET REG 13 01061000
  1154. L R15,0(,R15) GET A(EXIT ROUTINE) FROM EXIT LIST 01062000
  1155. LR R1,R2 SET REG1 = V(DCB) 01063000
  1156. LM R2,R13,EGPR2 RESTORE REGS TO PRE-SVC VALUE 01064000
  1157. BALR R14,R15 GO TO USER EXIT ROUTINE 01065000
  1158. DMSKEY RESET RESTORE NUCLEUS KEY 01066000
  1159. L R13,CURRSAVE POINT TO SYSTEM SAVE AREA 01067000
  1160. L R13,USAVEPTR POINT TO USER SAVE AREA 01068000
  1161. LM R0,R15,0(R13) RESTORE PRESENT REGS 01069000
  1162. ST R9,DCBSAV RESTORE CURR DCB SAVE AREA @VA10775 01069100
  1163. L R13,CURRSAVE RESET TO SYSTEM SAVE AREA 01070000
  1164. OI DCBOFLGS,OPENLOCK SET LOCK=OFF 01071000
  1165. ST R1,SAVER1 SAVE REG 1 01072000
  1166. B EX2 01073000
  1167. EJECT 01074000
  1168. * BUFFER POOL CONSTRUCTION 01075000
  1169. BUFFPOOL EQU * SIMULATE A WET BUFFER POOL 01076000
  1170. SR R4,R4 ZERO REG 4 01077000
  1171. IC R4,DCBNCP GET NO. OF CHAN. PROGS. 01078000
  1172. TM DCBBUFCB+3,1 DID USER SUPPLY OWN BUFFER POOL 01079000
  1173. BZ BUCN3 YES. DO NOT GET POOL 01080000
  1174. SR R0,R0 CLEAN REG 01081000
  1175. IC R0,DCBBUFNO NUMBER OF BUFFERS REQUESTED 01082000
  1176. LTR R0,R0 ZERO? 01083000
  1177. BNZ BUCN1 NO. 01084000
  1178. LA R0,2 SET DEFAULT BUFNO TO 2 01085000
  1179. TM DCBCIND2,QSAMDCB ACCESS METHOD QSAM 01086000
  1180. BZ BUCN4 NO, DON'T GET BUFFER 01087000
  1181. BUCN1 SLL R0,16 01088000
  1182. LH R1,DCBBUFL GET BUFFER LENGTH 01089000
  1183. N R1,HALFWORD 01090000
  1184. BNZ BUCN2 BUFL IS NOT ZERO. 01091000
  1185. SETBUFL LH R1,DCBBLKSI GET BLKSIZE 01092000
  1186. N R1,HALFWORD CLEAR FIRST HALF 01093000
  1187. BUCN2 CH R1,DCBBLKSI BUFL > BLKSI 01094000
  1188. BL SETBUFL NO, BUFL LESS SO USE BLKSI 01095000
  1189. AR R0,R1 SET GETPOOL PARAMETER 01096000
  1190. LA R1,0(,R2) GET V(DCB) 01097000
  1191. OI DCBCIND2,X'08' SIGNAL: OPEN ACQUIRED BUFFER POOL. 01098000
  1192. GETPOOL (R1),(0) 01099000
  1193. * SET INTIAL BUFFER CONDITIONS ACCORDING TO RECFM AND MACRF 01100000
  1194. BUCN3 EQU * 01101000
  1195. L R1,DCBBUFCB GET V(BUFFER CONTROL BLOCK) 01102000
  1196. L R1,0(,R1) GET A(FIRST BUFFER) 01103000
  1197. ST R1,IOBSTART SET V(FIRST AVAILABLE BUFFER IN CHAIN 01104000
  1198. ST R1,DCBRECAD SET V(FIRST BUFFER TO BE USED) 01105000
  1199. TM DCBCIND2,1 QSAM? 01106000
  1200. BZ BUCN3A NOPE. 01107000
  1201. TM DCBRECFM,FXD RECFM=VARIABLE? 01108000
  1202. BO BUCN3A NO. FXD OR UND. 01109000
  1203. LA R0,4(,R1) ACCOUNT FOR BDW 01110000
  1204. ST R0,DCBRECAD SET ADJUSTED RECAD 01111000
  1205. BUCN3A ST R1,DCBEOBAD SET END OF BLOCK CONDITION 01112000
  1206. LA R0,1 ID OF NEXT BUFFER TO BE USED 01113000
  1207. STC R0,IOBSTART 01114000
  1208. TM DCBCIND2,X'01' QSAM? 01115000
  1209. BZ BUCN4 NOPE. GOOD. LEAVE EOB CONDITION 01116000
  1210. L R7,SAVER1 GET ADDR OF REG 1 01117000
  1211. TM 0(R7),X'0F' WAS OUTPUT SPECIFIED? 01118000
  1212. BNO BUCN4 NO. 01119000
  1213. TM DCBCIND2,UPDT QSAM UPDATE MODE V0307 01120000
  1214. BO BUCN4 YES 01121000
  1215. LH R14,DCBBUFL GET BUFFER LENGTH IF ANY @VA04227 01122000
  1216. N R14,HALFWORD CLEAN TOP @VA04227 01123000
  1217. BZ USBLKSZ THERE IS NONE, USE BLOCKSIZE @VA04227 01124000
  1218. CH R14,DCBBLKSI IS THE BUFL GREATER THAN @VA07550 01124200
  1219. BH USBLKSZ YES,USE BLOCKSIZE @VA07550 01124400
  1220. STH R14,DCBBUFL SAVE BUFFER LENGTH @VA07550 01124600
  1221. B KONT CONTINUE ALONG @VA04227 01125000
  1222. USBLKSZ MVC DCBBUFL(2),DCBBLKSI SET BUFFER LENGTH = @VA04227 01126000
  1223. * BLOCKSIZE 01127000
  1224. KONT AH R1,DCBBUFL GET V(NEXT BUFFER) @VA04227 01128000
  1225. ST R1,DCBEOBAD REMOVE EOB CONDITION. SET NEW ONE@VA04227 01129000
  1226. TM DCBMACRF+1,LOC QSAM PUT-LOCATE? @VA04227 01130000
  1227. BNO BUCN4 BR IF NOT 01131000
  1228. LA R0,2 SET ID OF NEXT-BUFFER-TO-BE-USED 01132000
  1229. SR R14,R14 01133000
  1230. IC R14,DCBBUFNO GET N'BUFFERS 01134000
  1231. CLR R0,R14 HAS N'BUFFERS BEEN EXCEEDED? 01135000
  1232. BNH BUCN3B NO. NEXT BUFFER IS VALID 01136000
  1233. BCTR R0,0 RESET TO FIRST BUFFER 01137000
  1234. L R1,IOBSTART GET V(FIRST BUFFER IN CHAIN) 01138000
  1235. LA R1,0(R1) REMOVE ID BYTE 01139000
  1236. BUCN3B STC R0,IOBSTART 01140000
  1237. BUCN4 STC R4,DCBNCP RESTORE DCBNCP 01141000
  1238. SPACE 2 01142000
  1239. * SETUP EXTRA IOBS IF NECCESSARY 01143000
  1240. * 01144000
  1241. TM DCBCIND2,1 QSAM DCB? 01145000
  1242. BO OPENED YES, CONTINUE 01146000
  1243. LA R7,32 GET IOB LENGTH 01147000
  1244. LA R8,IOBNXTAD GET ADDR OF IOB 01148000
  1245. LR R9,R8 SAVE FCB IOB ADDR 01149000
  1246. LR R1,R8 SETUP REG 1 FOR 1ST IOB 01150000
  1247. CKNCP ST R1,0(R8) CHAIN THIS IOB TO PREV. IOB 01151000
  1248. TM DCBDSORG,DA ORGANIZATION= BDAM? 01152000
  1249. BO OPENED YES, THEN IGNORE DCBNCP 01153000
  1250. LR R8,R1 SAVE ADDR OF THIS IOB 01154000
  1251. BCTR R4,R0 DECREMENT NO. OF CHAN. PROGS. 01155000
  1252. LTR R4,R4 IS IT PLUS 01156000
  1253. BNP OPENED NO, GO FINISH OPEN 01157000
  1254. BLDLIOBS GETMAIN R,LV=(R7) GET CORE FOR IOB 01158000
  1255. MVC 0(32,R1),0(R8) FILL IN IOB 01159000
  1256. ST R9,0(R1) SET IOB POINTER TO 1ST IOB 01160000
  1257. B CKNCP CHAIN IOB TO PREV. IOB 01161000
  1258. EJECT 01162000
  1259. * SIGNAL "OPEN" COMPLETED FOR THIS DCB 01163000
  1260. OPENED OI DCBOFLGS,GOODOPEN SIGNAL SUCCESSFUL OPEN 01164000
  1261. L R1,SAVER1 RESTORE REG 1 01165000
  1262. TM FCBIOSW,FCBPROCO DOES FCBPROC WANT CONTROL 01166000
  1263. BNO NOTOPEN DON'T GO TO FCBPROC RTN. 01167000
  1264. L R15,FCBPROC GET ADDR OF PROC RTN. 01168000
  1265. LTR R15,R15 IS IT ZERO 01169000
  1266. BZ NOTOPEN YES, THEN DON'T GO 01170000
  1267. LR R11,R5 FCB ADDR. IN REG, 11 FOR PROC. P3003 01171000
  1268. BALR R14,R15 BRANCH TO PROC RTN. 01172000
  1269. NOTOPEN EQU * DCB WAS NOT OPENED 01173000
  1270. L R1,DCBSAV GET ADDR TO FRET 01174000
  1271. DMSFRET DWORDS=12,LOC=(1),TYPCALL=BALR 01175000
  1272. L R1,SAVER1 RESTORE REG 1 @VA02963 01176000
  1273. NI DCBOFLGS,255-OPENBUSY 01177000
  1274. TM 0(R1),EOL END-OF-LIST FOR OPENING DCB 01178000
  1275. BO RETURN YES. 01179000
  1276. LA R1,4(,R1) GET NEXT DCB IN OPEN LIST 01180000
  1277. B COMOPEN 01181000
  1278. * RETURN TO SVCINT, WHO WILL RETURN TO CALLER 01182000
  1279. RETURN TM TYPFLAG,TPFACB ACB'S IN PLIST? @V305174 01183000
  1280. BZ RETURN2 NO, HEAD FOR THE EXITS @V305174 01184000
  1281. NI TYPFLAG,255-TPFACB CLEAR FLAG BIT @V305174 01185000
  1282. L R1,EGPR0 RESTORE R1 TO SVC PLIST ADDR @V305174 01186000
  1283. L R13,USAVEPTR POINT TO USER SAVE AREA @V305174 01187000
  1284. SR R7,R7 CLEAR WORK REG @V305174 01188000
  1285. ICM R7,BIN0001,OSIOTYPE GET REQUEST TYPE @V305066 01189000
  1286. EX R7,SETSVC SET SVC TYPE IN VIP LIST @V305174 01190000
  1287. VSAMCALL MVC 89(3,R13),=CL3'SOP' MOVE IN ID @V305174 01191000
  1288. MVC 92(4,R13),BRBACK AND FINALLY RETURN INSTR @V305174 01192000
  1289. LA R14,88(,R13) INIT RETURN REG FOR VIP @V305174 01193000
  1290. L R15,ACMSCVT POINT TO CVT @V305174 01194000
  1291. USING CMSCVT,R15 @V305174 01195000
  1292. L R15,CVTAVIB GET ADDR OF VSAM INTFC @V305174 01196000
  1293. BR R15 BR FOR VSAM REQUEST @V305174 01197000
  1294. DROP R15 @V305174 01198000
  1295. SETSVC MVI 88(R13),BINZERO EXECUTED INSTR @V305066 01199000
  1296. BRBACK B RETURN3 RETURN INSTR FOR VSAM @V305174 01200000
  1297. RETURN2 SR R15,R15 CLEAR ERROR REG @V305174 01201000
  1298. RETURN3 L R13,CURRSAVE RESTORE ADDR OF SAVE AREA @V305174 01202000
  1299. ST R15,EGPR15 SAVE VSAM RETURN CODE @V305174 01203000
  1300. L R14,AOSRET GET OS RET VECTOR INTO INTSVC@V305174 01204000
  1301. BR R14 01205000
  1302. * TYPE DCB NOT OPENED MSG 01206000
  1303. BADDCB L R4,USAVEPTR GET ADDR OF SCRATCH AREA 01207000
  1304. CVD R15,0(R4) CONVERT NO. TO DECIMAL @V201122 01208000
  1305. UNPK 0(2,R4),6(2,R4) UNPACK NO. @V201122 01209000
  1306. MVC 2(15,R4),ERRMSG1 SETUP ERROR MESSAGE @V201122 01210000
  1307. OI 1(R4),X'F0' CONVERT TO EBCDIC 01211000
  1308. STD F6,8(R4) INDICATE DDNAME 01212000
  1309. DMSERR MF=I,SUB=(CHARA,(R4)),NUM=036,LET=E, X01213000
  1310. TEXT='OPEN ERROR CODE ''.................' 01214000
  1311. SR R0,R0 SEARCH FOR BEGINING OF AFT @VA07070 01215000
  1312. L R13,USAVEPTR GET ADDR OF SAVE AREA @VA07070 01216000
  1313. LA R1,FCBOP GET ADDR OF PLIST @VA07070 01217000
  1314. L R15,AACTLKP GET ADDR OF AFT ROUTINE @VA07070 01218000
  1315. BALR R14,R15 GET ADDR OF AFT @VA07070 01219000
  1316. L R13,CURRSAVE RESTORE REG 13 SAVE AREA @VA07783 01219100
  1317. LTR R15,R15 WAS AFT FOUND? @VA07070 01220000
  1318. BNZ NOTOPEN NO, LEAVE @VA07070 01221000
  1319. L R13,CURRSAVE RESTORE ADDRESS OF SAVEAREA @VA10705 01221500
  1320. MVC FCBOP(8),=CL8'FINIS' SET TO FINIS FILE @VA10705 01222000
  1321. LA R1,FCBOP @VA10705 01222500
  1322. SVC 202 @VA10705 01223000
  1323. DC AL4(*+4) @VA10705 01223500
  1324. L R1,DCBSAV GET ADDRESS TO FRET @VA02963 01225000
  1325. MVC 0(96,R2),0(R1) RESTORE ORIGINAL DCB @VA02963 01226000
  1326. MVI DCBOFLGS,X'00' SET NOTOPEN BIT @VA02963 01227000
  1327. LR R15,R11 RESTORE REG 15 01228000
  1328. B NOTOPEN SET FLAG BYTE 01229000
  1329. NROOM EQU * @VA04752 01230000
  1330. MVI DCBOFLGS,X'00' SET NOTOPEN BIT ON @VA02963 01231000
  1331. B RETURN @VA02963 01232000
  1332. EJECT 01233000
  1333. *********************************************************************** 01234000
  1334. * * 01235000
  1335. * CLLOOOOOOOOOOOOSSSSSSSIINNNGGGGGGGGGGGGGGGG * 01236000
  1336. * * 01237000
  1337. *********************************************************************** 01238000
  1338. SPACE 01239000
  1339. * 01259000
  1340. * COMMENCE CLOSING A DATA CONTROL BLOCK 01260000
  1341. * 01261000
  1342. COMCLOSE EQU * ALL CLOSE JOIN IN HERE... 01262000
  1343. USING DMSSOP,R12 01263000
  1344. L R2,0(R1) GET V(DCB) FROM CLOSE LIST 01264000
  1345. CLI 0(R2),ACBID ACB? @V305174 01265000
  1346. BNE COMCL2 NO, PROCESS DCB @V305174 01266000
  1347. OI TYPFLAG,TPFACB SET FLAG BIT @V305174 01267000
  1348. TM 0(R1),EOL END OF LIST? @V305174 01268000
  1349. BO RETURN YES @V305174 01269000
  1350. LA R1,4(,R1) NO, POINT TO NEXT ENTRY @V305174 01270000
  1351. ST R1,EGPR1 SAVE UP-TO-DATE DCB LIST PTR @V305174 01271000
  1352. B COMCLOSE AND CONTINUE @V305174 01272000
  1353. COMCL2 TM DCBOFLGS,GOODOPEN HAD THIS DCB BEEN OPENED? @V305174 01273000
  1354. BZ CLOSED NO. IGNORE THIS FIOLISHNESS 01274000
  1355. L R5,DCBDEBAD GET ADDR OF DEB IN FCB 01275000
  1356. SH R5,=AL2(IHADEB-FCBINIT) GET ADDR OF FCB 01276000
  1357. CLI OSIOTYPE,C'T' IS THIS A TEMPORARY CLOSE 01277000
  1358. BE SETFLGS YES 01278000
  1359. L R0,FCBKEYS GET KEY TABL ADDR 01279000
  1360. LTR R0,R0 IS IT ZERO 01280000
  1361. BZ CKFORPDS YES CHECK FOR PDS 01281000
  1362. SR R0,R0 NO GO TO SAVE KEYS 01282000
  1363. SVC 203 01283000
  1364. DC H'-3' SVC 203 ENTRY IN DMSSVT 01284000
  1365. LTR R15,R15 ANY ERRORS? 01285000
  1366. BZ CKFORPDS NO, CONTINUE 01286000
  1367. ERREXIT LR R11,R5 YES, SETUP TO ABEND 01287000
  1368. LA R6,=XL4'420000FF' SET ERROR CODE FOR CHECK 01288000
  1369. L R15,=V(DMSSCTCE) GET CHECK ADDR 01289000
  1370. L R12,=V(DMSSCTCK) GET CHECK BASE REG 01290000
  1371. BR R15 PRINT MSG AND ABEND 01291000
  1372. CKFORPDS EQU * CHECK FOR PDS @VA14182 01292000
  1373. LA R15,BINZERO SET REG 15 TO ZERO @VA14182 01292040
  1374. TM MACDIRC,X'80' IS HIGH ORDER BIT ON @VA14182 01292080
  1375. BZ FOUNDIT NO, CLEAR OSFST POINTER @VA14182 01292120
  1376. ICM R15,7,MACDIRC+1 YES, PUT IT IN REG 15 @VA14182 01292160
  1377. TM FCBNEXT,FCBCATML IS IT CONCATENATED ??? @VA14182 01292200
  1378. BZ FREEPDS NO, GO AHEAD AND FREE @VA14182 01292240
  1379. TM FCBNEXT,FCBDOSL DOSLIB ?? @VA14182 01292280
  1380. BNZ FREEPDS IF SO, GO AHEAD AND FREE @VA14182 01292320
  1381. L R1,FCBFIRST GET FIRST FCB @VA14182 01292360
  1382. FCBLOOP EQU * @VA14182 01292400
  1383. LA R1,0(,R1) CLEAR HIGH BYTE @VA14182 01292440
  1384. LTR R1,R1 IS IT ZERO ?? @VA14182 01292480
  1385. BZ FREEPDS YES, NOTHING LEFT TO CHECK @VA14182 01292520
  1386. CLC FCBDD-FCBSECT(8,R1),FCBDD COMPARE DD NAME OF FCB@VA14182 01292560
  1387. * WE'RE CLOSING WITH THE @VA14182 01292600
  1388. * ONE WE'RE POINTING TO @VA14182 01292640
  1389. BE FOUNDIT THEY'RE EQUAL..GOT IT @VA14182 01292680
  1390. L R1,FCBNEXT-FCBSECT(R1) GET NEXT FCB IN CHAIN @VA14182 01292720
  1391. B FCBLOOP CHECK NEXT FCB @VA14182 01292760
  1392. FOUNDIT EQU * @VA14182 01292800
  1393. STCM R15,7,FCBOSFST+1 RESET OSFST POINTER @VA14182 01292840
  1394. SPACE 1 @VA14182 01292880
  1395. FREEPDS EQU * @VA14182 01292920
  1396. L R0,FCBPDS GET PDS ADDR 01292960
  1397. LTR R0,R0 IS IT ZERO 01293000
  1398. BZ SETFLGS YES, THEN CONT 01294000
  1399. SR R0,R0 CALL PDSSAVE TO 01295000
  1400. BCTR R0,R0 FREE PDS CORE 01296000
  1401. SVC 203 AND OR SAVE DIRECTORY 01297000
  1402. DC H'-3' SVC 203 ENTRY IN DMSSVT 01298000
  1403. LTR R15,R15 ANY ERRORS? 01299000
  1404. BNZ ERREXIT YES, SETUP TO ABEND 01300000
  1405. SETFLGS EQU * 01301000
  1406. OI FCBIOSW,FCBCLOSE SIGNAL: DURING CLOSE 01302000
  1407. OI DCBOFLGS,OPENBUSY 01303000
  1408. * IF I/O=OUTPUT, MUST CLOSE OUT AND PUT LAST BUFFER 01304000
  1409. TM DCBRECFM,VAR RECFM= VAR OR UND V0206 01305000
  1410. BNO CKPUT NO, BYPASS PREVIOUS CHECK V0206 01306000
  1411. TM DCBOFLGS,PREVIOUS IS WRITE BIT ON 01307000
  1412. BNO CLOSE0 NO, CONTINUE CLOSE 01308000
  1413. CKPUT TM DCBDSORG,PS ACCESS METHOD= SEQUENTIAL V0206 01309000
  1414. BNO SETWRBIT NO, TURN OFF WRITE BIT 01310000
  1415. CLC DCBGET+1(3),VGET IS GET SPECIFIED 01311000
  1416. BE SETWRBIT YES, TURN WRITE BIT OFF 01312000
  1417. TM DCBCIND2,QSAMDCB QSAM SPECIFIED 01313000
  1418. BZ CKUPDT NO, CHECK FOR UPDATE MODE 01314000
  1419. TM DCBMACRF+1,PUT IS THIS UPDATE OR OUTPUT FILE @VA07538 01314200
  1420. BNO SETWRBIT NO-TURN OFF WRITE BIT @VA07538 01314400
  1421. CLI FCBDEV,FCBDUM HAS FILE BEEN DUMMIED? @VA03854 01315000
  1422. BE CKUPDT YES - BYPASS PUT OF LAST BUFFER @VA03854 01316000
  1423. L R13,USAVEPTR GET NEEDED SAVE AREA 01317000
  1424. LR R1,R2 SET R1=DCB FOR PUT ROUTINE 01318000
  1425. L R15,DCBPUT GET V(PUT) 01319000
  1426. BALR R14,R15 PUT LAST BLOCK 01320000
  1427. OI DCBOFLGS,PREVIOUS LAST I/O WAS WRITE @VA09421 01320500
  1428. L R13,CURRSAVE RESET REG 13 01321000
  1429. L R1,EGPR1 RESTORE R1 TO DCB LIST POINTER 01322000
  1430. STC R9,OSIOTYPE RESTORE TYPE INDICATOR 01323000
  1431. CKUPDT TM DCBCIND2,UPDT IS THIS UPDATE MODE? 01324000
  1432. BNO CLOSE0 NO, CONTINUE CLOSE 01325000
  1433. SETWRBIT NI DCBOFLGS,255-PREVIOUS TURN OFF WRITE BIT 01326000
  1434. CLOSE0 EQU * INTERROGATE CLOSE MACRO INSTRUC 01327000
  1435. NI FCBIOSW,255-FCBCLEAV 01328000
  1436. TM 0(R1),X'40' REWIND OPTION ON CLOSE? @VA07569 01328100
  1437. BO CLOSE4B YES-DON'T SET LEAVE BIT @VA07569 01328200
  1438. TM 0(R1),OPLEAVE TEST OPTION BYTE- DISP=LEAVE? 01329000
  1439. BM CLOSE4B NO.REREAD 01331000
  1440. CLOSE4A OI FCBIOSW,FCBCLEAV SIGNAL: DISP=LEAVE 01334000
  1441. * DOES FCBPROC ROUTINE WANT CONTROL ? 01335000
  1442. CLOSE4B TM FCBIOSW,FCBPROCC FCBPROC WANT CONTROL ? P3003 01336000
  1443. BNO CLOSE4C NO, CONTINUE CLOSING P3003 01337000
  1444. L R15,FCBPROC GET PROC ROUTINE ADDR. P3003 01338000
  1445. LTR R15,R15 IS IT ACTIVE ? P3003 01339000
  1446. BZ CLOSE4C P3003 01340000
  1447. LR R11,R5 FCB ADDR. IN REG. 11 FOR PROC P3003 01341000
  1448. BALR R14,R15 GO TO PROC P3003 01342000
  1449. SPACE 1 01343000
  1450. CLOSE4C SR R11,R11 P3003 01344000
  1451. IC R11,FCBDEV GET DEVICE TYPE CODE 01345000
  1452. B *+4(R11) GO TO DEVICE DEPENDENT CODE 01346000
  1453. B CDUMMY DUMMY DEVICE 01347000
  1454. B CPRINT PRINTER 01348000
  1455. B CREADER READER 01349000
  1456. B CCONSOLE CONSOLE 01350000
  1457. B CTAPE TAPE 01351000
  1458. B CDISK DISK 01352000
  1459. B CPUNCH CARD PUNCH 01353000
  1460. B CCRT CATHODE RAY TUBE 01354000
  1461. EJECT 01355000
  1462. * DEVICE TYPE = MAG TAPE 01356000
  1463. CTAPE EQU * CLOSE OUT TAPE DATA SET 01357000
  1464. MVC TAPEDEV(4),FCBDSNAM GET SYMBOLIC TAPE NAME 01358000
  1465. MVC TAPEMASK(1),FCBMODE SET TAPE MODE 01359000
  1466. LA R1,TAPELIST 01360000
  1467. MVC TAPEOPER(8),=CL8'WTM' WRITE TAPE MARK 01361000
  1468. TM IOBIOFLG,IOBIN INPUT? @VA03973 01362000
  1469. BO TAPEREW YES THEN DON'T WRITE TAPE MARK @VA03973 01363000
  1470. TM DEBOPATB,OPNOUT DATASET OPENED AS OUTPUT? @VA08930 01364000
  1471. BNO TAPEREW TREAT IT AS AN INPUT DATA SET @VA05424 01365000
  1472. * THEN. 01366000
  1473. TM DCBOFLGS,PREVIOUS WAS LAST I/O A WRITE @VA06253 01367000
  1474. BO TAPEWTM YES,WRITE THE TAPE MARK @VA08024 01367150
  1475. * MAY BE VAR OR UND OUTPUT DATA SET AND NO WRITE DONE 01367175
  1476. TM DEBOPATB,DEBOUTPT D.S. OPENED FOR OUTPUT @VA11273 01367200
  1477. BO TAPEWTM YES, WRITE TAPE MARK @VA11273 01367225
  1478. TM FCBIOSW2,FCBTCLOS HAVE WE ISSUED A CLOSE T? @VA08024 01367300
  1479. BZ TAPEREW NO,OK TO CONTINUE @VA08024 01367450
  1480. MVC TAPEOPER(3),=CL3'FSF' FSF PAST THE TAPE MARK @VA08024 01367600
  1481. SVC 202 ISSUE FSF @VA08024 01367750
  1482. DC AL4(*+4) IGNORE ERROR @VA08024 01367900
  1483. MVC TAPEOPER(8),=CL8'WTM' RESET TO WRITE TAPE MARK @VA08024 01368050
  1484. NI FCBIOSW2,255-FCBTCLOS TURN OFF TCLOSE @VA08024 01368200
  1485. B TAPEREW CONTINUE @VA08024 01368350
  1486. TAPEWTM DS 0H @VA08024 01368500
  1487. SVC 202 01369000
  1488. DC AL4(*+4) 01370000
  1489. CLI OSIOTYPE,TYPET IS THIS CLOSE TYPE T ? @VA06253 01371000
  1490. BNE TAPEREW NO. FORGET IT @VA06253 01372000
  1491. MVC TAPEOPER(8),BACKSPCE SET UP TO BACK SPACE @VA06253 01373000
  1492. SVC 202 OVER PREVIOUSLY WRITTEN @VA06253 01374000
  1493. DC AL4(*+4) TAPE MARK @VA06253 01375000
  1494. OI FCBIOSW2,FCBTCLOS JUST DID A TCLOSE @VA08024 01375500
  1495. TAPEREW TM FCBIOSW,FCBCLEAV TEST OPTION BYTE FOR LEAVE 01376000
  1496. BO CLOSE2 LEAVE TAPE POSITIONED 01377000
  1497. MVC TAPEOPER(8),=CL8'REW' REWIND TAPE 01378000
  1498. SVC 202 01379000
  1499. DC AL4(*+4) 01380000
  1500. B CLOSE1A 01381000
  1501. EJECT 01382000
  1502. * CLOSE OUT UNIT RECORD EQUIPMENT 01383000
  1503. CPUNCH SR R11,R11 GET PUNCH CODE 01384000
  1504. B CREADER CLOSE DEVICE 01385000
  1505. CPRINT L R1,FCBDSTYP GET ADDR OF PRINT BUFFER 01386000
  1506. LTR R1,R1 IS IT ZERO? 01387000
  1507. BZ CREADER YES, CONTINUE 01388000
  1508. FREEMAIN R,LV=160,A=(R1) NO, FREE CORE FOR PRINT BUFFER 01389000
  1509. CREADER MVC FCBDSNAM(12),=CL12'CP C' SETUP PLIST 01390000
  1510. L R6,UNITREC(R11) GET DEVICE CODE @VA08024 01391000
  1511. ST R6,FCBDSTYP+4 SET DEVICE NAME IN PLIST @VA08024 01392000
  1512. MVC FCBDSMD(4),FENCE SET PLIST DELIMITER 01393000
  1513. LA R1,FCBDSNAM GET PLIST ADDR 01394000
  1514. SVC 202 CLOSE OUT UNIT RECORD EQUIP. 01395000
  1515. DC AL4(*+4) 01396000
  1516. SR R1,R1 ZERO OUT PRINT BUFFER ADDR 01397000
  1517. ST R1,FCBDSTYP PRINT BUFFER ADDR = ZERO 01398000
  1518. SPACE 5 01399000
  1519. * DEVICE TYPE = CONSOLE 01400000
  1520. CCONSOLE EQU * 01401000
  1521. * DEVICE TYPE = DUMMY OR CRT 01402000
  1522. CDUMMY EQU * 01403000
  1523. CCRT B CLOSE2 01404000
  1524. EJECT 01405000
  1525. * DEVICE TYPE = DISK, DIRECT ACCESS 01406000
  1526. CDISK EQU * CLOSE OUT DISK DATA SET 01407000
  1527. TM DCBOFLGS,PREVIOUS WAS LAST I/O A WRITE 01408000
  1528. BNO DOFINIS NO, GO DO FINIS 01409000
  1529. TM DCBDSORG,X'40' CHECK FILE ORGANIZATION @VA10276 01409100
  1530. BZ GETAFT NOT SEQUENTIAL @VA10276 01409200
  1531. TM DCBCIND2,X'80' UPDATE PROCESSING? @VA10276 01409300
  1532. BO GETAFT YES, BYPASS READ TEST @VA10276 01409400
  1533. TM DEBOPATB,X'04' USING OUTPUT OR OUTIN METHOD? @VA10276 01409500
  1534. BO GETAFT YES, BYPASS READ TEST @VA10276 01409600
  1535. TM IOBFLG,IOBIN WAS READ IN PROCESS? @VA10276 01409700
  1536. BO DOFINIS YES, FILE STATUS UNCHANGED @VA10276 01409800
  1537. GETAFT EQU * @VA10276 01409900
  1538. SR R0,R0 SEARCH BEGINNING OF AFT 01410000
  1539. L R13,USAVEPTR GET ADDR OF SAVE AREA 01411000
  1540. LA R1,FCBOP GET ADDR OF PLIST 01412000
  1541. L R15,AACTLKP GET ADDR OF AFT ROUTINE 01413000
  1542. BALR R14,R15 GET ADDR OF AFT 01414000
  1543. LTR R15,R15 WAS AFT FOUND 01415000
  1544. BNZ DOFINIS NO, GO FINIS FILE 01416000
  1545. USING AFTSECT,R1 USE AFT DSECT 01417000
  1546. LH R15,AFTIN GET LAST I/O PTR @VA01052 01418000
  1547. N R15,HALFWORD ZERO FIRST HALF 01419000
  1548. LTR R15,R15 IF AFT WAS JUST CREATED @VA09567 01419350
  1549. BZ SKIPITEM SKIP UPDATING THE ITEM COUNT @VA09567 01419700
  1550. BCTR R15,R0 GET NO. ITEMS IN FILE 01420000
  1551. STH R15,AFTIC UPDATE EOF INDICATOR 01421000
  1552. L R14,AFTPFST-1 GET FST ADDR @VA01052 01422000
  1553. STH R15,AFTIC-AFTFST(R14) SET FSTIC FIELD @VA01052 01423000
  1554. SKIPITEM EQU * @VA09567 01423500
  1555. L R1,AFTADT GET ADT ADDR @VA01052 01424000
  1556. USING ADTSECT,R1 USE ADT BASE @VA01052 01425000
  1557. TM ADTFLG1,ADTFRO IS DISK READ ONLY @VA01052 01426000
  1558. BO DOFINIS YES, DON'T CALL UPDISK @VA01052 01427000
  1559. SR R15,R15 CLEAR REG 15 @VA01052 01428000
  1560. CH R15,ADTNACW ANY DISKS ACTIVE FOR WRITTING@VA01052 01429000
  1561. BE DOFINIS YES, DON'T CALL UPDISK @VA01052 01430000
  1562. LR R0,R1 SAVE ADT ADDR IN R0 @VA01052 01431000
  1563. LA R1,FCBOP GET ADDR OF PLIST @VA01052 01432000
  1564. L R15,AFINIS GET FINIS ADDR @VA01052 01433000
  1565. BALR R14,R15 DO FINIS @VA01052 01434000
  1566. L R15,AUPDISK GET ADDR OF UPDISK @VA01052 01435000
  1567. BALR R14,R15 CALL UPDISK TO WRITE FST @VA01052 01436000
  1568. L R13,CURRSAVE RESTORE ADDR. OF SAVE AREA @VA04107 01437000
  1569. B CLOSE1 CONTINUE CLOSE @VA04107 01438000
  1570. DROP R1 @VA04107 01439000
  1571. DOFINIS EQU * @VA13031 01439080
  1572. L R13,CURRSAVE RESTORE ADDR OF SAVE AREA @VA13031 01440840
  1573. MVC FCBOP(8),=CL8'FINIS' SET TO FINIS FILE 01441000
  1574. LA R1,FCBOP 01442000
  1575. SVC 202 01443000
  1576. DC AL4(*+4) 01444000
  1577. EJECT 01445000
  1578. CLOSE1 TM FCBIOSW,FCBCLEAV DISP=LEAVE? 01446000
  1579. BO CLOSE2 YES. 01447000
  1580. CLOSE1A MVC FCBITEM(2),HALF1+2 SET ITEM NO. TO ONE 01448000
  1581. * FOR FULL CLOSE, NOT TCLOSE, RESET DCB ENTRIES MODIFIED BY OPEN. 01449000
  1582. TM DCBDSORG,DA DSORG=DA V0313 01450000
  1583. BO CLOSE2 YES, NO POINT INDICATOR V0313 01451000
  1584. MVI DCBFDAD,0 SET POINT INDICATOR OFF V0313 01452000
  1585. CLOSE2 NI DCBOFLGS,255-PREVIOUS-OPENBUSY SET SW OFF V0313 01453000
  1586. NI FCBIOSW,255-FCBCLOSE SET CLOSE SW OFF V0313 01454000
  1587. CLI OSIOTYPE,C'T' IS THIS A TCLOSE 01455000
  1588. BE CLOSED 01456000
  1589. MVC DCBMACR(2),DCBMACRF RESTORE DCB FIELDS 01457000
  1590. MVC DCBIFLG(1),DCBIFLGS 01458000
  1591. MVC DCBDDNAM(8),FCBDD 01459000
  1592. * IF FILEMODE WAS CHANGED TO '*4' CHANGE IT BACK TO '* ' 01459100
  1593. CLI FCBDSMD,C'*' FILEMODE = '*'? @VA10414 01459200
  1594. BNE CL2A NO,NEVER MIND @VA10414 01459300
  1595. CLI FCBDSMD+1,C' ' FILEMODE = '* '? @VA10414 01459400
  1596. BE CL2A YES,ALL OK @VA10414 01459500
  1597. MVI FCBDSMD+1,C' ' BLANK OUT MODE NUMBER @VA10414 01459600
  1598. CL2A EQU * @VA10414 01459700
  1599. NI JFCBIND2,255-M4FLAG TURN OFF MODE 4 FLAG @VA09484 01459800
  1600. NI FCBINIT,255-FCBOS TURN OFF FCB OS SWITCH @V201122 01460000
  1601. TM FCBINIT,FCBCATML CONCATONATED BIT ON? @V201122 01462000
  1602. BNO CKFORDA NO, CONTINUE @V201122 01463000
  1603. CLI MACLIBL,X'FF' MACLIB GLOBALED @V201122 01464000
  1604. BE CKFORDA NO, CONTINUE @V201122 01465000
  1605. MVC FCBDSNAM(8),MACLIBL RESET DSNAME @V201122 01466000
  1606. CKFORDA EQU * @V201122 01467000
  1607. TM DCBMACR,DCBMRECP EXCP DCB @VA08866 01467100
  1608. BO CLOSEXCP YES @VA13742 01467200
  1609. TM DCBDSORG,DA BDAM SPECIFIED? 01468000
  1610. BO RESETDCB YES, THEN DON'T RESET LRECL 01469000
  1611. MVC DCBLRECL(2),FCBRECL DCBLRECL SET SAME AS BEFORE OPEN 01470000
  1612. RESETDCB EQU * @VA08024 01471000
  1613. SR R6,R6 ZERO WORK REG @VA08024 01471500
  1614. TM JFCBMASK+2,X'10' WAS BLKSI MERGED 01472000
  1615. BNO *+8 NO,CONTINUE 01473000
  1616. STH R6,DCBBLKSI ZERO BLKSIZE @VA08024 01474000
  1617. TM JFCBMASK+3,X'02' WAS LRECL MERGED? 01475000
  1618. BNO *+8 NO. 01476000
  1619. STH R6,DCBLRECL ZERO LRECL @VA08024 01477000
  1620. TM JFCBMASK+2,X'04' WAS RECFM MERGED? 01478000
  1621. BNO *+8 NO. 01479000
  1622. NI DCBRECFM,X'01' RESET RECFM FLAGS @VA10680 01480000
  1623. TM JFCBMASK+3,X'01' WAS DSORG MERGED? 01481000
  1624. BNO *+8 NO. 01482000
  1625. STH R6,DCBDSORG ZERO DATA SET ORGANIZATION @VA08024 01483000
  1626. TM JFCBMASK+2,X'80' WAS DCBOPTCD FILLED IN 01484000
  1627. BNO *+8 NO, CONTINUE 01485000
  1628. STC R6,DCBOPTCD ZERO OPTCD @VA08024 01486000
  1629. TM JFCBMASK+3,X'20' WAS KEYLE FILLED IN 01487000
  1630. BNO *+8 NO, CONTINUE 01488000
  1631. STC R6,DCBKEYLE ZERO DCB KEYLE @VA08024 01489000
  1632. TM JFCBMASK+2,X'40' WAS LIMCT FILLED IN 01490000
  1633. BNO *+10 NO, CONTINUE 01491000
  1634. XC DCBLRECL-1(3),DCBLRECL-1 ZERO LIMCT 01492000
  1635. TM DCBCIND2,1 IS THIS A QSAM DATA SET 01493000
  1636. BNO FREEIOBS NO, THEN FREE IOB'S 01494000
  1637. L R1,DCBBUFCB GET ADDR OF BUFFER CONTROL BLK 01495000
  1638. MVC 1(3,R1),IOBSTART+1 RESET BUFFER CHAIN TO START 01496000
  1639. B CLOSE3 TURN OFF OPEN FLAG 01497000
  1640. FREEIOBS CLI DCBNCP,1 NO. IOB'S = ONE 01498000
  1641. BNH RESETIOB YES, RESET IOB PTRS IN DCB 01499000
  1642. LA R9,IOBNXTAD GET START OF IOB CHAIN P3040 01500000
  1643. L R8,0(R9) GET ADDR OF NEXT IOB P3040 01501000
  1644. ST R9,0(R9) RESET IOB CHAIN P3056 01502000
  1645. CKIOBS LA R1,0(R8) CLEAR HIGH ORDER BYTE P3040 01503000
  1646. CR R1,R9 DOES IOB POINT TO FIRST IOB P3040 01504000
  1647. BE RESETIOB YES, THEN IOB CHAIN EMPTY P3040 01505000
  1648. L R8,0(R1) GET ADDR OF NEXT IOB P3040 01506000
  1649. FREEMAIN R,LV=32,A=(1) FREE IOB AREA 01507000
  1650. B CKIOBS GET NEXT IOB IN CHAIN 01508000
  1651. RESETIOB SR R8,R8 ZERO REG 8 01509000
  1652. ST R8,DCBIOBA CLEAR IOB ADDR 01510000
  1653. ST R8,DCBIOBAD CLEAR IOB ADDR 01511000
  1654. CLOSE3 NI DCBOFLGS,255-GOODOPEN SIGNAL: DCB CLOSED 01512000
  1655. IC R6,FCBDCBCT GET NUM DCBS USING THIS FCB @VA08024 01513000
  1656. BCT R6,SETCNT IF MORE THAN ONE, SAVE FCB @VA08024 01514000
  1657. TM FCBSECT,X'08' DID OPEN GET THIS FCB V0311 01515000
  1658. BZ SETCNT NO, RESET DCB COUNT V0311 01516000
  1659. MVC CMSOP(8),FILEDEF SET FILEDEF INDICATOR 01517000
  1660. MVC FILENAME(8),FCBDD SET UP PLIST 01518000
  1661. MVC FILETYPE(8),=CL8'CLEAR' ISSUE A FILEDEF 01519000
  1662. MVC FILEMODE(8),FENCE CLEAR SVC 01520000
  1663. LA R1,CMSOP GET ADDR OF PLIST 01521000
  1664. SVC X'CA' 01522000
  1665. DC AL4(*+4) 01523000
  1666. CLOSEXCP NI DCBOFLGS,255-GOODOPEN SIGNAL: DCB CLOSED @VA13742 01523500
  1667. CLOSED L R1,EGPR1 RESTORE DCB LIST POINTER 01524000
  1668. TM 0(R1),EOL END-OF-LIST OF DCB 01525000
  1669. BO RETURN YES. 01526000
  1670. LA R1,4(,R1) POIYT TO NEXT DCB 01527000
  1671. ST R1,EGPR1 SAVE UP-TO-DATE DCB LIST POINTER 01528000
  1672. B COMCLOSE 01529000
  1673. SETCNT EQU * @VA08024 01530000
  1674. STC R6,FCBDCBCT SAVE NEW DCB COUNT @VA08024 01530500
  1675. B CLOSED FINIS CLOSE 01531000
  1676. EJECT 01532000
  1677. * 01546000
  1678. * ROUTINE VECTORS AND GOODIES 01547000
  1679. * 01548000
  1680. TYPET EQU 227 @VA06253 01549000
  1681. PUT EQU X'40' PUT FLAG FOR DCBMACRF FLAG @VA07538 01549100
  1682. OUTIN EQU 7 @VA06253 01550000
  1683. BACKSPCE DC CL8'BSR' @VA06253 01551000
  1684. FILEDEF DC CL8'FILEDEF' 01552000
  1685. NOCHNG DC CL8'(' 01553000
  1686. DC CL8'NOCHANGE' 01554000
  1687. FENCE DC 8X'FF' 01555000
  1688. VBSAM DC VL3(DMSSBS) 01557000
  1689. VCHECK DC VL3(DMSSCTCK) 01558000
  1690. VGET DC VL3(DMSSQSGT) 01559000
  1691. VNTPT DC VL3(DMSSCTNP) 01560000
  1692. VPUT DC VL3(DMSSQSPT) 01561000
  1693. VUPDATE DC VL3(DMSSQSUP) 01562000
  1694. DEBOUTPT EQU X'0F' TEST FOR OUTPUT ONLY OPTION @VA11273 01562100
  1695. OPNWRITE EQU X'04' TEST FOR WRITE OPERATION @VA07040 01562300
  1696. OPNOUT EQU X'03' TEST FOR OUTPUT OPTIONS @VA07040 01562400
  1697. DISP31 EQU 31 31-BYTE DISPLACEMENT @VA07040 01562500
  1698. ERCOD11 EQU 11 ERROR CODE 11 @VA07040 01562600
  1699. ZERO DC F'0' 01563000
  1700. HALF1 DC F'1' V0307 01564000
  1701. HALFWORD DC F'65535' 01565000
  1702. MAXOS DC H'32760' MAXIMUM OS BLOCKSIZE ALLOWED @VA04751 01566000
  1703. UNITREC DC CL12'PUN PRT RDR ' UNIT RECORD NAMES 01567000
  1704. DEVTYP DC XL8'2848414F81284200' OS DEVICE CODES V0020 01568000
  1705. CA1 DC CL2'A1' DEFAULT FILE MODE @VA02169 01569000
  1706. DCBMRECP EQU X'80' EXCP DCB @VA08866 01569100
  1707. DCBCNT EQU X'71' NO. OF DCBS USING FCB 01570000
  1708. EOL EQU X'80' END-OF-LIST 01571000
  1709. GOODOPEN EQU X'10' SUCCESSFUL OPEN PERFORMED 01572000
  1710. GT EQU X'40' MACRF=GET 01573000
  1711. OPENBUSY EQU X'01' OPEN BUSY BIT 01574000
  1712. OPENLOCK EQU X'02' OPEN LOCK BIT 01575000
  1713. OPLEAVE EQU X'30' OPEN OPTION = LEAVE 01576000
  1714. PT EQU X'40' NACRF+1=PUT 01577000
  1715. FF EQU X'FF' ANY LIBRARIES GLOBABLED @V305066 01578000
  1716. ASTERISK EQU C'*' ASTERISK @V305066 01579000
  1717. BIN0001 EQU B'0001' MASK @V305066 01580000
  1718. BINZERO EQU X'00' ZERO @V305066 01581000
  1719. OSRDERR DC H'80' OS STATE ERROR,CODES 80-89 @V201122 01582000
  1720. ERRMSG1 DC C''' ON '' ''' OPEN ERROR MESSAGE @V201122 01583000
  1721. M4FLAG EQU X'01' FM IN FCB=*, MODE IS 4 @VA09484 01583100
  1722. PRINT GEN 01584000
  1723. LTORG 01585000
  1724. EJECT 01586000
  1725. DCBD DSORG=(PS) 01587000
  1726. EJECT 01588000
  1727. * 01589000
  1728. CMSCB 01590000
  1729. EJECT 01591000
  1730. NUCON 01592000
  1731. EJECT 01593000
  1732. IO 01594000
  1733. OSFST @V201122 01595000
  1734. CMSCVT 01596000
  1735. AFT 01597000
  1736. ADT @VA01052 01598000
  1737. EJECT 01599000
  1738. FVS @VA07824 01599200
  1739. FSTD @VA07824 01599400
  1740. CMSAVE 01600000
  1741. EJECT 01601000
  1742. REGEQU 01602000
  1743. EJECT 01603000
  1744. END 01604000
ibm/vm370-lib/cms/dmssop.assemble_src.txt ยท Last modified: 2023/08/06 13:35 by Site Administrator