Table of Contents

DMSROS Source

References

Source Listing

DMSROS.ASSEMBLE.txt
  1. ROS TITLE 'DMSROS (CMS) VM/370 - RELEASE 6' 00001000
  2. SPACE 2 00002000
  3. *. 00003000
  4. * 00004000
  5. * 00005000
  6. * 00006000
  7. * MODULE NAME: 00007000
  8. * 00008000
  9. * DMSROS 00009000
  10. * 00010000
  11. * FUNCTION: 00011000
  12. * 00012000
  13. * TO ALLOW CMS TO ACCESS, STATE, READ, NOTE, POINT AND 00013000
  14. * BACKSPACE DATA SETS RESIDING ON O/S DISKS. 00014000
  15. * 00015000
  16. * ATTRIBUTES: 00016000
  17. * 00017000
  18. * SERIALLY REUSABLE, CORE RESIDENT ONLY WHEN AN OS DISK 00018000
  19. * IS ACCESSED 00019000
  20. * 00020000
  21. * ENTRY POINTS: 00021000
  22. * 00022000
  23. * DMSROS ROSACC (ACCESS O/S DISKS) 00023000
  24. * DMSROS+4 ROSSTT (STATE O/S DISKS) 00024000
  25. * DMSROS+8 ROSRPS (READ O/S DISKS) 00025000
  26. * DMSROS+12 ROSFIND (FIND MEMBER IN O/S PDS) 00026000
  27. * DMSROS+16 ROSNTPTB (NOTE, POINT AND BSP FUNCTIONS) 00027000
  28. * 00028000
  29. * EXIT CONDITIONS: 00029000
  30. * 00030000
  31. * ACCESS R15= 80 I/O ERROR R15= 0 NO ERROR 00031000
  32. * DMSROS723I FM (CCU) R/O - OS 00032000
  33. * DMSROS725I CCU ALSO = FM - O/S DISK 00033000
  34. * STATE R15= 80 I/O ERROR R15= 81 READ PROTECTED 00034000
  35. * R15= 82 NOT BSAM, BPAM OR QSAM R15= 0 NO ERRORS 00035000
  36. * R15= 83 DOS DATA SET WITH MORE THAN 16 EXTENTS 00036000
  37. * R15= 88 DATA SET NOT FOUND 00037000
  38. * DMSROS227I PROCESSING VOLUME 'NN' IN DATA SET NAME 00038000
  39. * 'DATA SET NAME' 00039000
  40. * DMSROS228I USER LABELS BYPASSED ON DATA SET 00040000
  41. * 'DATA SET NAME' 00041000
  42. * READ R15= 80 I/O ERROR R15= 12 END OF FILE 00042000
  43. * R15= 0 NO ERRORS 00043000
  44. * FIND R15= 8 I/O ERROR R15= 4 MEMBER NOT FOUND 00044000
  45. * R15= 0 MEMBER FOUND 00045000
  46. * NOTE NO ABNORMAL RETURN 00046000
  47. * POINT NO ABNORMAL RETURN 00047000
  48. * BACKSPACE R15= 80 I/O ERROR R15= 0 NO ERRORS 00048000
  49. * 00049000
  50. * EXTERNAL REFERENCES: 00050000
  51. * 00051000
  52. * NUCON, OSFST, ADT, CMSCB 00052000
  53. * 00053000
  54. * CALLS TO OTHER ROUTINES: 00054000
  55. * 00055000
  56. * DMSERR, ADTNXT, DMSFREE, DMSFRET 00056000
  57. * 00057000
  58. * TABLES/WORKAREAS: 00058000
  59. * 00059000
  60. * REGISTER USAGE: 00060000
  61. * 00061000
  62. * R0 NUCON 00062000
  63. * R1 OPSECT 00063000
  64. * R4 FST 00064000
  65. * R5 ADT 00065000
  66. * R7 FCB 00066000
  67. * R11 DMSROS 1ST. BASE 00067000
  68. * R12 DMSROS 2ND. BASE 00068000
  69. * 00069000
  70. * OPERATION: 00070000
  71. * 00071000
  72. * 00072000
  73. * ROSACC: FINALIZE ACCESS OF AN O/S DATA SET 00073000
  74. * 00073500
  75. * ROSACC GETS CONTROL FROM DMSACM ONCE IT IS DETERMINED THAT 00074000
  76. * THE LABEL OF THE DISK BELONGS TO AN O/S - DISK. THE ROSACC 00075000
  77. * ROUTINE WILL READ THE FORMAT 4 DSCB OF THE DISK TO FURTHER 00076000
  78. * VERIFY THE VALIDITY OF THE O/S DISK. THE ADT IS UPDATED TO 00077000
  79. * CONTAIN THE ADDRESS OF THE HIGH EXTENT OF THE VTOC (IF THE 00078000
  80. * DISK IS DOS), OR THE ADDRESS OF THE LAST ACTIVE FORMAT ONE 00079000
  81. * DSCB (IF THE DISK IS O/S), THE NUMBER OF CYLINDERS IN THE 00080000
  82. * DISK, AND IF THE DISK IS A DOS FORMATTED DISK, A FLAG IS 00081000
  83. * SET IN THE ADT. INFORMATION MESSAGES ARE ISSUED TO NOTIFY 00082000
  84. * THE USER THE DISK HAS BEEN ACCESSED IN READ-ONLY MODE, AND 00083000
  85. * IF THE DISK IS ALREADY ACCESSED AS ANOTHER DISK, ANOTHER 00084000
  86. * INFORMATION MESSAGE IS ISSUED TO THAT EFFECT. FINALLY THE 00085000
  87. * ADTFLG1 FLAG IN THE ADT IS ZEROED, THE ADTFLG2 FLAG IS SET 00086000
  88. * TO REFLECT THAT AN O/S DISK HAS BEEN ACCESSED, AND CONTROL 00087000
  89. * RETURNS TO THE CALLER. 00088000
  90. * 00089000
  91. * 00090000
  92. * ROSSTT: VERIFY EXISTENCE OF AN O/S OR DOS DATA SET AND TO 00091500
  93. * VERIFY THAT THE ATTRIBUTES OF THE DATA SET ARE 00092000
  94. * SUPPORETED UNDER CMS. 00092500
  95. * 00093000
  96. * ROSSTT GETS CONTROL FROM DMSSTT ONCE IT IS DETERMINED THAT 00093500
  97. * THE STATE OPERATION IS TO AN O/S OR DOS FORMATTED DISK. 00094000
  98. * THE ROSSTT ROUTINE WILL SEARCH FOR A MATCHING CMSCB OR DOSCB 00094500
  99. * ASSOCIATED TO THE DATA SET VIA A PREVIOUS FILEDEF OR DLBL. 00095000
  100. * THEN ROSSTT TRIES TO FIND IF THERE IS AN ACTIVE OSFST ASSO- 00095500
  101. * CIATED WITH THE DATA SET. IF AN ACTIVE ONE IS FOUND, CONTROL 00096000
  102. * THEN PASSES TO ROSSTRET, OTHERWISE THE DSNAME BLOCK IS BUILT, 00096500
  103. * ITS ADDRESS IS PLACED IN THE CMSCB OR DOSCB, AS MAY BE, AND 00097000
  104. * THE DATA SET NAME IS MOVED TO THE ACQURED BLOCK. THEN AN 00097500
  105. * OSFST BLOCK IS ACQUIRED AND IS CHAINED TO THE OSFST CHAIN. 00098000
  106. * THE ADDRESS OF THE OSFST BLOCK IS THEN PLACED IN THE CMSCB 00098500
  107. * OR DOSCB AS MAY BE THE CASE. SOME FIELDS IN THE OSFST ARE 00099000
  108. * INITIALIZED (DATA SET NAME, DISK ADDRESS, AND DISK MODE). 00099500
  109. * NOW, THE FORMAT 1 DSCB FOR THE DATA SET IS READ AND A CHECK 00100000
  110. * IS MADE FOR UNSUPPORTED OPTIONS ( READ PROTECT, BDAM, AND 00100500
  111. * ISAM ). ERRORS CAUSE CONTROL TO BE PASSED TO THE CALLING 00101000
  112. * ROUTINE WITH AN ERROR CODE. ALL EXTENTS OF THE DATA SET ARE 00101500
  113. * GROUPED TOGETHER (BY READING THE FORMAT 3 DSCB IF NECESSARY) 00102000
  114. * AND ARE CHECKED FOR VALIDITY. IF ANY USER LABELS EXITS, THEY 00102500
  115. * ARE BYPASSED AND A MESSAGE IS ISSUED TO THAT EFFECT. 00103000
  116. * NEXT, IF THE CMS/DOS ENVIRONMENT IS NOT ACTIVE, THE FORMAT 1 00103500
  117. * LABEL FIELDS BLKSIZE, LRECL AND RECFM ARE MOVED TO THE OSFST 00104000
  118. * AND CONTROL PASSES TO ROSSTRET. 00104500
  119. * 00105000
  120. * ROSSTRET: IF THE DISK IS NOT A DOS 00113000
  121. * DISK CONTROL IS PASSED BACK TO THE CALLER. IF THE SPECIFIED 00114000
  122. * DISK IS A DOS DISK, OS FST BLKSIZE, LRECL AND RECFM 00115000
  123. * FIELDS THAT WERE NOT SPECIFIED IN THE DSCB1 ARE FILLED IN 00116000
  124. * FROM THE CMSCB OR, IF THE CMSCB FIELDS ARE ZERO, THEY 00117000
  125. * ARE DEFAULTED TO BLKSIZE= 32760, LRECL= 32760 AND RECFM= U. 00118000
  126. * CONTROL IS THEN RETURNED TO THE CALLER. 00119000
  127. * 00120000
  128. * ROSRPS: READ NEXT RECORD OF OS DATA SET 00121000
  129. * 00121500
  130. * UPON ENTRY TO THE ROSRPS ENTRY POINT, THE READ ROUTINE 00122000
  131. * CALLS CHKXTNT AND, IF THE CURRENT CCHHR IS XERO, SETXTNT 00123000
  132. * TO INSURE THE CCHHR AND EXTENT BOUNDARIES ARE SET CORRECT. 00124000
  133. * IT THEN CALLS DISKIO AND IF NECESSARY CHKSENSE AND 00125000
  134. * GETALT TO READ THE NEXT RECORD. IF THERE ARE NO ERRORS 00126000
  135. * OR IF AN UNRECOVERABLE ERROR WAS ENCOUNTERED, CONTROL 00127000
  136. * IS RETURNED TO THE USER WITH EITHER A ZERO (I/O OK) 00128000
  137. * OR AN EIGHTY (I/O ERROR) IN REG15. IF A RECOVERABLE 00129000
  138. * ERROR IS ENCOUNTERED, THE CCW'S AND BUFFER POINTERS 00130000
  139. * ARE UPDATED AS NECESSARY AND CHKXTNT AND DISKIO 00131000
  140. * ARE RECALLED TO READ THE NEXT RECORD. 00132000
  141. * 00133000
  142. * 00134000
  143. * ROSFIND: SET CCHHR TO POINT TO MEMBER SPECIFIED IN 00135000
  144. * FCBMEMBR OR, IF FCBMVPDS BIT IS ON, SET CCHHR 00136000
  145. * TO POINT TO NEXT MEMBER HIGHER THAN FCBMEMBR 00137000
  146. * AND SET NEW MEMBER NAME IN FCBMEMBR. 00138000
  147. * 00138500
  148. * UPON ENTRY, ROSFND SETS UP A CCW TO SEARCH FOR A HIGHER 00139000
  149. * MEMBER NAME IF THE FCBMVPDS BIT IS ON OR AN EQUAL 00140000
  150. * MEMBER NAME IF THE FCBMVPDS BIT IS NOT ON. IT 00141000
  151. * THEN CALLS SETXTNT, DISKIO AND IF NEEDED CHKSENSE, 00142000
  152. * AND GETALT TO READ IN THE DIRECTORY BLOCK THAT CONTAINS 00143000
  153. * THE MEMBER NAME REQUESTED. AFTER THE BLOCK HAS BEEN 00144000
  154. * READ, IT IS SEARCHED FOR THE REQUESTED MEMBER NAME. 00145000
  155. * IF THE MEMBER NAME IS NOT FOUND, AN ERROR CODE 4 IS 00146000
  156. * PASSED BACK TO THE CALLER. IF AN I/O ERROR IS EN- 00147000
  157. * COUNTERED TRYING TO READ THE PDS BLOCK, AN ERROR 00148000
  158. * CODE 8 IS PASSED BACK TO THE CALLER. IF THE MEMBER 00149000
  159. * NAME IS FOUND, TTRCNVRT IS CALLED TO CONVERT THE 00150000
  160. * RELATIVE TRAK ADDRESS TO A CCHH AND THE ADDRESS OF THE 00151000
  161. * MEMBER ENTRY IS PASSED BACK TO THE CALLER. 00152000
  162. * 00153000
  163. * 00154000
  164. * ROSNTPTB: GET CURRENT TTR, SET CURRENT CCHHR TO TTR, 00155000
  165. * BACKSPACE TO PREVIOUS RECORD 00156000
  166. * 00156500
  167. * UPON ENTRY TO ROSNTPTB, A CHECK IS MADE TO 00157000
  168. * SEE IF A NOTE, POINT OR BSP FUNCTION HAS BEEN 00158000
  169. * REQUESTED. IF REG 0 IS ZERO, A NOTE IS ASSUMED. 00159000
  170. * THE NOTE ROUTINE CALLS CHRCNVRT TO CONVERT THE CCHH 00160000
  171. * TO A RELATIVE TRACK AND RETURNS CONTROL TO THE 00161000
  172. * CALLER WITH THE TTR IN REG 0. IF REG 0 WAS 00162000
  173. * POSITIVE ON ENTRY TO DMSROS, A POINT IS ASSUMED 00163000
  174. * AND A TTR IS LOADED FROM THE ADDRESS SPECIFIED IN 00164000
  175. * R0 AND TTRCNVRT AND SETXTNT ARE CALLED TO CONVERT 00165000
  176. * THE TTR TO A CCHHR AND CONTROL IS RETURNED TO THE 00166000
  177. * CALLER. IF REG 0 WAS NEGATIVE ON ENTRY TO DMSROS, A 00167000
  178. * BSP (BACKSPACE) IS ASSUMED. THE BACKSPACE CODE CHECKS 00168000
  179. * IF THE CURRENT POSITION IS THE BEGINNING OF A TRACK. 00169000
  180. * IF NOT, THE RECORD NUMBER IS DECREMENTED BY ONE AND 00170000
  181. * CONTROL IS RETURNED TO THE CALLER. IF THE CURRENT 00171000
  182. * POSITION IS THE BEGINNING OF A TRACK, CHRCNVRT IS 00172000
  183. * CALLED TO GET THE CURRENT RELATIVE TRACK, THE RELATIVE 00173000
  184. * TRACK IS DECREMENTED BY ONE AND TTRCNVRT IS CALLED 00174000
  185. * TO GET THE CURRENT CCHH. RDCNT IS THEN CALLED TO 00175000
  186. * GET THE CURRENT RECORD NUMBER OF THE LAST RECORD ON 00176000
  187. * THE NEW TRACK, SETXTNT IS CALLED TO SET THE NEW EXTENT 00177000
  188. * BOUNDARIES AND CONTROL IS RETURNED TO THE CALLER. 00178000
  189. * 00179000
  190. * 00180000
  191. * ROUTINES COMMON TO ALL OF DMSROS: 00181000
  192. * 00182000
  193. * CHRCNVRT: CONVERTS A CCHH ADDRESS TO A RELATIVE TRACK 00183000
  194. * ADDRESS. 00184000
  195. * TTRCNVRT: CONVERTS A RELATIVE TRACK ADDRESS TO AN 00185000
  196. * ACTUAL ADDRESS (CCHHR). 00186000
  197. * 00187000
  198. * CHKSENSE: IF A UNIT CHECK IS ENCOUNTERED, CHECKS 00188000
  199. * SENSE BITS TO DETERMINE IF THE ERROR IS 00189000
  200. * RECOVERABLE. 00190000
  201. * 00191000
  202. * CHKXTNT: CHECKS TO SEE IF END OF SPLIT CYL OR END OF 00192000
  203. * ENTENT HAS BEEN REACHED AND IF SO UPDATES TO 00193000
  204. * THE NEXT SPLIT CYL OR EXTENT. 00194000
  205. * 00195000
  206. * DISKIO: STARTS I/O ON CCW STRING VIA A DIAGNOSE X'20' 00196000
  207. * 00197000
  208. * GETALT: SWITCHES FROM ALTERNATE TRACK TO PRIME TRACK 00198000
  209. * AND FROM PRIME TRACK TO ALTERNATE TRACK. 00199000
  210. * 00200000
  211. * RDCNT: READS COUNT FIELDS ON TRACK TO DETERMINE 00201000
  212. * LAST RECORD NUMBER ON TRACK. 00202000
  213. * 00203000
  214. * SETXTNT: SET OSFSTEND TO END OF EXTENT AND, IF A NEW 00204000
  215. * EXTENT IS SPECIFIED, SETS CCHHR TO THE START 00205000
  216. * OF THE EXTENT. 00206000
  217. * 00207000
  218. * 00208000
  219. *. 00209000
  220. PRINT NOGEN 00210000
  221. DMSROS CSECT @V201122 00211000
  222. SPACE 1 00212000
  223. USING NUCON,R0 @V201122 00213000
  224. USING DMSROS,R11,R12 @V201122 00214000
  225. USING DMSROS,R15 TEMP BASE REG @V201122 00215000
  226. B ROSACC ACCESS O/S DISK @V201122 00216000
  227. B ROSSTT STATE O/S DISK @V201122 00217000
  228. B ROSRPS READ O/S DISK SEQUENTIALLY @V201122 00218000
  229. B ROSFIND FIND MEMBER IN OS PDS @V201122 00219000
  230. B ROSNTPTB GO TO NOTE BSP OR POINT ROUTINE @V201122 00220000
  231. *************************************************************** 00221000
  232. * 00222000
  233. * READ VTOC'S FORMAT 4 DSCB TO COMPLETE ACCESS OF O/S DI 00223000
  234. * 00224000
  235. *************************************************************** 00225000
  236. ROSACC STM R0,R14,SAVEREGS SAVE ALL REGISTERS @V201101 00226000
  237. LR R5,R11 SET UP ADT BASE @V201101 00227000
  238. LM R11,R12,BASE SET UP ADDRESSABILITY @V201101 00228000
  239. DROP R15 @V201101 00229000
  240. USING ADTSECT,R5 @V201101 00230000
  241. * 00231000
  242. L R1,ADTDTA GET DEVICE ADDR. POINTER @V201101 00232000
  243. L R1,DTAD(,R1) GET DEVICE ADDRESS @V201101 00233000
  244. ST R1,OSADTDSK SAVE DISK ADDRESS IN OSADT @V201101 00234000
  245. SRL R1,16 CUU TO BOTTOM OF REG1 @V201101 00235000
  246. * 00236000
  247. MVC CCHHR(5),OSADTVTA GET VTOC ADDRESS @V201101 00237000
  248. MVC SEEK+2(4),CCHHR SET SEEK ADDRESS @V201101 00238000
  249. LA R0,RDDSCB4 GET CHANNEL PROG. @V201101 00239000
  250. BAL R14,ACCESSIO READ FORMAT 4 DSCB @V201101 00240000
  251. B ERR80 I/O ERROR EXIT @V201101 00241000
  252. B ERR80 ILI OR SOMETHING WORSE @V201101 00242000
  253. * 00243000
  254. MVC OSADTVTB(5),DS4VTOCE+6 VTOC END EXTENT @VA05420 00243160
  255. LA R8,RWL POINT TO READ/WRITE LIST @V305101 00243200
  256. LA R9,OSL AND ASSUME O/S DISK @V305101 00243300
  257. TM DS4VTOCI,DOSDASD+DS4VTOCX INDEXED VTOC ? @VA13649 00243500
  258. BO GETCYLS YES, OS DISK @VA13649 00243700
  259. TM DS4VTOCI,X'80' IS IT DOS FORMATTED DISK ? @V201101 00244000
  260. BZ GETCYLS NO, IT IS O/S DISK @V305101 00245100
  261. OI ADTFLG2,ADTFDOS SET DOS FLAG IN ADT @V201101 00246000
  262. LA R9,DOSL POINT TO DOS DISK SUB. LIST @V305101 00246100
  263. GETCYLS LH R1,DS4DEVSZ GET NO. CYLS IN DISK @V201101 00250000
  264. ST R1,ADTCYL SAVE IN ADT FOR LATER USE @V201101 00251000
  265. OI ADTFLG2,ADTFROS SET 2ND. FLAG TO INDICATE O/S@V201101 00253000
  266. TM ADTFLG3,ADTFORCE USER WANTS DISK R/O ? @VM03092 00254100
  267. BO MSG723 YES, LEAVE AS R/O THEN @V305101 00254200
  268. CLM R7,B'0001',MRW IS DISK LINKED R/O ? @V305101 00254300
  269. BNL MSG723 YES, LEAVE ADT ALONE @V305101 00254400
  270. LA R8,1(,R8) ADJUST TO WRITE SUB. LIST @V305101 00254500
  271. OI ADTFLG3,ADTFRWOS SIGNAL DOS/OS DISK R/W @V305101 00254600
  272. EJECT 00254700
  273. MSG723 NI ADTFLG1,ALL CLEAR FIRST FLAG BYTE @V305101 00254800
  274. DMSERR TEXT='.. (...) R/.. - ...',LET=I,NUM=723,CSECT=ACC, *00254900
  275. SUB=(CHARA,(ADTM,1),HEXA,OSADTDSK-2,CHARA,((R8),1), *00255000
  276. CHARA,(R9)),RENT=NO,DOT=NO @V305101 00255100
  277. EJECT 1 00258000
  278. SR R1,R1 ... @V201101 00259000
  279. LH R3,OSADTDSK SAVE DEVICE ADDR @V201101 00260000
  280. DROP R5 @V201101 00261000
  281. USING ADTSECT,R1 @V201101 00262000
  282. * 00263000
  283. ACCALSO L R15,VCADTNXT GET ADTNXT ADDRESS @VM03093 00264100
  284. BALR R14,R15 GET NEXT ADT IN CHAIN @V201101 00265000
  285. BNZ ACCRET NO MORE..RETURN @V201101 00266000
  286. CR R1,R5 SAME ADT AS BEFORE @V201101 00267000
  287. BE ACCALSO GET NEXT ONE THEN.. @V201101 00268000
  288. * 00269000
  289. CLC OSADTVTA(5),CCHHR SAME VOLUME ? @V201101 00270000
  290. BNE ACCALSO NO..KEEP LOOKING @V201101 00271000
  291. CH R3,OSADTDSK SAME DEVICE ADDRESS ? @V201101 00272000
  292. BNE ACCALSO NO..KEEP LOOKING @V201101 00273000
  293. LR R14,R1 SAVE REG. 1 @V201101 00274000
  294. LA R2,ADTM GET FILEMODE ADDRESS @V201101 00275000
  295. DMSERR TEXT='... ALSO = .. - ... DISK',LET=I,NUM=725,RENT=NO, *00276100
  296. SUB=(HEX,(R3),CHARA,((R2),1),CHARA,(R9)), @V305101*00276200
  297. CSECT=ACC,DOT=NO @V305101 00276300
  298. LR R1,R14 RESTORE REG. 1 @V201101 00278000
  299. B ACCALSO GET NEXT ADT IN CHAIN @V201101 00279000
  300. * 00280000
  301. ACCRET LM R0,R14,SAVEREGS RESTORE ALL REGS. @V201101 00281000
  302. SR R15,R15 ZERO RETURN CODE @V201101 00282000
  303. BR R14 RETURN TO CALLER @V201101 00283000
  304. DROP R1 @V201101 00284000
  305. USING ADTSECT,R5 @V201101 00285000
  306. * 00286000
  307. SPACE 2 00286100
  308. MRW DC X'80' READ/WRITE INDICATOR @V305101 00286200
  309. RWL DC CL2'OW' READ/WRITE MESSAGE SUBS. @V305101 00286300
  310. OSL DC CL3'OS' O/S DISK MESSAGE SUBS. @V305101 00286400
  311. DOSL DC CL3'DOS' DOS DISK MESSAGE SUBS. @V305101 00286500
  312. ALL EQU 0 CONSTANT @V305101 00286510
  313. EJECT 1 00287000
  314. *************************************************************** 00288000
  315. * 00289000
  316. * READ AND VERIFY FORMAT 1 DSCB FOR DATA SET 00290000
  317. * 00291000
  318. *************************************************************** 00292000
  319. USING DMSROS,R15 @V201122 00293000
  320. ROSSTT STM R0,R14,SAVEREGS SAVE REGS @V201122 00294000
  321. LM R11,R12,BASE SETUP BASE REGS @V201122 00295000
  322. DROP R15 @V201122 00296000
  323. XC INTREG14(4),INTREG14 CLEAR ERROR RETURN REG @V201122 00297000
  324. NI ROSFLAG,255-DYNAMIC CLEAR DYNAMIC FLAG @VA09241 00297500
  325. L R5,SAVEREGS+R11*4 SET ADT PTR FROM DMSLFS @V201122 00298000
  326. LR R1,R2 POINT TO STATE PLIST @V201122 00299000
  327. USING OPSECT,R1 @V201122 00300000
  328. USING OSFST,R4 @V201122 00301000
  329. LA R7,FCBFIRST LOOK FOR MATCHING FCB @V201105 00302000
  330. USING FCBSECT,R7 @V201105 00303000
  331. SR R4,R4 CLEAR OSFST REG @VM28889 00303100
  332. TM DOSFLAGS,DOSSVC CMS/DOS ACTIVE FOR SVC ? @V305001 00303200
  333. BZ OSLKP NO, USE CMSCB THEN... @V305001 00303300
  334. LA R7,DOSFIRST IF ACTIVE, USE DOSCB FOR SEARCH @V305001 00303400
  335. OSLKP CLC FCBNEXT+1(3),ZEROES ANY MORE FCB'S @V201105 00304000
  336. BNE SRCHON NO, CHECK NEXT FCB @VM28889 00305100
  337. LTR R4,R4 WAS AN FCB FOUND @VM28889 00305200
  338. BZ FCBNTFND NO, GIVE ERROR MSG @VM28889 00305300
  339. B ROSSTRT2 YES, THROUGH WITH STATE @VM28889 00305400
  340. SRCHON ICM R7,B'0111',FCBNEXT+1 GET PTR TO NEXT FCB @VM28889 00305500
  341. CLC FCBDSNAM(16),FILENAME FCB FN FT MATCH STATE P@V201105 00307000
  342. BNE OSLKP NO, LOOK FOR ANOTHER FCB @V201105 00308000
  343. CLI FCBDSMD,C'*' FCB FOR ALL MODES @V201105 00309000
  344. BE FCBFND YES, USE IT @V201105 00310000
  345. CLC FCBDSMD(1),ADTM FCB AND ADT MODES MATCH @V201105 00311000
  346. BE FCBFND LIKEWISE OK @V201105 00312000
  347. CLC FCBDSMD(1),ADTM+1 FCB AND ADT XTENTION MATCH@V201105 00313000
  348. BNE OSLKP NO, LAST CHANCE @V201105 00314000
  349. FCBFND ST R7,FCBSAVE SAVE FCB ADDRESS @V201122 00315000
  350. L R4,FCBOSFST GET OS FST POINTER @V201105 00316000
  351. LTR R4,R4 IS IT THERE @V201105 00317000
  352. BZ DSKSRCH NO, MUST SEARCH VTOC @V201105 00318000
  353. CLC OSFSTFM(1),ADTM FST AND ADT MODES MATCH @V201105 00319000
  354. BE OSFSTFND YES, DATA SET FOUND @V201105 00320000
  355. CLC OSFSTFM(1),ADTM+1 FST AND ADT XTENTION MATCH@V201105 00321000
  356. BE OSFSTFND YES, DATA SET FOUND @V201105 00322000
  357. XC FCBOSFST(4),FCBOSFST FCB HAS WRONG OS FST, TRY T@V201105 00323000
  358. DSKSRCH CLC FCBOSDSN+1(3),ZEROES DOES OS DSN BLOCK EXIST@V201105 00324000
  359. BNE FCBSET YES, SKIP DSNAME BUILD @V201105 00325000
  360. DMSFREE DWORDS=6,TYPCALL=BALR,TYPE=USER GET DSNAME BLO@V201105 00326000
  361. ST R1,FCBOSDSN POINT FCB TO IT @V201105 00327000
  362. OI ROSFLAG,DYNAMIC DSN BLOCK CREATED @VA09241 00327500
  363. MVI 0(R1),X'40' BLANCK DSNAME BLOCK @V201105 00328000
  364. MVC 1(43,R1),0(R1) @V201105 00329000
  365. MVC 0(8,R1),FCBDSNAM BUILD OS DSN FROM FN FT @V201105 00330000
  366. OSNAMLP CLI 0(R1),X'40' BLANK ? @V201105 00331000
  367. BE PERIOD YES, TIME FOR PERIOD @V201105 00332000
  368. LA R1,1(0,R1) NEXT CHAR. @V201105 00333000
  369. B OSNAMLP @V201105 00334000
  370. PERIOD MVI 0(R1),C'.' INDICATE END OF 1ST QUALIFIER @V201105 00335000
  371. MVC 1(8,R1),FCBDSTYP USE FTYPE AS 2ND QUALIFIER @V201105 00336000
  372. FCBSET EQU * @VA08048 00336100
  373. BLDOSFST DMSFREE DWORDS=OSFSTLTH,TYPE=NUCLEUS,TYPCALL=BALR @V201122 00345000
  374. LA R4,ROSSTERR GET ADDRESS OF ROSST ERROR ROUTIN@V201122 00346000
  375. ST R4,INTREG14 SET ERROR RETURN ADDRESS @V201122 00347000
  376. LR R4,R1 SETUP NEW FST ADDRESS @V201122 00348000
  377. XC 0(256,R4),0(R4) CLEAR 1ST PART OF FST BLOCK @V201122 00349000
  378. XC 256(OSFSTLTH*8-256,R4),256(R4) CLEAR REST OF OSF@V201122 00350000
  379. MVC OSFSTNXT(4),OSADTFST CHAIN NEW FST TO CHAIN @V201122 00351000
  380. ST R4,OSADTFST RESTORE CHAIN @V201122 00352000
  381. L R3,FCBOSDSN POINT TO FCB DSNAME BLOCK @V201105 00353000
  382. MVC OSFSTDSN(44),0(R3) MOVE DSNAME TO OS FST @V201105 00354000
  383. MVC OSFSTMEM,FCBMEMBR MOVE MEMBER NAMES TO OSFST @VA05385 00354100
  384. MVC OSFSTDSK(4),OSADTDSK MOVE DISK CUU AND TYPE @V201105 00355000
  385. MVC OSFSTFM(1),ADTM SET DISK MODE IN OSFST @V201105 00356000
  386. MVC OSFSTFM+1(1),FCBDSMD+1 SET MODE NUMBER IN OSFS@V201105 00357000
  387. MVC CCHHR(5),OSADTVTA SET SEEK TO VTOC START @V201105 00358000
  388. LA R0,OSFSTDSN GET DSNAME ADDRESS @V201105 00359000
  389. STCM R0,B'0111',ADDSNAME+1 SET DSNAME ADDR IN CCW @V201105 00360000
  390. MVI OSFSTTRK+3,X'14' ASSUME 20 TRKS PER CYL @V201122 00361000
  391. CLI OSFSTTYP+1,X'08' IS THIS 2314? @V201122 00362000
  392. BE GOTDSN YES, CONTINUE @V201122 00363000
  393. MVI OSFSTTRK+3,X'13' NO, 3330 19 TRKS PER CYL @V201122 00364000
  394. CLI OSFSTTYP+1,X'09' IS THIS A 3330 ? @V2A2014 00364100
  395. BE GOTDSN YES....BR @V2A2014 00364200
  396. MVI OSFSTTRK+3,X'1E' 3350 30 TRACKS PER CYLINDER @V304498 00364240
  397. CLI OSFSTTYP+1,TYP3350 IS THIS A 3350 ? @V304498 00364250
  398. BE GOTDSN YES, READ FORMAT 1 DSCB @V304498 00364260
  399. MVI OSFSTTRK+3,X'0F' 3380 15 TRACKS PER CYLINDER HRC004DS 00364270
  400. CLI OSFSTTYP+1,X'0E' IS THIS A 3380 ? HRC004DS 00364280
  401. BE GOTDSN YES, READ FORMAT 1 DSCB HRC004DS 00364290
  402. MVI OSFSTTRK+3,X'0C' NO, 3340 12 TRKS PER CYL @V2A2014 00364300
  403. GOTDSN LA R0,RDDSCB1 CHAN PROG TO READ FORMAT 1 DSCB @V201105 00365000
  404. BAL R14,DISKIO GO GET EXTENTS OF THE DATA SET @V201105 00366000
  405. B DSCB1UC UNIT CHECK DURING I/O @V201105 00367000
  406. B CHKSLI CHECK FOR WRONG LENGTH @V201105 00368000
  407. B GOTDSCB1 DATA SET EXISTS @V201105 00369000
  408. DSCB1UC BAL R14,CHKSENSE GO CHECK SENSE DATA @V201105 00370000
  409. TM SNSEBYTE,X'09' NO REC FND, OVERFLOW INC NOT@V201105 00371000
  410. BNZ ERR80 BUT ONE OR BOTH WAS PRESENT @V201105 00372000
  411. TM SNSEBYTE,X'20' WAS IT CYLINDER END @V201105 00373000
  412. BZ DSCB1TRK NO, ASSUME TRACK CONDITION FOR NO@V201105 00374000
  413. LA R8,ZEROES NEGATE INCRCYL TEST FOR SPLIT CYL@V201105 00375000
  414. BAL R14,INCRCYL GO INCREMENT CYLINDER ADDRESS @V201105 00376000
  415. CHKXTNT1 CLC CCHHR(4),OSADTVTB MUST NOT BE HIGHER THAN LAST @VA05574 00377100
  416. BL GOTDSN GOOD, GO TRY NEXT CYLINDER @V201105 00378000
  417. B DSNOTFND TOO HIGH, HAVE SCANNED WHOLE VTOC@V201105 00379000
  418. CHKSLI CH R15,=H'3' WRONG LENGTH ERROR @V201105 00380000
  419. BE DSNOTFND YES, OFF END OF VTOC - NO DATA SE@V201105 00381000
  420. B ERR80 RETURN @V201105 00382000
  421. DSCB1TRK BAL R14,GETALT ASSUME TRACK BAD, GET ALTERNATE @V201105 00383000
  422. B GOTDSN SWITCHING TO ALTERNATE, CONTINUE @V201105 00384000
  423. B CHKXTNT1 BACK TO NEXT PRIME TRACK, GO CHEC@V201105 00385000
  424. GOTDSCB1 CLC NEXTSEEK(4),OSADTVTB WAS RECORD FOUND WITHIN LIM@VA05781 00386000
  425. BH DSNOTFND NO, ERROR @V201105 00387000
  426. CLI DS1FMTID,C'1' IS DSCB1 ID PRESENT @V201105 00388000
  427. BE CHKMULTI YES, CONTINUE @V201105 00389000
  428. B ERR80 RETURN @V201105 00390000
  429. SPACE 2 00391000
  430. *************************************************************** 00392000
  431. * 00393000
  432. * VERIFY ALLOWABLE ATTRIBUTES OF THE DATA SET 00394000
  433. * 00395000
  434. *************************************************************** 00396000
  435. CHKMULTI CLC DS1VOLSQ(2),=H'1' IS VOL SEQUENCE ONE @V201105 00397000
  436. BE CHK4LAST YES, GO COUNT VOLUMES @V201105 00398000
  437. MULTIVOL OI OSFSTFLG,OSFSTMVL INDICATE MUTIPLE VOL. DATA S@V201105 00399000
  438. SR R9,R9 CLEAR R9 @V201105 00400000
  439. IC R9,DS1VOLSQ+1 GET VOL. SEQ. NO. @V201105 00401000
  440. L R2,FCBOSDSN POINT TO DSN @V201105 00402000
  441. DMSERR TEXT='PROCESSING VOLUME ''..'' IN DATA SET ''..........X00403000
  442. ..................................''',CSECT=STT, X00404000
  443. NUM=227,LET=I,SUB=(HEX,(R9),CHARA,(R2)),RENT=NO @V201105 00405000
  444. B CHKPASS CONTINUE @V201105 00406000
  445. CHK4LAST TM DS1DSIND,X'80' IS THIS THE LAST (ONLY) VOLUME @V201105 00407000
  446. BZ MULTIVOL NO, CANNOT STAND IT ANY LONGER @V201105 00408000
  447. CHKPASS TM DS1DSIND,X'14' CHECK PASSWORD INDICATORS @V201105 00409000
  448. BNM CHK4ISBD BOTH ON OR OFF IS OK @V201105 00410000
  449. LA R15,81 READ, WRITE PROTECTED @V201105 00411000
  450. B ERRRET ALL DONE @V201105 00412000
  451. CHK4ISBD TM DS1DSORG,PS+PO SEQUENTIAL OR PARTITIONED @V201105 00413000
  452. BM CHKMOVBL OKAY IF EITHER @V201105 00414000
  453. CLC FCBPROC(4),=CL4'DLBL' IS THIS A DOSCB ? @V305001 00414100
  454. BE CHKMOVBL YES, IGNORE DSORG @V305001 00414200
  455. ERR82 EQU * @VA11533 00414300
  456. BADORG LA R15,82 ISAM, BDAM ERROR CODE @V201105 00415000
  457. B ERRRET @V201105 00416000
  458. CHKMOVBL TM DS1DSORG,X'01' IS DATA SET UNMOVEABLE @V201105 00417000
  459. BZ MOVABLE NO, CONTINUE @V201105 00418000
  460. OI OSFSTFLG,OSFSTUMV INDICATE UNMOVEABLE IN FST @V201105 00419000
  461. MOVABLE TM ADTFLG2,ADTFDOS DOS FORMATTED DISK ? @V201105 00420000
  462. BO GETEXTNT YES, BYPASS RECFM CHECK @V201105 00421000
  463. TM DS1RECFM,UND TEST FOR RECFM F OR V @V201105 00422000
  464. BZ ERR82 ERROR IF NOT RECFM F, V OR UND @VA11533 00423000
  465. SPACE 2 00424000
  466. *************************************************************** 00425000
  467. * 00426000
  468. * GET ALL EXTENTS TOGETHER BY READING FORMAT 3 DSCB IF 00427000
  469. * NECESSARY 00428000
  470. * 00429000
  471. *************************************************************** 00430000
  472. GETEXTNT SR R9,R9 CLEAR @V201105 00431000
  473. IC R9,DS1NOEPV GET NUMBER OF EXTENTS ON PACK @V201105 00432000
  474. LTR R9,R9 TEST FOR VALID NUMBER @V201105 00433000
  475. BNP ERR83 INVALID EXTENTS - ERROR RC83 @VA11533 00434000
  476. STC R9,OSFSTXNO SET NO. EXTENTS IN FST @V201105 00435000
  477. CLC DS1NOEPV(1),THREE HOW MANY DATA EXTENTS? @VA06195 00435300
  478. BL GOTDSCB3 LESS THAN 3 @VA06195 00435600
  479. BH GETADR3 MORE THAN 3 @VA06195 00435900
  480. CLI DS1EXT1,USERLBL IF 3 PLUS USER LABEL, GET @VA06195 00436200
  481. * FORMAT 3 DSCB FOR LAST EXTENT 00436500
  482. BNE GOTDSCB3 NO FORMAT 3 DSCB NEEDED @VA06195 00436800
  483. GETADR3 EQU * @VA06195 00437100
  484. MVC CCHHR(5),DS1PTRDS ADDR OF FORMAT 3 DSCB @V201105 00438000
  485. NI OSFSTFLG,255-OSFSTALT ALT TRK SW OFF @V201105 00439000
  486. CLI DS1NOEPV,16 MORE THAN 16 EXTENTS? @V201122 00440000
  487. BNH GETDSCB3 NO, CONTINUE @V201122 00441000
  488. ERR83 EQU * @VA11533 00442000
  489. LA R15,83 INDICATE DOS DISK WITH < 16 EXTEN@V201122 00444000
  490. B ERRRET RETURN WITH ERROR CODE @V201122 00445000
  491. GETDSCB3 LA R0,RDDSCB3 CHAN PROG TO READ FORMAT 3 DSCB @V201105 00446000
  492. LA R14,OSFSTEX4 PLUG CCW TO READ XTRA EXTENTS @V201105 00447000
  493. STCM R14,B'0111',XTENTS+1 @V201105 00448000
  494. BAL R14,DISKIO GO GET MORE EXTENTS FROM VTOC @V201105 00449000
  495. B DSCB3UC UNIT CHECK ON I/O, GO CHECK IT OU@V201105 00450000
  496. B ERR80 IL OR UE IS ERROR @V201105 00451000
  497. CLI OSFSTEX4+44,C'3' VALID FORMAT 3 @V201105 00452000
  498. BE DSCB3OK YES, SO FAR ANYWAY @V201105 00453000
  499. B ERR80 INVALID FORMAT 3 - ERROR RC80 @VA11533 00454000
  500. DSCB3UC BAL R14,CHKSENSE GO CHECK FOR BAD SENSE BITS @V201105 00455000
  501. DSCB3TRK TM SNSEBYTE,X'29' ANY BUT TRACK COND IS A NO-NO @V201105 00456000
  502. BNZ ERR80 RETURN @V201105 00457000
  503. BAL R14,GETALT GO SWITCH TO ALTERNATE TRACK @V201105 00458000
  504. B GETDSCB3 HAVE SWITCHED SATISFACTORILY @V201105 00459000
  505. B ERR80 THIS INSTRUCTION SHOULD NEVER BE @V201105 00460000
  506. DSCB3OK MVC OSFSTEX4(40),OSFSTEX4+4 @V201105 00461000
  507. MVC OSFSTEX4+40(90),OSFSTEX4+45 NEXT 13 XTENTS @V201105 00462000
  508. SPACE 2 00463000
  509. *************************************************************** 00464000
  510. * 00465000
  511. * CHECK VALIDITY OF FIRST EXTENT 00466000
  512. * 00467000
  513. *************************************************************** 00468000
  514. GOTDSCB3 MVC OSFSTXTN(30),DS1EXT1 ADD 1ST 3 XTENTS TO LI@V201105 00469000
  515. LA R8,OSFSTXTN POINT TO THEM @V201105 00470000
  516. CLI 0(R8),0 IS EXTENT VALID @V201105 00471000
  517. BE ERR80 NO, ERROR @V201105 00472000
  518. CLI 0(R8),X'40' TEST FOR USER LABELS IN DATA SET @V201105 00473000
  519. BH BLKSZ NO, OK IF 80 OR 81 @V201105 00474000
  520. BL XTNTOK2 CONTINUE @V201105 00475000
  521. MVC OSFSTXTN(159),OSFSTXTN+10 COMPRESS OUT LABEL @V201105 00476000
  522. L R14,FCBOSDSN POINT TO DSN @V201105 00477000
  523. DMSERR TEXT='USER LABELS BYPASSED ON DATA SET ''..............X00478000
  524. ..............................''',CSECT=STT, @V201105X00479000
  525. NUM=228,LET=I,SUB=(CHARA,(R14)) @V201105 00480000
  526. CLI DS1NOEPV,16 SIXTEEN EXTENTS ? @V2A3801 00481100
  527. BL BLKSZ NO, CHECK BLOCK & LRECL @V2A3801 00481200
  528. LA R15,83 INDICATE OVER 16 EXTENTS @V2A3801 00481300
  529. B ERRRET RETURN WITH ERROR CODE @V2A3801 00481400
  530. XTNTOK2 CLI 0(R8),1 IS IT A DATA SET EXTENT @V201105 00482000
  531. BNE ERR80 NO, BAD NEWS @V201105 00483000
  532. SPACE 2 00484000
  533. *************************************************************** 00485000
  534. * 00486000
  535. * CHECK BLOCK AND RECORD SIZES OF DATA SET 00487000
  536. * 00488000
  537. *************************************************************** 00489000
  538. BLKSZ MVC OSFSTRFM(1),DS1RECFM SET RECFM IN FST @V201122 00490000
  539. LH R8,DS1LRECL GET LRECL FROM DSCB @V201122 00491000
  540. MVC OSFSTBLK(2),DS1BLKL SAVE DSCB BLOCK SIZE @V201122 00492000
  541. BLKSZ1 CLC FCBPROC(4),=CL4'DLBL' IS THIS A DOSCB ? @V305001 00492500
  542. BE ROSSTRET YES, NO MORE CHECKING THEN.. @V305001 00493000
  543. LH R9,OSFSTBLK GET BLOCK SIZE @V305001 00493500
  544. LTR R9,R9 TEST SIZE @V201122 00494000
  545. BP BLKSZOK1 OK, LESS THAN 32K BLOCKS @V201122 00495000
  546. TM ADTFLG2,ADTFDOS DOS FORMATED DISK? @V201122 00496000
  547. BNO ERR82 INVALID BLKSIZE FOR OS D.S. RC82 @VA11533 00497000
  548. OI OSFSTFLG,OSFSTDBK DOS DSCB BLKSIZE IS EMPTY @V201122 00498000
  549. BLKSZOK1 TM ADTFLG2,ADTFDOS DOS DISK? @V201122 00499000
  550. BNO BLKSZOK2 NO, CONTINUE @V201122 00500000
  551. MVC OSFSTRFM(1),FCBRECFM SET RECFM IN FST @V201122 00501000
  552. CLI OSFSTRFM,0 RECFM SPECIFIED? @V201122 00502000
  553. BNE CKDOSBLK NO, CONTINUE @V201122 00503000
  554. OI OSFSTRFM,UND INDICATE UNDEFINED @V201122 00504000
  555. CKDOSBLK TM OSFSTFLG,OSFSTDBK DOS BLKSIZE IN DSCB? @V201122 00505000
  556. BNO SETLRL YES, CONTINUE @V201122 00506000
  557. LH R9,FCBBLKSZ GET FCB BLKSIZE @V201122 00507000
  558. LTR R8,R9 IS IT ZERO @V201122 00508000
  559. BNZ BLKSZOK2 NO, CONTINUE @V201122 00509000
  560. LH R9,=H'32760' USE 32,760 FOR DEFAULT @V201122 00510000
  561. SETLRL LR R8,R9 USE BLKSIZE FOR LRECL @V201122 00511000
  562. BLKSZOK2 ST R8,OSFSTLRL SET FST LRECL @V201105 00512000
  563. STH R9,OSFSTBLK SET FST BLKSI @V201105 00513000
  564. LH R9,FCBLRECL GET USER SPECIFIED LRECL @V2A3801 00514100
  565. LTR R9,R9 ANYTHING THERE ? @V2A3801 00514200
  566. BNP CKDOSRFM NO, CONTINUE @V2A3801 00514300
  567. ST R9,OSFSTLRL SET FST LRECL @V2A3801 00514400
  568. CKDOSRFM MVI OSFSTFVF,C'V' SET VARIABLE FLAG @V2A3801 00514500
  569. TM OSFSTRFM,VAR VAR OR UND SPECIFIED @V201105 00515000
  570. BZ OSFSTFXD NO, ASSUME FIXED @V2A3801 00516100
  571. TM OSFSTRFM,UND UNDEFINED ? @V2A3801 00516200
  572. BO ROSSTRET YES, CONTINUE @V2A3801 00516300
  573. LH R9,FCBLRECL USER SPECIFIED LRECL ? @V2A3801 00516400
  574. LTR R9,R9 ... @V2A3801 00516500
  575. BP ROSSTRET YES, CONTINUE @V2A3801 00516600
  576. SH R8,=H'4' SUBTRACT BDW FROM LRECL @V2A3801 00516700
  577. ST R8,OSFSTLRL AND SAVE IN OSFST LRECL @V2A3801 00516800
  578. B ROSSTRET CONTINUE @V2A3801 00516900
  579. OSFSTFXD MVI OSFSTFVF,C'F' SET FIXED FLAG @V2A3801 00517000
  580. B ROSSTRET RETURN TO CALLER @V201105 00518000
  581. OSFSTFND TM ADTFLG2,ADTFDOS DOS DISK? @V201122 00519000
  582. BO BLKSZ1 YES, SET BLOCKSIZE AND RECFM @V201122 00520000
  583. ROSSTRET NI OSFSTFLG,255-OSFSTALT CLEAR ALTERNATE FLG @V201122 00521000
  584. L R7,FCBSAVE RETORE FCB POINTER @V201122 00522000
  585. ST R4,FCBOSFST PUT OS FST ADDRESS IN FCB @V201122 00523000
  586. ST R4,SAVEREGS+R5*4 SET OSFST ADDR FOR DMSLFS @V201122 00524000
  587. LA R9,FCBOP GET FCB PLIST ADDR @VM28889 00525100
  588. SR R1,R1 CLEAR REG1 FOR INSERT @VM28889 00525200
  589. ICM R1,B'0111',SAVEREGS+R2*4+1 GET PLIST ADDRESS @VM28889 00525300
  590. CR R1,R9 PLIST IN THIS FCB? @VM28889 00525400
  591. BNE OSLKP NO, CHECK FOR MORE MATCHES @VM28889 00525500
  592. ROSSTRT2 B CLR15RET RETURN TO CALLER @VM28889 00525600
  593. SPACE 1 00526000
  594. ROSSTERR LR R1,R4 SETUP TO FREE OSFST @V201122 00527000
  595. LR R8,R15 SAVE RETURN CODE @V201122 00528000
  596. MVC OSADTFST(4),OSFSTNXT REMOVE OSFST FROM CHAIN @V201122 00529000
  597. DMSFRET DWORDS=OSFSTLTH,LOC=(1),TYPCALL=BALR @V201122 00530000
  598. TM ROSFLAG,DYNAMIC DSN BLOCK CREATED @VA09241 00530100
  599. BZ ROSSTER1 NO , PROCEED @VA09241 00530200
  600. L R1,FCBOSDSN ADDRESS OF DSN BLOCK @VA09241 00530300
  601. DMSFRET DWORDS=6,LOC=(1),TYPCALL=BALR @VA09241 00530400
  602. XC FCBOSDSN,FCBOSDSN UNCHAIN THE DSN BLOCK @VA09241 00530500
  603. ROSSTER1 DS 0H @VA09241 00530600
  604. LR R15,R8 SETUP RETURN CODE @V201122 00531000
  605. B ROSRET RETURN TO CALLER @V201122 00532000
  606. EJECT 1 00533000
  607. *************************************************************** 00534000
  608. * 00535000
  609. * SETUP TO READ DATA SET OR PDS DIRECTORY 00536000
  610. * 00537000
  611. *************************************************************** 00538000
  612. USING DMSROS,R15 @V201122 00539000
  613. ROSRPS STM R0,R14,SAVEREGS SAVE REGS @V201122 00540000
  614. LM R11,R12,BASE SETUP BASE REGS @V201122 00541000
  615. USING FCBSECT,R15 @V201122 00542000
  616. XC INTREG14(4),INTREG14 CLEAR INTERNAL RETURN REG @V201122 00543000
  617. L R15,SAVEREGS+R11*4 GET FCB DSECT BASE @V201122 00544000
  618. L R4,FCBOSFST GET POINTER TO OS FST @V201122 00545000
  619. LTR R4,R4 IS POINTER ZERO @V201122 00546000
  620. BZ FCBNTFND YES, FCB NOT FOUND - ERROR RC88 @VA11533 00547000
  621. LA R8,OSFSTXTN 1ST XTENT @V201122 00548000
  622. SR R9,R9 CLEAR REG FOR INSERT @V201122 00549000
  623. IC R9,OSFSTXNO GET NO. OF EXTENTS @V201122 00550000
  624. MVC CCHHR(5),OSFSTCHR SET RECORD PTR @V201122 00551000
  625. NI OSFSTFLG,255-OSFSTALT TURN ALT TRK FLAG OFF @VM28935 00551100
  626. XC OSFSTNTE(5),OSFSTNTE SETUP AREA FOR NOTE AFTER O@V201122 00552000
  627. CLC CCHHR(5),ZEROES DISK ADDR ZEROES @V201122 00553000
  628. BNE NXTREAD NO, DON'T SET EXTENT @V201122 00554000
  629. MVC OSFSTEND(5),ZEROES ZERO EXTENT BOUNDARY @V201122 00556000
  630. NI OSFSTFLG,255-OSFSTRSW TURN OFF POINT+1 SWITCH@V201122 00557000
  631. BAL R10,SETXTNT SET TO START OF EXTENT @V201122 00558000
  632. NXTREAD L R1,SAVEREGS+R1*4 GET PLIST BASE REG @V201122 00559000
  633. L R6,FILEBYTE GET READ COUNT @V201122 00560000
  634. L R7,FILEBUFF GET BUFFER ADDR @V201122 00561000
  635. STCM R7,B'0111',READCCW+1 SET BUFFER ADDRESS @V201122 00562000
  636. STH R6,READCCW+6 PUT LENGTH INTO COUNT FIELD @V201122 00563000
  637. NXTREAD2 BAL R14,CHKXTNT INSURE VALID SEEK ARG BEFORE I/O @V201122 00564000
  638. B CKRDSKIP GOOD, RECORD IS WITHIN EXTNET @V201122 00565000
  639. B CKRDSKIP NEW EXTENT AVAILABLE, GO USE IT @V201122 00566000
  640. B EOF SIMULATE EOF @V201122 00567000
  641. CKRDSKIP LA R0,READBLK SETUP FOR NORMAL READ @V201122 00568000
  642. TM OSFSTFLG,OSFSTRSW POINT+1 SPECIFIED? @V201122 00569000
  643. BNO DOREAD NO, DO A NORMAL READ @V201122 00570000
  644. LA R0,READSKIP SETUP TO DO A READ DATA SKIP @V201122 00571000
  645. B GOREAD BYPASS OSFSTNTE SAVE @V201122 00572000
  646. * READ A BLOCK AND CONFIRM THAT I/O ENDED SATISFACTORILY 00573000
  647. DOREAD CLC OSFSTNTE(5),ZEROES IS NOTE FIELD SPECIFIED @V201122 00574000
  648. BNE GOREAD YES, GO DO READ @V201122 00575000
  649. MVC OSFSTNTE(5),CCHHR SAVE CCHHR ADDRESS @V201122 00576000
  650. GOREAD L R15,SAVEREGS+R11*4 GET FCB BASE REG @VM08817 00577000
  651. MVC MEMBER(8),FCBOP SAVE FCBOP @VM08817 00577040
  652. MVC FCBOP(5),CCHHR SAVE CCHHR @VM28935 00577060
  653. LA R1,FCBOP READ NEXT CCHHR INTO FCBOP @VM08817 00577080
  654. STCM R1,B'0111',READCHR+1 SET CCHHR ADDR IN CCW @VM08817 00577120
  655. STCM R1,B'0111',READCHR1+1 SET CCHHR ADDR IN CCW @VM28920 00577130
  656. STCM R1,B'0111',READCHR2+1 SET CCHHR ADDR IN CCW @VM28920 00577140
  657. BAL R14,DISKIO GO DO I/O @VM08817 00577160
  658. BAL R1,SETCHR SET CCHHR IN NEXTSEEK @VM08817 00577200
  659. BAL R1,SETCHR SET CCHHR IN NEXTSEEK @VM08817 00577240
  660. BAL R1,SETCHR SET CCHHR IN NEXTSEEK @VM08817 00577280
  661. SETCHR LA R1,0(R1) CLEAR HIGH BYTE @VM08817 00577320
  662. LA R14,0(R14) CLEAR HIGH ORDER BYTE @VM08817 00577360
  663. SR R1,R14 GET DISPLACEMENT IN BRANCH TBL @VM08817 00577400
  664. L R15,SAVEREGS+R11*4 GET FCB BASE REG @VM08817 00577440
  665. MVC NEXTSEEK(8),FCBOP SAVE NEXTSEEK FIELD @VM08817 00577480
  666. MVC FCBOP(8),MEMBER RESORE FCBOP FIELD @VM08817 00577520
  667. BALR R15,R0 GET ADDR OF *+4 @VM08817 00577560
  668. AR R15,R1 GET BRANCH TBL ADDR @VM08817 00577600
  669. BR R15 BRANCH IN BRANCH TABLE @VM08817 00577640
  670. DROP R15 @VM08817 00577680
  671. B BLKUC UNIT CHECK IN STATUS OF I/O @V201122 00578000
  672. B CHK4UE NO UC, GO CHECK FOR UNIT EXCEPTIO@V201122 00579000
  673. B GOTBLK GOOD RETURN @V201122 00580000
  674. BLKUC MVC RESIDUAL(2),CSW+6 SAVE RESIDUAL COUNT IN CCW @V201122 00581000
  675. BAL R14,CHKSENSE TIME TO GO LOOK AT THE SENSE INFO@V201122 00582000
  676. TM SNSEBYTE,X'08' NO RECORD FOUND @V201122 00583000
  677. BO ERR80 TOO BAD @V201122 00584000
  678. TM SNSEBYTE,X'02' WAS IT A TRACK CONDITION CHECK @V201122 00585000
  679. BNZ BLKUC3 YES @V201122 00586000
  680. TM SNSEBYTE,X'20' WAS IT END OF CYLINDER @V201122 00587000
  681. BO BLKUC2A YES, INCREMENT CYL @V201122 00588000
  682. TM SNSEBYTE,X'04' FILE PROTECT ERROR @V201122 00589000
  683. BZ ERR80 NO, THEN INDICATE ERROR @V201122 00590000
  684. LA R14,TSTOVRFL-4 SET RETURN ADDR TO RETURN TO TSTO@V201122 00591000
  685. B UPTRK UP TRACK INDICATOR @V201122 00592000
  686. BLKUC2A BAL R14,INCRCYL ADJUST SEEK ARG. TO NEXT CYL. @V201122 00593000
  687. B TSTOVRFL CONTINUE @V201122 00594000
  688. BLKUC3 BAL R14,GETALT2 TRK COND, GO GET ALTERNATE @V201122 00595000
  689. BC 0,0(R0) NOP @V201122 00596000
  690. TSTOVRFL TM SNSEBYTE,X'01' WAS OVERFLOW INCOMPLETE SET @V201122 00597000
  691. BZ NXTREAD2 NO, ALL SET FOR RESTART @V201122 00598000
  692. TM OSFSTRFM,X'20' OVERFLOW SPECIFIED @V201122 00599000
  693. BNO ERR80 NO, THEN ERROR @V201122 00600000
  694. TM OSFSTFLG,OSFSTRSW CONTINUE POINT+1 @V201122 00601000
  695. BO NXTREAD2 CONTINUE READ DATA SKIP @V201122 00602000
  696. LH R15,READCCW+6 GET ATTEMPTED READ SIZE @V201122 00603000
  697. SH R15,NEXTSEEK+6 GET RESIDUAL COUNT @V201122 00604000
  698. BZ ERR80 NO RESIDUAL AND INCOMPLETE THEN E@V201122 00605000
  699. STH R15,READCCW+6 NEW LENGTH FOR CONTINUATION READ @V201122 00606000
  700. LR R14,R6 BLKSIZE @V201122 00607000
  701. SR R14,R15 MINUS RESIDUAL IS LENGTH READ SO @V201122 00608000
  702. AR R14,R7 BUMP UP BUFFER ADDRESS @V201122 00609000
  703. STCM R14,B'0111',READCCW+1 SET BUFFER ADDRESS @V201122 00610000
  704. B NXTREAD2 GO START READ FOR NEXT SEGMENT @V201122 00611000
  705. RDSKIPOK NI OSFSTFLG,255-OSFSTRSW FINISHED WITH READ SKIP@V201122 00612000
  706. SR R15,R15 CLEAR FOR INSERT @V201122 00613000
  707. IC R15,NEXTSEEK+4 GET RECORD NO. @V201122 00614000
  708. BCTR R15,R0 DECREMENT BY ONE @V201122 00615000
  709. STC R15,NEXTSEEK+4 REPLACE RECORD NO. @V201122 00616000
  710. MVC CCHHR(5),NEXTSEEK SETUP NEW CCHHR ADDRESS @V201122 00617000
  711. B NXTREAD2 GO DO READ DATA @V201122 00618000
  712. CHK4UE TM OSFSTFLG,OSFSTRSW READ SKIP SPECIFIED? @V201122 00619000
  713. BO RDSKIPOK YES, THEN EOF WAS ON READ SKIP @V201122 00620000
  714. TM CSW+4,X'01' DID WE GET UNIT EXCEPTION @V201122 00621000
  715. BO EOF YES @V201122 00622000
  716. * SAVE POINTER TO NEXT BLOCK 00623000
  717. GOTBLK TM OSFSTFLG,OSFSTRSW READ SKIP SPECIFIED? @V201122 00624000
  718. BO RDSKIPOK THEN ONLY READ SKIP COMPLETE @V201122 00625000
  719. MVC OSFSTCHR(5),NEXTSEEK SAVE DISK BLOCK ADDRES@V201122 00626000
  720. SH R6,CSW+6 SUB RESIDUAL= LENGTH READ @V201122 00627000
  721. L R1,SAVEREGS+R1*4 GET PLIST ADDRESS @V201122 00628000
  722. ST R6,FILEREAD SAVE READ COUNT @V201122 00629000
  723. * 00630000
  724. * RETURN TO CALLER 00631000
  725. * 00632000
  726. CLR15RET SR R15,R15 CLEAR RETURN CODE @V201122 00633000
  727. B ROSRET @V201122 00634000
  728. INTRETRN L R14,INTREG14 GET INTERNAL RETURN REG @V201122 00635000
  729. XC INTREG14(4),INTREG14 CLEAR INTERNAL RETURN A@V201122 00636000
  730. LTR R14,R14 DID AN ROS RTN BR TO ANOTHER ROS @V201122 00637000
  731. BCR 7,R14 YES, RETURN TO 1ST ROS RTN @V201122 00638000
  732. ROSRET EQU * @V201122 00638500
  733. NI ROSFLAG,255-DYNAMIC DSN BLOCK NOT CHAINED @VA09241 00639000
  734. LM R0,R14,SAVEREGS RESTORE REGS @V201122 00639500
  735. BR R14 RETURN @V201122 00640000
  736. INTREG14 DS 1F SAVE AREA FOR ROS INTERNAL CALLS @V201122 00641000
  737. SAVEREGS DS 15F SAVE AREA @V201122 00642000
  738. BASE DC A(DMSROS) 1ST BASE REG @V201122 00643000
  739. ADMSROS2 DC A(DMSROS+4096) 2ND BASE REG @V201122 00644000
  740. SPACE 2 00645000
  741. *************************************************************** 00646000
  742. * 00647000
  743. * I/O SUBROUTINE 00648000
  744. * 00649000
  745. *************************************************************** 00650000
  746. DISKIO TM OSFSTFLG,OSFSTALT I/O TO ALTERNATE TRACK @V201105 00651000
  747. BO ALTIO YES, SEEK ALREADY SET @V201105 00652000
  748. L R1,CCHHR GET SEARCH INFO @V201105 00653000
  749. ST R1,SEEK+2 AND USE IT FOR SEEKING AS WELL @V201105 00654000
  750. ST R1,NEXTSEEK SAVE TRACK ADDRESS CURRENTLY IN V@V201105 00655000
  751. ALTIO LH R1,OSFSTDSK GET DISK ADR (CUU) @V201105 00656000
  752. ACCESSIO XC CSW(8),CSW RESET CSW @V201105 00657000
  753. DC X'83100020' CALL CP FOR DISK I/O @V201105 00658000
  754. BC 8,8(R14) NORMAL COMPLETION, RETURN+8 @V201105 00659000
  755. BC 4,ERR80 DISK NOT ATTACHED @V201105 00660000
  756. BC 2,4(R14) INCOR. LGTH. OR UNIT EXCEPT. @V201105 00661000
  757. STH R0,SNSEDATA UNIT CHK, SAVE 1ST 2 SENSE BYTES @V201105 00662000
  758. B 0(R14) RETURN+0 @V201105 00663000
  759. SPACE 2 00664000
  760. * SEARCH DIRECTORY ON DASD FOR PROPER BLOCK 00665000
  761. USING DMSROS,R15 TEMP BASE REG @V201122 00666000
  762. ROSFIND STM R0,R14,SAVEREGS SAVE REGS @V201122 00667000
  763. LM R11,R12,BASE GET BASE REGS @V201122 00668000
  764. USING FCBSECT,R15 FCB BASE REG @V201122 00669000
  765. L R15,SAVEREGS+R11*4 GET FCB BASE REG @V201122 00670000
  766. MVC MEMBER(8),0(R9) GET MEMBER NAME @V201122 00671000
  767. MVI SRCHMEM,MEMHGHEQ SEARCH HIGH OR EQUAL @V201122 00672000
  768. TM FCBIOSW2,FCBMVPDS MOVE PDS OPTION SPECIFIED @V201122 00673000
  769. BNO SETERRET NO, CONTINUE @V201122 00674000
  770. MVI SRCHMEM,MEMHIGH SEARCH HIGH @V201122 00675000
  771. SETERRET L R4,FCBOSFST GET OS FST BASE REG @V201122 00676000
  772. NI OSFSTFLG,255-OSFSTRSW TURN OFF POINT+1 SWITCH@V201122 00677000
  773. XC OSFSTNTE(5),OSFSTNTE CLEAR NOTE INDICATOR @V201122 00678000
  774. LA R15,FINDIOER GET ADDRESS OF FIND ERROR RETURN @V201122 00679000
  775. ST R15,INTREG14 SET ERROR RETURN REG @V201122 00680000
  776. LTR R4,R4 FST BASE OK @V201122 00681000
  777. BCR 8,R15 NO, INDICATE ERROR @V201122 00682000
  778. LA R8,OSFSTXTN SET TO 1ST XTENT @V201122 00683000
  779. SR R9,R9 CLEAR REG FOR INSERT @V201122 00684000
  780. IC R9,OSFSTXNO GET NO. OF EXTENTS @V201122 00685000
  781. BAL R10,SETXTNT CHECK 1ST XTENT FOR ERRORS @V201122 00686000
  782. GOTMEMBR LA R0,RDPDSD DIRECTORY SEARCHING CHANNEL PROG @V201122 00687000
  783. BAL R14,DISKIO LET'S READ THE PDS DIRECTORY @V201122 00688000
  784. B PDSUC UNIT CHECK ON READ @V201122 00689000
  785. B FINDIOER RETURN WITH ERROR CODE @V201122 00690000
  786. B GOTMEM1 YES, MEMBER BLOCK FOUND @V201122 00691000
  787. PDSUC BAL R14,CHKSENSE GO SEE WHAT HAPPENED @V201122 00692000
  788. TM SNSEBYTE,X'09' NO REC OR OVERFLOW INC NOT ALLOWE@V201122 00693000
  789. BNZ FINDIOER TOO BAD @V201122 00694000
  790. TM SNSEBYTE,X'20' WAS IT END OF CYLINDER @V201122 00695000
  791. BZ PDSERRTK NO, MUST BE A BAD TRACK @V201122 00696000
  792. BAL R14,INCRCYL GO GET TO NEXT CYLINDER @V201122 00697000
  793. PDSCHKX BAL R14,CHKXTNT SEE IF NEW CCHHR WITHIN EXTENT @V201122 00698000
  794. B GOTMEM2 GO TRY AGAIN WITH NEXT CYL, SAME @V201122 00699000
  795. B GOTMEM2 CONTINUE WITH FIRST CYL OF NEXT E@V201122 00700000
  796. B NOTFOUND NO MORE EXTENTS @V201122 00701000
  797. PDSERRTK BAL R14,GETALT GET ALTERNATE TRACK @V201122 00702000
  798. B GOTMEM2 RETRY I/O ON ALTERNATE @V201122 00703000
  799. B PDSCHKX RESTART ON NEXT PRIME TRACK IF OK@V201122 00704000
  800. GOTMEM1 MVC CCHHR(4),NEXTSEEK SETUP WITH FOUND RECORD ADDR@V201122 00705000
  801. BAL R14,CHKXTNT SEE IF FOUND REC WITHIN EXTENT @V201122 00706000
  802. B MEMFOUND GOOD NEWS @V201122 00707000
  803. B GOTMEM2 NO, TRY NEXT EXTENT @V201122 00708000
  804. B NOTFOUND NO, AND END OF DATA SET FOUND @V201122 00709000
  805. GOTMEM2 CLI NEXTSEEK+5,8 IS KEY LENGTH STILL 8 @V201122 00710000
  806. BE GOTMEMBR YES, CONTINUE WITH I/O @V201122 00711000
  807. B NOTFOUND NO, LABEL TELLS IT ALL @V201122 00712000
  808. SPACE 2 00713000
  809. * SEARCH THROUGH PDS DIRECTORY BLOCK FOR CORRECT ENTRY 00714000
  810. MEMFOUND L R15,SAVEREGS+R11*4 GET FCB BASE REG @V201122 00715000
  811. L R3,=A(PDSBLK) POINT TO PDS INFO READ IN @V201122 00716000
  812. LH R2,0(,R3) GET LENGTH USED IN BLOCK @V201122 00717000
  813. LA R1,2 DUMMY LENGTH @V201122 00718000
  814. CR R2,R1 TEST LENGTH VALIDITY @V201122 00719000
  815. BNH FINDIOER NO GOOD @V201122 00720000
  816. C R2,=F'256' MAXIMUM LENGTH ALLOWED @V201122 00721000
  817. BNH PDSCONT OK @V201122 00722000
  818. B ERR80 QUIT RIGHT NOW @V201122 00723000
  819. PDSCONT AR R1,R3 BUMP TO FIRST VALID BYTE @V201122 00724000
  820. AR R3,R2 POINT TO END OF THE DIRECTORY BLO@V201122 00725000
  821. BCTR R3,0 BACK UP ONE BYTE FOR BXLE USE @V201122 00726000
  822. CLCMEMBR CLC 0(8,R1),MEMBER IS THIS THE ENTRY WE WANT @V201122 00727000
  823. BH NEWMEM MAYBY, CHECK PDS OPTION @V201122 00728000
  824. BL CKNXTMEM NO, CHECK NEXT MEMBER @V201122 00729000
  825. TM FCBIOSW2,FCBMVPDS IS PDS MOVE IN EFFECT @V201122 00730000
  826. BNO MEMFND NO, THEN WE HAVE MEMBER @V201122 00731000
  827. CKNXTMEM EQU * @V201122 00732000
  828. IC R2,11(,R1) NUMBER OF USER HALFWORDS IN USE @V201122 00733000
  829. N R2,=A(X'1F') ONLY WANT LAST 5 BITS @V201122 00734000
  830. SLL R2,1 NUMBER OF BYTES IN USER FIELD @V201122 00735000
  831. LA R2,12(,R2) ADD LENGTH OF NAME AND TTRC FIELD@V201122 00736000
  832. BXLE R1,R2,CLCMEMBR GO CHECK NEXT ENTRY @V201122 00737000
  833. B NOTFOUND SORRY, MEMBER ISN'T IN LIBRARY @V201122 00738000
  834. NEWMEM TM FCBIOSW2,FCBMVPDS @V201122 00739000
  835. BNO CKNXTMEM @V201122 00740000
  836. MVC MEMBER(8),0(R1) @V201122 00741000
  837. CLC MEMBER(8),FENCE LAST ENTRY @V201122 00742000
  838. BE NOTFOUND YES, THEN MEMBER NOT FOUND @V201122 00743000
  839. L R9,SAVEREGS+R9*4 GET ADDRESS OF MEMBER NAME @V201122 00744000
  840. MVC 0(8,R9),MEMBER SET NEW MEMBER NAME @V201122 00745000
  841. DROP R15 DROP FCB BASE REG @V201122 00746000
  842. MEMFND EQU * @V201122 00747000
  843. CLC MEMBER(8),FENCE IS IT DUMMY LAST ENTRY @V201122 00748000
  844. BE NOTFOUND YES, ALL DONE @V201122 00749000
  845. * CONVERT TTR OF MEMBER TO ABSOLUTE DASD ADDRESS 00750000
  846. MEMTHERE IC R14,10(,R1) GET REC NUMBER, RELATIVE @V201122 00751000
  847. BCTR R14,0 DOWN IT BY ONE FOR SEARCHING @V201122 00752000
  848. STC R14,CCHHR+4 SAVE IT FOR USE @V201122 00753000
  849. ST R1,SAVEREGS+R5*4 RETURN ADDRESS OF MEMBER ENT@V201122 00754000
  850. LH R1,8(,R1) GET TT VALUE (RELATIVE TRACK ADDR@V201122 00755000
  851. N R1,=A(X'FFFF') CLEAR UNWANTED BITS @V201122 00756000
  852. LA R14,BPDSDBAD RETURN FOR CONVERSION FAILURE @V201122 00757000
  853. B TTRCNVRT CONVERT TTR TO ACTUAL ADDRESS @V201122 00758000
  854. BPDSDBAD B FINDIOER INDICATE BAD PDS @V201122 00759000
  855. MVC OSFSTCHR(5),CCHHR SAVE DATA ADDRESS @V201122 00760000
  856. SR R15,R15 CLEAR FOR COMPARE @V201122 00761000
  857. C R15,SAVEREGS+R6*4 IS THIS A BLDL CALL @V201122 00762000
  858. BNE FINDRET YES, BYPASS SETXTNT CALL @V201122 00763000
  859. BAL R10,SETXTNT COMPUTE XTENT BOUNDARY @V201122 00764000
  860. SR R15,R15 CLEAR ERROR REG @V201122 00765000
  861. FINDRET B ROSRET RETURN TO CALLER @V201122 00766000
  862. NOTFOUND LA R15,4 INDICATE NOT FOUND ERROR @V201122 00767000
  863. B FINDRET RETURN TO CALLER @V201122 00768000
  864. FINDIOER LA R15,8 INDICATE I/O ERROR @V201122 00769000
  865. B FINDRET RETURN TO CALLER @V201122 00770000
  866. SPACE 2 00771000
  867. * 00772000
  868. * CONVERT TTR TO CCHHR OR CCHHR TO TTR 00773000
  869. * 00774000
  870. CHRCNVRT L R0,=A(X'FFFF') SET R0 AND R1 TO MAX REL TRACK @V201122 00775000
  871. LR R1,R0 R1= R0 @V201122 00776000
  872. B GETXTNTS GET EXTENTS @V201122 00777000
  873. TTRCNVRT XC CCHHR(4),CCHHR CLEAR DISK ADDRESS AREA @V201122 00778000
  874. GETXTNTS SR R9,R9 CLEAR R9 FOR WORK @V201122 00779000
  875. IC R9,OSFSTXNO GET NO. OF VALID EXTENTS @V201122 00780000
  876. LA R8,OSFSTXTN POINT TO THEM @V201122 00781000
  877. NXTSIZE CLI 0(R8),0 FLAGGED 'NO EXTENT DATA'? @VA08149 00782010
  878. BE NOXTENTA YES - SKIP OVER THIS EXTENT @VA08149 00782020
  879. LH R2,2(,R8) GET STARTING CYL THIS EXTENT @VA08149 00782030
  880. LH R3,6(,R8) GET ENDING CYLINDER @V201122 00783000
  881. SR R3,R2 NO OF CYLINDERS IN EXTENT @V201122 00784000
  882. CLC CCHHR(4),2(R8) DISK ADDRESS IN THIS EXTENT @V201122 00785000
  883. BL TRKNO TTR CONVERT ALWAYS TAKES THIS BRA@V201122 00786000
  884. * READY FOR FINAL CCHH CONVERT 00787000
  885. CLC CCHHR(4),6(R8) DISK ADDRESS IN THIS EXTENT @V201122 00788000
  886. BH TRKNO NO, CONTINUE CHR CONVERT @V201122 00789000
  887. LH R3,CCHHR GET CYL ADDRESS @V201122 00790000
  888. SR R3,R2 GET NO. CYLS INTO EXTENT @V201122 00791000
  889. MH R3,OSFSTTRK+2 CONVERT CYLS TO TRACKS @V201122 00792000
  890. AH R3,CCHHR+2 GET TRACK ADDRES @V201122 00793000
  891. SH R3,4(R8) GET RELATIVE TRACK ADDR @V201122 00794000
  892. SR R1,R3 SUBTRACT FROM CURRENT TT @V201122 00795000
  893. SR R0,R1 GET CURRENT REL TRACK @V201122 00796000
  894. BR R14 RETURN TO CALLER @V201122 00797000
  895. TRKNO MH R3,OSFSTTRK+2 * NO. TRACKS PER CYLINDER @V201122 00798000
  896. AH R3,8(,R8) ADD ENDING TRK, LAST CYL @V201122 00799000
  897. SH R3,4(,R8) SUBTRACT STARTING TRACK, FIRST CY@V201122 00800000
  898. LA R3,1(,R3) ADD ONE DUE TO INCLUSIVENESS @V201122 00801000
  899. SR R1,R3 SUB EXTENT SIZE FROM TT TOTAL @V201122 00802000
  900. BM GOTTHEX THIS IS THE CORRECT EXTNET @V201122 00803000
  901. NOXTENTA EQU * @VA08149 00803010
  902. LA R8,10(,R8) POINT TO NEXT EXTENT DESCRIPTION @V201122 00804000
  903. BCT R9,NXTSIZE GO TRY IT @V201122 00805000
  904. BR R14 FOOLISHNESS ABOUNDS @V201122 00806000
  905. * READY FOR FINAL TT CONVERT 00807000
  906. GOTTHEX MVC CCHHR(4),2(R8) ADD CCHH TO ALREADY WAITING R @V201122 00808000
  907. AR R1,R3 RESTORE OVERFLOW AMOUNT @V201122 00809000
  908. BZ 4(,R14) ALL SET, TTR IS FIRST OF EXTENT @V201122 00810000
  909. AH R1,4(,R8) STARTING HH IN EXTENT @V201122 00811000
  910. SR R0,R0 CLEAR FOR DIVISION @V201122 00812000
  911. D R0,OSFSTTRK Q(R1)=CYL OFFSET, R(R0)=ABSOLUT@V201122 00813000
  912. AH R1,2(,R8) ADD CYLINDER START OF EXTENT @V201122 00814000
  913. STH R1,CCHHR PUT CYLINDER ADDRESS INTO SEEK AR@V201122 00815000
  914. STH R0,CCHHR+2 ALSO HEAD ADDRESS @V201122 00816000
  915. B 4(,R14) NORMAL RETURN TO CALLER @V201122 00817000
  916. SPACE 2 00818000
  917. * ROUTINE FOR OS DISK NOTES AND POINTS 00819000
  918. USING DMSROS,R15 TEMP BASE REG @V201122 00820000
  919. ROSNTPTB STM R0,R14,SAVEREGS SAVE REGS @V201122 00821000
  920. LM R11,R12,BASE GET BASE REGS @V201122 00822000
  921. USING FCBSECT,R15 TEMP FCB BASE @V201122 00823000
  922. L R15,SAVEREGS+R11*4 GET FCB BASE @V201122 00824000
  923. L R4,FCBOSFST GET OS FST ADDRESS @V201122 00825000
  924. DROP R15 DROP FCB BASE @V201122 00826000
  925. XC INTREG14(4),INTREG14 CLEAR RETURN REG @V201122 00827000
  926. MVC CCHHR(5),OSFSTCHR SETUP CCHHR ADDR @V201122 00828000
  927. LTR R2,R0 POINT SPECIFIED @V201122 00829000
  928. BZ ROSNOTE NO, BUT NOTE IS @V201122 00830000
  929. XC OSFSTNTE(5),OSFSTNTE CLEAR LAST RECORD POINT@V201122 00831000
  930. NI OSFSTFLG,255-OSFSTRSW TURN OFF POINT+1 SWITCH@V201122 00832000
  931. LTR R2,R2 POINT SPECIFIED? @V201122 00833000
  932. BM ROSBSP GO TO BACKSPACE CODE @V201122 00834000
  933. B ROSPOINT YES, DO A POINT @V201122 00835000
  934. ROSNOTE C R2,OSFSTCHR IS THIS 1ST READ @V201122 00836000
  935. BE NOTERET YES, REL TRACK= 0 @V201122 00837000
  936. CLC OSFSTNTE(5),ZEROES LAST I/O OVRFLW ? @V201122 00838000
  937. BE NOTECVRT NO, USE OSFSTCHR @V201122 00839000
  938. CLC OSFSTCHR+2(2),OSFSTNTE+2 DID TRACK CHANGE ? @VA10090 00839300
  939. BNE NEWTRK YES, TAKE CARE OF IT @VA10090 00839600
  940. MVC CCHHR(5),OSFSTNTE YES, USE OVRFLW CHR @V201122 00840000
  941. B NOTECVRT IT'S BEEN SET, CONVERT IT @VA06020 00840400
  942. NEWTRK MVC CCHHR+4(2),ZEROES ZERO OLD RECORD COUNT @VA06020 00840800
  943. NOTECVRT BAL R14,CHRCNVRT CONVERT CHR TO REL TRACK @V201122 00841000
  944. NOTERET STH R0,SAVEREGS RETURN REL TRACK @V201122 00842000
  945. SR R2,R2 CLEAR R2 FOR INSERT @V201122 00843000
  946. IC R2,CCHHR+4 GET RECORD NO. @V201122 00844000
  947. LA R2,1(R2) ADD ONT TO TTR @V201122 00845000
  948. STC R2,SAVEREGS+2 RETURN RECORD NO. @V201122 00846000
  949. B ROSRET RETURN TO CALLER @V201122 00847000
  950. ROSPOINT SR R1,R1 CLEAR REG 1 FOR INSERT @V201122 00848000
  951. ICM R1,B'0111',0(R2) GET REL TTR @V201122 00849000
  952. BCTR R1,R0 SUBTRACT ONE FROM RECORD @V201122 00850000
  953. CLI 3(R2),1 SHOULD R BE UPDATED @V201122 00851000
  954. BNE CKSTART NO, SETUP FOR TTR CONVERT @V201122 00852000
  955. OI OSFSTFLG,OSFSTRSW TURN ON POINT+1 SWITCH @V201122 00853000
  956. CKSTART STC R1,OSFSTCHR+4 SET NEW RECORD NO. @V201122 00854000
  957. SRL R1,8 GET REL TRACK @V201122 00855000
  958. BAL R14,TTRCNVRT CONVERT REL TRACK @V201122 00856000
  959. BC 0,0(0) ANY ERRORS SHOW UP ON NEXT READ @V201122 00857000
  960. MVC OSFSTCHR(4),CCHHR SET NEW CCHH @V201122 00858000
  961. BAL R10,SETXTNT SET EXTENT BOUNDARY @V201122 00859000
  962. B ROSRET RETURN TO CALLER @V201122 00860000
  963. ROSBSP SR R2,R2 CLEAR REG 2 @V201122 00861000
  964. IC R2,OSFSTCHR+4 GET RECORD NO. @V201122 00862000
  965. LTR R2,R2 IS IT ZERO @V201122 00863000
  966. BZ BSPTRK YES, THEN BACKSPACE TRACK @V201122 00864000
  967. BCTR R2,R0 BACKUP ONE RECORD @V201122 00865000
  968. STC R2,OSFSTCHR+4 SET NEW RECORD PTR @V201122 00866000
  969. B CLR15RET RETURN TO CALLER @V201122 00867000
  970. BSPTRK CLC OSFSTCHR(5),ZEROES CCHHR = ZERO @V201122 00868000
  971. BE ERR80 YES, RETURN WITH ERROR @V201122 00869000
  972. BAL R14,CHRCNVRT CONVERT CCHH @V201122 00870000
  973. LTR R1,R0 RELATIVE TRACK ZERO @V201122 00871000
  974. BZ ERR80 YES, THEN RETURN ERROR @V201122 00872000
  975. BCTR R1,R0 TRACK = TRACK-1 @V201122 00873000
  976. BAL R14,TTRCNVRT GET ACTUAL ADDRESS @V201122 00874000
  977. B ERR80 INDICATE ERROR @V201122 00875000
  978. MVI CCHHR+4,0 RECORD NO.= 0 @V201122 00876000
  979. CLI 0(R8),X'80' BSP ON SPLIT'S ? @V2A3801 00876100
  980. BNE BSPTRK2 NO, CONTINUE @V2A3801 00876200
  981. CLC CCHHR+2(2),8(R8) ALREADY ABOVE HIGH HEAD ? @VM01015 00876300
  982. BH ERR80 YES, EXIT WITH RC @VM01015 00876400
  983. CLC CCHHR+2(2),4(R8) ALREADY BELOW LOW HEAD ? @V2A3801 00876500
  984. BL ERR80 YES, EXIT WITH RC @V2A3801 00876600
  985. BSPTRK2 LA R0,RDLSTCNT PGM TO READ LAST CNT ON TRK @V2A3801 00876700
  986. BAL R14,DISKIO GO EXCP @V201122 00878000
  987. B *+12 UNIT CHECK EXPECTED @V201122 00879000
  988. B ERR80 NORMAL END IS ABNORMAL @V201122 00880000
  989. B ERR80 NORMAL END IS 'ABNORMAL' @V201122 00881000
  990. TM SNSEDATA+1,12 FILE PROTECT OR NO REC FND ? @V2A3801 00882100
  991. BNZ BSPRET ANY OR ALL ALLOWED @V2A3801 00882200
  992. TM SNSEDATA,2 TRACK CONDITION ? @V2A3801 00882300
  993. BZ ERR80 NO, ERROR @V2A3801 00882400
  994. BSPRET SR R15,R15 CLEAR R15 FOR INSERT @V201122 00886000
  995. IC R15,NEXTSEEK+4 GET RECORD NUMBER @V201122 00887000
  996. BCTR R15,R0 DECREMENT IT BY ONE @V201122 00888000
  997. STC R15,NEXTSEEK+4 RESET RECORD NUMBER @V201122 00889000
  998. MVC OSFSTCHR(5),NEXTSEEK SAVE ADDRESS POINTER @V201122 00890000
  999. BAL R10,SETXTNT SET EXTENT BOUNDARY @V201122 00891000
  1000. B CLR15RET RETURN TO CALLER @V201122 00892000
  1001. *************************************************************** 00893000
  1002. * 00894000
  1003. * TEST INFORMATION RETURNED BY SENSE FOR UNEXPECTED STAT 00895000
  1004. * 00896000
  1005. *************************************************************** 00897000
  1006. CHKSENSE TM SNSEDATA,X'FD' ANYTHING BUT TRACK CONDITION @V201122 00898000
  1007. BNZ ERR80 YES, ERROR @V201122 00899000
  1008. TRKBYTE TM SNSEDATA+1,X'D2' ALLOW CYLEND,NOREC,OVERINC,PROT@V201122 00900000
  1009. BNZ ERR80 TOO BAD @V201122 00901000
  1010. MVC SNSEBYTE(1),SNSEDATA MAKE A COMPOUND BYTE @V201122 00902000
  1011. OC SNSEBYTE(1),SNSEDATA+1 OUT FO BOTH FOR EASY IN@V201122 00903000
  1012. BR R14 NOW RETURN TO CALLER @V201122 00904000
  1013. SPACE 2 00905000
  1014. *************************************************************** 00906000
  1015. * 00907000
  1016. * INCREMENT DASD ADDRESS TO TRK 0, REC 0 OF NEXT CYL 00908000
  1017. * 00909000
  1018. *************************************************************** 00910000
  1019. INCRCYL LH R1,CCHHR GET CYLINDER ADDRESS @V201122 00911000
  1020. LA R1,1(,R1) ADD ONE TO IT @V201122 00912000
  1021. SLL R1,16 CREATE CCHH WITH HEAD ZERO @V201122 00913000
  1022. CLI 0(R8),X'80' SPLIT EXTENT @V201122 00914000
  1023. BNE SETCCHHR NO @V201122 00915000
  1024. ICM R1,B'0011',4(R8) SET STARTING HH @V201122 00916000
  1025. SETCCHHR ST R1,CCHHR PUT TO SEARCH ARG. AREA @V201122 00917000
  1026. MVI CCHHR+4,X'00' START WITH RECORD ZERO @V201122 00918000
  1027. BR R14 RETURN TO USER @V201122 00919000
  1028. SPACE 2 00920000
  1029. *************************************************************** 00921000
  1030. * 00922000
  1031. * MAKE SURE DASD ADDRESS IS WITHIN CURRENT EXTENT. OTHE 00923000
  1032. * SUBSTITUTE ADDRESS OF FIRST TRACK OF NEXT EXTENT. 00924000
  1033. * 00925000
  1034. *************************************************************** 00926000
  1035. CHKXTNT TM OSFSTFLG,OSFSTALT CURRENT ON ALTERNATE @V201122 00927000
  1036. BCR 1,R14 YES, IT WILL ALL TAKE CARE OF ITS@V201122 00928000
  1037. SETUP8 CLI 0(R8),0 FLAGGED 'NO EXTENT DATA'? @VA08149 00929010
  1038. BE NOXTENTB YES - SKIP OVER THIS EXTENT @VA08149 00929020
  1039. CLC OSFSTEND(4),6(R8) IS THIS THE RIGHT EXTENT @VA08149 00929030
  1040. BE CHKEND YES, CHECK FOR END OF EXTENT @V201122 00930000
  1041. NOXTENTB EQU * @VA08149 00930010
  1042. LA R8,10(R8) UP TO NEXT EXTENT @V201122 00931000
  1043. BCT R9,SETUP8 CHECK IF THIS IS RIGHT EXTENT @V201122 00932000
  1044. B 8(R14) RAN OUT OF EXTENTS, RETURN @V201122 00933000
  1045. CHKEND CLC CCHHR(4),OSFSTEND IS ADDR OUT OF EXTENT @V201122 00934000
  1046. BH NXTXTNT2 YES, UP TO NEXT EXTENT @V201122 00935000
  1047. BAL R15,SETMASK SET FILE MASK @V201122 00936000
  1048. CLI 0(R8),X'80' SPLIT CYL? @V201122 00937000
  1049. BCR 7,R14 NO, RETURN TO CALLER @V201122 00938000
  1050. CLC OSFSTEND+2(2),CCHHR+2 COMPARE ENDING TRK TO CURR@V201122 00939000
  1051. BCR 11,R14 BNL TO CALLER @V201122 00940000
  1052. LR R10,R14 SAVE REG 14 @V201122 00941000
  1053. BAL R14,INCRCYL YES, UP TO NEXT CYL @V201122 00942000
  1054. BR R10 RETURN TO CALLER @V201122 00943000
  1055. NOXTENTC EQU * @VA08149 00943010
  1056. NXTXTNT2 BCT R9,NXTXTNT GO GET ANOTHER IF ONE EXISTS @V201122 00944000
  1057. B 8(,R14) NO MORE EXTENTS RETURN ADDRESS @V201122 00945000
  1058. NXTXTNT LA R8,10(,R8) BUMP ADDRESS TO NEXT EXTENT DESCR@V201122 00946000
  1059. CLI 0(R8),0 FLAGGED 'NO EXTENT DATA'? @VA08149 00946060
  1060. BE NOXTENTC YES - SKIP OVER THIS EXTENT @VA08149 00946070
  1061. LA R10,4(,R14) SET NEW RETURN ADDRESS @V201122 00947000
  1062. B SETXTNT SET EXTENT BOUNDARY @V201122 00948000
  1063. SETMASK MVC MASK(1),MASK1 SET TO ALLOW OVERFLOW OF TRK @V201122 00949000
  1064. CLC CCHHR(4),OSFSTEND LAST TRK OF ENTENT? @V201122 00950000
  1065. BE NOOVRFLW YES, DON'T ALLOW OVERFLOW @V201122 00951000
  1066. TM OSFSTRFM,X'20' IS THIS AN OVERFLOW DATA SET @V201122 00952000
  1067. BO NOOVRFLW YES, SET MASK TO STOP OVERFLOW @V201122 00953000
  1068. CLI 0(R8),X'80' SPLIT CYL EXTENT @V201122 00954000
  1069. BCR 7,R15 NO, CONTINUE @V201122 00955000
  1070. CLC CCHHR+2(2),OSFSTEND+2 LAST TRACK OF SPLIT CYL@V201122 00956000
  1071. BCR 7,R15 NO, RETURN TO CALLER @V201122 00957000
  1072. NOOVRFLW MVC MASK(1),MASK2 SET TO NOT ALLOW OVERFLOW OF TRK @V201122 00958000
  1073. BR R15 RETURN TO CALLER @V201122 00959000
  1074. SETXTNT MVC CCHHR(4),2(R8) SET TRACK ADDR @V201122 00960000
  1075. MVI CCHHR+4,0 SET RECORD NO. TO ZERO @V201122 00961000
  1076. MVC OSFSTEND(4),6(R8) SET END OF EXTENT ADDR @V201122 00962000
  1077. NI OSFSTFLG,255-OSFSTALT TURN OFF ALT TRK INDICA@V201122 00963000
  1078. BAL R15,SETMASK SET FILE MASK @V201122 00964000
  1079. BR R10 RETURN TO CALLER @V201122 00965000
  1080. SPACE 2 00966000
  1081. *************************************************************** 00967000
  1082. * 00968000
  1083. * SWITCH DASD ADDRESS FROM DEFECTIVE TO ALTERNATE TRACK 00969000
  1084. * OR BACK FROM ALTERNATE TO NEXT PRIMARY TRACK 00970000
  1085. * 00971000
  1086. *************************************************************** 00972000
  1087. GETALT TM SNSEBYTE,X'02' IS TRACK CONDITION PRESENT @V201122 00973000
  1088. BZ ERR80 NO, IMPROPER ENTRANCE @V201122 00974000
  1089. GETALT2 TM OSFSTFLG,OSFSTALT ON ALTERNATE TRACK? @V201122 00975000
  1090. BO NXTPRIME YES, GO RETURN TO NEXT PRIME TRAC@V201122 00976000
  1091. OI OSFSTFLG,OSFSTALT INDICATE ALT TRACK @V201122 00977000
  1092. L R1,CSW GET FAILING CCW ADDRESS @V201122 00978000
  1093. LA R1,0(,R1) CLEAR HIGH ORDER BYTE @V201122 00979000
  1094. S R1,=F'8' BACKUP TO FAILING CCW START ADDRE@V201122 00980000
  1095. TM 0(R1),X'80' IS IT A MULTIPLE TRACK CCW @V201122 00981000
  1096. L R1,NEXTSEEK SEARCH ADDRESS USED PREVIOUSLY @V201122 00982000
  1097. BZ NOTMTCCW NOT MULTIPLE TRACK, LEAVE SEARCH @V201122 00983000
  1098. BUMPCCHH MVI CCHHR+4,0 START ALT TRK ADDR AT RECORD 0 @V201122 00984000
  1099. LA R1,1(,R1) BUMP TO NEXT TRACK ADDRESS @V201122 00985000
  1100. ST R1,CCHHR UPDATE TO TRACK REPRESENTED BY AL@V201122 00986000
  1101. NOTMTCCW ST R1,SEEK+2 ADDRESS WHICH IS BAD TRACK @V201122 00987000
  1102. LR R10,R14 SAVE RETURN ADDRESS FOR A MOMENT @V201122 00988000
  1103. LA R0,READR0 CHAN PROG TO READ R0 TO FIND ALTE@V201122 00989000
  1104. BAL R14,DISKIO GO GET ALTERNATE ADDRESS @V201122 00990000
  1105. B ERR80 BAD NEW BROTHER @V201122 00991000
  1106. BC 0,0(R0) IL OR UE IS OKAY @V201122 00992000
  1107. ALTRET TM R0DATA+11,X'02' BAD TRACK INDICATOR ON @V201122 00993000
  1108. BCR 1,R10 OKAY IF BAD TRK, RETURN @V201122 00994000
  1109. TM OSFSTRFM,X'20' TRACK OVERFLOW SPECIFIED @V201122 00995000
  1110. BCR 14,R10 NO, RETURN @V201122 00996000
  1111. TM SNSEBYTE,X'03' BOTH OVERFLOW AND BAD TRK @V201122 00997000
  1112. BCR 14,R10 NO, RETURN @V201122 00998000
  1113. L R1,R0DATA+12 GET CURRENT CCHH @V201122 00999000
  1114. LR R14,R10 SAVE RETURN ADDR @V201122 01000000
  1115. B BUMPCCHH READ NEXT HOME ADDR @V201122 01001000
  1116. NXTPRIME NI OSFSTFLG,255-OSFSTALT RESET ALT INDICATOR @V201122 01002000
  1117. UPTRK LA R1,1 SETUP TO COMPUTE NEXT GOOD TRACK @V201122 01003000
  1118. A R1,CCHHR DASD ADDR OF DEFECTIVE +1 @V201122 01004000
  1119. CLM R1,B'0001',OSFSTTRK+3 IS HEAD BEYOND CYL BOUNARY@V201122 01005000
  1120. BL NOTBYOND NO, ADDR OK AS IS @V201122 01006000
  1121. LH R1,CCHHR GET CYLINDER ADDRESS @V201122 01007000
  1122. LA R1,1(,R1) BUMP TO NEXT CYLINDER @V201122 01008000
  1123. SLL R1,16 CLEAR HEAD ADDRESS TO ZERO @V201122 01009000
  1124. CLI 0(R8),X'80' SPLIT CYLINDER ? @V2A3801 01009100
  1125. BNE NOTBYOND NO, BRANCH @V2A3801 01009200
  1126. ICM R1,B'0011',4(R8) SET STARTING HH @V2A3801 01009300
  1127. NOTBYOND ST R1,CCHHR PUT BACK UPDATED SEARCH ADDRESS @V201122 01010000
  1128. MVI CCHHR+4,0 SET TO RECORD ZERO @V201122 01011000
  1129. B 4(,R14) RETURN ON NEW TRACK RETURN POINT @V201122 01012000
  1130. SPACE 1 01013000
  1131. SPACE 4 01014000
  1132. *************************************************************** 01015000
  1133. * 01016000
  1134. * CHANNEL PROGRAMS FOR PACK FORMATTED FOR OS 01017000
  1135. * 01018000
  1136. *************************************************************** 01019000
  1137. SPACE 1 01020000
  1138. READR0 CCW 7,SEEK,CC,6 SEEK TO ADDRESS AT SEEK @V201122 01021000
  1139. CCW 31,MASK,CC,1 SET FILE MASK @V201122 01022000
  1140. CCW 26,R0DATA+11,CC,5 READ HOME ADDRESS @V201122 01023000
  1141. CCW 22,R0DATA,CC,8 READ ALTERNATE TRACK ADD@V201122 01024000
  1142. CCW 3,0,SLI,1 NOP @V201122 01025000
  1143. SPACE 1 01026000
  1144. READBLK CCW 7,SEEK,CC,6 SEEK TO ADDRESS AT SEEK @V201122 01027000
  1145. CCW 31,MASK,CC,1 SET FILE MASK @V201122 01028000
  1146. CCW 49,CCHHR,CC,5 SEARCH ID EQUAL @V201122 01029000
  1147. CCW 8,*-8,CC+SLI,1 TIC @V201122 01030000
  1148. READCHR CCW 146,0,CC,8 READ THIS CCHHR @VM08817 01031000
  1149. READCCW CCW 6,0,0,0 READ DATA RECORD @V201122 01032000
  1150. SPACE 1 01033000
  1151. RDDSCB4 CCW 7,SEEK,CC,6 SEEK TO ADDRESS AT SEEK @V201122 01034000
  1152. CCW 31,MASK1,CC,1 SET FILE MASK @V201122 01035000
  1153. CCW 49,CCHHR,CC,5 SEARCH ID EQUAL @V201122 01036000
  1154. CCW 8,*-8,CC+SLI,1 TIC @V201122 01037000
  1155. CCW 6,DSCB4,CC,96 READ DSCB4 INTO TEMP BUF@V201122 01038000
  1156. CCW 3,0,SLI,1 NOP @V201122 01039000
  1157. SPACE 1 01040000
  1158. RDDSCB1 CCW 7,SEEK,CC,6 SEEK TO ADDRESS IN SEEK @V201122 01041000
  1159. CCW 31,MASK1,CC,1 SET FILE MASK @V201122 01042000
  1160. CCW 49,CCHHR,CC,5 SEARCH ID EQUAL @V201122 01043000
  1161. CCW 8,*-8,CC+SLI,1 TIC @V201122 01044000
  1162. CCW 146,NEXTSEEK,CC,8 READ DISK ADDR OF THIS R@V201122 01045000
  1163. ADDSNAME CCW 41,0,CC,44 SEARCH KEY EQUAL FOR DSN@V201122 01046000
  1164. CCW 8,*-16,CC+SLI,1 TIC @V201122 01047000
  1165. CCW 6,DSCB1,CC,96 READ DSCB1 INTO TEMP BUF@V201122 01048000
  1166. CCW 3,0,SLI,1 NOP @V201122 01049000
  1167. SPACE 1 01050000
  1168. RDDSCB3 CCW 7,SEEK,CC,6 SEEK TO ADDRESS IN SEEK @V201122 01051000
  1169. CCW 31,MASK1,CC,1 SET FILE MASK @V201122 01052000
  1170. CCW 49,CCHHR,CC,5 SEARCH ID EQUAL @V201122 01053000
  1171. CCW 8,*-8,CC+SLI,1 TIC @V201122 01054000
  1172. XTENTS CCW 14,*-*,CC,140 READ KEY & DATA (DSCB3 E@V201122 01055000
  1173. CCW 3,0,SLI,1 NOP @V201122 01056000
  1174. SPACE 1 01057000
  1175. RDPDSD CCW 7,SEEK,CC,6 SEEK TO ADDR IN SEEK @V201122 01058000
  1176. CCW 31,MASK,CC,1 SET FILE MASK @V201122 01059000
  1177. CCW 49,CCHHR,CC,5 SEARCH ID EQUAL @V201122 01060000
  1178. CCW 8,*-8,CC+SLI,1 TIC @V201122 01061000
  1179. CCW 146,NEXTSEEK,CC,8 READ DISK ADDR OF THIS R@V201122 01062000
  1180. SRCHMEM CCW 105,MEMBER,CC,8 SEARCH KEY EQUAL OR HIGH@V201122 01063000
  1181. CCW 8,*-16,CC+SLI,1 TIC @V201122 01064000
  1182. CCW 6,PDSBLK,CC,256 READ PDS BLOCK INTO TEMP@V201122 01065000
  1183. CCW 3,0,SLI,1 NOP @V201122 01066000
  1184. SPACE 1 01067000
  1185. READSKIP CCW 7,SEEK,CC,6 SEEK TO ADDR IN SEEK @V201122 01068000
  1186. CCW 31,MASK,CC,1 SET FILE MASK @V201122 01069000
  1187. CCW 49,CCHHR,CC,5 SEARCH ID EQUAL @V201122 01070000
  1188. CCW 8,*-8,CC+SLI,1 TIC @V201122 01071000
  1189. READCHR1 CCW 146,0,CC,8 READ DISK ADDR @VM28920 01072000
  1190. CCW 6,0,CC+SKIP+SLI,8 READ DATA SKIP FOR POINT@V201122 01073000
  1191. READCHR2 CCW 146,0,0,8 READ DISK ADDR @VM28920 01074000
  1192. SPACE 2 01075000
  1193. RDLSTCNT CCW 7,SEEK,CC,6 SEEK TO ADDR IN SEEK @V201122 01076000
  1194. CCW 31,MASK2,CC,1 SET FILE MASK @V201122 01077000
  1195. CCW 49,CCHHR,CC,5 SEARCH ID EQUAL @V201122 01078000
  1196. CCW 8,*-8,CC+SLI,1 TIC @V201122 01079000
  1197. CCW 18,NEXTSEEK,CC+SLI,5 RD COUNT TILL TRK END @V2A3801 01080100
  1198. CCW 8,*-8,SLI,1 TIC @V201122 01081000
  1199. SPACE 4 01082000
  1200. *************************************************************** 01083000
  1201. * 01084000
  1202. * CONSTANTS, STORAGE AREAS, AND MESSAGES OF GREAT UTILIT 01085000
  1203. * 01086000
  1204. *************************************************************** 01087000
  1205. SPACE 1 01088000
  1206. DS 0D @V201122 01089000
  1207. ZEROES DC 2F'0' ZEROES @V201122 01090000
  1208. FCBSAVE DS F FCB ADDRESS SAVED @V201122 01091000
  1209. FENCE DC 8X'FF' DELIMITER FENCE @V201122 01092000
  1210. SNSEDATA DC 2X'00' SAVE SENSE DATA @V201122 01093000
  1211. RESIDUAL DS H'0' @V201122 01094000
  1212. CCHHR DC F'0' NEXT SEARCH ADDRESS @V201122 01095000
  1213. DC H'0' @V201122 01096000
  1214. NEXTSEEK DS 2F ADDRESS OF RECOR JUST RE@V201122 01097000
  1215. DS H @V201122 01098000
  1216. SEEK DC H'0' NEXT SEEK ADDRESS @V201122 01099000
  1217. R0DATA DS 4F @V201122 01100000
  1218. MEMBER DS 8X CURRENT MEMBER NAME @V201122 01101000
  1219. MASK DC B'01010000' MASK TO ALLOW TRK OVERFL@V201122 01102000
  1220. MASK1 DC B'01010000' @V201122 01103000
  1221. MASK2 DC B'01011000' MASK TO RESTRICT TRK OVE@V201122 01104000
  1222. SNSEBYTE DC X'00' SENSE DATA @V201122 01105000
  1223. ROSFLAG DC X'00' CONTROL FLAGS @VA09241 01105300
  1224. DYNAMIC EQU X'80' DSN BLOCK IS CHAINED @VA09241 01105600
  1225. SPACE 2 01106000
  1226. SPACE 2 01107000
  1227. LTORG @V201122 01108000
  1228. SPACE 2 01109000
  1229. DS 0D ALIGN FOR GOOD I/O @V201122 01110000
  1230. DSCB4 DS 0F TEMP 4F DSCB4 ACCESS BUF@V201122 01111000
  1231. DS4HPCHR EQU DSCB4+45-44 HIGHEST DSCB1 ADDRESS @V201122 01112000
  1232. DS4VTOCI EQU DSCB4+58-44 VTOC INDICATORS @V201122 01113000
  1233. DS4DEVSZ EQU DSCB4+62-44 DEVICE SIZE @V201122 01114000
  1234. DS4VTOCE EQU DSCB4+105-44 VTOC EXTENT @V201122 01115000
  1235. DSCB1 DS 0F TEMP 24F DSCB1 STATE BUF@V201122 01116000
  1236. DS1FMTID EQU DSCB1+44-44 FORMAT IDENTIFIER @V201122 01117000
  1237. DS1VOLSQ EQU DSCB1+51-44 VOLUME SEQUENCE NO. @V201122 01118000
  1238. DS1NOEPV EQU DSCB1+59-44 NO. OF EXTENTS @V201122 01119000
  1239. DS1DSORG EQU DSCB1+82-44 DATA SET ORGANIZATION @V201122 01120000
  1240. DS1RECFM EQU DSCB1+84-44 RECORD FORMAT @V201122 01121000
  1241. DS1BLKL EQU DSCB1+86-44 BLOCK SIZE @V201122 01122000
  1242. DS1LRECL EQU DSCB1+88-44 LOGICAL RECORD LENGTH @V201122 01123000
  1243. DS1DSIND EQU DSCB1+93-44 DATA SET INDICATORS @V201122 01124000
  1244. DS1LSTAR EQU DSCB1+98-44 LAST BLOCK POINTER @V201122 01125000
  1245. DS1EXT1 EQU DSCB1+105-44 DATA SET EXTENTS @V201122 01126000
  1246. DS1PTRDS EQU DSCB1+135-44 POINTER TO DSCB3 @V201122 01127000
  1247. PDSBLK DS 64F TEMP 64F OS FIND PDS BLO@V201122 01128000
  1248. SPACE 2 01129000
  1249. EJECT 1 01130000
  1250. CC EQU X'40' CCW COMMAND CHAIN @V201122 01131000
  1251. SLI EQU X'20' SUPPRESS INCORRECT LENGT@V201122 01132000
  1252. SKIP EQU X'10' SUPPRESS DATA TRANSFER @V201122 01133000
  1253. MEMHIGH EQU 73 SEARCH FOR HIGHER MEMBER NAME @V201122 01134000
  1254. MEMHGHEQ EQU 105 SEARCH FOR HIGH OR EQUAL NAME @V201122 01135000
  1255. TYP3350 EQU X'0B' CMS' 3350 DEVICE TYPE @V304498 01135100
  1256. THREE DC X'03' THREE EXTENTS @VA06195 01135200
  1257. USERLBL EQU X'40' USER LABEL FLAG @VA06195 01135300
  1258. DOSDASD EQU X'80' DOS PACK @VA13649 01135500
  1259. DS4VTOCX EQU X'01' DSCB4 INDEXED VTOC @VA13649 01135700
  1260. SPACE 4 01136000
  1261. ERR80 LA R15,80 @V201122 01137000
  1262. ERRRET B INTRETRN @V201122 01138000
  1263. EOF LA R15,12 SET EOF ERROR CODE @V201122 01139000
  1264. B ERRRET @V201122 01140000
  1265. DSNOTFND EQU * @V201122 01141000
  1266. FCBNTFND LA R15,88 @V201122 01142000
  1267. B ERRRET @V201122 01143000
  1268. EJECT 1 01144000
  1269. PRINT GEN 01145000
  1270. NUCON @V201122 01146000
  1271. ADT @V201122 01147000
  1272. OSFST @V201122 01148000
  1273. CMSCB @V201122 01149000
  1274. IO @V201122 01150000
  1275. CMSAVE @V201122 01151000
  1276. REGEQU @V201122 01152000
  1277. END 01153000