User Tools

Site Tools


ibm:vm370-lib:cms:dmstpd.assemble_src

DMSTPD Source

References

Source Listing

DMSTPD.ASSEMBLE.txt
  1. TPD TITLE 'DMSTPD (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. * DMSTPD (TAPPDS) 00010000
  11. * 00011000
  12. * FUNCTION: 00012000
  13. * 00013000
  14. * ENABLE USERS TO READ A TAPE CONSISTING OF CARD IMAGES 00014000
  15. * MEMBERS OF A PDS AND CREATE CMS DISK FILE(S) FOR EACH 00015000
  16. * MEMBER OF THE DATA SET, OR TO READ A TAPE CONSISTING 00016000
  17. * OF UNLOADED PDS AND CREATE CMS DISK FILE(S) FOR EACH 00017000
  18. * MEMBER OF THE DATA SET. THE PDS OPTION WILL ALLOW TO 00018000
  19. * TO READ UNBLOCKED TAPES PRODUCED BY THE O/S IEBPTPCH 00019000
  20. * UTILITY, OR BLOCKED TAPES PRODUCED BY THE O/S IEHMOVE 00020000
  21. * UTILITY. THE UPDATE OPTION WILL PROVIDE THE './ ADD' 00021000
  22. * FUNCTION TO TAPES, BLOCKED OR UNBLOCKED, PRODUCED BY 00022000
  23. * THE O/S IEBUPDTE UTILITY. 00023000
  24. * 00024000
  25. * ATTRIBUTES: 00025000
  26. * 00026000
  27. * DISK RESIDENT 00027000
  28. * 00028000
  29. * ENTRY POINTS: 00029000
  30. * 00030000
  31. * DMSTPD 00031000
  32. * 00032000
  33. * ENTRY CONDITIONS: 00033000
  34. * 00034000
  35. * GPR1 = A(PLIST) 00035000
  36. * PLIST DC CL8'TAPPDS' 00036000
  37. * 00037000
  38. * DC CL8'FILENAME'|'TAPPDS' 00038000
  39. * 00039000
  40. * DC CL8'FILETYPE'|'CMSUT1' 00040000
  41. * 00041000
  42. * DC CL8'FILEMODE'|'A1' 00042000
  43. * 00043000
  44. * DC CL8'(' DEFAULT OPTIONS APPEAR FIRST: 00044000
  45. * 00045000
  46. * DC CL8'PDS'|'NOPDS'|'UPDATE' 00046000
  47. * 00047000
  48. * DC CL8'NOCOL1'|'COL1' 00048000
  49. * 00049000
  50. * DC CL8'TAP1'|'TAPX' 00050000
  51. * 00051000
  52. * DC CL8'NOEND'|'END' 00052000
  53. * 00053000
  54. * DC CL8'NOMAXTEN'|'MAXTEN' 00054000
  55. * 00055000
  56. * EXIT CONDITIONS: 00056000
  57. * 00057000
  58. * NORMAL 00058000
  59. * 00059000
  60. * GPR15 = 0 : NO ERRORS. 00060000
  61. * 00061000
  62. * ERROR 00062000
  63. * 00063000
  64. * GPR15 = 00064000
  65. * 24 INVALID DISK MODE 00065000
  66. * 24 OPTION ERROR 00066000
  67. * 40 TWO ADJACENT TAPE MARKS ENCOUNTERED 00067000
  68. * 100 TAPE ERROR 00068000
  69. * 100 ERROR WRITING TO DISK 00069000
  70. * 104 VIRTUAL STORAGE CAPACITY EXCEEDED 00070000
  71. * 00071000
  72. * CALLS TO OTHER ROUTINES: 00072000
  73. * 00073000
  74. * DMSBWR,DMSFNS,DMSSTT,DMSAUDL,DMSERS,DMSCWR,DMSTIO,DMSERR 00074000
  75. * 00075000
  76. * EXTERNAL REFERENCES: 00076000
  77. * 00077000
  78. * NONE. 00078000
  79. * 00079000
  80. * TABLES/WORKAREAS: 00080000
  81. * 00081000
  82. * PLISTS FOR THE CALLS AND OTHER ROUTINES. 00082000
  83. * 00083000
  84. * REGISTER USAGE: 00084000
  85. * 00085000
  86. * GPR12 = BASE REGISTER 00086000
  87. * GPR1 = A(PARAMETER LIST) 00087000
  88. * 00088000
  89. * NOTES: 00089000
  90. * 00090000
  91. * WHEN PROCESSING UNLOADED PDS, ALL OPTIONS ARE IGNORED. 00091000
  92. * 00092000
  93. * OPERATION: 00093000
  94. * 00094000
  95. * TAPPDS SETS FLAG BITS EITHER TO THE DEFAULT SETTING 00095000
  96. * OR TO THE REQUESTED OPTION SETTING. IF A USER 00096000
  97. * FILENAME, FILETYPE, OR TAPE UNIT IS REQUESTED, THESE 00097000
  98. * ARE SAVED IN LOCATIONS NAM1, NAM2, AND TAPID. TAPE 00098000
  99. * RECORDS ARE READ, & THE END-OF-FILE FLAG IS CLEARED 00099000
  100. * AFTER EACH READ. IF O/S LABELS ARE ON THE TAPE, THEY 00100000
  101. * ARE TYPED TO THE TERMINAL AND THE NEXT RECORD IS 00101000
  102. * READ. 00102000
  103. * 00103000
  104. * IF DATA COLUMNS 1-7 CONTAIN 'MEMBER', THE OPTION BITS 00104000
  105. * ARE CHECKED FOR THE PARTITIONED DATA SET REQUEST. IF 00105000
  106. * THERE IS A PDS REQUEST AND THE FILE IS OPEN, FINIS 00106000
  107. * IS CALLED TO CLOSE THE OLD FILE, THE USER IS NOTIFIED 00107000
  108. * AND THE PROGRAM CONTINUES. OTHERWISE, 00108000
  109. * STATE IS CALLED FOR THE FILE - IF IT EXISTS, ERASE IS 00109000
  110. * CALLED. THE OPEN FILE BIT IS SET ON, AND THE RECORDS 00110000
  111. * ARE BROUGHT IN. IF THERE IS NO PDS REQUEST, THE 00111000
  112. * FIELD IS IGNORED, THE FILE OPENED, AND WRBUF IS 00112000
  113. * CALLED TO WRITE THE RECORD ON DISK. SUCCEEDING 00113000
  114. * RECORDS GO DIRECTLY TO WRBUF UNTIL TAPPDS ENCOUNTERS 00114000
  115. * EITHER THE NEXT 'MEMBER' CARD (PDS) OR A TAPE MARK IS 00115000
  116. * READ (NOPDS). IF THE 'END' OPTION IS SPECIFIED, PRO- 00116000
  117. * CESSING CONTINUES UNTIL AN 'END' CARD IS ENCOUNTERED. 00117000
  118. * FOR 'NOPDS', THE FILE IS CLOSED, AND PROCESSING STOPS 00118000
  119. * WITH THE TAPE POSITIONED AFTER THE 'END' CARD. 00119000
  120. * FOR 'PDS', THE FILE IS CLOSED BY CMS FINIS, THE USER 00120000
  121. * IS INFORMED, AND THE 'MAXTEN' COUNTER IS UPDATED AND 00121000
  122. * CHECKED. IF 'MAXTEN' IS REQUESTED, AND THE LIMIT IS 00122000
  123. * REACHED, THE TAPE IS BACKSPACED, THE USER IS INFORMED 00123000
  124. * AND THE PROGRAM IS TERMINATED. IF THE 'MAXTEN' OPTION 00124000
  125. * IS NOT SPECIFIED, TAPPDS SCANS FOR THE NEXT FILE. 00125000
  126. * 00126000
  127. * 00127000
  128. * TAPPDS, WITH THE 'UPDATE' OPTION, WILL SCAN FOR './' 00128000
  129. * CARDS, WHICH ARE USED AS 'IEBUPDTE' CONTROL CARDS, IN 00129000
  130. * ORDER TO LOAD SOURCE DECKS INTO CMS DISK FILES. TAPPDS 00130000
  131. * WILL ONLY RECOGNIZE THE './ ADD' CARD WITH A 'NAME=' 00131000
  132. * PARAMETER FROM WHICH TAPPDS GETS THE CMS FILENAME. A 00132000
  133. * DEFAULT FILENAME OF 'TAPPDS' WILL BE USED IF 'NAME=' 00133000
  134. * IS MISSING OR FOLLOWED BY A BLANK. A DEFAULT FILETYPE 00134000
  135. * OF 'ASSEMBLE' IS USED, UNLESS OTHERWISE SPECIFIED BY 00135000
  136. * THE USER IN THE COMMAND LINE. 00136000
  137. * THE 'END' OPTION IS DISABLED WITH THE 'UPDATE' OPTION. 00137000
  138. * ALL './' CARDS ARE DELETED BEFORE THE FILE IS WRITTEN 00138000
  139. * TO DISK. WHEN A './ ENDUP' CARD IS FOUND, THE CURRENT 00139000
  140. * FILE IS CLOSED, THE USER IS INFORMED, AND PROCESSING 00140000
  141. * STOPS WITH NO REPOSITIONING OF THE TAPE. 00141000
  142. * 00142000
  143. * IF THE FIRST RECORD READ SHOWS THAT THE FILE BELONGS 00143000
  144. * TO AN UNLOADED PDS, THE DSCB FOR THE DATA SET (RECORD 00144000
  145. * 2) IS READ, AND THE 'RECFM' AND 'LRECL' ARE SAVED FOR 00145000
  146. * LATER USE. THE 1ST. MEMBER HEADER RECORD IS READ. ALL 00146000
  147. * DUMMY AND NOTELIST RECORDS ARE IGNORED. ALL PDS DATA 00147000
  148. * RECORDS ARE WRITTEN TO DISK (IF THE DATA SET IS FIXED 00148000
  149. * BLOCKED, THE DATA SET IS DEBLOCKD AND WRITTEN TO DISK 00149000
  150. * AS FIXED). WHEN THE NEXT MEMBER HEADER RECORD IS READ, 00150000
  151. * OR A TAPE MARK IS READ, THE FILE IS CLOSED, THE USER 00151000
  152. * IS INFORMED, AND THE NEW FILE IS OPENED (IF NOT EOF). 00152000
  153. * EVERYTIME A NEW MEMBR HEADER RECORD IS READ, STATE IS 00153000
  154. * CALLED TO VERIFY IF ANY OLD FILE EXISTS, AND IF FOUND 00154000
  155. * ERASE IS CALLED TO ERASE THE OLD FILE. 00155000
  156. * 00156000
  157. * AN ENCOUNTER OF TWO TAPE MARKS IN A ROW WILL ALSO 00157000
  158. * TERMINATE THE PROGRAM. 00158000
  159. * 00159000
  160. *. 00160000
  161. EJECT 00161000
  162. DMSTPD CSECT 00162000
  163. USING DMSTPD,R12 00163000
  164. USING NUCON,R0 @V305001 00163100
  165. LR R12,R15 GET ADDRESSABILITY 00164000
  166. OI FLAG,PDS+BTOF SET DEFAULT VALUES 00165000
  167. * 00166000
  168. LA R1,8(,R1) INTERPRET PARAMETER LIST 00167000
  169. CLC 0(4,R1),FENCE END OF LIST ? 00168000
  170. BE TOP YES, BYPASS LIST DECODE 00169000
  171. CLI 0(R1),C'(' BEGIN OF OPTIONS ? 00170000
  172. BE PARLOOP YES, DETERMINE OPTIONS 00171000
  173. CLC 0(2,R1),STAR DEFAULT FILENAME SPECIFIED ? 00172000
  174. BE LOOKTYPE YES, CHECK FILETYPE 00173000
  175. MVC NAM1,0(R1) PROVIDE USER FILENAME 00174000
  176. LOOKTYPE LA R1,8(,R1) BUMP TO FILETYPE 00175000
  177. CLC 0(4,R1),FENCE END OF LIST ? 00176000
  178. BE STATCALL YES, CALL STATE 00177000
  179. CLI 0(R1),C'(' BEGIN OF OPTIONS ? 00178000
  180. BE STATCALL YES, CALL STATE 00179000
  181. CLC 0(2,R1),STAR DEFAULT FILETYPE SPECIFIED ? 00180000
  182. BE DEFTYPE YES, CHECK FILEMODE 00181000
  183. MVC NAM2,0(R1) PROVIDE USER FILETYPE 00182000
  184. DEFTYPE LA R1,8(,R1) BUMP TO FILEMODE 00183000
  185. CLC 0(4,R1),FENCE END OF LIST ? 00184000
  186. BE STATCALL YES, CALL STATE 00185000
  187. CLI 0(R1),C'(' BEGIN OF OPTIONS ? 00186000
  188. BE STATCALL IF SO, GO CALL STATE 00187000
  189. CLC 0(2,R1),STAR DEFAULT FILEMODE SPECIFIED ? 00188000
  190. BE BUMP YES, BUMP TO START OPTIONS 00189000
  191. MVC MODE(2),0(R1) PROVIDE USER FILEMODE 00190000
  192. CLI MODE+1,C' ' IS FILEMODE NUMBER BLANK @VA04055 00190100
  193. BNE BUMP BR TO BUMP IF NUMBER GIVEN @VA04055 00190200
  194. MVI MODE+1,C'1' SPECIFY 1 IF NOT @VA04055 00190300
  195. BUMP LA R1,8(,R1) BUMP TO OPTIONS 00191000
  196. STATCALL LR R2,R1 SAVE LINE POINTER 00192000
  197. MVC STATNAME(18),NAM1 MAKE UP STATE FILEID 00193000
  198. LA R1,STATLIST GET STATE LIST 00194000
  199. SVC 202 CALL STATE 00195000
  200. DC AL4(*+4) ... 00196000
  201. LTR R15,R15 ANY ERRORS FROM STATE ? 00197000
  202. BZ CHEKEND NO, KEEP CHECKING LINE 00198000
  203. CH R15,=H'28' WAS IT 'NOT FOUND' ? 00199000
  204. BNE RETURN NO, SYNTAX OR DISK ERROR 00200000
  205. CHEKEND LR R1,R2 RESTORE LINE POINTER 00201000
  206. CLC 0(4,R1),FENCE END OF LIST ? 00202000
  207. BE TOP YES, GET OUT OF LINE SCAN 00203000
  208. CLI 0(R1),C'(' START OF OPTIONS ? 00204000
  209. BNE ERR3E NO, ABSOLUTELY AN ERROR 00205000
  210. EJECT 00206000
  211. PARLOOP LA R1,8(,R1) POINT TO 1ST OPTION 00207000
  212. CLC 0(4,R1),FENCE END OF LIST ? 00208000
  213. BE TOP YES, BYPASS OPTION CHECKING 00209000
  214. CLI 0(R1),C')' END OF OPTIONS ? 00210000
  215. BE TOP YES, BYPASS OPTION CHECKING 00211000
  216. CLC 0(8,R1),=CL8'PDS' IS OPTION 'PDS' ? 00212000
  217. BNE TNPDS NO, CHECK 'NOPDS' 00213000
  218. OI FLAG,PDS SET 'PDS' FLAG 00214000
  219. NI FLAG2,255-UPDATE AND 'NOPDS' OFF 00215000
  220. B PARLOOP GET NEXT OPTION 00216000
  221. TNPDS CLC 0(8,R1),=CL8'NOPDS' IS OPTION 'NOPDS' ? 00217000
  222. BNE TCOL1 NO, CHECK 'COL1' 00218000
  223. NI FLAG,255-PDS CLEAR 'PDS' FLAG 00219000
  224. B PARLOOP GET NEXT OPTION 00220000
  225. TCOL1 CLC 0(8,R1),=CL8'COL1' IS OPTION 'COL1' ? 00221000
  226. BNE TNCOL1 NO, CHECK 'NOCOL1' 00222000
  227. OI FLAG,COL1 SET 'COL1' FLAG 00223000
  228. B PARLOOP GET NEXT OPTION 00224000
  229. TNCOL1 CLC 0(8,R1),=CL8'NOCOL1' IS OPTION 'NOCOL1' ? 00225000
  230. BNE TTAP NO, CHECK 'TAPX' 00226000
  231. NI FLAG,255-COL1 CLEAR 'COL1' FLAG 00227000
  232. B PARLOOP GET NEXT OPTION 00228000
  233. TTAP CLC 0(3,R1),=C'TAP' IS OPTION 'TAPX' ? 00229000
  234. BNE TEND NO, CHECK 'END' 00230000
  235. CLI 3(R1),C'0' IS IT TAP0 ? HRC002DS 00231390
  236. BL ERR3E IF LESS THAN 0, ERROR HRC002DS 00231780
  237. CLI 3(R1),C'9' IS IT TAP4 ? HRC002DS 00232170
  238. BNH TTAPX IF <= 9, OK HRC002DS 00232560
  239. CLI 3(R1),C'A' IS IT TAP0 ? HRC002DS 00232950
  240. BL ERR3E IF LESS THAN A, ERROR HRC002DS 00233340
  241. CLI 3(R1),C'F' IS IT TAPF ? HRC002DS 00233730
  242. BH ERR3E IF HIGHER THAN F, ERROR HRC002DS 00234120
  243. TTAPX EQU * HRC002DS 00234510
  244. CLI 4(R1),C' ' ANYMORE DIGITS ? 00235000
  245. BNE ERR3E YES, DEFINITELY AN ERROR 00236000
  246. MVC TAPID(4),0(R1) SET TAPEID FOR TAPEIO 00237000
  247. B PARLOOP GET NEXT OPTION 00238000
  248. TEND CLC 0(8,R1),=CL8'END' IS OPTION 'END' ? 00239000
  249. BNE TNEND NO, CHECK 'NOEND' 00240000
  250. OI FLAG,END SET 'END' FLAG 00241000
  251. B PARLOOP GET NEXT OPTION 00242000
  252. TNEND CLC 0(8,R1),=CL8'NOEND' IS OPTION 'NOEND' ? 00243000
  253. BNE TUPDATE NO, CHECK 'UPDATE' 00244000
  254. NI FLAG,255-END CLEAR 'END' FLAG 00245000
  255. B PARLOOP GET NEXT OPTION 00246000
  256. TUPDATE CLC 0(8,R1),=CL8'UPDATE' IS OPTION 'UPDATE' ? 00247000
  257. BNE TMAXTEN NO, CHECK 'MAXTEN' 00248000
  258. OI FLAG2,UPDATE SET 'UPDATE' FLAG 00249000
  259. NI FLAG,255-END-PDS CLEAR 'END' & 'PDS' FLAGS 00250000
  260. B PARLOOP GET NEXT OPTION 00251000
  261. TMAXTEN CLC 0(8,R1),=CL8'MAXTEN' IS OPTION 'MAXTEN' ? 00252000
  262. BNE TNMAXTEN NO, CHECK 'NOMAXTEN' 00253000
  263. OI FLAG,MAXTEN SET 'MAXTEN' FLAG 00254000
  264. B PARLOOP GET NEXT OPTION 00255000
  265. TNMAXTEN CLC 0(8,R1),=CL8'NOMAXTEN' IS OPTION 'NOMAXTEN' ? 00256000
  266. BNE ERR3E NO, THEN MUST BE INVALID 00257000
  267. NI FLAG,255-MAXTEN CLEAR 'MAXTEN' FLAG 00258000
  268. B PARLOOP GET NEXT OPTION 00259000
  269. EJECT 00260000
  270. TOP EQU * 00261000
  271. MVC DOSF(1),DOSFLAGS SAVE NUCON'S DOSFLAGS @V305001 00261100
  272. DMSEXS NI,DOSFLAGS,255-DOSSVC SET DOSSVC OFF (IF ON) @V305001 00261200
  273. GETMAIN VC,LA=REQS,A=UPBUF @VA00766 00262000
  274. MVC TAPBUFSZ(4),UPBUF+4 BUFFER SIZE TO TAPIO LIST @VA00766 00263000
  275. L R11,UPBUF GET THE BUFFER ADDRESS @VA00766 00264000
  276. STCM R11,7,TAPBUFAD SAVE IT IN TAPEIO LIST @VA00766 00265000
  277. A R11,TAPBUFSZ GET TOP OF AREA GETMAIN'D @V200801 00266000
  278. ST R11,UPBUFHI SAVE FOR LATER USE @V200801 00267000
  279. MVC 0(4,R11),=C'VOL1' PREPARE BUFFER @VA00766 00268000
  280. TM FLAG2,UPDATE 'UPDATE' OPTION SPECIFIED ? 00269000
  281. BZ NOUP NO, SKIP FILETYPE CHECK 00270000
  282. CLC NAM2(8),=CL8'CMSUT1' WAS FILETYPE SPECIFIED ? 00271000
  283. BNE NOUP NO, LEAVE FILETYPE ALONE 00272000
  284. MVC NAM2(8),=CL8'ASSEMBLE' SET DEFAULT FILETYPE 00273000
  285. MVC STATNAME(16),NAM1 ALSO STATE LIST 00274000
  286. NOUP MVC FILETYPE,NAM2 PROVIDE 'WRBUF' WITH FILETYPE 00275000
  287. MVC FILEMODE,MODE AND FILEMODE ALSO 00276000
  288. TM FLAG,PDS 'PDS' OPTION SPECIFIED ? 00277000
  289. BO TAPEREAD YES, USE MEM NAMES AS FNAME 00278000
  290. MVC FILENAME,NAM1 OTHERWISE, USE A FILENAME 00279000
  291. TAPEREAD LA R1,TAPLIST READ A TAPE RECORD 00280000
  292. SVC 202 ... 00281000
  293. DC AL4(TAPERR) ERROR EXIT 00282000
  294. TM CSW+5,X'40' INCORRECT LENGTH ? @VA00766 00283000
  295. BZ POSTREAD NO, NO PROBLEM THEN @VA00766 00284000
  296. CLC CSW+6(2),H0 ANY DATA READ AT ALL ? @VA00766 00285000
  297. BE SIZERR NO, NEED LARGER BUFFER @VA00766 00286000
  298. POSTREAD L R8,TAPBUFAD-1 GET THE BUFFER ADDRESS @VA00766 00287000
  299. TM FLAG,BTOF IS THIS THE BEGINNING ? 00288000
  300. BNO PR2 NO, DON'T CHECK FOR HEADERS 00289000
  301. CLC 0(3,R8),=C'VOL' IS IT O/S VOL1 LABEL ? @VA00766 00290000
  302. BE LABEL YES, PROCESS IT 00291000
  303. CLC 0(3,R8),=C'HDR' IS IT O/S HDR LABEL ? @VA00766 00292000
  304. BE LABEL YES, PROCESS IT 00293000
  305. BAL LKGR,TIEHMOVE GO SEE IF UNLOADED PDS @V200801 00294000
  306. PR2 TM FLAG,EOF TAPE MARK BEEN READ ? 00295000
  307. BNO TAPRD01 NO, CHECK DATA IN BUFFER 00296000
  308. CLC 0(3,R8),=C'EOF' IS IT O/S EOF LABEL ? @VA00766 00297000
  309. BE LABEL YES, PROCESS IT 00298000
  310. CLC 0(3,R8),=C'EOV' IS IT O/S EOV LABEL ? @VA00766 00299000
  311. BE STOP YES, WE ARE ALL DONE 00300000
  312. EJECT 00301000
  313. TAPRD0 NI FLAG,255-EOF-BTOF INDICATE NO TAPE MARKS 00302000
  314. TAPRD01 TM FLAG,COL1 DATA IN COLUMN 1 ? 00303000
  315. BO MEMCHEK YES, CHECK IF MEMBER RECORD 00304000
  316. LA R8,1(,R8) START SCANNING FROM COLUMN 2 00305000
  317. MEMCHEK CLC 0(7,R8),=CL7'MEMBER' IS THIS A 'MEMBER' RECORD ? 00306000
  318. BE MEMBR YES, CHECK IF 'PDS' SPECIFIED 00307000
  319. TAPRD1 TM FLAG2,UPDATE UPDATE OPTION SPECIFIED ? 00308000
  320. BO UPDATES YES, GO PROCESS IT 00309000
  321. TM FLAG,FILEOPEN IS OUTPUT FILE OPEN ? 00310000
  322. BZ FILECHEK NO, THEN OPEN IT 00311000
  323. WRITEIT LR R2,R8 GET THE BUFFER ADDRESS @VA00766 00312000
  324. ST R2,FILEBUFF AND STORE IN BUFF POCKET 00313000
  325. LA R1,FILE GET WRBUF LIST 00314000
  326. SVC 202 WRITE THE RECORD 00315000
  327. DC AL4(ERR105S) ERROR EXIT 00316000
  328. TM FLAG,END END OPTION SPECIFIED ? 00317000
  329. BZ TAPEREAD CONTINUE READ LOOP 00318000
  330. * 00319000
  331. * SCAN FOR END CARD 00320000
  332. * 00321000
  333. TESTEND L R1,TAPSIZE GET RECORD LENGTH 00322000
  334. CLC 0(4,R2),=CL4'END' IS THIS 'END' RECORD ? 00323000
  335. BE CLOZER YES, FILE DONE..CLOSE IT 00324000
  336. CLI 0(R2),C'*' IS IT COMMENT RECORD ? 00325000
  337. BE TAPEREAD YES, IGNORE IT 00326000
  338. TESTEND1 CLI 0(R2),C' ' FIND FIRST BLANK 00327000
  339. BE TESTEND2 FOUND IT, FIND 1ST NON-BLANK 00328000
  340. LA R2,1(,R2) INCREMENT PAST BLANK 00329000
  341. BCT R1,TESTEND1 KEEP LOOKING THRU BUFFER 00330000
  342. B TAPEREAD NO BLANKS FOUND - NORMAL RECORD 00331000
  343. SPACE 00332000
  344. TESTEND2 CLI 0(R2),C' ' FIND FIRST NON-BLANK AFTER 00333000
  345. BNE TESTEND3 FIRST BLANK 00334000
  346. LA R2,1(,R2) INCREMENT PAST NON-BLANK 00335000
  347. BCT R1,TESTEND2 KEEP LOOKING THRU BUFFER 00336000
  348. B TAPEREAD NONE FOUND - READ NEXT RECORD 00337000
  349. SPACE 00338000
  350. TESTEND3 CLC 0(4,R2),=CL4'END' NOW, IS IT 'END' ? 00339000
  351. BNE TAPEREAD NO, IT IS A NORMAL RECORD 00340000
  352. CLOZER BAL LKGR,CLOZFILE CLOSE THIS FILE 00341000
  353. TM FLAG,PDS PDS OPTION SPECIFIED ? 00342000
  354. BZ STOP NO, SEQUENTIAL DATASET: STOP 00343000
  355. B TAPEREAD LETS START AGAIN FOR NXT MEM 00344000
  356. EJECT 00345000
  357. MEMBR TM FLAG,PDS PROCESSING PDS ? 00346000
  358. BZ TAPRD1 IGNORE 'MEMBER' RECORD THEN 00347000
  359. TM FLAG,FILEOPEN IS THE FILE OPEN ? 00348000
  360. BZ NEWMEMBR NO, THIS MUST BE FIRST ONE 00349000
  361. BAL LKGR,CLOZFILE CLOSE THE OLD ONE 00350000
  362. NEWMEMBR LA R7,13(R8) POINT TO BEG OF MEMBER NAME @VA00766 00351000
  363. SR R8,R8 READY FOR CHAR COUNT @VA00766 00352000
  364. BLOOP CLI 0(R7),C' ' LOOK FOR START OF MEMBER NAME 00353000
  365. BNE FOUND NON-BLANK MUST BE BEGIN 00354000
  366. LA R7,1(,R7) BUMP TO NEXT CHARACTER 00355000
  367. B BLOOP KEEP LOOKING 00356000
  368. FOUND LR R9,R7 SAVE NAME START 00357000
  369. FOUND1 LA R8,1(,R8) LETS COUNT CHARS IN NAME 00358000
  370. LA R7,1(,R7) BUMP TO NEXT CHAR 00359000
  371. CLI 0(R7),C' ' IS IT END OF NAME ? 00360000
  372. BE ENDNAM YES, SET IF WITHIN LIMITS 00361000
  373. CLI 0(R7),C',' CHECK COMMA FOR UPDATES 00362000
  374. BNE FOUND1 IF NEITHER, LOOP 00363000
  375. ENDNAM MVI FILENAME,C' ' BLANK-OUT DISK NAME AREA 00364000
  376. MVC FILENAME+1(7),FILENAME ... 00365000
  377. CH R8,=H'8' IS MEMBER NAME UNDER 8 CHARS ? 00366000
  378. BNH MOVNAME YES, USE IT THEN 00367000
  379. LA R8,8 GET MAX LENGTH ALLOWED 00368000
  380. MOVNAME BCTR R8,0 DECREMENT FOR 'EXECUTE' 00369000
  381. EX R8,MEMNAME PROVIDE MEMBR NAME FOR WRITE 00370000
  382. MEMOPEN BAL LKGR,OPENFILE OPEN THE NEW FILE 00371000
  383. TM FLAG2,UPDATE UPDATE OPTION SPECIFIED ? 00372000
  384. BO BXLE YES, USE DEBLOCKING 00373000
  385. B TAPEREAD GO READ NEXT RECORD 00374000
  386. SPACE 00375000
  387. FILECHEK TM FLAG,PDS WAIT FOR 'MEMBER' OF PDS 00376000
  388. BO TAPEREAD ... 00377000
  389. BAL LKGR,OPENFILE OPEN NEW OUTPUT FILE 00378000
  390. B WRITEIT WRITE RECORD TO IT 00379000
  391. SPACE 00380000
  392. LABEL TM FLAG,BEGUN HAVE WE STARTED A FILE YET ? 00381000
  393. BO TAPRD0 YES, DO NOT TYPE LABEL 00382000
  394. BAL LKGR,SHOWTAPE TYPE OUT THE LABEL 00383000
  395. B TAPEREAD AND GO ON READING 00384000
  396. EJECT 00385000
  397. UPDATES LR R3,R8 R3 -> FIRST LOGICAL REC 00386000
  398. LA R4,80 INCREMENT FOR DEBLOCKING 00387000
  399. L R5,TAPCOUNT SET END OF BLOCK FOR BXLE 00388000
  400. AR R5,R8 R5 -> END OF BLOCK 00389000
  401. SR R5,R4 00390000
  402. LR R9,R8 START OF BUFFER @VA00766 00391000
  403. AR R9,R4 PLUS LEN GIVES END REC PTR @VA00766 00392000
  404. SPACE 1 00393000
  405. CHEKUP EQU * THIS IS THE DEBLOCKING LOOP 00394000
  406. NI FLAG2,255-LINEND RESET LINEND 00395000
  407. LR R7,R3 R7 -> CURRENT LOGICAL REC 00396000
  408. CLC 0(3,R7),=CL3'./' IEBUPDTE CARD? 00397000
  409. BE CTLOOP YES 00398000
  410. TM FLAG,FILEOPEN ANY FILE OPEN? 00399000
  411. BNO BXLE IF NOT, DON'T WRITE 00400000
  412. ST R3,FILEBUFF POINT TO CURRENT REC FOR WRBUF 00401000
  413. LA R1,FILE 00402000
  414. SVC 202 WRITE CURRENT LOGICAL REC 00403000
  415. DC AL4(ERR105S) ERROR EXIT 00404000
  416. BXLE AR R9,R6 BUMP END OF LINE PTR 00405000
  417. BXLE R3,R4,CHEKUP NEXT LOGICAL REC 00406000
  418. B TAPEREAD IF END OF BLOCK, GET NEXT ONE 00407000
  419. SPACE 1 00408000
  420. CTLOOP LA R7,2(,R7) SKIP BY './' 00409000
  421. AGAIN CLI 0(R7),C' ' FIND CONTROL WORD 00410000
  422. BNE ADDCHEK DROP IF FOUND 00411000
  423. LA R7,1(,R7) IF NOT, BUMP AND LOOP 00412000
  424. CR R9,R7 CHEK END OF RECORD 00413000
  425. BE BXLE 00414000
  426. B AGAIN 00415000
  427. EJECT 00416000
  428. ADDCHEK CLC 0(4,R7),=CL4'ADD' IS IT 'ADD' RECORD ? 00417000
  429. BE ADDFOUND YES, GET FILENAME FROM CARD 00418000
  430. CLC 0(6,R7),=CL6'ENDUP' CHEK FOR 'ENDUP' CARD 00419000
  431. BNE BXLE IF NEITHER, GET NEXT REC 00420000
  432. BAL LKGR,CLOZFILE IF ENDUP, CLOSE CURRENT FILE, 00421000
  433. B STOP AND STOP. 00422000
  434. SPACE 1 00423000
  435. ADDFOUND EQU * PROCESS 'ADD' CARD FOR NAME 00424000
  436. LA R7,3(,R7) IF SO, POINT TO KEYWORDS 00425000
  437. TM FLAG,FILEOPEN FILE ACTIVE? 00426000
  438. BZ NAMLOOP NO: FIRST FILE 00427000
  439. BAL LKGR,CLOZFILE GO CLOSE ACTIVE FILE 00428000
  440. NAMLOOP LA R7,1(,R7) FIND THE 'NAME=' PARM 00429000
  441. CLI 0(R7),C' ' 00430000
  442. BNE NAMECHEK KEYWORDS HAVE STARTED 00431000
  443. TM FLAG2,LINEND END OF KEYWORDS? 00432000
  444. BO DEFNAME DEFAULT THE NAME IF SO 00433000
  445. CR R9,R7 END OF RECORD? 00434000
  446. BE BXLE 00435000
  447. B NAMLOOP LOOP FOR END 00436000
  448. SPACE 1 00437000
  449. NAMECHEK CLC 0(5,R7),=CL5'NAME=' IS IT 'NAME=' PARM ? 00438000
  450. BE USENAME JACKPOT= MEMBER NAME 00439000
  451. OI FLAG2,LINEND SIGNAL KEYWORD START 00440000
  452. B NAMLOOP 00441000
  453. USENAME LA R7,5(,R7) POINT TO ACTUAL NAME 00442000
  454. XR R8,R8 00443000
  455. CLI 0(R7),C' ' CHEK FOR BLANK NAME FIELD 00444000
  456. BNE FOUND O.K. 00445000
  457. DEFNAME MVC FILENAME(8),=CL8'TAPPDS' DEFAULT FILENAME 00446000
  458. B MEMOPEN CONTINUE PROCESSING 00447000
  459. EJECT 00448000
  460. OPENFILE MVC STATNAME(18),FILENAME FILEID FOR STATE 00449000
  461. MVC STATLIST(8),=CL8'STATE' COMMAND NAME IN LIST 00450000
  462. LA R1,STATLIST GET STATE LIST 00451000
  463. SVC 202 ISSUE STATE 00452000
  464. DC AL4(NEWFILE) ERROR EXIT 00453000
  465. MVC STATLIST(8),=CL8'ERASE' ERASE COMMAND IN LIST 00454000
  466. SVC 202 ISSUE ERASE 00455000
  467. DC AL4(*+4) ... 00456000
  468. * 00457000
  469. NEWFILE MVC TAPSIZE,TAPCOUNT SET TAPE RECORD SIZE 00458000
  470. OI FLAG,FILEOPEN+BEGUN SET FILE NOT NEW ANYMORE 00459000
  471. TM FLAG2,UPDATE IF UPDATE, 00460000
  472. BCR 1,LKGR KEEP FILESIZE OF '80' 00461000
  473. L R2,TAPCOUNT GET RECORD SIZE 00462000
  474. TM FLAG,COL1 IS COL1 IS TO BE IGNORED? 00463000
  475. BO NEWFILE1 YES, DO NOT DECREMENT SIZE 00464000
  476. BCTR R2,0 DECREMENT COUNT BY 1 00465000
  477. NEWFILE1 ST R2,FILESIZE SAVE NEW RECORD SIZE 00466000
  478. BR LKGR RETURN TO CALLER 00467000
  479. EJECT 00468000
  480. * 00469000
  481. TIEHMOVE CLC 0(2,R8),=H'1' LOOKS LIKE UNLOADED PDS ? @V200801 00470000
  482. BNER LKGR NO, JUST RETURN @V200801 00471000
  483. L R4,TAPCOUNT GET NUMBER BYTES READ @V200801 00472000
  484. LA R4,0(R4,R8) POINT TO END OF BLOCK @V200801 00473000
  485. ST R8,ABUFF1 SAVE BEGIN BLOCK @V200801 00474000
  486. ST R4,ABUFF2 SAVE END BLOCK AS 2ND BUFF @V200801 00475000
  487. ST R4,ABUFF2A SAME AS ABUFF2 @V200801 00476000
  488. ST LKGR,SAVLKGR SAVE LINK REGISTER @V200801 00477000
  489. BAL LKGR,TAPIO2 GO STRIP UNWANTED CHARS. @V200801 00478000
  490. B NIEHMOVE ERROR RETURN FROM TAPIO @V200801 00479000
  491. L R3,ABUFF2 GET BEGIN 2ND BUUFER @V200801 00480000
  492. LA R10,75 GET SUPPOSED LEN OF 1ST. REC @V200801 00481000
  493. CH R10,0(,R3) DOES LENGTH MATCH ? @V200801 00482000
  494. BNE NIEHMOVE NO, NOT UNLOADED PDS @V200801 00483000
  495. LA R10,3(,R10) UP LENGTH BY 3 @V200801 00484000
  496. CLC 3(75,R3),IEHMOVE IS THIS UNLOADED PDS REC ? @V200801 00485000
  497. BE RDDSCB YES, GO ON TO READ DSCB @V200801 00486000
  498. NIEHMOVE L LKGR,SAVLKGR RESTORE LINK REGISTER @V200801 00487000
  499. BR LKGR RETURN TO CALLER @V200801 00488000
  500. * 00489000
  501. RDDSCB BAL LKGR,NEXTREC GO GET 2ND RECORD @V200801 00490000
  502. MVI FLAG2,0 CLEAR 2ND FLAGS @V200801 00491000
  503. TM 87(R3),FXD IS DATA SET FIXED ? @V200801 00492000
  504. BO POSSFXD MAYBE, SEE IF UNDEFINED @V200801 00493000
  505. MVI FILEMODE+1,C'4' IF NOT, MAKE FMODE NO. 4 @V200801 00494000
  506. SETVAR MVI FILEFV,C'V' MAKE FILEFV VARIABLE @V200801 00495000
  507. B GETNEXT GO GET NEXT RECORD @V200801 00496000
  508. POSSFXD TM 87(R3),VAR IS DATA SET UNDEFINED ? @V200801 00497000
  509. BO SETVAR YES, SET WRBUF FV TO V @V200801 00498000
  510. TM 87(R3),BLK IS FIXED DATA SET BLOCKED ? @V200801 00499000
  511. BZ GETNEXT NO, GO GET NEXT RECORD @V200801 00500000
  512. OI FLAG2,BLK SET BLOCKED FLAG @V200801 00501000
  513. MVC RECLEN+2(2),91(R3) SAVE LRECL FOR DEBLOCKING @V200801 00502000
  514. GETNEXT BAL LKGR,NEXTREC GO GET NEXT RECORD @V200801 00503000
  515. TM 2(R3),X'08' IS THIS A MEMBER HEADER REC ? @V200801 00504000
  516. BZ GETNEXT NO, KEEP CHECKING @V200801 00505000
  517. * 00506000
  518. FOUND2 MVI FLAG,FILEOPEN+BEGUN SET SOME FLAGS @V200801 00507000
  519. MVC FILENAME(8),6(R3) MAKE MEM NAME AS FILENAME @V200801 00508000
  520. MVC STATNAME(18),FILENAME PREPARE STATE LIST @V200801 00509000
  521. LA R1,STATLIST ADDRESS STATE P-LIST @V200801 00510000
  522. MVC STATLIST(8),=CL8'STATE' MOVE IN THE COMMAND @V200801 00511000
  523. SVC 202 CALL STATE @V200801 00512000
  524. DC AL4(*+4) ... @V200801 00513000
  525. CH R15,=H'28' WAS FILE NOT FOUND ? @V200801 00514000
  526. BE NEWMEM YES..SKIP ERASE OLD FILE @V200801 00515000
  527. LTR R15,R15 ANY OTHER ERRORS ? @V200801 00516000
  528. BNZ RETURN YES, MUST BE BAD THEN @V200801 00517000
  529. MVC STATLIST(8),=CL8'ERASE' MOVE IN THE COMMAND @V200801 00518000
  530. SVC 202 CALL ERASE @V200801 00519000
  531. DC AL4(*+4) ... @V200801 00520000
  532. EJECT 00521000
  533. NEWMEM BAL LKGR,NEXTREC GET NEXT RECORD @V200801 00522000
  534. TM 2(R3),X'14' IS IT DUMMY OR NOTELIST ? @V200801 00523000
  535. BM NEWMEM YES, IGNORE THIS RECORD @V200801 00524000
  536. TM 2(R3),X'08' IS IT A MEMBER HEADER REC ? @V200801 00525000
  537. BO CLSOPN YES, CLOSE OLD FILE THEN @V200801 00526000
  538. TM 2(R3),X'20' IS IT DATA RECORD ? @V200801 00527000
  539. BZ NEWMEM NO, IGNORE WHATEVER IT IS @V200801 00528000
  540. BAL LKGR,RECOUT WRITE THIS RECORD TO DISK @V200801 00529000
  541. B NEWMEM GO AND GET NEXT RECORD @V200801 00530000
  542. * 00531000
  543. NEXTREC AR R3,R10 POINT TO BEGIN NEXT REC @V200801 00532000
  544. CHKREC LH R10,0(,R3) GET LENGTH NEW RECORD @V200801 00533000
  545. LA R10,3(,R10) UP LENGTH BY 3 @V200801 00534000
  546. TM 2(R3),X'80' ANY TTR INFO. IN REC ? @V200801 00535000
  547. BZ NOTTR DON'T COMPENSATE FOR IT @V200801 00536000
  548. LA R10,3(,R10) BYPASS TTR INFORMATION @V200801 00537000
  549. NOTTR LA R6,0(R3,R10) POINT TO POSSIBLE END REC @V200801 00538000
  550. C R6,BUFFEND IS ALL OF REC IN CORE ? @V200801 00539000
  551. BLR LKGR YES, RETURN SINCE WE HAVE IT @V200801 00540000
  552. * 00541000
  553. L R2,ABUFF2A GET ADDR 2ND BUFFER @V200801 00542000
  554. L R4,BUFFEND ALSO ADDR END 2ND BUFFER @V200801 00543000
  555. SR R4,R3 CALCULATE LENGTH IN BUFFER @V200801 00544000
  556. LOOP1 LA R6,256 GET MAX MVC LENGTH @V200801 00545000
  557. SR R4,R6 SEE IF WE EXCEED MAX @V200801 00546000
  558. BNP LAST256 IF NOT, SKIP LOOP @V200801 00547000
  559. BCTR R6,0 MAX LESS 1 FOR EXECUTE @V200801 00548000
  560. EX R6,MOVEUP MOVE 256 BYTES UP @V200801 00549000
  561. LA R2,1(R6,R2) BUMP 2ND BUFFER BY LENGTH @V200801 00550000
  562. LA R3,1(R6,R3) ALSO WHERE MOVING FROM @V200801 00551000
  563. B LOOP1 GO AND TRY AGAIN @V200801 00552000
  564. LAST256 AR R4,R6 LETS PUT PROPER LEN BACK @V200801 00553000
  565. BCTR R4,0 LESS 1 FOR EXECUTE @V200801 00554000
  566. EX R4,MOVEUP MOVE REMAINIG UP @V200801 00555000
  567. LA R2,1(R4,R2) BUMP 2ND BUFFER BY LENGTH @V200801 00556000
  568. * 00557000
  569. ST R2,ABUFF2 SAVE 2ND BUFFER ADDRESS @V200801 00558000
  570. ST LKGR,SAVLKGR SAVE LINK REGISTER @V200801 00559000
  571. BAL LKGR,TAPIO GET & STRIP NEXT BLOCK @V200801 00560000
  572. B ERR110S ERROR EXIT FROM TAPIO @V200801 00561000
  573. L R3,ABUFF2A GET ADDR NEW BUFFER @V200801 00562000
  574. L LKGR,SAVLKGR RESTORE LINK REGISTER @V200801 00563000
  575. B CHKREC GO CHECK IF ALL IN CORE NOW @V200801 00564000
  576. EJECT 00565000
  577. RECOUT LA R4,3(,R3) POINT TO POSS BEGIN OF DATA @V200801 00566000
  578. TM 2(R3),X'80' ANY TTR TO BYPASS @V200801 00567000
  579. BZ SETBUF NO, THAT IS IT @V200801 00568000
  580. LA R4,3(,R4) SKIP PAST TTR INFORMATION @V200801 00569000
  581. SETBUF ST R4,FILEBUFF SAVE BUFFER START ADDRESS @V200801 00570000
  582. LH R4,0(,R3) NOW GET THE LENGTH OF THE REC @V200801 00571000
  583. ST R4,FILESIZE SAVE BUFFER LENGTH @V200801 00572000
  584. XC FILENOIT,FILENOIT CLEAR NO. OF ITEMS @V200801 00573000
  585. TM FLAG2,BLK ARE RECORDS BLOCKED ? @V200801 00574000
  586. BZ WRITEIT2 NO, JUST WRITE ONE RECORD @V200801 00575000
  587. SRDA R4,32 PREPARE FOR DIVIDE @V200801 00576000
  588. D R4,RECLEN COMPUTE NUMBER RECORDS @V200801 00577000
  589. LTR R4,R4 ANY RESIDUAL COUNT ? @V200801 00578000
  590. BNZ ERR110S IF SO, TAPE MUST BE BAD @V200801 00579000
  591. STH R5,FILENOIT SAVE NUMBER RECORDS TO WRITE @V200801 00580000
  592. WRITEIT2 LA R1,FILE GET WRBUF P-LIST ADDR @V200801 00581000
  593. SVC 202 CALL WRBUF @V200801 00582000
  594. DC AL4(ERR105S) ERROR EXIT FOR WRBUF @V200801 00583000
  595. BR LKGR GOOD, RETURN TO CALLER @V200801 00584000
  596. * 00585000
  597. CLSOPN BAL LKGR,CLOZFILE CLOSE THIS FILE AND GIVE @V200801 00586000
  598. B FOUND2 INFO. MSG TO USER @V200801 00587000
  599. * 00588000
  600. TAPIO LA R1,TAPLIST ADDRESS TAPE P-LIST @V200801 00589000
  601. SVC 202 CALL TAPEIO @V200801 00590000
  602. DC AL4(TAPERR) ERROR EXIT FROM TAPEIO @V200801 00591000
  603. TAPIO2 L R4,TAPCOUNT GET NUMBER BYTES READ @V200801 00592000
  604. CL R4,LRECL LESS THAN SHORTEST BLOCK ? @V200801 00593000
  605. BLR LKGR YES, ERROR (POSS BAD TAPE) @V200801 00594000
  606. SRDA R4,32 PREPARE FOR DIVIDE @V200801 00595000
  607. D R4,LRECL GET NO. 80 BYTE RECS. @V200801 00596000
  608. LTR R4,R4 ANY REMAINDER FROM DIVIDE ? @V200801 00597000
  609. BNZR LKGR YES, ERROR (POSS BAD TAPE) @V200801 00598000
  610. LR R4,R5 GET QUOTIENT IN REG 4 @V200801 00599000
  611. SLL R4,1 MULTIPLY BY 2 @V200801 00600000
  612. L R6,TAPCOUNT GET NUMBER BYTES READ @V200801 00601000
  613. SR R6,R4 LESS NO. BYTES TO BE REMOVED @V200801 00602000
  614. L R4,ABUFF2 GET 2ND BUFFER ADDRESS @V200801 00603000
  615. LA R4,0(R6,R4) PLUS NEW BYTES TO BE MOVED @V200801 00604000
  616. C R4,UPBUFHI WILL THIS EXCEED HIGHEST AREA @V200801 00605000
  617. BH SIZERR YES, THEN NO MORE CORE AVAIL @V200801 00606000
  618. ST R4,BUFFEND SAVE NEW BUFFER END @V200801 00607000
  619. L R2,ABUFF1 GET AREA JUST READ FROM TAPE @V200801 00608000
  620. L R3,ABUFF2 GET 2ND BUFFER ADDRESS @V200801 00609000
  621. LOOP3 MVC 0(78,R3),2(R2) MOVE UP SKIPPING 1ST 2 BYTES @V200801 00610000
  622. LA R2,80(,R2) BUMP READ BLOCK POINTER @V200801 00611000
  623. LA R3,78(,R3) BUMP 2ND BUFFER POINTER @V200801 00612000
  624. BCT R5,LOOP3 MOVE 'TILL NO MORE RECORDS @V200801 00613000
  625. B 4(,LKGR) RETURN TO CALLER + 4 (NORMAL) @V200801 00614000
  626. EJECT 00615000
  627. ERR3E LR R2,R1 SUB IN REG 2 00616000
  628. DMSERR NUM=3,LET=E,SUB=(CHARA,(R2)),TEXT='INVALID OPTION ''...*00617000
  629. .....''' 00618000
  630. LA R15,24 RETURN CODE = 24 00619000
  631. B RETURN GET OUT OF HERE 00620000
  632. EJECT 00621000
  633. CLOZFILE LA R1,STATLIST GET LIST ADDRESS 00622000
  634. MVC STATLIST(8),=CL8'FINIS' FINIS COMMAND (CLOSE) 00623000
  635. SVC 202 CLOSE THE FILE 00624000
  636. DC AL4(*+4) ... 00625000
  637. NI FLAG,255-FILEOPEN SHOW FILE NOT OPEN 00626000
  638. DMSERR NUM=703,LET=I,SUB=(CHAR8A,FILENAME), *00627000
  639. TEXT='FILE ''....................'' COPIED' 00628000
  640. TM FLAG,MAXTEN CHECK IF LIMIT IS IMPOSED 00629000
  641. BCR 8,LKGR NO, RETURN 00630000
  642. LH R1,FILECONT GET CURRENT COUNT 00631000
  643. LA R1,1(,R1) INCREMENT THE COUNT 00632000
  644. STH R1,FILECONT SAVE UPDATED COUNT 00633000
  645. CH R1,=H'10' MAXIMIN REACHED ? 00634000
  646. BCR 4,LKGR NO, RETURN TO CALLER 00635000
  647. * 00636000
  648. MVC TAPLIST+8(8),=CL8'BSR' BACKSPACE TAPE ONE RECORD 00637000
  649. LA R1,TAPLIST TAPE LIST ADDRESS 00638000
  650. SVC 202 TAPE COMMAND 00639000
  651. DC AL4(*+4) ... 00640000
  652. DMSERR NUM=707,LET=I,TEXT='TEN FILES COPIED' 00641000
  653. B STOP DONE 00642000
  654. EJECT 00643000
  655. TAPERR CH R15,=H'2' IS IT END-OF-FILE ? 00644000
  656. BNE ERR110S NO, GIVE ERROR MSG 00645000
  657. TM FLAG,EOF READ END-OF-FILE BEFORE ? 00646000
  658. BO EOFSTOP YES, THAT IS TWO IN A ROW.. 00647000
  659. OI FLAG,EOF+BTOF SET EOF AND BEGIN NEW FILE 00648000
  660. TM FLAG,BEGUN DO WE HAVE A NEW FILE ? 00649000
  661. BZ TAPEREAD NO, KEEP READING FROM TAPE 00650000
  662. TM FLAG,FILEOPEN IS THE NEW FILE OPEN ? 00651000
  663. BZ STOP NO, JUST EXIT 00652000
  664. BAL LKGR,CLOZFILE IF OPEN, CLOSE THE FILE 00653000
  665. B STOP EXIT 00654000
  666. SPACE 00655000
  667. SIZERR DMSERR NUM=109,LET=S,TEXT='VIRTUAL STORAGE CAPACITY EXCEEDED' 00656000
  668. LA R15,104 RETURN CODE = 104 @VA00766 00657000
  669. B RETURN RETURN @VA00766 00658000
  670. SPACE 00659000
  671. EOFSTOP DMSERR NUM=58,LET=E,TEXT='END-OF-FILE OR END-OF-TAPE' 00660000
  672. LA R15,40 RETURN CODE = 40 00661000
  673. B RETURN RETURN 00662000
  674. EJECT 00663000
  675. ERR110S DMSERR NUM=110,LET=S,SUB=(CHARA,TAPID),TEXT='ERROR READING ''.*00664000
  676. ...''' 00665000
  677. LA R15,100 RETURN CODE = 100 00666000
  678. B RETURN RETURN 00667000
  679. ERR105S LR R9,R15 SUB IN REG 9 00668000
  680. DMSERR NUM=105,LET=S,SUB=(DEC,(R9),CHAR8A,FILENAME),TEXT='ERRO*00669000
  681. R ''..'' WRITING FILE ''....................'' ON DISK',*00670000
  682. RENT=NO 00671000
  683. LA R15,100 RETURN CODE = 100 00672000
  684. B RETURN RETURN 00673000
  685. EJECT 00674000
  686. SHOWTAPE LA R1,TYPLIST2 TYPLIN LIST ADDRESS 00675000
  687. STCM R8,7,TPLSTBUF SET TYPLIN BUFFER @VA00766 00676000
  688. MVC TPLST2A+1(3),TAPCOUNT+1 MOVE IN BYTE COUNT 00677000
  689. SVC 202 TYPE THE BUFFER 00678000
  690. DC AL4(*+4) ... 00679000
  691. BR LKGR RETURN TO CALLER 00680000
  692. SPACE 00681000
  693. STOP SR R15,R15 RETURN CODE = 0 00682000
  694. RETURN EQU * @V305001 00683100
  695. DMSEXS MVC,DOSFLAGS(1),DOSF RESET NUCON'S DOSFLAGS @V305001 00683200
  696. TM FLAG2,UPDATE BUFFER GETMAIN'D ? @V305001 00683300
  697. BCR 8,R14 NO, JUST GET OUT @VA00766 00684000
  698. LR R8,R15 SAVE THE RETURN CODE @VA00766 00685000
  699. FREEMAIN V,A=UPBUF @VA00766 00686000
  700. LR R15,R8 RESTORE THE RETURN CODE @VA00766 00687000
  701. BR R14 EXIT GRACEFULLY @VA00766 00688000
  702. EJECT 00689000
  703. TYPLIST2 DS 0D 00690000
  704. DC CL8'TYPLIN' TYPLIN P-LIST 00691000
  705. DC AL1(1) 00692000
  706. TPLSTBUF DC AL3(*-*) BUFFER ADDRESS @VA00766 00693000
  707. TPLST2A DC C'B' 00694000
  708. DC AL3(*-*) BUFFER LENGTH 00695000
  709. SPACE 00696000
  710. TAPLIST DS 0D 00697000
  711. DC CL8'TAPEIO' TAPEIO P-LIST 00698000
  712. DC CL8'READ' 00699000
  713. TAPID DC C'TAP1' 00700000
  714. DC X'00' NO MODE FOR TAPEIO @VA12288 00701000
  715. TAPBUFAD DC AL3(*-*) BUFFER ADDRESS @VA00766 00702000
  716. TAPBUFSZ DC F'0' BUFFER SIZE @VA00766 00703000
  717. TAPCOUNT DC F'0' NO. BYTES READ 00704000
  718. FENCE DC F'-1' FENCE 00705000
  719. TAPSIZE DC F'0' SAVE FOR PREVIOUS SIZE 00706000
  720. SPACE 00707000
  721. FILE DS 0D WRBUF P-LIST 00708000
  722. DC CL8'WRBUF' COMMAND 00709000
  723. FILENAME DC CL8'*' 00710000
  724. FILETYPE DC CL8'*' 00711000
  725. FILEMODE DC CL2'A1' 00712000
  726. DC H'0' ITEM NUMBER 00713000
  727. FILEBUFF DC A(*-*) 00714000
  728. FILESIZE DC A(80) 00715000
  729. FILEFV DC CL2'F' 00716000
  730. FILENOIT DC H'1' NUMBER OF ITEMS 00717000
  731. SPACE 00718000
  732. STATLIST DS 0D STATE P-LIST 00719000
  733. DC CL8'STATE' 00720000
  734. STATNAME DC CL24' ' STATE FILEID 00721000
  735. SPACE 00722000
  736. UPBUF DC 2F'0' GETMAIN PARM LIST @VA00766 00723000
  737. REQS DC F'80' MINIMUM AREA NEEDED @VA00766 00724000
  738. DC F'49152' MAXIMUM AREA REQUESTED @VA13892 00725000
  739. UPBUFHI DC F'0' TOP OF GETMAIN'D AREA @V200801 00726000
  740. H0 DC H'0' RESIDUAL COUNT COMPARE @VA00766 00728000
  741. FILECONT DC H'0' NUMBER OF FILES READ COUNT 00729000
  742. DOSF DS X SAVE AREA FOR NUCON'S DOSFLAGS @V305001 00729100
  743. EJECT 00730000
  744. FLAG DC X'0' FLAG FOR SWITCHES 00731000
  745. PDS EQU X'80' ON IF THIS IS A PDS 00732000
  746. COL1 EQU X'40' ON IF COL1 CONTAINS DATA, NOT CC 00733000
  747. FILEOPEN EQU X'20' ON IF FILE IS OPEN 00734000
  748. END EQU X'10' ON IF END CARD IMPLIES END OF MBR 00735000
  749. BEGUN EQU X'08' ON IF FILE HAS EVER BEEN PROCESSED 00736000
  750. EOF EQU X'04' END-OF-FILE HAS JUST BEEN READ 00737000
  751. MAXTEN EQU X'02' SET IF MAXIMUM OF TEN MEMBERS 00738000
  752. BTOF EQU X'01' BEGINNING OF TAPE FILE 00739000
  753. * 00740000
  754. FLAG2 DC X'0' SECOND FLAG FOR SWITCHES 00741000
  755. UPDATE EQU X'80' ON IF IEBUPDTE SCAN WANTED 00742000
  756. LINEND EQU X'40' ON IF KEYWORDS SCAN HAS STARTED 00743000
  757. BLK EQU X'10' UNLOADED DATA SET IS BLOCKED @V200801 00744000
  758. * 00745000
  759. FXD EQU X'80' FIXED FORMAT RECS. @V200801 00746000
  760. VAR EQU X'40' VARIABLE FORMAT RECS. @V200801 00747000
  761. * 00748000
  762. NAM1 DC CL8'TAPPDS' DEFAULT FILENAME (NPDS) 00749000
  763. NAM2 DC CL8'CMSUT1' DEFAULT FILETYPE 00750000
  764. MODE DC CL2'A1' DEFAULT FILEMODE 00751000
  765. LKGR EQU 11 LINK REGISTER 00752000
  766. SAVLKGR DC F'0' SAVE AREA FOR LINK REG. @V200801 00753000
  767. MEMNAME MVC FILENAME(*-*),0(R9) MOVE NAME FROM TAPE TO DISK 00754000
  768. MOVEUP MVC 0(0,R2),0(R3) MOVE UNLOADED PDS BLOCK UP @V200801 00755000
  769. STAR DC CL2'*' CHECK FOR DEFAULT FILEID 00756000
  770. IEHMOVE DC C'THIS IS AN UNLOADED DATA SET PRODUCED BY' @V200801 00757000
  771. DC X'80' @V200801 00758000
  772. DC C'THE IBM UTILITY, SYSMOVE.OMMBRLDWB' @V200801 00759000
  773. ABUFF1 DC A(*-*) UNLOADED PDS TAPE BUFFER @V200801 00760000
  774. ABUFF2 DC A(*-*) 2ND BUFFER FOR STRIP RECS @V200801 00761000
  775. ABUFF2A DC A(*-*) PART OF ABOVE @V200801 00762000
  776. BUFFEND DC F'0' END ADDRESS OF 2ND BUFFER @V200801 00763000
  777. RECLEN DC F'0' LRECL FOR BLOCKED DATA SETS @V200801 00764000
  778. LRECL DC F'80' STANDARD IEHMOVE LRECL @V200801 00765000
  779. EJECT 00766000
  780. LTORG 00767000
  781. EJECT 00768000
  782. NUCON @V305001 00768100
  783. REGEQU 00769000
  784. END 00770000
ibm/vm370-lib/cms/dmstpd.assemble_src.txt ยท Last modified: 2023/08/06 13:36 by Site Administrator