Table of Contents

DMSUPD Source

References

Source Listing

DMSUPD.ASSEMBLE.txt
  1. UPD TITLE 'DMSUPD (CMS) VM/370 - RELEASE 6' 00001000
  2. SPACE 2 00002000
  3. * 00003000
  4. * MACROS FOR INTERFACE WITH CMS V1.0 AND VM/370 00004000
  5. * 00005000
  6. SPACE 00006000
  7. MACRO 00007000
  8. &NAME CMS &PLIST,&ERR,&BUFF=,&CMD= 00008000
  9. AIF ('&NAME' EQ '').SKPNM 00009000
  10. &NAME EQU * - CALL A CMS FUNCTION 00010000
  11. .SKPNM AIF ('&BUFF' EQ '').SKPBF 00011000
  12. LA R1,&BUFF - BUFFER ADDRESS 00012000
  13. ST R1,&PLIST+28 - RESET BUFFER ADDRESS 00013000
  14. .SKPBF LA R1,&PLIST - PARM LIST ADDRESS 00014000
  15. AIF ('&CMD' EQ '').SKCMD 00015000
  16. MVC 0(8,R1),=CL8'&CMD' - FILL IN COMMAND NAME 00016000
  17. .SKCMD SVC 202 - CALL TO CMS FUNCTION 00017000
  18. AIF ('&ERR' EQ '').NOERR 00018000
  19. DC AL4(&ERR) - ERROR RETURN ADDRESS 00019000
  20. MEXIT 00020000
  21. .NOERR DC AL4(*+4) - IGNORE ANY ERROR RETURN 00021000
  22. MEND 00022000
  23. SPACE 2 00023000
  24. MACRO 00024000
  25. WARN &N 00025000
  26. CLI RC,&N COMPARE WITH OLD RC 00026000
  27. BH *+8 SKIP IF OLD IS HIGHER 00027000
  28. MVI RC,&N SET HIGHER RETURN CODE 00028000
  29. MEND 00029000
  30. SPACE 3 00030000
  31. MACRO 00031000
  32. UPITEM &F 00032000
  33. LH R1,ITEM+&F GET OLD ITEM NUMBER FROM FSCB 00033000
  34. LA R1,1(,R1) INCREMENT IT 00034000
  35. STH R1,ITEM+&F STORE NEW ITEM NUMBER 00035000
  36. MEND 00036000
  37. EJECT 00037000
  38. MACRO 00038000
  39. &NAME LOG &TEXT,&KEY,&CUTE 00039000
  40. LCLA &NM 00040000
  41. AIF ('&NAME' EQ '').SKPNM 00041000
  42. &NAME EQU * - WRITE A RECORD TO LOGFILE 00042000
  43. .SKPNM BAL R1,CLRLOGB - CLEAR LOGFILE BUFFER 00043000
  44. AIF ('&TEXT'(1,1) NE '''').LABL 00044000
  45. &NM SETA K'&TEXT-2 00045000
  46. LA R1,=C&TEXT 00046000
  47. MVC LOGBUFF(&NM),0(R1) - MOVE MSG TO BUFFER 00047000
  48. .DOIT ANOP 00048000
  49. BAL R15,LOGIT 00049000
  50. MEXIT 00050000
  51. .LABL AIF ('&KEY' NE 'ERR').CCTL 00051000
  52. MVC LOGBUFF(80),&TEXT - MOVE CARD TO BUFFER 00052000
  53. AGO .DOIT 00053000
  54. .CCTL AIF ('&KEY' NE 'CTL').CCUE 00054000
  55. MVC LOGBUFF+8(72),&TEXT - MOVE CARD TO BUFFER 00055000
  56. AGO .DOIT 00056000
  57. .CCUE AIF ('&KEY' NE 'CUE').COL8 00057000
  58. &NM SETA K'&CUTE-2 00058000
  59. MVC LOGBUFF(&NM),=C&CUTE - CUEING MESSAGE 00059000
  60. .COL8 MVC LOGBUFF+16(80),&TEXT - MOVE CARD TO BUFFER 00060000
  61. AGO .DOIT 00061000
  62. MEND 00062000
  63. EJECT 00063000
  64. MACRO 00064000
  65. &LABEL OPT &N,&MIN,&CKAD,&DO,&ARG 00065000
  66. &LABEL DC CL8'&N' - OPTION NAME 00066000
  67. DC AL2(&MIN-1) - (MINIMUM # LETTERS) - 1 00067000
  68. DC AL2(&CKAD-CKADS) - CHECK ADDRESS 00068000
  69. AIF ('&DO' EQ 'ON').ON 00069000
  70. AIF ('&DO' EQ 'OFF').OFF 00070000
  71. AIF ('&DO' EQ 'GO').GO 00071000
  72. MNOTE 8,'ILLEGAL PARAMETER ''&DO''' 00072000
  73. MEXIT 00073000
  74. .ON AIF ('&N' EQ 'STOR').ON2 00074000
  75. OI GLOBALS,&ARG - TURN ON FLAG 00075000
  76. SPACE 00076000
  77. MEXIT 00077000
  78. .ON2 OI UPDFLAG,&ARG - TURN ON FLAG 00078000
  79. SPACE 00079000
  80. MEXIT 00080000
  81. .OFF AIF ('&N' EQ 'NOSTOR').OFF2 00081000
  82. NI GLOBALS,X'FF'-&ARG - TURN OFF FLAG 00082000
  83. SPACE 00083000
  84. MEXIT 00084000
  85. .OFF2 NI UPDFLAG,X'FF'-&ARG - TURN OFF FLAG 00085000
  86. SPACE 00086000
  87. MEXIT 00087000
  88. .GO B &ARG - BRANCH TO OPTION HANDLER 00088000
  89. SPACE 00089000
  90. MEXIT 00090000
  91. MEND 00091000
  92. EJECT 00092000
  93. *. 00093000
  94. * MODULE NAME - 00094000
  95. * 00095000
  96. * DMSUPD (UPDATE COMMAND) 00096000
  97. * 00097000
  98. * FUNCTION - 00098000
  99. * 00099000
  100. * CMS 'UPDATE' COMMAND -- UPDATE SOURCE FILES ACCORDING 00100000
  101. * TO SPECIFICATIONS IN UPDATE FILES. MULTIPLE UPDATES 00101000
  102. * MAY BE MADE, ACCORDING TO SPECIFICATIONS IN CONTROL 00102000
  103. * FILES WHICH DESIGNATE THE UPDATE FILES. 00103000
  104. * 00104000
  105. * ATTRIBUTES - 00105000
  106. * 00106000
  107. * DISK RESIDENT, NON-RE-ENTRANT, NON-REUSABLE 00107000
  108. * 00108000
  109. * ENTRY POINTS - 00109000
  110. * 00110000
  111. * DMSUPD 00111000
  112. * 00112000
  113. * ENTRY CONDITIONS - 00113000
  114. * 00114000
  115. * LA R1,PLIST 00115000
  116. * SVC 202 00116000
  117. * 00117000
  118. * WHERE THE PLIST HAS THE FORMAT DESCRIBED IN THE COMMAND 00118000
  119. * LANGUAGE USER'S GUIDE 00119000
  120. * 00120000
  121. * EXIT CONDITIONS - 00121000
  122. * 00122000
  123. * NORMAL - 00123000
  124. * RETURN CODE 0 IN REGISTER 15 00124000
  125. * 00125000
  126. * ERROR - 00126000
  127. * RETURN CODE IN REGISTER 15 00127000
  128. * 4 SEQUENCE ERROR IN INPUT SOURCE FILE 00128000
  129. * 8 SEQUENCE ERROR INTRODUCED INTO OUTPUT FILE 00129000
  130. * 12 OTHER NON-FATAL UPDATING ERROR (SUCH AS INVALID 00130000
  131. * UPDATE FILE CONTROL CARD) 00131000
  132. * 20-36 FATAL ERROR, CAUSING UPDATE TO ABORT (SUCH AS 00132000
  133. * INVALID OPTION, MISSING FILENAME, INVALID CONTROL 00133000
  134. * FILE, ETC.) 00134000
  135. * 40 NO UPDATE FILES WERE FOUND WITH 'CTL' OPTION 00135000
  136. * 100 I/O ERROR READING OR WRITING 00136000
  137. * 00137000
  138. * CALLS TO OTHER ROUTINES - 00138000
  139. * 00139000
  140. * ADTLKP LOOK UP ACTIVE DISK TABLE 00140000
  141. * ADTLKW LOOK UP READ/WRITE ACTIVE DISK TABLE 00141000
  142. * FSREAD READ RECORDS FROM INPUT FILES 00142000
  143. * FSWRITE WRITE RECORDS TO OUTPUT FILES 00143000
  144. * FSCLOSE CLOSE INPUT AND OUTPUT FILES 00144000
  145. * FSERASE ERASE OLD COPIES OF OUTPUT FILES 00145000
  146. * PRINTL PRINT THE LOG FILE 00146000
  147. * LINEDIT TYPE MESSAGES AND FORM LINES 00147000
  148. * DMSERR TYPE ERROR MESSAGES 00148000
  149. * FSSTATE DETERMINE EXISTENCE OF INPUT FILES 00149000
  150. * ATTN STACK LINES (WITH 'STK' OPTION) 00150000
  151. * RENAME RENAME WORK FILES 00151000
  152. * 00152000
  153. * EXTERNAL REFERENCES - 00153000
  154. * 00154000
  155. * NUCON NUCLEUS CONSTANTS AND VARIABLES 00155000
  156. * ADT ACTIVE DISK TABLE 00156000
  157. * 00157000
  158. * TABLES / WORKAREAS - 00158000
  159. * 00159000
  160. * NONE -- ALL WORK STORAGE IS IN-LINE 00160000
  161. * 00161000
  162. * REGISTER USAGE - 00162000
  163. * 00163000
  164. * R12 BASE REGISTER # 1 00164000
  165. * R11 BASE REGISTER # 2 00165000
  166. * R9 BASE REGISTER # 3 00166000
  167. * R10 HOLDS SEQ8/SEQ5 COUNT FOR EX 00167000
  168. * R2 - R8 WORK REGISTERS 00168000
  169. * 00169000
  170. * NOTES - 00170000
  171. * 00171000
  172. * NONE 00172000
  173. * 00173000
  174. * OPERATION - 00174000
  175. * 00175000
  176. * IF A SINGLE UPDATE IS TO BE PERFORMED, THEN THE INPUT 00176000
  177. * SOURCE FILE AND THE UPDATE FILE ARE OPENED. AS THE 00177000
  178. * CONTROL CARDS ARE READ FROM THE UPDATE FILE, INSERTIONS 00178000
  179. * AND DELETIONS ARE MADE TO THE SOURCE FILE, WITH THE 00179000
  180. * UPDATED VERSION WRITTEN ONTO DISK AS $FNAME. 00180000
  181. * 00181000
  182. * IF MULTIPLE UPDATES ARE TO BE PERFORMED, THEN THE CONTROL 00182000
  183. * FILE IS OPENED, AND USED AS A GUIDE TO THE VARIOUS 00183000
  184. * UPDATE FILES. UPDATE FILE CONTROL CARDS MAY REFER 00184000
  185. * TO UPDATE FILES, OR TO 'AUX' FILES CONTAINING 00185000
  186. * DESIGNATIONS OF UPDATE FILEIDS. (THE EXACT FORMATS OF 00186000
  187. * THESE FILES IS DESCRIBED IN DETAIL IN THE COMMAND 00187000
  188. * LANGUAGE USER'S GUIDE.) IF NO UPDATE FILES ARE FOUND 00188000
  189. * AT ALL, A RETURN CODE OF 40 IS GENERATED (THIS CODE IS 00189000
  190. * GENERATED IN ONLY THIS WAY). 00190000
  191. * WHEN MULTIPLE UPDATES ARE BEING PERFORMED, THE INPUT 00191000
  192. * SOURCE FILE IS READ INTO STORAGE AND THE UPDATES ARE 00192000
  193. * THEN PERFORMED IN STORAGE. ALL UPDATES ARE DONE 00193000
  194. * IN STORAGE BEFORE THE OUTPUT FILE IS CREATED 00194000
  195. * ON DISK. 00195000
  196. * 00196000
  197. * AS A FINAL STEP, IF THE 'REP' OPTION WAS SPECIFIED, THEN 00197000
  198. * THE $FNAME FILE IS RENAMED TO FNAME. 00198000
  199. *. 00199000
  200. EJECT 00200000
  201. * "FSSTATE/FSREAD/FSWRITE/FSCLOSE/FSERASE" MACROS WITH BALR CALLS: 00201000
  202. SPACE 00202000
  203. MACRO 00203000
  204. &LABEL FSSTATE &FILEID,&FSCB=,&ERROR= 00204000
  205. GBLC &DMSNAME,&DMSTYPE,&DMSMODE 00205000
  206. AIF (T'&FILEID EQ 'O' AND T'&FSCB EQ 'O').ERR1 00206000
  207. AIF (T'&FILEID EQ 'O').NOID 00207000
  208. AIF ('&FILEID'(1,1) NE '''' AND '&FILEID'(1,1) NE '(').ERR2 00208000
  209. AIF ('&FILEID'(1,1) EQ '(' AND '&FILEID(1)' EQ '1').ERR3 00209000
  210. AIF ('&FILEID'(1,1) EQ '(' AND '&FILEID(1)' EQ '0').ERR4 00210000
  211. &DMSNAME SETC ' ' 00211000
  212. &DMSTYPE SETC ' ' 00212000
  213. &DMSMODE SETC ' ' 00213000
  214. AIF ('&FILEID'(1,1) EQ '(').SKIP1 00214000
  215. &DMSMODE SETC 'A1' 00215000
  216. DMSPID &FILEID 00216000
  217. AIF ('&DMSNAME' EQ ' ' OR '&DMSTYPE' EQ ' ').ERR2 00217000
  218. .SKIP1 AIF (T'&FSCB EQ 'O').NOCB 00218000
  219. .NOID AIF (T'&LABEL EQ 'O').NLBL 00219000
  220. &LABEL DS 0H 00220000
  221. .NLBL ANOP 00221000
  222. AIF ('&FSCB'(1,1) EQ '(').REG1 00222000
  223. LA 1,&FSCB 00223000
  224. AGO .CONT1 00224000
  225. .REG1 AIF ('&FSCB(1)' EQ '1').CONT1 00225000
  226. LR 1,&FSCB(1) 00226000
  227. .CONT1 ANOP 00227000
  228. AIF (T'&FILEID EQ 'O').CONT2 00228000
  229. AIF ('&FILEID'(1,1) EQ '(').REG2 00229000
  230. MVC 8(8,1),=CL8'&DMSNAME' 00230000
  231. MVC 16(8,1),=CL8'&DMSTYPE' 00231000
  232. MVC 24(2,1),=CL2'&DMSMODE' 00232000
  233. AGO .CONT2 00233000
  234. .REG2 ANOP 00234000
  235. MVC 8(18,1),0(&FILEID(1)) 00235000
  236. .CONT2 ANOP 00236000
  237. MVC 40(4,1),28(1) 00237000
  238. ST R14,0(,R1) PRESERVE R14 (IN P-LIST) 00238000
  239. L R15,ASTATE CALL 'STATE' VIA BALR 00239000
  240. BALR R14,R15 ... 00240000
  241. L R14,0(,R1) RECOVER R14 00241000
  242. AIF (T'&ERROR EQ 'O').NOER 00242000
  243. BNZ &ERROR 00243000
  244. AGO .CONT3 00244000
  245. .NOER ANOP 00245000
  246. BNZ DMS&SYSNDX.B 00246000
  247. .CONT3 ANOP 00247000
  248. L 15,28(,1) 00248000
  249. MVC 28(4,1),40(1) 00249000
  250. LR 1,15 00250000
  251. SR 15,15 00251000
  252. AIF (T'&ERROR NE 'O').EXIT 00252000
  253. DMS&SYSNDX.B EQU * 00253000
  254. .EXIT MEXIT 00254000
  255. .NOCB ANOP 00255000
  256. CNOP 0,4 00256000
  257. &LABEL BAL 1,DMS&SYSNDX.A 00257000
  258. DC CL8'STATE' 00258000
  259. DC CL8'&DMSNAME' 00259000
  260. DC CL8'&DMSTYPE' 00260000
  261. DC CL2'&DMSMODE' 00261000
  262. DC CL2' ' 00262000
  263. DC AL4(0) 00263000
  264. DMS&SYSNDX.A EQU * 00264000
  265. AIF ('&FILEID'(1,1) NE '(').SKIP2 00265000
  266. MVC 8(18,1),0(&FILEID(1)) 00266000
  267. .SKIP2 ANOP 00267000
  268. ST R14,0(,R1) PRESERVE R14 (IN P-LIST) 00268000
  269. L R15,ASTATE CALL 'STATE' VIA BALR 00269000
  270. BALR R14,R15 ... 00270000
  271. L R14,0(,R1) RECOVER R14 00271000
  272. AIF (T'&ERROR EQ 'O').NERR 00272000
  273. BNZ &ERROR 00273000
  274. AGO .SKIP3 00274000
  275. .NERR ANOP 00275000
  276. BNZ *+8 00276000
  277. .SKIP3 ANOP 00277000
  278. L 1,28(,1) 00278000
  279. MEXIT 00279000
  280. .ERR1 MNOTE 8,'NEITHER FILEID OF FSCB SPECIFIED' 00280000
  281. MEXIT 00281000
  282. .ERR2 MNOTE 8,'INVALID FILEID SPECIFICATION' 00282000
  283. MEXIT 00283000
  284. .ERR3 MNOTE 8,'REGISTER 1 INVALID FOR FILEID' 00284000
  285. MEXIT 00285000
  286. .ERR4 MNOTE 8,'INVALID USE OF REGISTER 0' 00286000
  287. MEND 00287000
  288. SPACE 00288000
  289. MACRO 00289000
  290. &LABEL FSREAD &FILEID,&FSCB=,&RECFM=,&BUFFER=,&BSIZE=,&RECNO=,&NOREC=X00290000
  291. ,&ERROR= 00291000
  292. GBLC &DMSNAME,&DMSTYPE,&DMSMODE 00292000
  293. AIF (T'&FILEID EQ 'O' AND T'&FSCB EQ 'O').ERR1 00293000
  294. AIF (T'&FILEID EQ 'O').NOID 00294000
  295. AIF ('&FILEID'(1,1) NE '''' AND '&FILEID'(1,1) NE '(').ERR2 00295000
  296. AIF ('&FILEID'(1,1) EQ '(' AND '&FILEID(1)' EQ '0').ERR3 00296000
  297. AIF ('&FILEID'(1,1) EQ '(' AND '&FILEID(1)' EQ '1').ERR3 00297000
  298. &DMSNAME SETC ' ' 00298000
  299. &DMSTYPE SETC ' ' 00299000
  300. &DMSMODE SETC ' ' 00300000
  301. AIF ('&FILEID'(1,1) EQ '(').CONT1 00301000
  302. &DMSMODE SETC 'A1' 00302000
  303. DMSPID &FILEID 00303000
  304. AIF ('&DMSNAME' EQ ' ' OR '&DMSTYPE' EQ ' ').ERR2 00304000
  305. .CONT1 AIF (T'&FSCB EQ 'O').NOCB 00305000
  306. .NOID AIF (T'&LABEL EQ 'O').NLBL 00306000
  307. &LABEL DS 0H 00307000
  308. .NLBL ANOP 00308000
  309. AIF ('&FSCB'(1,1) EQ '(').REG1 00309000
  310. LA 1,&FSCB 00310000
  311. AGO .CONT2 00311000
  312. .REG1 AIF ('&FSCB(1)' EQ '1').CONT2 00312000
  313. LR 1,&FSCB(1) 00313000
  314. .CONT2 AIF (T'&FILEID EQ 'O').CONT3 00314000
  315. AIF ('&FILEID'(1,1) EQ '(').REG2 00315000
  316. MVC 8(8,1),=CL8'&DMSNAME' 00316000
  317. MVC 16(8,1),=CL8'&DMSTYPE' 00317000
  318. MVC 24(2,1),=CL2'&DMSMODE' 00318000
  319. AGO .CONT3 00319000
  320. .REG2 ANOP 00320000
  321. MVC 8(18,1),0(&FILEID(1)) 00321000
  322. .CONT3 AIF (T'&RECNO EQ 'O').SKIP1 00322000
  323. AIF ('&RECNO'(1,1) EQ '(').STOR1 00323000
  324. MVC 26(2,1),=H'&RECNO' 00324000
  325. AGO .SKIP1 00325000
  326. .STOR1 ANOP 00326000
  327. AIF ('&RECNO(1)' EQ '1').ERR4 00327000
  328. STH &RECNO(1),26(,1) 00328000
  329. .SKIP1 AIF (T'&BUFFER EQ 'O').SKIP2 00329000
  330. AIF ('&BUFFER'(1,1) EQ '(').STOR2 00330000
  331. MVC 28(4,1),=A(&BUFFER) 00331000
  332. AGO .SKIP2 00332000
  333. .STOR2 ANOP 00333000
  334. AIF ('&BUFFER(1)' EQ '1').ERR5 00334000
  335. ST &BUFFER(1),28(,1) 00335000
  336. .SKIP2 AIF (T'&BSIZE EQ 'O').SKIP3 00336000
  337. AIF ('&BSIZE'(1,1) EQ '(').STOR3 00337000
  338. MVC 32(4,1),=F'&BSIZE' 00338000
  339. AGO .SKIP3 00339000
  340. .STOR3 ANOP 00340000
  341. AIF ('&BSIZE(1)' EQ '1').ERR6 00341000
  342. ST &BSIZE(1),32(,1) 00342000
  343. .SKIP3 AIF (T'&RECFM EQ 'O').SKIP4 00343000
  344. AIF ('&RECFM'(1,1) EQ '(').STOR4 00344000
  345. AIF ('&RECFM' NE 'F' AND '&RECFM' NE 'V').ERR11 00345000
  346. MVC 36(2,1),=CL2'&RECFM' 00346000
  347. AGO .SKIP4 00347000
  348. .STOR4 ANOP 00348000
  349. AIF ('&RECFM(1)' EQ '1').ERR7 00349000
  350. STC &RECFM(1),36(,1) 00350000
  351. .SKIP4 AIF (T'&NOREC EQ 'O').SKIP5 00351000
  352. AIF ('&NOREC'(1,1) EQ '(').STOR5 00352000
  353. MVC 38(2,1),=H'&NOREC' 00353000
  354. AGO .SKIP5 00354000
  355. .STOR5 ANOP 00355000
  356. AIF ('&NOREC(1)' EQ '1').ERR8 00356000
  357. STH &NOREC(1),38(,1) 00357000
  358. .SKIP5 ANOP 00358000
  359. ST R14,0(,R1) PRESERVE R14 (IN P-LIST) 00359000
  360. L R15,ARDBUF CALL 'RDBUF' VIA BALR 00360000
  361. BALR R14,R15 ... 00361000
  362. L R14,0(,R1) RECOVER R14 00362000
  363. AIF (T'&ERROR EQ 'O').NOER 00363000
  364. BNZ &ERROR BRANCH IF ERROR OCCURRED 00364000
  365. .NOER ANOP 00365000
  366. L 0,40(,1) 00366000
  367. MEXIT 00367000
  368. .NOCB ANOP 00368000
  369. AIF (T'&BUFFER EQ 'O').ERR9 00369000
  370. AIF (T'&BSIZE EQ 'O').ERR10 00370000
  371. CNOP 0,4 00371000
  372. &LABEL BAL 1,DMS&SYSNDX.A 00372000
  373. FSCB &FILEID 00373000
  374. DMS&SYSNDX.A EQU * 00374000
  375. AIF ('&FILEID'(1,1) EQ '(').REG2 00375000
  376. AGO .CONT3 00376000
  377. .ERR1 MNOTE 8,'NEITHER FILEID OR FSCB SPECIFIED' 00377000
  378. MEXIT 00378000
  379. .ERR2 MNOTE 8,'INVALID FILEID SPECIFICATION' 00379000
  380. MEXIT 00380000
  381. .ERR3 MNOTE 8,'REGISTERS 0 AND 1 INVALID FOR FILEID' 00381000
  382. MEXIT 00382000
  383. .ERR4 MNOTE 8,'REGISTER 1 INVALID FOR RECNO' 00383000
  384. MEXIT 00384000
  385. .ERR5 MNOTE 8,'REGISTER 1 INVALID FOR BUFFER' 00385000
  386. MEXIT 00386000
  387. .ERR6 MNOTE 8,'REGISTER 1 INVALID FOR BSIZE' 00387000
  388. MEXIT 00388000
  389. .ERR7 MNOTE 8,'REGISTER 1 INVALID FOR RECFM' 00389000
  390. MEXIT 00390000
  391. .ERR8 MNOTE 8,'REGISTER 1 INVALID FOR NOREC' 00391000
  392. MEXIT 00392000
  393. .ERR9 MNOTE 8,'BUFFER ADDRESS NOT SPECIFIED' 00393000
  394. MEXIT 00394000
  395. .ERR10 MNOTE 8,'BUFFER SIZE NOT SPECIFIED' 00395000
  396. MEXIT 00396000
  397. .ERR11 MNOTE 8,'INVALID RECFM SPECIFICATION' 00397000
  398. MEND 00398000
  399. SPACE 00399000
  400. MACRO 00400000
  401. &LABEL FSWRITE &FILEID,&FSCB=,&RECFM=,&BUFFER=,&BSIZE=,&RECNO=,&NORECX00401000
  402. =,&ERROR= 00402000
  403. GBLC &DMSNAME,&DMSTYPE,&DMSMODE 00403000
  404. AIF (T'&FILEID EQ 'O' AND T'&FSCB EQ 'O').ERR1 00404000
  405. AIF (T'&FILEID EQ 'O').NOID 00405000
  406. AIF ('&FILEID'(1,1) NE '''' AND '&FILEID'(1,1) NE '(').ERR2 00406000
  407. AIF ('&FILEID'(1,1) EQ '(' AND '&FILEID(1)' EQ '0').ERR3 00407000
  408. AIF ('&FILEID'(1,1) EQ '(' AND '&FILEID(1)' EQ '1').ERR3 00408000
  409. &DMSNAME SETC ' ' 00409000
  410. &DMSTYPE SETC ' ' 00410000
  411. &DMSMODE SETC ' ' 00411000
  412. AIF ('&FILEID'(1,1) EQ '(').CONT1 00412000
  413. &DMSMODE SETC 'A1' 00413000
  414. DMSPID &FILEID 00414000
  415. AIF ('&DMSNAME' EQ ' ' OR '&DMSTYPE' EQ ' ').ERR2 00415000
  416. .CONT1 AIF (T'&FSCB EQ 'O').NOCB 00416000
  417. .NOID AIF (T'&LABEL EQ 'O').NLBL 00417000
  418. &LABEL DS 0H 00418000
  419. .NLBL ANOP 00419000
  420. AIF ('&FSCB'(1,1) EQ '(').REG1 00420000
  421. LA 1,&FSCB 00421000
  422. AGO .CONT2 00422000
  423. .REG1 AIF ('&FSCB(1)' EQ '1').CONT2 00423000
  424. LR 1,&FSCB(1) 00424000
  425. .CONT2 AIF (T'&FILEID EQ 'O').CONT3 00425000
  426. AIF ('&FILEID'(1,1) EQ '(').REG2 00426000
  427. MVC 8(8,1),=CL8'&DMSNAME' 00427000
  428. MVC 16(8,1),=CL8'&DMSTYPE' 00428000
  429. MVC 24(2,1),=CL2'&DMSMODE' 00429000
  430. AGO .CONT3 00430000
  431. .REG2 ANOP 00431000
  432. MVC 8(18,1),0(&FILEID(1)) 00432000
  433. .CONT3 AIF (T'&RECNO EQ 'O').SKIP1 00433000
  434. AIF ('&RECNO'(1,1) EQ '(').STOR1 00434000
  435. MVC 26(2,1),=H'&RECNO' 00435000
  436. AGO .SKIP1 00436000
  437. .STOR1 ANOP 00437000
  438. AIF ('&RECNO(1)' EQ '1').ERR4 00438000
  439. STH &RECNO(1),26(,1) 00439000
  440. .SKIP1 AIF (T'&BUFFER EQ 'O').SKIP2 00440000
  441. AIF ('&BUFFER'(1,1) EQ '(').STOR2 00441000
  442. MVC 28(4,1),=A(&BUFFER) 00442000
  443. AGO .SKIP2 00443000
  444. .STOR2 ANOP 00444000
  445. AIF ('&BUFFER(1)' EQ '1').ERR5 00445000
  446. ST &BUFFER(1),28(,1) 00446000
  447. .SKIP2 AIF (T'&BSIZE EQ 'O').SKIP3 00447000
  448. AIF ('&BSIZE'(1,1) EQ '(').STOR3 00448000
  449. MVC 32(4,1),=F'&BSIZE' 00449000
  450. AGO .SKIP3 00450000
  451. .STOR3 ANOP 00451000
  452. AIF ('&BSIZE(1)' EQ '1').ERR6 00452000
  453. ST &BSIZE(1),32(,1) 00453000
  454. .SKIP3 AIF (T'&RECFM EQ 'O').SKIP4 00454000
  455. AIF ('&RECFM'(1,1) EQ '(').STOR4 00455000
  456. AIF ('&RECFM' NE 'F' AND '&RECFM' NE 'V').ERR11 00456000
  457. MVC 36(2,1),=CL2'&RECFM' 00457000
  458. AGO .SKIP4 00458000
  459. .STOR4 ANOP 00459000
  460. AIF ('&RECFM(1)' EQ '1').ERR7 00460000
  461. STC &RECFM(1),36(,1) 00461000
  462. .SKIP4 AIF (T'&NOREC EQ 'O').SKIP5 00462000
  463. AIF ('&NOREC'(1,1) EQ '(').STOR5 00463000
  464. MVC 38(2,1),=H'&NOREC' 00464000
  465. AGO .SKIP5 00465000
  466. .STOR5 ANOP 00466000
  467. AIF ('&NOREC(1)' EQ '1').ERR8 00467000
  468. STH &NOREC(1),38(,1) 00468000
  469. .SKIP5 ANOP 00469000
  470. ST R14,0(,R1) PRESERVE R14 (IN P-LIST) 00470000
  471. L R15,AWRBUF CALL 'WRBUF' VIA BALR 00471000
  472. BALR R14,R15 ... 00472000
  473. L R14,0(,R1) RECOVER R14 00473000
  474. AIF (T'&ERROR EQ 'O').NOER 00474000
  475. BNZ &ERROR BRANCH IF ERROR OCCURRED 00475000
  476. .NOER ANOP 00476000
  477. MEXIT 00477000
  478. .NOCB ANOP 00478000
  479. AIF (T'&BUFFER EQ 'O').ERR9 00479000
  480. AIF (T'&BSIZE EQ 'O').ERR10 00480000
  481. CNOP 0,4 00481000
  482. &LABEL BAL 1,DMS&SYSNDX.A 00482000
  483. SPACE 00483000
  484. FSCB &FILEID 00484000
  485. DMS&SYSNDX.A EQU * 00485000
  486. AIF ('&FILEID'(1,1) EQ '(').REG2 00486000
  487. AGO .CONT3 00487000
  488. .ERR1 MNOTE 8,'NEITHER FILEID OR FSCB SPECIFIED' 00488000
  489. MEXIT 00489000
  490. .ERR2 MNOTE 8,'INVALID FILEID SPECIFICATION' 00490000
  491. MEXIT 00491000
  492. .ERR3 MNOTE 8,'REGISTERS 0 AND 1 INVALID FOR FILEID' 00492000
  493. MEXIT 00493000
  494. .ERR4 MNOTE 8,'REGISTER 1 INVALID FOR RECNO' 00494000
  495. MEXIT 00495000
  496. .ERR5 MNOTE 8,'REGISTER 1 INVALID FOR BUFFER' 00496000
  497. MEXIT 00497000
  498. .ERR6 MNOTE 8,'REGISTER 1 INVALID FOR BSIZE' 00498000
  499. MEXIT 00499000
  500. .ERR7 MNOTE 8,'REGISTER 1 INVALID FOR RECFM' 00500000
  501. MEXIT 00501000
  502. .ERR8 MNOTE 8,'REGISTER 1 INVALID FOR NOREC' 00502000
  503. MEXIT 00503000
  504. .ERR9 MNOTE 8,'BUFFER ADDRESS NOT SPECIFIED' 00504000
  505. MEXIT 00505000
  506. .ERR10 MNOTE 8,'BUFFER SIZE NOT SPECIFIED' 00506000
  507. MEXIT 00507000
  508. .ERR11 MNOTE 8,'INVALID RECFM SPECIFICATION' 00508000
  509. MEND 00509000
  510. SPACE 00510000
  511. MACRO 00511000
  512. &LABEL FSCLOSE &FILEID,&FSCB=,&ERROR= 00512000
  513. GBLC &DMSNAME,&DMSTYPE,&DMSMODE 00513000
  514. AIF (T'&FILEID EQ 'O' AND T'&FSCB EQ 'O').ERR1 00514000
  515. AIF (T'&FILEID EQ 'O').NOID 00515000
  516. AIF ('&FILEID'(1,1) NE '''' AND '&FILEID'(1,1) NE '(').ERR2 00516000
  517. AIF ('&FILEID'(1,1) EQ '(' AND '&FILEID(1)' EQ '0').ERR3 00517000
  518. AIF ('&FILEID'(1,1) EQ '(' AND '&FILEID(1)' EQ '1').ERR3 00518000
  519. &DMSNAME SETC ' ' 00519000
  520. &DMSTYPE SETC ' ' 00520000
  521. &DMSMODE SETC ' ' 00521000
  522. AIF ('&FILEID'(1,1) EQ '(').SKIP1 00522000
  523. &DMSMODE SETC 'A1' 00523000
  524. DMSPID &FILEID 00524000
  525. AIF ('&DMSNAME' EQ ' ' OR '&DMSTYPE' EQ ' ').ERR2 00525000
  526. .SKIP1 AIF (T'&FSCB EQ 'O').NOCB 00526000
  527. .NOID AIF (T'&LABEL EQ 'O').NLBL 00527000
  528. &LABEL DS 0H 00528000
  529. .NLBL ANOP 00529000
  530. AIF ('&FSCB'(1,1) EQ '(').REG1 00530000
  531. LA 1,&FSCB 00531000
  532. AGO .CONT1 00532000
  533. .REG1 AIF ('&FSCB(1)' EQ '1').CONT1 00533000
  534. LR 1,&FSCB(1) 00534000
  535. .CONT1 ANOP 00535000
  536. AIF (T'&FILEID EQ 'O').CONT2 00536000
  537. AIF ('&FILEID'(1,1) EQ '(').REG2 00537000
  538. MVC 8(8,1),=CL8'&DMSNAME' 00538000
  539. MVC 16(8,1),=CL8'&DMSTYPE' 00539000
  540. MVC 24(2,1),=CL2'&DMSMODE' 00540000
  541. AGO .CONT2 00541000
  542. .REG2 ANOP 00542000
  543. MVC 8(18,1),0(&FILEID(1)) 00543000
  544. .CONT2 ANOP 00544000
  545. ST R14,0(,R1) PRESERVE R14 (IN P-LIST) 00545000
  546. L R15,AFINIS CALL 'FINIS' VIA BALR 00546000
  547. BALR R14,R15 ... 00547000
  548. L R14,0(,R1) RECOVER R14 00548000
  549. AIF (T'&ERROR EQ 'O').NOER1 00549000
  550. BNZ &ERROR BRANCH IF ERROR OCCURRED 00550000
  551. .NOER1 ANOP 00551000
  552. MEXIT 00552000
  553. .NOCB ANOP 00553000
  554. CNOP 0,4 00554000
  555. &LABEL BAL 1,DMS&SYSNDX.A 00555000
  556. DC CL8'FINIS' 00556000
  557. DC CL8'&DMSNAME' 00557000
  558. DC CL8'&DMSTYPE' 00558000
  559. DC CL2'&DMSMODE' 00559000
  560. DMS&SYSNDX.A EQU * 00560000
  561. AIF ('&FILEID'(1,1) NE '(').SKIP2 00561000
  562. MVC 8(18,1),0(&FILEID(1)) 00562000
  563. .SKIP2 ANOP 00563000
  564. ST R14,0(,R1) PRESERVE R14 (IN P-LIST) 00564000
  565. L R15,AFINIS CALL 'FINIS' VIA BALR 00565000
  566. BALR R14,R15 ... 00566000
  567. L R14,0(,R1) RECOVER R14 00567000
  568. AIF (T'&ERROR EQ 'O').NOER2 00568000
  569. BNZ &ERROR BRANCH IF ERROR OCCURRED 00569000
  570. .NOER2 ANOP 00570000
  571. MEXIT 00571000
  572. .ERR1 MNOTE 8,'NEITHER FILEID OR FSCB SPECIFIED' 00572000
  573. MEXIT 00573000
  574. .ERR2 MNOTE 8,'INVALID FILEID SPECIFICATION' 00574000
  575. MEXIT 00575000
  576. .ERR3 MNOTE 8,'REGISTERS 0 AND 1 INVALID FOR FILEID' 00576000
  577. MEND 00577000
  578. SPACE 00578000
  579. MACRO 00579000
  580. &LABEL FSERASE &FILEID,&FSCB=,&ERROR= 00580000
  581. GBLC &DMSNAME,&DMSTYPE,&DMSMODE 00581000
  582. AIF (T'&FILEID EQ 'O' AND T'&FSCB EQ 'O').ERR1 00582000
  583. AIF (T'&FILEID EQ 'O').NOID 00583000
  584. AIF ('&FILEID'(1,1) NE '''' AND '&FILEID'(1,1) NE '(').ERR2 00584000
  585. AIF ('&FILEID'(1,1) EQ '(' AND '&FILEID(1)' EQ '0').ERR3 00585000
  586. AIF ('&FILEID'(1,1) EQ '(' AND '&FILEID(1)' EQ '1').ERR3 00586000
  587. &DMSNAME SETC ' ' 00587000
  588. &DMSTYPE SETC ' ' 00588000
  589. &DMSMODE SETC ' ' 00589000
  590. AIF ('&FILEID'(1,1) EQ '(').SKIP1 00590000
  591. &DMSMODE SETC 'A1' 00591000
  592. DMSPID &FILEID 00592000
  593. AIF ('&DMSNAME' EQ ' ' OR '&DMSTYPE' EQ ' ').ERR2 00593000
  594. .SKIP1 AIF (T'&FSCB EQ 'O').NOCB 00594000
  595. .NOID AIF (T'&LABEL EQ 'O').NLBL 00595000
  596. &LABEL DS 0H 00596000
  597. .NLBL ANOP 00597000
  598. AIF ('&FSCB'(1,1) EQ '(').REG1 00598000
  599. LA 1,&FSCB 00599000
  600. AGO .CONT1 00600000
  601. .REG1 AIF ('&FSCB(1)' EQ '1').CONT1 00601000
  602. LR 1,&FSCB(1) 00602000
  603. .CONT1 ANOP 00603000
  604. AIF (T'&FILEID EQ 'O').CONT2 00604000
  605. AIF ('&FILEID'(1,1) EQ '(').REG2 00605000
  606. MVC 8(8,1),=CL8'&DMSNAME' 00606000
  607. MVC 16(8,1),=CL8'&DMSTYPE' 00607000
  608. MVC 24(2,1),=CL2'&DMSMODE' 00608000
  609. AGO .CONT2 00609000
  610. .REG2 ANOP 00610000
  611. MVC 8(18,1),0(&FILEID(1)) 00611000
  612. .CONT2 ANOP 00612000
  613. ST R14,0(,R1) PRESERVE R14 (IN P-LIST) 00613000
  614. L R15,AERASE CALL 'ERASE' VIA BALR 00614000
  615. BALR R14,R15 ... 00615000
  616. L R14,0(,R1) RECOVER R14 00616000
  617. AIF (T'&ERROR EQ 'O').NOER1 00617000
  618. BNZ &ERROR BRANCH IF ERROR OCCURRED 00618000
  619. .NOER1 ANOP 00619000
  620. MEXIT 00620000
  621. .NOCB ANOP 00621000
  622. CNOP 0,4 00622000
  623. &LABEL BAL 1,DMS&SYSNDX.A 00623000
  624. DC CL8'ERASE' 00624000
  625. DC CL8'&DMSNAME' 00625000
  626. DC CL8'&DMSTYPE' 00626000
  627. DC CL2'&DMSMODE' 00627000
  628. DC 8X'FF' 00628000
  629. DMS&SYSNDX.A EQU * 00629000
  630. AIF ('&FILEID'(1,1) NE '(').SKIP2 00630000
  631. MVC 8(18,1),0(&FILEID(1)) 00631000
  632. .SKIP2 ANOP 00632000
  633. ST R14,0(,R1) PRESERVE R14 (IN P-LIST) 00633000
  634. L R15,AERASE CALL 'ERASE' VIA BALR 00634000
  635. BALR R14,R15 ... 00635000
  636. L R14,0(,R1) RECOVER R14 00636000
  637. AIF (T'&ERROR EQ 'O').NOER2 00637000
  638. BNZ &ERROR BRANCH IF ERROR OCCURRED 00638000
  639. .NOER2 ANOP 00639000
  640. MEXIT 00640000
  641. .ERR1 MNOTE 8,'NEITHER FILEID OF FSCB SPECIFIED' 00641000
  642. MEXIT 00642000
  643. .ERR2 MNOTE 8,'INVALID FILEID SPECIFICATION' 00643000
  644. MEXIT 00644000
  645. .ERR3 MNOTE 8,'REGISTERS 0 AND 1 INVALID FOR FILEID' 00645000
  646. MEND 00646000
  647. EJECT 00647000
  648. DMSUPD START X'20000' @VM03093 00648000
  649. SPACE 2 00649000
  650. USING DMSUPD,R12,R11,R9 BASE REGISTERS FOR ROUTINE 00650000
  651. USING NUCON,R0 00651000
  652. SPACE 2 00652000
  653. LR R12,R15 SET FIRST BASE REGISTER 00653000
  654. ST R14,SAVE14 SAVE RETURN ADDRESS 00654000
  655. LA R11,2048(0,R12) SET UP SECOND BASE REGISTER 00655000
  656. LA R11,2048(0,R11) ... 00656000
  657. LA R9,2048(,R11) SET THIRD BASE REG 00657000
  658. LA R9,2048(,R9) 00658000
  659. LR R6,R1 SAVE ADDRESS OF P-LIST BUFFER 00659000
  660. MVI GLOBALS,SEQ8+NSTK+DISK+TERM SET OPTION DEFAULTS 00660000
  661. LA R10,7(0,0) DEFAULT = EIGHT-DIGIT SEQUENCE 00661000
  662. ZAP SEQMAX,=P'100000000' SET MAX SEQ NUMBER P3027 00662000
  663. MVI UPDFLAG,X'04' INCORE DEFAULT @V2D4821 00663000
  664. MVI UPDFLAG2,0 ZERO THE FLAG @V2D4821 00664000
  665. MVI CTLMACS,X'40' BLANK OUT MACLIB BUFFER 00665000
  666. MVC CTLMACS+1(71),CTLMACS ... 00666000
  667. * NOW SET DEFAULTS IN THE DISK P-LISTS 00667000
  668. MVC INPFILE+16(10),=C'ASSEMBLEA1' FTYPE, FMODE 00668000
  669. MVC UPDFILE+16(10),=C'UPDATE A1' FTYPE,FMODE 00669000
  670. MVC CTLFILE+16(10),=C'CNTRL A1' FTYPE, FMODE 00670000
  671. MVC NEWNAME+8(10),=C'ASSEMBLEA1' FTYPE, FMODE 00671000
  672. MVC LOGFILE+16(8),=CL8'UPDLOG ' FTYPE 00672000
  673. DMSKEY NUCLEUS NOW RUN WITH NUCLEUS KEY, AND @VM03093 00673000
  674. SSM NOINTS NO EXTRANEOUS INTERRUPTS PLEASE @VM03093 00674000
  675. EJECT 00675000
  676. * NOW WE'RE ALL SET TO EXAMINE THE INPUT PARMS 00676000
  677. LA R2,8(0,R6) ADVANCE TO FIRST REAL PARAMETER 00677000
  678. CLC 0(8,R2),FENCED WERE ANY PARMS GIVEN ? 00678000
  679. BE NOFNAME NOPE - NEED AT LEAST ONE 00679000
  680. CLC =CL2'( ',0(R2) WERE ONLY OPTIONS SPECIFIED P3059 00680000
  681. BE NOFNAME YES, TYPE OUT AN ERROR MESSAGE P3059 00681000
  682. MVC FNAME,0(R2) SET FILENAME 00682000
  683. MVC INPFILE+8(8),0(R2) FILL IN DISK P-LISTS 00683000
  684. MVC UPDFILE+8(8),0(R2) ... 00684000
  685. MVC LOGFILE+8(8),0(R2) ... 00685000
  686. MVC AUXFILE+8(8),0(R2) ... 00686000
  687. MVC UPSFILE+8(8),0(R2) ... 00687000
  688. MVC NEWNAME+1(7),0(R2) DEFAULT NAME FOR UPDATED FILE 00688000
  689. MVI NEWNAME,C'$' ... IS '$FNAME1' 00689000
  690. MVC SEQLABL(3),0(R2) DEFAULT THREE-CHAR LABEL 00690000
  691. SPACE 2 00691000
  692. BAL R14,OPTSCAN SECOND PARM, IF ANY 00692000
  693. MVC INPFILE+16(8),0(R2) INPUT FILE FTYPE 00693000
  694. MVC NEWNAME+8(8),0(R2) ...ALSO OUTPUT FTYPE 00694000
  695. SPACE 00695000
  696. BAL R14,OPTSCAN THIRD PARM 00696000
  697. MVC INPFILE+24(2),0(R2) INPUT FMODE 00697000
  698. CLI 2(R2),C' ' IS FMOVE > 2 CHARS? 00698000
  699. BNE BADMODE GO IF IT IS 00699000
  700. SPACE 00700000
  701. BAL R14,OPTSCAN CHECK FOR FOURTH PARM... 00701000
  702. MVC UPDFILE+8(8),0(R2) UPDATE FNAME 00702000
  703. SPACE 00703000
  704. BAL R14,OPTSCAN CHECK FOR FIFTH... 00704000
  705. MVC UPDFILE+16(8),0(R2) UPDATE FTYPE 00705000
  706. MVC CTLFILE+16(8),0(R2) SET FILETYPE OF CTL FILE 00706000
  707. SPACE 00707000
  708. BAL R14,OPTSCAN SIXTH.... 00708000
  709. MVC UPDFILE+24(2),0(R2) UPDATE FMODE 00709000
  710. MVC CTLFILE+24(2),0(R2) SET FILEMODE OF CONTROL FILE 00710000
  711. CLI 2(R2),C' ' IS FMODE > 2 CHARS? 00711000
  712. BNE BADMODE GO IF IT IS 00712000
  713. SPACE 00713000
  714. BAL R14,OPTSCAN PICK UP OPTION LIST 00714000
  715. B EXCESIV HMMMM... TOO MANY FIELDS 00715000
  716. EJECT 00716000
  717. OPTSCAN EQU * SCAN COMMAND INPUT FOR OPTIONS, PARMS 00717000
  718. LA R2,8(0,R2) NEXT PARM SLOT 00718000
  719. CLI 0(R2),X'FF' AT END OF LIST YET ? 00719000
  720. BE OPTEND YES - JUMP INTO PROCESSING 00720000
  721. CLI 0(R2),C'(' START OF OPTION LIST ? 00721000
  722. BCR 7,R14 (BNE 0(R14)) NO - JUST RETURN 00722000
  723. OPTNEXT EQU * START DECODING OPTIONS 00723000
  724. LA R2,8(0,R2) NEXT OPTION SLOT 00724000
  725. CLI 0(R2),X'FF' AT END OF PLIST? 00725000
  726. BE OPTEND YES - START MOVING 00726000
  727. CLI 0(R2),C')' AT END OF LIST ? 00727000
  728. BE OPTEND YES 00728000
  729. SPACE 00729000
  730. LA R3,7(0,R2) END OF 8-BYTE FIELD 00730000
  731. OPTBLNK EQU * SCAN BACK TO NON-BLANK 00731000
  732. CLI 0(R3),X'40' 00732000
  733. BNE OPTLIST 00733000
  734. BCT R3,OPTBLNK 00734000
  735. OPTLIST EQU * SET-UP FOR TABLE LOOK-UP 00735000
  736. SR R3,R2 GPR 3 = PARM LENGTH - 1 00736000
  737. LA R7,OPTIONS TABLE START 00737000
  738. LA R4,16(0) TABLE ENTRY LENGTH 00738000
  739. LA R5,OPTLAST TABLE END 00739000
  740. OPTCHEK EQU * MATCH INPUT AGAINST TABLE 00740000
  741. CH R3,8(0,R7) ABOVE MIN. LEN FOR THIS OPTION ? 00741000
  742. BL OPTABLE NO - SKIP OVER IT 00742000
  743. EX R3,OPTCMP DOES IT MATCH ? 00743000
  744. BE OPTFND GO IF FOUND 00744000
  745. SPACE 00745000
  746. OPTABLE EQU * 00746000
  747. BXLE R7,R4,OPTCHEK 00747000
  748. B INVOPTN UNRECOGNIZABLE OPTION 00748000
  749. SPACE 2 00749000
  750. OPTCMP CLC 0(*-*,R7),0(R2) LENGTH FILLED IN BY EX 00750000
  751. SPACE 3 00751000
  752. * COME HERE IF THE OPTION HAS BEEN FOUND IN THE TABLE. 00752000
  753. OPTFND EQU * 00753000
  754. LH R3,10(,R7) GET ADDRESS OF CHECK ADDRESS 00754000
  755. L R4,CKADS(R3) GET VALUE IN CHECK ADDRESS 00755000
  756. LTR R4,R4 IS THERE ALREADY AN ADDR THERE? 00756000
  757. BNZ OPTERR THEN WE HAVE DUP OR CONF OPTIONS 00757000
  758. ST R7,CKADS(R3) STORE ADDRESS OF OPTION TABLE 00758000
  759. EX 0,12(,R7) EXECUTE OI, NI OR B 00759000
  760. B OPTNEXT GO FOR NEXT OPTION 00760000
  761. SPACE 00761000
  762. * COME HERE IF OPTION ERROR. 00762000
  763. OPTERR EQU * 00763000
  764. CLR R7,R4 SAME OPTION SPECIFIED TWICE? 00764000
  765. BE OPTDUP DUPLICATE OPTION IF SO 00765000
  766. B OPTCONF CONFLICTING IF NOT 00766000
  767. SPACE 5 00767000
  768. * COME HERE AT END OF OPTIONS 00768000
  769. OPTEND EQU * 00769000
  770. TM GLOBALS,NSTK 'STK' SPECIFIED? 00770000
  771. BO OPTEND1 GO IF NOT @V2D4821 00771000
  772. TM GLOBALS,CTLF 'CTL' SPECIFIED? 00772000
  773. BZ ERSC ERROR IF 'STK' AND NO 'CTL' 00773000
  774. OPTEND1 EQU * @V2D4821 00774000
  775. TM GLOBALS,CTLF 'CTL' IN EFFECT ? @V2D4821 00775000
  776. BZ OPTEND2 SKIP THIS TEST IF NOT @V2D4821 00776000
  777. L R4,CKCT POINT TO 'CTL' KEYWORD @V2D4821 00777000
  778. L R7,CKIN POINT TO 'INC/NOINC' KEYWORD @V2D4821 00778000
  779. LTR R7,R7 WAS EITHER SPECIFIED @V2D4821 00779000
  780. BZ OPTEND2 GO IF NEITHER WAS SPECIFIED @V2D4821 00780000
  781. CLI 0(R7),C'N' WAS IT 'NOINC' ? @V2D4821 00781000
  782. BE OPTCONF 'NOINC' AND 'CTL' ARE CONFLICTS @V2D4821 00782000
  783. SPACE 00783000
  784. SPACE 00784000
  785. OPTEND2 EQU * 00785000
  786. B PROCESS START PROCESSING 00786000
  787. EJECT 00787000
  788. OPTBASE EQU * OPTION PROCESSOR BASE ADDRESS 00788000
  789. SPACE 00789000
  790. OPTSEQ8 EQU * EIGHT-DIGIT SEQUENCING 00790000
  791. OI GLOBALS,SEQ8 00791000
  792. LA R10,7(0,0) SEQUENCE FIELD LENGTH = 8 00792000
  793. ZAP SEQMAX,=P'100000000' SET MAX SEQ NUMBER (8 DIGS)P3027 00793000
  794. B OPTNEXT 00794000
  795. SPACE 3 00795000
  796. OPTNSEQ EQU * FIVE-DIGIT SEQUENCING 00796000
  797. NI GLOBALS,X'FF'-SEQ8 00797000
  798. LA R10,4(0,0) FIVE DIGITS ONLY 00798000
  799. ZAP SEQMAX,=P'100000' MAX SEQ NUMBER FOR 5 DIGS P3027 00799000
  800. MVC SEQLABL(3),INPFILE+8 DEFAULT THREE-CHAR LABEL 00800000
  801. B OPTNEXT 00801000
  802. SPACE 3 00802000
  803. OPTCNTL EQU * UPDATE CONTROL FILE GIVEN 00803000
  804. OI GLOBALS,CTLF+INCL CONTROL FILE GIVEN 00804000
  805. L R3,CKCOR MUST CHECK TO SEE IF NOINCORE WAS SPEC@V2D4821 00805000
  806. LTR R3,R3 PREVIOUSLY. @V2D4821 00806000
  807. BZ OPTCNTLA IT WASN'T.. SET DEFAULT OF INCORE @V2D4821 00807000
  808. CLI 0(R3),C'N' MAYBE IT WAS @V2D4821 00808000
  809. BE NOINC YES, IT WAS @V2D4821 00809000
  810. OPTCNTLA OI UPDFLAG,INCOR SET DEFAULT INCORE PROCESSING @V2D4821 00810000
  811. NOINC MVC CTLFILE+8(8),UPDFILE+8 FNAME2 = CNTRL FNAME @V2D4821 00811000
  812. MVC UPDFILE+8(8),INPFILE+8 UPDATE FNAME = INPUT FNAME 00812000
  813. MVC UPDFILE+16(8),=CL8'UPDT....' FTYPE SKELETON 00813000
  814. B OPTNEXT 00814000
  815. EJECT 00815000
  816. * OPTION LIST 00816000
  817. OPTIONS DS 0D 00817000
  818. OPT SEQ8,4,CKSE,GO,OPTSEQ8 00818000
  819. OPT NOSEQ8,6,CKSE,GO,OPTNSEQ 00819000
  820. OPT INC,3,CKIN,ON,INCL 00820000
  821. OPT NOINC,5,CKIN,OFF,INCL 00821000
  822. OPT REP,3,CKRE,ON,REPL P3027 00822000
  823. OPT NOREP,5,CKRE,OFF,REPL P3027 00823000
  824. OPT STK,3,CKST,OFF,NSTK 00824000
  825. OPT NOSTK,5,CKST,ON,NSTK 00825000
  826. OPT TERM,4,CKTE,ON,TERM 00826000
  827. OPT NOTERM,6,CKTE,OFF,TERM 00827000
  828. OPT CTL,3,CKCT,GO,OPTCNTL 00828000
  829. OPT NOCTL,5,CKCT,OFF,CTLF 00829000
  830. OPT DISK,4,CKDP,ON,DISK 00830000
  831. OPT STOR,4,CKCOR,ON,INCOR @V2D4821 00831000
  832. SPACE 1 00832000
  833. OPT NOSTOR,6,CKCOR,OFF,INCOR @V2D4821 00833000
  834. SPACE 1 00834000
  835. OPTLAST OPT PRINT,5,CKDP,OFF,DISK 00835000
  836. EJECT 00836000
  837. * CHECK ADDRESSES FOR DUPLICATE OR CONFLICTING OPTIONS 00837000
  838. CKADS EQU * 00838000
  839. CKSE DC A(0) CHECK FOR SEQ8/NOSEQ8 00839000
  840. CKIN DC A(0) CHECK FOR INC/NOINC 00840000
  841. CKRE DC A(0) CHECK FOR REPLACE/NOREPLACE 00841000
  842. CKCT DC A(0) CHECK FOR CTL/NOCTL 00842000
  843. CKST DC A(0) CHECK FOR STK/NOSTK 00843000
  844. CKTE DC A(0) CHECK FOR TERM/NOTERM 00844000
  845. CKDP DC A(0) CHECK FOR DISK/PRINT 00845000
  846. CKCOR DC A(0) CHECK FOR INCORE/NOINCOR@V2D4821 00846000
  847. EJECT 00847000
  848. PROCESS EQU * 00848000
  849. STC R10,MVCPOSN+1 STORE INTO COUNT FIELDS @V2D4821 00849000
  850. STC R10,CLCILAST+1 OF SOME PREVIOUSLY 'EX' @V2D4821 00850000
  851. STC R10,MVCILAST+1 INSTRUCTIONS. @V2D4821 00851000
  852. STC R10,CLCOLAST+1 @V2D4821 00852000
  853. LA R1,INPFILE POINT TO FSCB FOR INPUT FILE 00853000
  854. BAL R14,LOCATE CALL 'STATE' TO SEE IF IT EXISTS 00854000
  855. B NOFILE FILE NOT FOUND -- ABORT 00855000
  856. SPACE 00856000
  857. * WE MUST NOW DETERMINE THE DISK UPON WHICH WE ARE GOING TO PLACE ALL 00857000
  858. * OUR OUTPUT FILES. THE RULES ARE AS FOLLOWS: 00858000
  859. SPACE 00859000
  860. * 1. TRY TO PUT IT ONTO THE DISK FROM WHICH WE ARE TAKING THE ORIGINAL 00860000
  861. * INPUT FILE. 00861000
  862. SPACE 00862000
  863. * 2. IF THAT DISK IS R/O, BUT IT IS AN EXTENSION OF A READ/WRITE DISK, 00863000
  864. * THEN IT GOES ONTO THAT READ/WRITE DISK. 00864000
  865. SPACE 00865000
  866. * 3. IF THOSE TWO STEPS FAIL, PUT IT ONTO THE A-DISK. 00866000
  867. SPACE 00867000
  868. USING ADTSECT,R1 00868000
  869. TM ADTFLG1,ADTFRW IS INPUT DISK READ/WRITE? 00869000
  870. L R1,INPFILE+PADT POINT TO ADT FOR INPUT DISK 00870000
  871. TM ADTFLG1,ADTFRW IS THAT DISK READ/WRITE? 00871000
  872. BO RWFND WE'VE FOUND WHAT WE WANT, IF SO 00872000
  873. LA R1,ADTMX-24 POINT TO PARENT DISK 00873000
  874. L R15,VCADTLKW CALL "ADKLKW" @VM03093 00874000
  875. BALR R14,R15 00875000
  876. BZ RWFND GO IF IT'S READ/WRITE 00876000
  877. LA R1,=C'A' POINT TO LETTER FOR 'A'-DISK 00877000
  878. SH R1,=H'24' 00878000
  879. L R15,VCADTLKP CALL "ADTLKP" TO @VM03093 00879000
  880. BALR R14,R15 FIND ACTIVE DISK TABLE @VM03093 00880000
  881. BNZ NOTACCER ERROR IF NOT ACCESSED P3059 00881000
  882. TM ADTFLG1,ADTFRO+ADTFRW IS DISK ACCESSED P3059 00882000
  883. BZ NOTACCER NO, TYPE OUT ERROR MESSAGE P3059 00883000
  884. TM ADTFLG1,ADTFRW IS 'A' DISK IN R/W STATUS P3059 00884000
  885. BZ ERRW NO, TYPE OUT ERROR MESSAGE P3059 00885000
  886. SPACE 00886000
  887. * R1 NOW POINTS TO THE ADT OF THE DISK ONTO WHICH WE ARE GOING TO 00887000
  888. * PUT OUR FILES. 00888000
  889. RWFND EQU * 00889000
  890. LA R2,C'1' USE MODE NUMBER OF '1' 00890000
  891. ICM R2,B'0010',ADTM GET MODE LETTER FROM ADT 00891000
  892. DROP R1 00892000
  893. STH R2,UT1FILE+24 USE FOR UTILITY FILE 00893000
  894. STH R2,RENAME+24 00894000
  895. STH R2,NEWNAME+16 USE FOR NEW NAME 00895000
  896. STH R2,LOGFILE+24 USE FOR LOG FILE 00896000
  897. STH R2,UPSFILE+24 USE FOR 'UPDATES' FILE 00897000
  898. EJECT 00898000
  899. * NEXT, WE DETERMINE WHETHER THE UTILITY FILE 'FNAME CMSUT1' ALREADY 00899000
  900. * EXISTS. IF IT DOES, THEN WE ABORT. 00900000
  901. LA R1,UT1FILE POINT TO FSCB FOR UTILITY FILE 00901000
  902. BAL R14,LOCATE CALL 'STATE' TO SEE IF IT EXISTS 00902000
  903. B *+8 SKIP NEXT IF FILE NOT FOUND 00903000
  904. B ERCMSUT ERROR - ALREADY EXISTS 00904000
  905. * IF WE ARE PUTTING THE LOG FILE ONTO DISK, WE ERASE THE OLD ONE 00905000
  906. TM GLOBALS,DISK LOG FILE TO DISK? 00906000
  907. BZ NOERASE DON'T ERASE IF NOT 00907000
  908. FSERASE FSCB=LOGFILE ERASE THE OLD LOG FILE, IF ONE 00908000
  909. SPACE 00909000
  910. NOERASE EQU * 00910000
  911. TM GLOBALS,CTLF CONTROL FILE OPTION ? 00911000
  912. BZ LOCTUPD NO - SINGLE UPDATE 00912000
  913. LA R1,CTLFILE FIND UPDATE CONTROL FILE 00913000
  914. BAL R14,LOCATE 00914000
  915. B NOFILE NOT FOUND 00915000
  916. B CTLMULT PERFORM MULTI-LEVEL UPDATE 00916000
  917. SPACE 00917000
  918. * 'CTL' WAS NOT REQUESTED -- DO A SINGLE UPDATE 00918000
  919. LOCTUPD EQU * CHECK SINGLE UPDATE FILE 00919000
  920. NI UPDFLAG,255-INCOR SINGLE UPDATES DON'T BENEFIT @V2D4821 00920000
  921. LA R1,UPDFILE 00921000
  922. BAL R14,LOCATE 00922000
  923. B NOFILE FILE NOT FOUND 00923000
  924. B SINGUPD UPDATE ONLY ONCE 00924000
  925. EJECT 00925000
  926. * 00926000
  927. * CTLMULT -- MULTI-LEVEL UPDATE CONTROLLED BY DATA FILE 00927000
  928. * 'FNAME2 CNTRL'. SEARCH THROUGH CONTROL FILE LOOKING 00928000
  929. * FOR UPDATES AGAINST THE INPUT FILE, APPLYING WHICHEVER 00929000
  930. * UPDATES OR PTF'S ARE FOUND. 00930000
  931. * 00931000
  932. CTLMULT EQU * MULTI-LEVEL UPDATE W/CNTRL FILE 00932000
  933. L R1,CTLFILE+PFST GET POINTER TO FST FOR CTL FILE 00933000
  934. LH R8,ITEM(0,R1) TOTAL ITEM COUNT IN FILE 00934000
  935. SR R2,R2 ITEM COUNT CURRENTLY ZERO 00935000
  936. SPACE 00936000
  937. * WE SEARCH THROUGH THE FILE, SKIPPING OVER THE COMMENT CARDS, 00937000
  938. * LOOKING FOR THE FIRST REAL CONTROL CARD, WHICH HAD BETTER BE A 00938000
  939. * 'MACS' CARD. 00939000
  940. * GET AN AREA TO SAVE THE AUXFILE FILETYPES THAT ARE 00944000
  941. * USED TO INSURE THAT NONE OF THEM WILL BE USED TWICE 00945000
  942. LR R0,R8 EASIER IF AMOUNT IS IN REG 0 @V60C5CC 00946000
  943. DMSFREE DWORDS=(0),ERR=CTLRCRD @V60C5CC 00947000
  944. ST R1,LISTADR ADDRESS OF FREE'D LIST @V60C5CC 00948000
  945. MVI 0(R1),LISTMARK NEXT AVAILABLE SLOT @V60C5CC 00949000
  946. CTLRCRD DS 0H ERROR WILL CAUSE NO-CHECKING @V60C5CC 00950000
  947. LA R2,1(,R2) INCREMENT ITEM COUNT @VA11994 00950100
  948. CLR R2,R8 ARE WE AT END OF FILE? @VA11994 00950200
  949. BH ERMACS ERROR -- NO 'MACS' CARD @VA11994 00950300
  950. FSREAD FSCB=CTLFILE,RECNO=(R2),ERROR=INPERR READ A RECORD 00951000
  951. CLI CTLBUFF,C'*' IS THIS CARD A COMMENT? 00952000
  952. BE CTLRCRD LOOP BACK IF IT IS @VA11994 00953000
  953. ST R2,MACSITEM SAVE ITEM NUMBER OF 'MACS' CARD 00954000
  954. LA R1,CTLBUFF INITIALIZE FOR SCAN ROUTINE 00955000
  955. ST R1,CTLBUFF+80 ... 00956000
  956. BAL R14,SCANCTL FIRST PARM MUST BE THE DEFAULT... 00957000
  957. BNZ BADCTLC ...LEVEL IDENTIFIER PARM 00958000
  958. CLI ACTVFLD+5,X'40' FIVE CHARS IS MAX... 00959000
  959. BNE BADCTLC OOPS...SORRY 00960000
  960. MVC UPLEVEL(5),ACTVFLD SET THE DEFAULT 00961000
  961. MVC DFLEVEL(5),ACTVFLD MAKE THIS ID @V2D4821 00962000
  962. BAL R14,SCANCTL SECOND FIELD... 00963000
  963. BNZ ERMACS THIS FIELD SHOUL READ 'MACS' P3059 00964000
  964. CLC ACTVFLD(8),=CL8'MACS ' IF NOT THIS... 00965000
  965. BNE ERMACS ...IT'S AN INVALID CARD @VA01031 00966000
  966. L R1,CTLBUFF+80 PICK UP RESIDUAL SCAN POINTER 00967000
  967. LA R3,CTLBUFF+SEQFELD-1 END OF VALID RECORD 00968000
  968. SLR R3,R1 COMPUTE LENGTH-1 OF REMAINING DATA 00969000
  969. LA R2,CTLMACS MOVE THE MACLIB LIST HERE 00970000
  970. EX R3,MVCR2R1 ... 00971000
  971. * GPR 8 STILL HOLDS TOTAL ITEM COUNT OF FILE 00972000
  972. LA R8,1(,R8) POINT ONE RECORD BEYOND 00973000
  973. STH R8,CTLFILE+ITEM FROM HERE ON, WE READ FROM BOTTOM... 00974000
  974. * ...TO THE TOP, APPLYING AS WE GO 00975000
  975. EJECT 00976000
  976. CTLREAD EQU * READ NEXT LEVEL CONTROL STATEMENT 00977000
  977. LH R2,CTLFILE+ITEM DECREMENT ITEM NUMBER FOR FILE 00978000
  978. BCTR R2,0 00979000
  979. STH R2,CTLFILE+ITEM 00980000
  980. FSREAD FSCB=CTLFILE,ERROR=INPERR READ CARD FROM CONTROL FILE 00981000
  981. C R2,MACSITEM HAVE WE JUST RED OUR 'MACS' CARD 00982000
  982. BNH CTLDONE WE'RE THRU IF WE HAVE 00983000
  983. CLI CTLBUFF,C'*' COMMENT CARD ? 00984000
  984. BE CTLREAD YES - READ AGAIN 00985000
  985. LA R1,CTLBUFF SETUP FOR SCAN ROUTINE 00986000
  986. ST R1,CTLBUFF+80 ... 00987000
  987. BAL R14,SCANCTL FIND FIRST FIELD ( LEVEL ID ) 00988000
  988. BNZ BADCTLC ...OOPS... 00989000
  989. CLI ACTVFLD+5,X'40' FIVE CHARS IS MAX 00990000
  990. BNE BADCTLC ... 00991000
  991. CLC ACTVFLD(4),=C'PTF ' IS THIS A PTF @V2D4821 00992000
  992. BE CTLIPTF YES SPECIAL PROC @V2D4821 00993000
  993. MVC DFLEVEL(5),ACTVFLD SAVE LEVEL ID HERE 00994000
  994. BAL R14,SCANCTL LOOK FOR UPDATE MODIFIER 00995000
  995. BO CTLREAD DUMMY RECORD FOR LOAD @VA01031 00996000
  996. BM BADCTLC INVALID CONTROL CARD @VA01031 00997000
  997. CLC ACTVFLD(8),=CL8'MACS ' 'MACS' RECORD? @VA01031 00998000
  998. BE ERMACS YES - FINISHED @VA01031 00999000
  999. MVC UPDFILE+16(8),=CL8'UPDT....' FILETYPE SKELETON 01000000
  1000. CLC ACTVFLD(4),=CL4'UPDT' UPDT TYPE ?? @V200930 01001000
  1001. BNE CTLAUX NO, TEST FOR AUX FILE @V200930 01002000
  1002. CLI ACTVFLD+4,C' ' IS IT UPDT ONLY ?? @V200930 01003000
  1003. BE CTLUP YES, CONT @V200930 01004000
  1004. CTLUPD MVC UPDFILE+16(8),ACTVFLD SET FILETYPE @V200930 01005000
  1005. MVC UPDFILE+24(2),=C'* ' SEARCH ALL DISKS @V200930 01006000
  1006. B CTLOCUP GO FIND FILE @V200930 01007000
  1007. CTLAUX CLC ACTVFLD(3),=CL3'AUX' AUX FILE TYPE ?? @V200930 01008000
  1008. BNE CTLUP NO, CONT @V200930 01009000
  1009. CLI ACTVFLD+3,C' ' IS IT AUX ONLY ?? @V200930 01010000
  1010. BE CTLUP YES, CONT @V200930 01011000
  1011. CLI ACTVFLD+8,C' ' NO RESTRICTION ON FTYPE LENGTH @VA04536 01012000
  1012. BNE BADCTLC @VM03203 01013000
  1013. MVC AUXFILE+16(8),ACTVFLD SET FILETYPE @V200930 01014000
  1014. MVC AUXFILE+24(2),=C'* ' SEARCH ALL DISKS @V200930 01015000
  1015. B AUXFIND GO FIND FILE @V200930 01016000
  1016. CTLUP DS 0H @V200930 01017000
  1017. MVC AUXSAVE,ACTVFLD SAVE THE MODIFIER @VA04536 01018000
  1018. CLI ACTVFLD+5,C' ' FIVE CHARACTERS MAX. @VA04536 01019000
  1019. BNE BADCTLC GREATER THAN 5 = ERROR @VA04536 01020000
  1020. MVC UPDFILE+20(4),ACTVFLD FILL IN MODIFIER 01021000
  1021. MVC UPDFILE+24(2),=C'* ' SEARCH ALL DISKS 01022000
  1022. BAL R14,SCANCTL NOW LOOK FOR OPTIONAL THIRD PARM 01023000
  1023. BO CTLOCUP MISSING - NORMAL UPDATE LEVEL @VA01031 01024000
  1024. BM BADCTLC INVALID CONTROL CARD @VA01031 01025000
  1025. CLC ACTVFLD(4),=C'AUX ' MAY BE THE 'AUX' OPTION 01026000
  1026. BNE CTLOCUP NO - ASSUME IT'S A COMMENT 01027000
  1027. B AUX OTHERWISE, IT'S AUX 01028000
  1028. SPACE 3 01029000
  1029. MACSITEM DS F ITEM NUMBER OF 'MACS' CARD 01030000
  1030. AUXSAVE DC CL5' ' SAVE AREA FOR 5 BYTE MODIFIER@VA04536 01031000
  1031. DS 0H REALIGN @VA04536 01032000
  1032. EJECT 01033000
  1033. * AUXILIARY FILE HAS BEEN SPECIFIED 01034000
  1034. AUX EQU * 01035000
  1035. MVC AUXFILE+19(5),AUXSAVE MOVE IN 5 CHAR. MODIFIER @VA04536 01036000
  1036. MVC AUXSAVE,=C' ' BLANK OUT SAVE AREA FOR NEXT @VA04536 01037000
  1037. MVC AUXFILE+24(2),=C'* ' SEARCH ALL DISKS 01038000
  1038. AUXFIND DS 0H @V200930 01039000
  1039. MVC FTSAVE,AUXFILE+16 SAVE IN CASE NOT AN AUXFILE @V60C5CC 01040000
  1040. AUXFIND1 DS 0H @V60C5CC 01041000
  1041. BAL R14,SCANCTL CHECK FOR ANOTHER PARM @V60C5CC 01042000
  1042. BNZ AUXFIND2 NOT A POSSIBLE FILE-TYPE @V60C5CC 01043000
  1043. CLI ACTVFLD+3,C' ' PARM AT LEASE 4 CHARACTERS? @V60C5CC 01044000
  1044. BE AUXFIND2 NO, USE INDICATED AUXFILE @V60C5CC 01045000
  1045. MVC AUXFILE+16(8),ACTVFLD STATE PREFERRED AUXFILE @V60C5CC 01046000
  1046. LA R1,AUXFILE FST FOR STATE @V60C5CC 01047000
  1047. BAL R14,LOCATE DOES PREFERRED FILE EXIST? @V60C5CC 01048000
  1048. B AUXFIND1 NO, CHECK FOR MORE LEVELS @VA09764 01049000
  1049. B CTLREAD YES, DON'T USE THIS AUXFILE @V60C5CC 01050000
  1050. AUXFIND2 DS 0H @V60C5CC 01051000
  1051. MVC AUXFILE+16(8),FTSAVE PREFERRED ONE. @V60C5CC 01052000
  1052. LA R1,AUXFILE ... 01053000
  1053. BAL R14,LOCATE IF IT'S THERE, WE WILL APPLY THE PTFS 01054000
  1054. B CTLREAD IF IT ISN'T, WE JUST SKIP THE LEVEL 01055000
  1055. * SCAN LIST OF AUXFILE FILETYPES TO 01056000
  1056. * INSURE WE DON'T TRY TO RE-USE ONE 01057000
  1057. L R1,LISTADR START OF LIST (OR 0) @V60C5CC 01058000
  1058. LTR R1,R1 DID WE INITIATE A LIST? @V60C5CC 01059000
  1059. BZ AUXFIND5 NO LIST. USE THE AUXFILE @V60C5CC 01060000
  1060. AUXFIND3 DS 0H @V60C5CC 01061000
  1061. CLI 0(R1),LISTMARK THIS SLOT UNUSED? @V60C5CC 01062000
  1062. BNE AUXFIND4 SLOT IN USE, CHECK THE ENTRY @V60C5CC 01063000
  1063. MVC 0(8,R1),FTSAVE SLOT FREE. INSERT FILETYPE @V60C5CC 01064000
  1064. MVI 8(R1),LISTMARK MARK NEXT SLOT AS AVAILABLE @V60C5CC 01065000
  1065. B AUXFIND5 UNIQUE AUXFILE. USE IT @V60C5CC 01066000
  1066. AUXFIND4 DS 0H CHECK THIS ENTRY @V60C5CC 01067000
  1067. CLC 0(8,R1),FTSAVE AUXFILE APPLIED BEFORE? @V60C5CC 01068000
  1068. BE CTLREAD YES, GET NEXT CNTRL ENTRY @V60C5CC 01069000
  1069. LA R1,8(R1) INCREMENT TO NEXT SLOT @V60C5CC 01070000
  1070. B AUXFIND3 CHECK NEXT LIST ENTRY @V60C5CC 01071000
  1071. AUXFIND5 DS 0H @V60C5CC 01072000
  1072. OI UPDFLAG,AUXF FOUND AN AUXILIARY FILE 01073000
  1073. L R1,AUXFILE+PFST FST POINTER FOR AUX FILE 01074000
  1074. LH R8,ITEM(0,R1) TOTAL ITEM COUNT IN AUX FILE 01075000
  1075. STH R8,AUXFILE+ITEM READ BOTTOM TO TOP 01076000
  1076. MVI TEMPSWT,X'00' RESET THE SWITCH @VA13438 01076500
  1077. EJECT 01077000
  1078. AUXREAD EQU * READ FROM AUXILIARY FILE 01078000
  1079. LH R4,AUXFILE+ITEM CHECK FOR TOP OF FILE 01079000
  1080. LTR R4,R4 AT THE TOP NOW ? 01080000
  1081. BNP AUXFINT YES - AUX LEVEL IS COMPLETE 01081000
  1082. * THE READ MUST BE TO A BUFFER TO ENABLE SAVING THE COMMENTS 01082000
  1083. FSREAD FSCB=AUXFILE,ERROR=INPERR,BUFFER=CTLBUFF @V60C5CC 01083000
  1084. BCTR R4,0 DECREMENT FOR UPWARD READ 01084000
  1085. STH R4,AUXFILE+ITEM RESET FOR NEXT READ 01085000
  1086. CLI CTLBUFF,C'*' COMMENT RECORD ? 01086000
  1087. BE AUXREAD YES - CONTINUE READING 01087000
  1088. LA R1,CTLBUFF SETUP FOR SCAN ROUTINE 01088000
  1089. ST R1,CTLBUFF+80 ... 01089000
  1090. BAL R14,SCANCTL FIND FIRST PARM 01090000
  1091. BNZ BADAUXC BAD CONTROL CARD 01091000
  1092. CLC ACTVFLD(4),=C'PTF ' IS IT THE OPTIONAL KEYWORD ? 01092000
  1093. BNE AUXTYPE NO - MUST BE 'A....6CA' FORMAT 01093000
  1094. BAL R14,SCANCTL SECOND PARM IS FILETYPE 01094000
  1095. BNZ BADAUXC ...OOPS... 01095000
  1096. AUXTYPE EQU * LOOK FOR SPECIFIED PTF 01096000
  1097. MVC UPDFILE+16(8),ACTVFLD FULL FILETYPE 01097000
  1098. MVC UPDFILE+24(2),=CL2'*' SEARCH ALL DISKS FOR PTM FILE 01098000
  1099. LA R1,UPDFILE GO CHECK FILE STATUS 01099000
  1100. BAL R14,LOCATE ... 01100000
  1101. B NOFILEW WARNING MSG IF MISSING 01101000
  1102. MVC UPLEVEL(5),DFLEVEL FOUND AT LEAST ONE UPDATE HERE 01102000
  1103. B CTLUMSG GO GIVE INFO MSG + APPLY UPDATE 01103000
  1104. AUXFINT EQU * FINISHED WITH 'AUX' LEVEL 01104000
  1105. FSCLOSE FSCB=AUXFILE CLOSE THE AUX FILE 01105000
  1106. NI UPDFLAG,X'FF'-AUXF RESET FLAG BIT 01106000
  1107. B CTLREAD AND CONTINUE WITH CONTROL FILE 01107000
  1108. EJECT 01108000
  1109. CTLOCUP EQU * STATE FOR SINGLE UPDATE FILE 01109000
  1110. CLI AUXSAVE+4,C' ' ONLY 4 BYTES FOR 'UPDT' TYPE @VA04536 01110000
  1111. BNE BADCTLC IF 5 = ERROR @VA04536 01111000
  1112. LA R1,UPDFILE SEE IF UPDATE FILE EXISTS 01112000
  1113. BAL R14,LOCATE ... 01113000
  1114. B CTLREAD NO - SKIP TO NEXT LEVEL 01114000
  1115. * FOUND AN UPDATE - NOW LET'S APPLY IT 01115000
  1116. MVC UPLEVEL(5),DFLEVEL SET LEVEL IDENTIFIER 01116000
  1117. B CTLUMSG GO GIVE INFO MSG + APPLY 01117000
  1118. CTLIPTF EQU * SINGLE PTF SPECIFIED IN CNTRL FILE 01118000
  1119. BAL R14,SCANCTL POINT TO PTF NAME @V2D4821 01119000
  1120. BNE CTLREAD SOMETHING FISHY @V2D4821 01120000
  1121. MVC UPDFILE+16(8),ACTVFLD FULL FILETYPE 01121000
  1122. MVC UPDFILE+24(2),=C'* ' SEARCH ALL DISKS 01122000
  1123. LA R1,UPDFILE 01123000
  1124. BAL R14,LOCATE 01124000
  1125. B CTLREAD SKIP TO NEXT LEVEL IF NOT FOUND 01125000
  1126. B CTLUMSG SET MESSAGE @V200930 01126000
  1127. MVC UPLEVEL(5),DFLEVEL MAKE THIS LEV @V2D4821 01127000
  1128. EJECT 01128000
  1129. * WE TYPE OUT THE 'UPDATING' MESSAGE, AND ADD RECORDS TO 'UPDATES' 01129000
  1130. * FILE. 01130000
  1131. CTLUMSG EQU * 01131000
  1132. TM GLOBALS,UPDN HAS AN UPDATE BEEN DONE? 01132000
  1133. BO CTLUMSS IF SO, THEN TYPE SHORT MESSAGE 01133000
  1134. TM UPDFLAG,INCOR IN-CORE PROCESSING WANTED?? @V2D4821 01134000
  1135. BNO SLOPPY NOPE... INCUR SOME OVERHEAD. @VM03203 01135000
  1136. USING NUCON,R0 @VM03203 01136000
  1137. IC R5,DOSFLAGS GET NUCON'S DOSFLAGS @VM03203 01137000
  1138. NI DOSFLAGS,255-DOSSVC TURN OFF DOS SVC HANDLE @VM03203 01138000
  1139. STC R5,DOSF TEMPORARILY STORE DOSFLAGS @VM03203 01139000
  1140. BAL R8,CORINIT GO INITIALIZE STORAGE @VM03203 01140000
  1141. FSSTATE FSCB=INPFILE @VM03203 01141000
  1142. LH R8,26(,R1) NUMBER OF ITEMS IN FILE @V2D4821 01142000
  1143. LA R8,50(,R8) PLUS SOME SLACK @V2D4821 01143000
  1144. C R8,SPARES WILL THE FILE FIT?? @V2D4821 01144000
  1145. BH SMALLCOR NOPE @V2D4821 01145000
  1146. XC INPFILE+ITEM(2),INPFILE+ITEM ZERO ITEM NUMBER @V2D4821 01146000
  1147. LA R0,800 GET STORAGE FOR RDBUF OF 10 RECS. @V2D4821 01147000
  1148. GETMAIN R,LV=(0) @V2D4821 01148000
  1149. ST R1,INPFILE+28 BUFAD @V2D4821 01149000
  1150. ST R0,INPFILE+32 BUFSIZE @V2D4821 01150000
  1151. LA R0,10 NUMBER OF RECS. WE'LL READ @V2D4821 01151000
  1152. STH R0,INPFILE+38 STORE INTO PLIST @V2D4821 01152000
  1153. LR R3,R1 SAVE BUFAD @V2D4821 01153000
  1154. * 01154000
  1155. INPLOOP FSREAD FSCB=INPFILE,ERROR=INPLERR @V2D4821 01155000
  1156. LR R2,R3 BUFFER STARTING ADDR. @V2D4821 01156000
  1157. LR R5,R0 NUM. OF BYTES ACTUALLY READ @V2D4821 01157000
  1158. LA R4,80 ITEM LENGTH @V2D4821 01158000
  1159. AR R5,R2 END ADDR. FOR BXLE @V2D4821 01159000
  1160. SR R5,R4 @V2D4821 01160000
  1161. * 01161000
  1162. INPL002 LR R1,R2 FOR XWRITE (ADDR. OF LINE) @V2D4821 01162000
  1163. BAL R14,XWRITE WRITE LINE INTO CORE @V2D4821 01163000
  1164. BXLE R2,R4,INPL002 @V2D4821 01164000
  1165. B INPLOOP READ SOME MORE STUFF @V2D4821 01165000
  1166. * 01166000
  1167. INPLERR CH R15,=H'12' TRUE E-O-F FROM RDBUF?? @V2D4821 01167000
  1168. BNE INPERR NO... @V2D4821 01168000
  1169. LR R1,R3 BUFFER ADDRESS @V2D4821 01169000
  1170. LA R0,800 BUFFER SIZE @V2D4821 01170000
  1171. FREEMAIN R,LV=(0),A=(1) @V2D4821 01171000
  1172. FSCLOSE FSCB=INPFILE @V2D4821 01172000
  1173. * 01173000
  1174. SLOPPY EQU * @V2D4821 01174000
  1175. LA R1,=CL8'CONWAIT' GIVE MESSAGES A CHANCE @VM03093 01175000
  1176. SVC 202 TO CATCH UP ... @VM03093 01176000
  1177. DMSERR NUM=178,LET=I,RENT=NO, *01177000
  1178. SUB=(CHAR8A,INPFILE+8), *01178490
  1179. TEXT='UPDATING ''....................''' HRC012DS 01178980
  1180. DMSERR NUM=178,LET=I,RENT=NO, *01179470
  1181. SUB=(CHAR8A,UPDFILE+8), *01179960
  1182. TEXT='APPLYING ''....................''' HRC012DS 01180450
  1183. FSERASE FSCB=UPSFILE ERASE ANY EXISTING UPDATES FILE 01181000
  1184. B CTLUF GO FINISH UP 01182000
  1185. SPACE 2 01183000
  1186. * WE HAVE ALREADY DONE A WHOLE UPDATE, SO WE TYPE ONLY THE SHORT 01184000
  1187. * MESSAGE. 01185000
  1188. CTLUMSS EQU * 01186000
  1189. LA R1,=CL8'CONWAIT' GIVE MESSAGES A CHANCE @VM03093 01187000
  1190. SVC 202 TO CATCH UP ... @VM03093 01188000
  1191. DMSERR NUM=178,LET=I,SUB=(CHAR8A,UPDFILE+8), *01189000
  1192. TEXT='APPLYING ''....................''' HRC012DS 01190490
  1193. SPACE 01191000
  1194. * NEXT, WE MUST ADD RECORDS TO THE 'UPDATES' FILE. THE FIRST RECORD IS 01192000
  1195. * THE CARD FROM THE CONTROL FILE, WHILE THE SECOND IS THE DATA ABOUT 01193000
  1196. * THE FILE FROM THE FST. 01194000
  1197. CTLUF EQU * 01195000
  1198. CLI TEMPSWT,X'00' WE WRITE FIRST ONE YET? @V60C5CC 01196000
  1199. BNE TEMP1OK YEP... @V60C5CC 01197000
  1200. MVC TEMPSAVE(2),AUXFILE+ITEM SAVE ITEM NUMBER @V60C5CC 01198000
  1201. MVC AUXFILE+ITEM(2),=H'1' @V60C5CC 01199000
  1202. READNXT EQU * READ THE NEXT ITEM @VA13438 01199500
  1203. FSREAD FSCB=AUXFILE,BUFFER=TEMPBUF,ERROR=TEMP1OK @V60C5CC 01200000
  1204. CLI TEMPBUF,C'*' DONT WRITE IT UNLESS ITS A COMMENT @V60C5CC 01201000
  1205. BNE NOTCOMM NOT A COMMENT.... I DONT KNOW WHY. @V60C5CC 01202000
  1206. FSWRITE FSCB=UPSFILE,BUFFER=TEMPBUF,ERROR=OUTERR @V60C5CC 01203000
  1207. LH R1,AUXFILE+ITEM INCREMENT @VA13438 01203500
  1208. LA R1,1(,R1) ITEM @VA13438 01203550
  1209. STH R1,AUXFILE+ITEM COUNT @VA13438 01203600
  1210. B READNXT READ NEXT ITEM @VA13438 01203650
  1211. NOTCOMM MVC AUXFILE+ITEM(2),TEMPSAVE RESTORE ITEM COUNT @V60C5CC 01204000
  1212. MVI TEMPSWT,X'FF' SIGNAL ITS DONE. @V60C5CC 01205000
  1213. TEMP1OK DS 0H @V60C5CC 01206000
  1214. FSWRITE FSCB=UPSFILE,ERROR=OUTERR,BUFFER=CTLBUFF WRITE CTL CRD 01207000
  1215. L R1,UPDFILE+PFST POINT TO FST FOR FILE 01208000
  1216. L R2,UPDFILE+PADT POINT TO ADT FOR FILE 01209000
  1217. SPACE 01210000
  1218. * THE FOLLOWING CODE IS STOLEN. 01211000
  1219. MVC NAME(8),0(1) FILE NAME 01212000
  1220. MVC TYPE(8),8(1) FILETYPE 01213000
  1221. MVC MODE(2),24(1) FILEMODE 01214000
  1222. UNPK DATE+1(5),16(3,1) MMDD 01215000
  1223. MVC DATE(2),DATE+1 01216000
  1224. MVI DATE+2,C'/' 01217000
  1225. MVI DATE+5,C'/' 01218000
  1226. UNPK TIME+1(5),18(3,1) HHMM 01219000
  1227. MVC TIME(2),TIME+1 01220000
  1228. MVI TIME+2,C':' GO, PRINTER GO @V2D4821 01221000
  1229. MVI TIME+5,C' ' 01222000
  1230. MVC YEAR(2),38(1) YEAR 01223000
  1231. MVC LABEL(6),0(2) DISK LABEL 01224000
  1232. MVC MODE(1),68(2) CORRECT DISK MODE LETTER 01225000
  1233. LH R4,AUXFILE+ITEM GET MODIFIED ITEM COUNT. @V60C5CC 01226000
  1234. STH R4,TEMPSAVE SAVE IT FOR RESTORE. @V60C5CC 01227000
  1235. LA R4,2(R4) POINT TO 1ST POSS. COMMENT. @V60C5CC 01228000
  1236. STH R4,AUXFILE+ITEM POINT AT IT... @V60C5CC 01229000
  1237. TEMPRD FSREAD FSCB=AUXFILE,ERROR=TEMPERR,BUFFER=TEMPBUF @V60C5CC 01230000
  1238. LA R4,1(R4) POINT TO NEXT RECORD. @V60C5CC 01231000
  1239. STH R4,AUXFILE+ITEM POINT AT IT. @V60C5CC 01232000
  1240. CLI TEMPBUF,C'*' COMMENT? @V60C5CC 01233000
  1241. BNE TEMPERR CLEAN UP AND LEAVE @V60C5CC 01234000
  1242. FSWRITE FSCB=UPSFILE,ERROR=OUTERR,BUFFER=TEMPBUF @V60C5CC 01235000
  1243. B TEMPRD GET NEXT ONE. @V60C5CC 01236000
  1244. TEMPERR LH R4,TEMPSAVE GET OLD POINTER. @V60C5CC 01237000
  1245. STH R4,AUXFILE+ITEM RESTORE IT AND BYE... @V60C5CC 01238000
  1246. NOTTEMP DS 0H @V60C5CC 01239000
  1247. FSWRITE FSCB=UPSFILE,ERROR=OUTERR,BUFFER=OUT WRITE OUT LINE 01240000
  1248. FSCLOSE FSCB=AUXFILE CLOSE THE AUX FILE. @VA14010 01240500
  1249. B SINGUPD GO PERFORM AN UPDATE 01241000
  1250. TEMPSAVE DC H'0' TEMPORARY ITEM-COUNT SAVE @V60C5CC 01242000
  1251. TEMPBUF DC CL80' ' MY VERY OWN BUFFER. @V60C5CC 01243000
  1252. TEMPSWT DC X'00' SWITCH FOR FIRST RECORD. @V60C5CC 01244000
  1253. DS 0H ALIGNMENT... @V60C5CC 01245000
  1254. SPACE 01246000
  1255. OUT DC C'*' 01247000
  1256. DC CL9' ' TO ALIGN FIELDS ON LOAD MAP 01248000
  1257. NAME DC CL9' ' 01249000
  1258. TYPE DC CL9' ' 01250000
  1259. MODE DC CL3' ' 01251000
  1260. LABEL DC CL7' ' 01252000
  1261. DATE DC CL6' ' 01253000
  1262. YEAR DC CL4' ' 01254000
  1263. TIME DC CL6' ' 01255000
  1264. DC CL27' ' 01256000
  1265. DS 0H 01257000
  1266. EJECT 01258000
  1267. CTLCONT EQU * MULTI-LEVEL UPDATE CONTINUATION 01259000
  1268. NI UPDFLAG,AUXF+INCOR PRESERVE ONLY TWO BITS. @V2D4821 01260000
  1269. MVI UPDFLAG2,0 RESET FINISH INDICATOR @V2D4821 01261000
  1270. TM UPDFLAG,AUXF WORKING WITH AUX @V2D4821 01262000
  1271. BO AUXREAD YES @V2D4821 01263000
  1272. B CTLREAD CONTINUE WITH CONTROL FILE 01264000
  1273. EJECT 01265000
  1274. CTLDONE EQU * MULTI-LEVEL UPDATE IS COMPLETE 01266000
  1275. * FRET THE AUXFILE-USED LIST IF IT IS PRESENT 01267000
  1276. L R1,LISTADR WAS AUXFILE LIST FREE'D @V60C5CC 01268000
  1277. LTR R1,R1 WAS LIST OBTAINED? @V60C5CC 01269000
  1278. BZ CTLDONE1 NO LIST, CONTINUE @V60C5CC 01270000
  1279. L R1,CTLFILE+PFST FST FOR CNTRL FILE @V60C5CC 01271000
  1280. LH R0,ITEM(0,R1) CNTRL LENGTH (LIST DWORDS) @V60C5CC 01272000
  1281. L R1,LISTADR @V60C5CC 01273000
  1282. DMSFRET DWORDS=(0),LOC=(1) @V60C5CC 01274000
  1283. CTLDONE1 DS 0H @V60C5CC 01275000
  1284. FSCLOSE FSCB=CTLFILE CLOSE THE CONTROL FILE 01276000
  1285. TM GLOBALS,NSTK SHOULD WE STACK THE RESULTS ? 01277000
  1286. BO RETURN NO -- RETURN 01278000
  1287. CMS STACKER SETUP FOR MACLIB LIST ALREADY 01279000
  1288. LA R1,UPLEVEL-2 NOW STACK THE UPDATE LEVEL ID 01280000
  1289. ST R1,STACKER+12 ... 01281000
  1290. MVI STACKER+12,7 LENGTH = 7 01282000
  1291. CMS STACKER ... 01283000
  1292. B RETURN RETURN 01284000
  1293. EJECT 01285000
  1294. UPDFERR EQU * EOF OR ERROR ON UPDATE FILE 01286000
  1295. LA R1,UPDFILE PTR IN CASE OF REAL ERROR 01287000
  1296. CH R15,=H'12' IS IT SIMPLE END OF FILE ? 01288000
  1297. BNE INPERR NO - A REAL ERROR 01289000
  1298. FSCLOSE FSCB=UPDFILE CLOSE THE UPDATE FILE 01290000
  1299. OI UPDFLAG,TAIL PROCESSING NORMAL END OF FILE 01291000
  1300. MVC SEQSTRT(8),FENCED THIS IS MAXIMUM NUMBER 01292000
  1301. TM UPDFLAG,INCOR IN-CORE UPDATE ??? @V2D4821 01293000
  1302. BNO INPUTRD NOPE.. GOT TO FLUSH INPUT FILE TO OUTP@V2D4821 01294000
  1303. TM UPDFLAG,RSEQ ARE WE RE-SEQUENCING ??? @V2D4821 01295000
  1304. BO INPUTRD YES.. WE'LL HAVE TO REPLACE SOME LINES @V2D4821 01296000
  1305. OI UPDFLAG2,FINISH 1 PASS FLAG @V2D4821 01297000
  1306. B INPUTRD TO CHK FOR SEQ ERRS @V2D4821 01298000
  1307. UPDFERR3 LA R15,12 SIM EOF @V2D4821 01299000
  1308. * ON INPUTRD 01300000
  1309. EJECT 01301000
  1310. INPFERR EQU * EOF OR I/O ERROR - INPFILE 01302000
  1311. LA R1,INPFILE PTR IN CASE OF REAL ERROR 01303000
  1312. CH R15,=H'12' SIMPLE END OF FILE ? 01304000
  1313. BNE INPERR NO - A REAL ERROR 01305000
  1314. FSCLOSE FSCB=UT1FILE CLOSE THE UTILITY FILE 01306000
  1315. FSCLOSE FSCB=INPFILE CLOSE THE INPUT FILE 01307000
  1316. TM UPDFLAG,TAIL WAS THIS EOF EXPECTED ? 01308000
  1317. BO UPDEND JUST FINISH UP IF SO 01309000
  1318. SPACE 01310000
  1319. * IF WE REACH A PREMATURE EOF ON A FILE, WE TYPE A WARNING MESSAGE 01311000
  1320. * AND GO ON. 01312000
  1321. BAL R14,CTLTYPE TYPE OUT THE LAST UPDATE CTL CRD 01313000
  1322. LA R14,SEQSTRT POINT TO STARTING SEQ NUMBER 01314000
  1323. TM UPDFLAG,DELT BUT WAS IT A DELETE RANGE? 01315000
  1324. BZ *+8 SKIP IF IT WAS A COPY 01316000
  1325. LA R14,SEQLAST POINT TO LAST SEQ NUM, INSTEAD 01317000
  1326. SPACE 01318000
  1327. LA R10,1(,R10) INCREMENT R10 TEMPORARILY 01319000
  1328. * NOTE THAT R10 CONTAINS THE LENGTH (5 OR 8) OF THE SEQ FIELD. 01320000
  1329. DMSERR DISP=NONE,LET=W,NUM=10,BUFFA=ERRBUFF,RENT=NO, *01321000
  1330. SUB=(CHAR8A,INPFILE+8,CHARA,((R14),(R10))), *01322000
  1331. TEXT='PREMATURE EOF ON FILE ''....................'' -- *01323000
  1332. SEQ NUMBER ''........'' NOT FOUND' 01324000
  1333. BCTR R10,0 RESET REGISTER 10 01325000
  1334. BAL R14,BUFFOUT TYPE AND PRINT MESSAGE 01326000
  1335. WARN 12 SET RETURN CODE TO 12 01327000
  1336. EJECT 01328000
  1337. * WE HAVE FINISHED AN UPDATE. WE CLEAN UP AND GO ON TO NEXT. 01329000
  1338. UPDEND EQU * 01330000
  1339. LA R15,NEWNAME POINT TO NEW NAME 01331000
  1340. TM UPDFLAG,INCOR INCORE UPDATE ??? @V2D4821 01332000
  1341. BO UPDENDA YES @V2D4821 01333000
  1342. FSERASE (R15) ERASE OLD COPY OF IT 01334000
  1343. CMS RENAME RENAME CMSUT FILE TO NEW NAME 01335000
  1344. MVC INPFILE+8(18),NEWNAME INPUT FILE IS NEW SOURCE FILE 01336000
  1345. UPDENDA EQU * @V2D4821 01337000
  1346. BAL R14,XCLOSE REWIND IN-CORE FILE @V2D4821 01338000
  1347. OI GLOBALS,UPDN INDICATE THAT AN UPDATE IS DONE 01339000
  1348. SPACE 01340000
  1349. TM GLOBALS,CTLF IS 'CTL' OPTION IN EFFECT? 01341000
  1350. BO CTLCONT GO FOR NEXT CONTROL CARD 01342000
  1351. EJECT 01343000
  1352. * WE ARE FINISHED ALL UPDATING. 01344000
  1353. RETURN EQU * 01345000
  1354. TM GLOBALS,UPDN WAS ANY UPDATE FILE FOUND? 01346000
  1355. BZ NOUPDATS ERROR IF NOT 01347000
  1356. TM UPDFLAG,INCOR IN-CORE UPDATE ??? @V2D4821 01348000
  1357. BNO RETR002 NOPE.. @V2D4821 01349000
  1358. MVC RDMVC(6),=XL6'470000000700' NO-OP MVC INTO INPL@V2D4821 01350000
  1359. * 01351000
  1360. RETR001 BAL R14,XREAD GET A LINE FRON CORE @V2D4821 01352000
  1361. B RETRD RETURN HERE ON E-O-F @V2D4821 01353000
  1362. LA R6,8(,R1) @V2D4821 01354000
  1363. ST R6,UT1FILE+28 STORE LINE ADDRESS INTO RDBUF PLI@V2D4821 01355000
  1364. FSWRITE FSCB=UT1FILE,ERROR=OUTERR @V2D4821 01356000
  1365. B RETR001 RETURN FOR NEXT @V2D4821 01357000
  1366. * 01358000
  1367. RETRD FSCLOSE FSCB=UT1FILE @V2D4821 01359000
  1368. LA R15,NEWNAME ERASE $FNAME @V2D4821 01360000
  1369. FSERASE (R15) @V2D4821 01361000
  1370. CMS RENAME REN CMSUT1 TO $FNAME @V2D4821 01362000
  1371. RETR002 EQU * @V2D4821 01363000
  1372. CLC RETCODE,=F'0' ANY WARNING MESSAGES ISSUED? 01364000
  1373. BNE WRETURN GO IF YES 01365000
  1374. TM GLOBALS,REPL WAS 'REPLACE' SPECIFIED? 01366000
  1375. BZ RRETURN NOTHING TO DO IT NOT 01367000
  1376. SPACE 01368000
  1377. * OTHERWISE, WE MUST ERASE THE OLD FILE, AND RENAME THE $FNAME FILE TO 01369000
  1378. * THE ORIGINAL FNAME. 01370000
  1379. MVC RENAME+8(18),NEWNAME SET UP RENAME PLIST 01371000
  1380. MVC NEWNAME(8),FNAME 01372000
  1381. LA R15,NEWNAME POINT TO NEWNAME 01373000
  1382. FSERASE (R15) ERASE OLD COPY OF IT 01374000
  1383. CMS RENAME RENAME NEW SOURCE 01375000
  1384. SPACE 01376000
  1385. * RESTORE REG AND RETURN 01377000
  1386. RRETURN EQU * 01378000
  1387. BAL R14,LOGCLOSE CLOSE THE LOG FILE 01379000
  1388. FSCLOSE FSCB=UPSFILE CLOSE THE UPDATES FILE @VA04077 01380000
  1389. L R1,FREEAD GET ADDRESS OF FREE STORAGE BLOCK@VM03203 01381000
  1390. LTR R1,R1 DID WE GETMAIN ??? @VM03203 01382000
  1391. BZ NOFRMN @VM03203 01383000
  1392. IC R5,DOSF GET SAVED DOSFLAGS @VM03203 01384000
  1393. STC R5,DOSFLAGS STORE BACK IN NUCON @VM03203 01385000
  1394. L R0,FREELEN LENGTH OF BLOCK @VM03203 01386000
  1395. FREEMAIN R,LV=(0),A=(1) @VM03203 01387000
  1396. NOFRMN EQU * @VM03203 01388000
  1397. OI MISFLAGS,RELPAGES TELL DMSINT WE CAN GO AWAY, @VM03093 01389000
  1398. DMSKEY RESET UN-DO OUR KEY MANIPULATING, @VM03093 01390000
  1399. L R14,SAVE14 GET RETURN ADDRESS, @VM03093 01391000
  1400. L R15,RETCODE GET RETURN CODE 01392000
  1401. BR R14 AND RETURN TO CALLER 01393000
  1402. SPACE 3 01394000
  1403. SAVE14 DS A SAVE RETURN ADDRESS HERE 01395000
  1404. RETCODE DC F'0' RETURN CODE FROM UPDATE COMMAND 01396000
  1405. RC EQU RETCODE+3 FOR 'MVI' INSTRUCTION 01397000
  1406. EJECT 01398000
  1407. * IN CASE WARNING MESSAGES WERE ISSUED, THEN WE DON'T DO A REPLACE. 01399000
  1408. * FURTHERMORE, IF THE GUY SPECIFIED 'NOTERM', SO HE DIDN'T GET THE 01400000
  1409. * MESSAGES, THEN WE TELL HIM WHAT HAPPENED, WHETHER HE WANTS IT OR NOT. 01401000
  1410. WRETURN EQU * 01402000
  1411. TM GLOBALS,TERM DID HE SPECIFY 'NOTERM' 01403000
  1412. BZ WRETURN1 IF SO, DEFINITELY GIVE HIM A MSG 01404000
  1413. TM GLOBALS,REPL DID HE SPECIFY 'REPLACE'? 01405000
  1414. BZ RRETURN NO MESSAGE NECESSARY IF NOT 01406000
  1415. SPACE 01407000
  1416. WRETURN1 EQU * 01408000
  1417. SR R2,R2 ASSUME SHORT MESSAGE 01409000
  1418. TM GLOBALS,REPL DID HE ASK FOR 'REPLACE'? 01410000
  1419. BZ *+8 SKIP IF NOT 01411000
  1420. LA R2,L'WMSG THEN GIVE HIM THE LONG MSG 01412000
  1421. SPACE 01413000
  1422. DMSERR NUM=177,LET=I,RENT=NO, *01414000
  1423. SUB=(DECA,RETCODE,CHARA,(WMSG,(R2))), *01415000
  1424. TEXT='WARNING MESSAGES ISSUED (SEVERITY = ......).......*01416000
  1425. ...............' P3027 01417000
  1426. B RRETURN 01418000
  1427. SPACE 2 01419000
  1428. WMSG DC C'. ''REP'' OPTION IGNORED' P3027 01420000
  1429. DS 0H 01421000
  1430. EJECT 01422000
  1431. * COME HERE ON ERROR TO ABORT UPDATE PROGRAM. 01423000
  1432. ERETURN EQU * 01424000
  1433. BAL R14,LOGCLOSE CLOSE THE LOG FILE 01425000
  1434. FSCLOSE FSCB=INPFILE CLOSE THE INPUT FILE 01426000
  1435. FSCLOSE FSCB=UPDFILE CLOSE THE UPDATE FILE 01427000
  1436. FSCLOSE FSCB=UT1FILE CLOSE THE CMSUT FILE 01428000
  1437. TM GLOBALS,CTLF 'CTL' OPTION SPECIFIED? 01429000
  1438. BZ RRETURN GO RETURN IF NOT 01430000
  1439. FSCLOSE FSCB=CTLFILE CLOSE THE CONTROL FILE 01431000
  1440. FSCLOSE FSCB=UPSFILE CLOSE THE UPDATES FILE 01432000
  1441. TM UPDFLAG,AUXF 'AUX' FILE IN PROGRESS? 01433000
  1442. BZ RRETURN RETURN IF NOT 01434000
  1443. FSCLOSE FSCB=AUXFILE CLOSE THE AUXILIARY FILE 01435000
  1444. B RRETURN GO RETURN TO COMMAND LEVEL 01436000
  1445. EJECT 01437000
  1446. SINGUPD EQU * INTERNAL SINGLE-UPDATE ROUTINE 01438000
  1447. MVC SEQFOLD(5),PAKZERO START RE-SEQUENCE AT ZERO 01439000
  1448. MVC SEQPOSN(8),CZEROES FILE POSITIONED AT ZERO 01440000
  1449. MVC SEQSTRT(8),CZEROES ... 01441000
  1450. MVC ISEQLAST(8),CZEROES ... 01442000
  1451. MVC OSEQLAST(8),CZEROES ... 01443000
  1452. MVI PASSFLG,0 01444000
  1453. MVC UPDFILE+ITEM(2),=H'0' START WITH ZERO ITEM NUMBER 01445000
  1454. MVC INPFILE+ITEM(2),=H'0' DITTO FOR INPUT FILE P3027 01446000
  1455. MVC CURRLINE,=A(MAXLINE) FORCE PAGE EJECT 01447000
  1456. BAL R14,XCLOSE REWIND POSSIBLE IN-CORE CMSUT1 FILE@V2D4821 01448000
  1457. SPACE 01449000
  1458. UPDREAD EQU * START READING UPDATE CONTROL CARDS 01450000
  1459. UPITEM UPDFILE INCREMENT ITEM NUMBER 01451000
  1460. FSREAD FSCB=UPDFILE,ERROR=UPDFERR READ A CARD 01452000
  1461. UPDCTLC EQU * UPDATE CONTROL CARD IS IN BUFFER 01453000
  1462. NI UPDFLAG,X'FF'-(SGEN+DELT) P3027 01454000
  1463. LA R1,UPDLINE+2 BUFFER START 01455000
  1464. ST R1,UPDLINE+80 SET FOR SCAN ROUTINE 01456000
  1465. SPACE 01457000
  1466. * PUT THE CONTROL CARD INTO THE LOG FILE. 01458000
  1467. LOG UPDLINE,CTL 01459000
  1468. SPACE 01460000
  1469. * SAVE THE CONTROL CARD IN THE 'LAST CONTROL CARD' FIELD, FOR USE IN 01461000
  1470. * ERROR MESSAGES. 01462000
  1471. MVC PREVCTLL(82),LASTCTLL CURRENT LAST BECOMES PREV P3027 01463000
  1472. MVC LASTCTLL,UPDLINE COPY CONTROL CARD 01464000
  1473. MVC LASTCTLI,UPDFILE+ITEM SAVE THE ITEM NUMBER ALSO 01465000
  1474. SPACE 01466000
  1475. CLC UPDLINE(3),=CL3'./ ' UPDATE CONTROL CARD ? 01467000
  1476. BNE INVUPCD NO - MUST BE INVALID 01468000
  1477. MVC UPDLINE+50(22),BLANKS LAST 22 COLUMNS ARE INVALIDP3027 01469000
  1478. BAL R14,SCANUPD SCAN FIRST FIELD ( FUNCTION ) 01470000
  1479. BNZ INVUPCD NO MORE FIELDS - INVALID CARD 01471000
  1480. MVC UPDCODE(1),ACTVFLD MOVE FUNCTION CHARACTER 01472000
  1481. CLI ACTVFLD+1,X'40' MORE THAN ONE CHAR.... 01473000
  1482. BNE INVUPCD ...MAKES IT AN INVALID CARD 01474000
  1483. * 01475000
  1484. * DECODE REQUESTED UPDATE FUNCTION 01476000
  1485. * 01477000
  1486. CLI UPDCODE,C'S' RE-SEQUENCE OUTPUT FILE ? 01478000
  1487. BE FCTRSEQ YES 01479000
  1488. * 01480000
  1489. CLI UPDCODE,C'R' REPLACE SOURCE RECORDS ? 01481000
  1490. BE FCTDELT YES - DELETE + INSERT 01482000
  1491. * 01483000
  1492. CLI UPDCODE,C'I' INSERT NEW RECORDS ? 01484000
  1493. BE FCTINST YES 01485000
  1494. * 01486000
  1495. CLI UPDCODE,C'D' DELETE RECORDS FROM SOURCE ? 01487000
  1496. BE FCTDELT YES 01488000
  1497. * 01489000
  1498. CLI UPDCODE,C'*' IS IT A COMMENT CARD? 01490000
  1499. BE UPDREAD JUST SKIP IT IF SO 01491000
  1500. * OOPS... IT'S AN INVALID CARD 01492000
  1501. EJECT 01493000
  1502. * INVALID CONTROL CARD 01494000
  1503. INVUPCD EQU * 01495000
  1504. BAL R14,CTLTYPE TYPE OUT THE INVALID CARD 01496000
  1505. DMSERR DISP=NONE,BUFFA=ERRBUFF,NUM=207,LET=W, P3059*01497000
  1506. TEXT='INVALID UPDATE FILE CONTROL CARD' 01498000
  1507. SPACE 01499000
  1508. * ENTER HERE FOR OTHER WARNING MESSAGES 01500000
  1509. INVUPCD1 EQU * 01501000
  1510. BAL R14,BUFFOUT TYPE AND PRINT ERROR MESSAGE 01502000
  1511. WARN 12 SET RETURN CODE TO 12 01503000
  1512. UPITEM UPDFILE INCREMENT ITEM NUMBER 01504000
  1513. FSREAD FSCB=UPDFILE,ERROR=UPDFERR READ NEXT RECORD FROM FILE 01505000
  1514. CLC =CL2'./',UPDLINE IS THIS A CONTROL CARD? 01506000
  1515. BE UPDCTLC GO PROCESS IT IF SO 01507000
  1516. SPACE 01508000
  1517. * OTHERWISE, WE LOG THE CARDS WE SKIP WITH THE CUE OF 'IGNORING'. 01509000
  1518. LOG UPDLINE,CUE,'IGNORING...' 01510000
  1519. SPACE 01511000
  1520. INVULUP EQU * 01512000
  1521. UPITEM UPDFILE 01513000
  1522. FSREAD FSCB=UPDFILE,ERROR=UPDFERR READ NEXT UPDATE CARD 01514000
  1523. CLC =CL2'./',UPDLINE IS IT A CONTROL CARD? 01515000
  1524. BE UPDCTLC GO PROCESS IT IF SO 01516000
  1525. LOG UPDLINE LOG THE IGNORED LINE 01517000
  1526. B INVULUP AND GO FOR NEXT RECORD 01518000
  1527. EJECT 01519000
  1528. RSEQERR EQU * 01520000
  1529. BAL R14,CTLTYPE TYPE OUT LAST CONTROL CARD 01521000
  1530. DMSERR NUM=184,LET=W,BUFFA=ERRBUFF,DISP=NONE, *01522000
  1531. TEXT='''./ S'' NOT FIRST CARD IN UPDATE FILE -- IGNORED' 01523000
  1532. B INVUPCD1 01524000
  1533. SPACE 3 01525000
  1534. UPDSERR EQU * 01526000
  1535. BAL R14,CTLTYPE TYPE LAST CONTROL CARD 01527000
  1536. * IF 'DELT' FLAG IS OFF, THEN WE WERE LOOKING FOR FIRST SEQUENCE 01528000
  1537. * NUMBER IN UPDATE CONTROL CARD; OTHERWISE, WE WERE LOOKING FOR 01529000
  1538. * THE 2ND (THE END OF THE DELETE OR REPLACE RANGE). 01530000
  1539. LA R14,SEQSTRT ASSUME FIRST SEQ NUMBER P3027 01531000
  1540. TM UPDFLAG,DELT WERE WE DELETING? P3027 01532000
  1541. BZ *+8 SKIP IF NOT P3027 01533000
  1542. LA R14,SEQLAST ELSE, POINT TO 2ND SEQ # P3027 01534000
  1543. LA R10,1(,R10) INCREMENT REG 10 TEMPORARILP3027 01535000
  1544. DMSERR DISP=NONE,BUFFA=ERRBUFF,LET=W,NUM=186, *01536000
  1545. SUB=(CHARA,((R14),(R10))), P3027*01537000
  1546. TEXT='SEQUENCE NUMBER ''........'' NOT FOUND' P3027 01538000
  1547. BCTR R10,0 RESTORE VALUE IN REG 10 P3027 01539000
  1548. B INVUPCD1 01540000
  1549. SPACE 3 01541000
  1550. INVCHAR EQU * 01542000
  1551. BAL R14,CTLTYPE TYPE LAST CONTROL CARD 01543000
  1552. DMSERR BUFFA=ERRBUFF,DISP=NONE,NUM=185,LET=W, *01544000
  1553. SUB=(CHARA,ACTVFLD), *01545000
  1554. TEXT=('INVALID ', P3059*01546000
  1555. 'CHAR IN SEQUENCE FIELD ''.........''') P3059 01547000
  1556. B INVUPCD1 01548000
  1557. EJECT 01549000
  1558. * TYPE WARNING MESSAGE FOR ZERO SEQUENCE INCREMENT 01550000
  1559. ZERSEQ EQU * 01551000
  1560. ST R14,Z14 SAVE RETURN ADDRESS 01552000
  1561. BAL R14,CTLTYPE TYPE LAST CONTROL CARD 01553000
  1562. DMSERR BUFFA=ERRBUFF,DISP=NONE,NUM=182,LET=W, *01554000
  1563. TEXT='SEQUENCE INCREMENT IS ZERO' 01555000
  1564. BAL R14,BUFFOUT TYPE AND PRINT MESSAGE 01556000
  1565. WARN 8 SET RETURN CODE TO 8 01557000
  1566. L R14,Z14 RESTORE RETURN ADDR 01558000
  1567. BR R14 01559000
  1568. SPACE 01560000
  1569. Z14 DS A 01561000
  1570. EJECT 01562000
  1571. * 01563000
  1572. * RE-SEQUENCE THE OUTPUT FILE - REQUESTED VIA UPDATE CARD: 01564000
  1573. * ./ S STARTNO INCREMENT LABEL 01565000
  1574. * (E.G. -- './ S 100 100 DMK ') 01566000
  1575. * 01567000
  1576. FCTRSEQ EQU * RE-SEQUENCE REQUEST 01568000
  1577. CLC SEQPOSN(8),CZEROES AT BEGINNING OF INPUT FILE ? 01569000
  1578. BNE RSEQERR NO - './ S' MUST BE FIRST 01570000
  1579. BAL R14,SCANUPD FIND STARTING SEQUENCE NO. 01571000
  1580. BO RSEQDEF SET DEFAULTS @VA01031 01572000
  1581. BM INVUPCD INVALID UPDATE CARD @VA01031 01573000
  1582. BAL R14,JUSTIFY JUSTIFY + VALIDATE THE FIELD 01574000
  1583. LA R4,SEQFOLD DESTINATION 01575000
  1584. EX R10,PACKACV PACK ACTIVE FIELD INTO SEQFOLD 01576000
  1585. BAL R14,SCANUPD FIND INCREMENT 01577000
  1586. BO RSEQIDF DEFAULT THE INCREMENT @VA01031 01578000
  1587. BM INVUPCD INVALID UPDATE CARD @VA01031 01579000
  1588. BAL R14,JUSTIFY JUSTIFY + VALIDATE 01580000
  1589. LA R4,SEQINCR DESTINATION 01581000
  1590. EX R10,PACKACV PACK INTO SEQINCR 01582000
  1591. CP SEQINCR,=P'0' IS THE INCREMENT POSITIVE? 01583000
  1592. BP *+8 SKIP IF NON-ZERO INCREMENT 01584000
  1593. BAL R14,ZERSEQ TYPE WARNING MESSAGE 01585000
  1594. BAL R14,SCANUPD FIND THREE-CHARACTER LABEL, IF ANY 01586000
  1595. BO RSEQLDF NONE - SET DEFAULT @VA01031 01587000
  1596. BM INVUPCD INVALID UPDATE CARD @VA01031 01588000
  1597. CLI ACTVFLD+3,X'40' THREE-CHARS IS MAXIMUM 01589000
  1598. BNE INVUPCD BAD CARD 01590000
  1599. MVC SEQLABL(3),ACTVFLD SAVE THE LABEL 01591000
  1600. B RSEQFIN GO FINISH CHECKING 01592000
  1601. RSEQDEF EQU * DEFAULT EVERYTHING 01593000
  1602. ZAP SEQFOLD,=PL4'10' DEFAULT FIVE-DIGIT START 01594000
  1603. TM GLOBALS,SEQ8 IS IT EIGHT-DIGIT ? 01595000
  1604. BZ RSEQIDF NO 01596000
  1605. ZAP SEQFOLD,=PL4'1000' DEFAULT EIGHT-DIGIT START 01597000
  1606. RSEQIDF EQU * DEFAULT INCREMENT + LABEL 01598000
  1607. MVC SEQINCR(5),SEQFOLD INCREMENT = START NUMBER 01599000
  1608. RSEQLDF EQU * DEFAULT THREE-CHAR LABEL 01600000
  1609. MVC SEQLABL(3),INPFILE+8 = FIRST THREE CHARS OF NAME 01601000
  1610. RSEQFIN EQU * FINAL VALIDATION OF PARMS 01602000
  1611. CP SEQMAX,SEQFOLD DOES SEQ. EXCEED MAX P3059 01603000
  1612. BNL CONST NO, CONTINUE PROCESSING P3059 01604000
  1613. ZAP SEQFOLD,SEQINCR RESTART AT BEGINNING P3059 01605000
  1614. LA R0,INPLINE+SEQFELD POINT TO LAST SEQ. NO. P3059 01606000
  1615. BAL R14,WOVF WARN USER OF OVERFLOW P3059 01607000
  1616. CONST EQU * P3059 01608000
  1617. UNPK SEQNEXT(8),SEQFOLD(5) CONSTRUCT FIRST FIELD 01609000
  1618. OI SEQNEXT+7,X'F0' FORCE EBCDIC 01610000
  1619. AP SEQFOLD(5),SEQINCR(5) UPDATE FOR NEXT CARD 01611000
  1620. BNP INVUPCD INVALID UPDATE CARD 01612000
  1621. OI UPDFLAG,RSEQ RE-SEQUENCE THE OUTPUT FILE 01613000
  1622. B UPDREAD ...AND CONTINUE WITH UPDATE FILE 01614000
  1623. EJECT 01615000
  1624. * 01616000
  1625. * INSERT UPDATE RECORDS IN THE SOURCE FILE - REQUESTED VIA: 01617000
  1626. * ./ I SEQNUM $ START INCR 01618000
  1627. * 01619000
  1628. FCTINST EQU * INSERT FUNCTION 01620000
  1629. BAL R14,SCANUPD FIND FIRST FIELD = SEQUENCE NO. 01621000
  1630. BNZ INVUPCD INVALID CARD IF NOT THERE 01622000
  1631. BAL R14,JUSTIFY RIGHT-JUSTIFY 01623000
  1632. LA R8,UPDREAD RETURN IN CASE OF SEQ. ERROR 01624000
  1633. EX R10,SEQCHEK VALIDATE UPDATE SEQUENCE 01625000
  1634. MVC SEQSTRT(8),ACTVFLD MOVE TO STARTING POSITION P3059 01626000
  1635. BH UPDSERR NO GOOD -- SORRY 01627000
  1636. FCTREPL EQU * ENTRY FOR SECOND HALF OF REPLACE 01628000
  1637. BAL R14,SCANUPD SEE IF UPDATE SEQUENCE REQUESTED 01629000
  1638. BO INSTINE NO - JUST A SIMPLE INSERT @VA01031 01630000
  1639. BM INVUPCD INVALID UPDATE CARD @VA01031 01631000
  1640. CLC ACTVFLD(2),=C'$ ' DOLLAR SIGN ? 01632000
  1641. BNE INVUPCD NO - INVALID CARD 01633000
  1642. OI UPDFLAG,SGEN GENERATE SEQUENCE FOR UPDATE 01634000
  1643. ZAP UPDSTRT,PAKZERO INITIALIZE START NUMBER 01635000
  1644. BAL R14,SCANUPD ANY OPTIONS GIVEN ? 01636000
  1645. BO INDFGEN NO - USE DEFAULTS @VA01031 01637000
  1646. BM INVUPCD INVALID UPDATE CARD @VA01031 01638000
  1647. BAL R14,JUSTIFY THIS MUST BE ALL NUMERICS 01639000
  1648. LA R4,UPDSTRT DESTINATION 01640000
  1649. EX R10,PACKACV PACK STARTING NUMBER 01641000
  1650. BAL R14,SCANUPD ANY INCREMENT GIVEN ? 01642000
  1651. BO INDFGEN NO - USE DEFAULT INCREMENT @VA01031 01643000
  1652. BM INVUPCD INVALID UPDATE CARD @VA01031 01644000
  1653. BAL R14,JUSTIFY JUSTIFY + VALIDATE 01645000
  1654. LA R4,UPDINCR DESTINATION 01646000
  1655. EX R10,PACKACV PACK THE INCREMENT 01647000
  1656. CP UPDINCR,=P'0' ZERO INCREMENT???? @VA10579 01648100
  1657. BP *+8 SKIP IF NON-ZERO SEQ NUMBER 01649000
  1658. BAL R14,ZERSEQ TYPE WARNING MESSAGE 01650000
  1659. B INSTINE GO START ACTUAL INSERT 01651000
  1660. INDFGEN EQU * SET DEFAULTS FOR UPDATE SEQUENCING 01652000
  1661. L R4,FENCED GPR 4 = F'-1' 01653000
  1662. LA R3,SEQSTRT(R10) END OF SEQUENCE FIELD 01654000
  1663. LR R5,R3 WE WANT TO LIMIT THE SCAN TO AVOID.. 01655000
  1664. SH R5,=H'3' ...A PROBLEM WITH EVEN-TENS CARDS 01656000
  1665. LA R14,1 FIRST GUESS AT INCREMENT @V2D4821 01657000
  1666. INDFINC EQU * INCREMENT = (LEAST SIGNIFICANT DIGIT)/10 01658000
  1667. CLI 0(R3),C'0' LOOK FOR LAST NON-ZERO DIGIT 01659000
  1668. BNE INDFGOT 01660000
  1669. SLL R14,4 INCREMENT TIMES 10 @V2D4821 01661000
  1670. BXH R3,R4,INDFINC CONTINUE BACKWARD SCAN 01662000
  1671. LA R14,X'100' USE DEFAULT INCREMENT OF P'1000' @V2D4821 01663000
  1672. SLL R14,4 @V2D4821 01664000
  1673. INDFGOT EQU * FOUND LEAST SIG. DIGIT 01665000
  1674. STCM R14,B'1111',UPDINCR+1 SET INCREMENT @V2D4821 01666000
  1675. MVI UPDINCR,X'00' ...FOR GENERATION 01667000
  1676. OI UPDINCR+4,X'0C' ADD DECIMAL SIGN 01668000
  1677. CP UPDSTRT(5),PAKZERO(5) WAS START DEFAULTED ? 01669000
  1678. BNE INSTINE NO - READY TO START INSERTING 01670000
  1679. EX R10,PACKUPD PACK SEQSTRT INTO UPDSTRT 01671000
  1680. AP UPDSTRT(5),UPDINCR(5) SET DEFAULT START NUMBER 01672000
  1681. EJECT 01673000
  1682. INSTINE EQU * START ACTUAL INSERTION 01674000
  1683. CLI UPDCODE,C'I' IS THIS AN EXPLICIT INSERT ? 01675000
  1684. BNE INSLOOP NO - WE'RE IN THE RIGHT PLACE ALREADY 01676000
  1685. LA R8,INSBAL RETURN ADDR FROM INPUTRD... V0026 01677000
  1686. CLC ITEM+INPFILE(2),=H'0' HAS ANY RECORD BEEN READ ? V0026 01678000
  1687. BE INPUTER NO..BEWARE OF SEQ. ALL ZEROS V0026 01679000
  1688. B INPUTRD POSITION THE INPUT FILE. V0026 01680000
  1689. INSBAL EQU * V0026 01681000
  1690. BAL R7,CONDPASS COND. WRITE OUT LAST RECORD @V2D4821 01682000
  1691. INSLOOP EQU * INSERT UNTIL NEXT './' CARD 01683000
  1692. UPITEM UPDFILE INCREMENT ITEM NUMBER 01684000
  1693. FSREAD FSCB=UPDFILE,ERROR=UPDFE001 @V2D4821 01685000
  1694. CLC UPDLINE(3),=CL4'./ ' CONTROL CARD ? 01686000
  1695. BE INSCTL YES -- INSERT IS COMPLETE P3027 01687000
  1696. TM GLOBALS,INCL INCLUDE SEQUENCE FROM UPDATE ? 01688000
  1697. BZ SETSTAR NO - USE ASTERISKS 01689000
  1698. TM UPDFLAG,SGEN GENERATE SEQUENCE ? 01690000
  1699. BZ INSWLOG NO - USE IT AS IS 01691000
  1700. UNPK UPDNEXT(8),UPDSTRT(5) UNPACK SEQUENCE NUMBER 01692000
  1701. OI UPDNEXT+7,X'F0' FORCE NUMERIC 01693000
  1702. MVC UPDLINE+SEQFELD(8),UPDNEXT FULL EIGHT-DIGIT SEQ. 01694000
  1703. TM GLOBALS,SEQ8 CHECK TO MAKE SURE 01695000
  1704. BO INSGSEQ YES 01696000
  1705. MVC UPDLINE+SEQFELD(3),SEQLABL SET LABEL ALSO 01697000
  1706. INSGSEQ EQU * CALCULATE NEXT SEQUENCE FIELD 01698000
  1707. AP UPDSTRT(5),UPDINCR(5) INCREMENT 01699000
  1708. CP UPDSTRT,SEQMAX NEXT SEQ # EXCEED THE MAX? P3027 01700000
  1709. BL INSWLOG BO IF NOT P3027 01701000
  1710. SPACE 1 01702000
  1711. * OTHERWISE, THE HAVE SEQUENCE NUMBER OVERFLOW 01703000
  1712. LA R0,UPDLINE+SEQFELD POINT TO LAST CORRECT SEQ #P3027 01704000
  1713. ZAP UPDSTRT,UPDINCR RESTART AT BEGINNING 01705000
  1714. BAL R14,WOVF GO TYPE OUT WARNING MESSAGE 01706000
  1715. EJECT 01707000
  1716. INSWLOG EQU * SET NEW FILE POSITION 01708000
  1717. LA R4,UPDLINE+SEQFELD+7 01709000
  1718. SLR R4,R10 BACK UP TO START OF FIELD 01710000
  1719. EX R10,MVCPOSN RECORD CURRENT POSITION 01711000
  1720. B INSTLOG 01712000
  1721. SPACE 01713000
  1722. SETSTAR EQU * DO NOT INCLUDE SEQUENCE FIELDS 01714000
  1723. MVC UPDLINE+SEQFELD(8),=CL8'********' 01715000
  1724. INSTLOG EQU * 01716000
  1725. TM UPDFLAG,FULL IS THERE DATA ALREADY IN BUFFER ? 01717000
  1726. BO INSWUT1 YES - THIS IS NOT THE FIRST LINE 01718000
  1727. NI UPDFLAG,X'FF'-FULI INDICATE DATA IS FROM UPDATE FIL 01719000
  1728. LOG UPDLINE,CUE,'INSERTING...' FIRST LINE + CUE MSG 01720000
  1729. B INSETXT GO SETUP FOR CONTINUED INSERT 01721000
  1730. INSWUT1 EQU * WRITE PREVIOUS LINE TO CMSUT1 01722000
  1731. BAL R7,PASSOVR 01723000
  1732. LOG UPDLINE WRITE CURRENT LINE TO LOGFILE 01724000
  1733. INSETXT EQU * MOVE INSERTED LINE TO 'INPLINE' 01725000
  1734. MVC INPLINE(80),UPDLINE THIS IS AN INSERTION 01726000
  1735. OI UPDFLAG,FULL BUFFER CONTAINS DATA 01727000
  1736. B INSLOOP CONTINUE WITH INSERTION 01728000
  1737. SPACE 01729000
  1738. INSCTL EQU * 01730000
  1739. BAL R7,PASSOVR WRITE OUT LAST INSERTED CARD 01731000
  1740. B UPDCTLC GO HANDLE CONTROL CARD 01732000
  1741. UPDFE001 TM UPDFLAG,INCOR IN-CORE UPDATE @V2D4821 01733000
  1742. BNO UPDFERR NOPE @V2D4821 01734000
  1743. BAL R7,PASSOVR WRITE OUT THE LAST RECORD @V2D4821 01735000
  1744. LA R15,12 SIMULATE E-O-F @V2D4821 01736000
  1745. B UPDFERR @V2D4821 01737000
  1746. EJECT 01738000
  1747. * 01739000
  1748. * DELETE RECORDS FROM THE INPUT FILE - CONTROL CARD IMAGE: 01740000
  1749. * ./ D SEQNO1 <SEQNO2> <$> 01741000
  1750. * DELETE FROM SEQNO1 UP TO AND INCLUDING SEQNO2 01742000
  1751. * 01743000
  1752. FCTDELT EQU * DELETE FUNCTION 01744000
  1753. BAL R14,SCANUPD FIND FIRST SEQUENCE FIELD 01745000
  1754. BNZ INVUPCD INVALID IF IT'S MISSING 01746000
  1755. L R1,UPDLINE+80 SAVE SCAN POINTER IN CASE OF REPLACE 01747000
  1756. ST R1,REPSCAN 01748000
  1757. BAL R14,JUSTIFY ADJUST + VALIDATE 01749000
  1758. LA R8,UPDREAD RETURN IN CASE OF SEQ. ERROR 01750000
  1759. EX R10,SEQCHEK VALIDATE UPDATE SEQUENCE 01751000
  1760. MVC SEQSTRT(8),ACTVFLD MOVE TO START SLOT P3059 01752000
  1761. BH UPDSERR NO GOOD -- SORRY 01753000
  1762. MVC SEQLAST(8),ACTVFLD DEFAULT ENDING SLOT, ALSO 01754000
  1763. BAL R14,SCANUPD SEE IF ANY SECOND FIELD 01755000
  1764. BO DELTINE NO - JUST DELETE ONE LINE @VA01031 01756000
  1765. BM INVUPCD INVALID UPDATE CARD @VA01031 01757000
  1766. CLC ACTVFLD(2),=C'$ ' IF IT'S A DOLLAR SIGN... 01758000
  1767. BE DELTINE ...JUST DELETE A SINGLE LINE 01759000
  1768. BAL R14,JUSTIFY OTHERWISE, ADJUST IT 01760000
  1769. MVC SEQLAST(8),ACTVFLD SET LAST SEQUENCE FIELD 01761000
  1770. L R1,UPDLINE+80 SAVE SCAN POINTER IN CASE OF REPLACE 01762000
  1771. ST R1,REPSCAN ... 01763000
  1772. DELTINE EQU * POSITION THE FILE FOR DELETION 01764000
  1773. EX R10,CHKRANG CHECK FOR VALID RANGE SPECIFICATION 01765000
  1774. BH INVUPCD N.G. -- START HIGHER THAN END 01766000
  1775. BAL R8,INPUTRD POSITON FILE AT 'SEQSTRT' 01767000
  1776. OI UPDFLAG,DELT INDICATE DELETE IN PROGRESS 01768000
  1777. NI UPDFLAG,X'FF'-FULL BUFFER SHOULD NOT BE WRITTEN 01769000
  1778. LOG INPLINE,CUE,'DELETING... ' FIRST LINE + CUE MSG 01770000
  1779. TM UPDFLAG,INCOR IN-CORE UPDATE ??? @V2D4821 01771000
  1780. BNO DELTINP NOPE.. @V2D4821 01772000
  1781. BAL R14,XDELE DELETE LINE FROM CHAIN @V2D4821 01773000
  1782. NOP 0 @V2D4821 01774000
  1783. EJECT 01775000
  1784. DELTINP EQU * READ, DO NOT WRITE 01776000
  1785. EX R10,CLCDELT FINISHED YET ? 01777000
  1786. BE DELTFIN YES - CLEAN UP 01778000
  1787. BAL R14,XREAD READ A LINE @V2D4821 01779000
  1788. B INPFERR GO IF ERROR @V2D4821 01780000
  1789. CLC INPLINE+SEQFELD(8),BLANKS IS IT BLANK SEQUENCE ? 01781000
  1790. BE DELTOVR YES - SKIP OVER IT 01782000
  1791. LA R4,INPLINE+SEQFELD+7 01783000
  1792. SLR R4,R10 BACK UP TO START OF SEQUENCE 01784000
  1793. EX R10,MVCPOSN RECORD NEW FILE POSITION 01785000
  1794. EX R10,CLCDELT DID WE MISS SEQNO2 ? @VA05353 01786000
  1795. BNL DELCHEK NO; SKIP @VA05353 01787000
  1796. EX R10,MVCILAST YES; RECORD INPUT FILE'S SEQ # @VA05353 01788000
  1797. OI UPDFLAG,FULL MUSTN'T DELETE THIS LINE @VA05353 01789000
  1798. B UPDSERR BUT TELL 'EM SEQNO2 NOT FOUND @VA05353 01790000
  1799. SPACE 1 01791000
  1800. * WE CHECK TO SEE IF SEQUENCE NUMBERS IN INPUT FILE ARE ASCENDING 01792000
  1801. DELCHEK EX R10,CLCILAST @VA05353 01793000
  1802. BL *+8 SKIP IF NO SEQUENCE ERR P3027 01794000
  1803. BAL R14,INSEQW GO TYPE OUT WARNING MSG P3027 01795000
  1804. EX R10,MVCILAST SAVE VALUE OF INPUT SEQ # P3027 01796000
  1805. DELTOVR TM UPDFLAG,INCOR UPDATING IN STORAGE? @VA05353 01797000
  1806. BZ DELTLOG NO; SKIP @VA05353 01798000
  1807. BAL R14,XDELE YES; REMOVE LINE FROM CHAIN @VA05353 01799000
  1808. NOP 0 @VA05353 01800000
  1809. DELTLOG LOG INPLINE LOG THE DELETED LINE @VA05353 01801000
  1810. B DELTINP DELETE BY PASSING OVER 01802000
  1811. DELTFIN EQU * CLEAN UP AFTER DELETE 01803000
  1812. NI UPDFLAG,X'FF'-DELT-FULL DELETE NOW COMPLETE 01804000
  1813. CLI UPDCODE,C'D' WAS IT A REAL DELETE ? 01805000
  1814. BNE REPFUNC NO REPLACE @V2D4821 01806000
  1815. BAL R14,XREAD UPD LINE PTR @V2D4821 01807000
  1816. B DELTEOF MIGHT BE EOF @VA05353 01808000
  1817. OI UPDFLAG,FULL+FULI BUFFER CONTAINS IP DATA @V2D4821 01809000
  1818. B DELTEND @VA05353 01810000
  1819. DELTEOF LA R1,INPFILE POINT TO PLIST IN CASE REAL ERR @VA05353 01811000
  1820. CH R15,=H'12' EOF? @VA05353 01812000
  1821. BNE INPERR NO; BAD NEWS @VA05353 01813000
  1822. DELTEND LA R4,INPLINE+SEQFELD+7 @VA05353 01814000
  1823. SLR R4,R10 BACK UP TO @V2D4821 01815000
  1824. * START OF SEQUENCE 01816000
  1825. EX R10,MVCPOSN RECORD NEW POS @V2D4821 01817000
  1826. EX R10,MVCILAST @V2D4821 01818000
  1827. B UPDREAD @V2D4821 01819000
  1828. EJECT @VA05353 01820000
  1829. * 01821000
  1830. * FOR REPLACE FUNCTION - SETUP AND TRANSFER TO 'INSERT' 01822000
  1831. * 01823000
  1832. REPFUNC L R1,REPSCAN POINTER TO RE-SCAN CONTROL CARD @VA05353 01824000
  1833. ST R1,UPDLINE+80 SET FOR SCAN ROUTINE 01825000
  1834. MVC SEQPOSN(8),SEQSTRT RESET FILE POSITION FOR 'INSERT' 01826000
  1835. B FCTREPL GO PERFORM INSERT HALF OF REPLACE 01827000
  1836. SPACE 2 01828000
  1837. PACKUPD PACK UPDSTRT(5),SEQSTRT(*-*) FOR INSERT 01829000
  1838. CLCDELT CLC SEQLAST(*-*),SEQPOSN FOR DELETE 01830000
  1839. CHKRANG CLC SEQSTRT(*-*),SEQLAST VALIDITY CHECK 01831000
  1840. SEQCHEK CLC SEQSTRT(*-*),ACTVFLD UPDATE INPUT SEQUENCE CHECK 01832000
  1841. PACKACV PACK 0(5,R4),ACTVFLD(*-*) PACK INTO SOMEWHERE 01833000
  1842. MVCR2R1 MVC 0(*-*,R2),0(R1) 01834000
  1843. MVCOLAST MVC OSEQLAST(*-*),0(R4) MOVE INTO OUTPUT SEQ # FIELD 01835000
  1844. EJECT 01836000
  1845. * 01837000
  1846. * INPUTRD -- SUBROUTINE TO POSITION THE INPUT FILE AT THE 01838000
  1847. * SEQUENCE NUMBER SPECIFIED IN 'SEQSTRT'. INPUT RECORDS 01839000
  1848. * ARE RE-SEQUENCED IF NECESSARY AND WRITTEN OUT TO THE 01840000
  1849. * 'UPDATE CMSUT1' FILE AS THEY ARE PASSED OVER. CHECKS ARE 01841000
  1850. * PERFORMED TO CATCH SEQUENCE ERRORS IN THE INPUT FILE. 01842000
  1851. * 01843000
  1852. INPUTRD EQU * POSITION FILE AT 'SEQSTRT' 01844000
  1853. LA R4,SEQSTRT MAYBE... 01845000
  1854. EX R10,CLCILAST ...WE'RE ALREADY WHERE WE WANT TO BE 01846000
  1855. BCR 8,R8 WHY, LO AND BEHOLD, WE ARE 01847000
  1856. BNL UPDSERR TYPE ERRMSG -- SEQ# NOT FNDP3027 01848000
  1857. SPACE 1 01849000
  1858. INPUTER EQU * READ UNTIL WE FIND IT 01850000
  1859. BAL R7,CONDPASS CONDITIONALLY WRITE DATA TO CMSUT1 @V2D4821 01851000
  1860. BAL R14,XREAD READ SOME INPUT @V2D4821 01852000
  1861. B INPFERR IF ERROR @V2D4821 01853000
  1862. OI UPDFLAG,FULL+FULI BUFFER CONTAINS INPUT FILE DATA 01854000
  1863. CLC INPLINE+SEQFELD(8),BLANKS WE SKIP BLANK CARDS 01855000
  1864. BE INPUTER YES INDEED 01856000
  1865. LA R4,INPLINE+SEQFELD+7 LAST BYTE OF FIELD 01857000
  1866. SLR R4,R10 BACK UP TO START OF NUMERICS 01858000
  1867. MVCPOSN MVC SEQPOSN(*-*),0(R4) UPDATE FILE POSITION @V2D4821 01859000
  1868. CLCILAST CLC ISEQLAST(*-*),0(R4) CHECK FOR LAST INPUT SEQ. #@V2D4821 01860000
  1869. BL *+8 SKIP IF LAST LOWER P3027 01861000
  1870. BAL R14,INSEQW TYPE OUT WARNING MESSAGE P3027 01862000
  1871. MVCILAST MVC ISEQLAST(*-*),0(R4) MOVE INTO INPUT SEQ. # FIEL@V2D4821 01863000
  1872. B INPUTRD GO SEE IF WE'VE FND TARGET P3027 01864000
  1873. EJECT 01865000
  1874. * 01866000
  1875. * PASSOVR -- WRITE A RECORD TO OUTPUT FILE, RE-SEQUENCING 01867000
  1876. * IF REQUESTED. BUFFER ADDRESS IN GPR6, RETURN IN GPR 7. 01868000
  1877. * 01869000
  1878. CONDPASS TM UPDFLAG,FULL IS BUFF FULL? @V2D4821 01870000
  1879. BCR 8,R7 NO RETURN @V2D4821 01871000
  1880. TM UPDFLAG,INCOR INCORE UPD? @V2D4821 01872000
  1881. BZ PASSOVR NO @V2D4821 01873000
  1882. TM UPDFLAG,RSEQ IF SO, ARE WE RESEQUENCING?? @V2D4821 01874000
  1883. BNO PASS1B NOPE.. @V2D4821 01875000
  1884. BAL R14,XDELE DO A LOGICAL REPLACE ON INPLINE @V2D4821 01876000
  1885. NOP 0 @V2D4821 01877000
  1886. B PASSOVR @V2D4821 01878000
  1887. * 01879000
  1888. PASSOVR EQU * WRITE THE RECORD TO CMSUT1 01880000
  1889. TM UPDFLAG,FULL IS THERE DATA IN THE BUFFER ? 01881000
  1890. BCR 8,R7 NO - JUST RETURN 01882000
  1891. TM UPDFLAG,RSEQ ARE WE RE-SEQUENCING ? 01883000
  1892. BZ PASSOUT NO - JUST RE-WRITE IT 01884000
  1893. MVC INPLINE+SEQFELD(8),SEQNEXT RE-SEQUENCE 01885000
  1894. UNPK SEQNEXT(8),SEQFOLD(5) SEQFOLD IS ALL SET 01886000
  1895. OI SEQNEXT+7,X'F0' FORCE TO EBCDIC 01887000
  1896. AP SEQFOLD(5),SEQINCR(5) UPDATE FOR NEXT LAP 01888000
  1897. CP SEQFOLD,SEQMAX COMPARE NEW SEQ# WITH MAX P3027 01889000
  1898. BL PASSNOV SKIP MESSAGE IF NO OVERFLOWP3027 01890000
  1899. ZAP SEQFOLD,SEQINCR RESET SEQUENCE NUMBER P3027 01891000
  1900. LA R0,INPLINE+SEQFELD POINT TO LAST OK SEQ # P3027 01892000
  1901. BAL R14,WOVF GO TYPE OVERFLOW MESSAGE P3027 01893000
  1902. SPACE 1 01894000
  1903. PASSNOV EQU * P3027 01895000
  1904. TM GLOBALS,SEQ8 SHOULD WE ADD THE LABEL ? 01896000
  1905. BO PASSOUT NO - LEAVE IT AS IS 01897000
  1906. MVC INPLINE+SEQFELD(3),SEQLABL ADD THREE-CHAR LABEL 01898000
  1907. PASSOUT EQU * 01899000
  1908. TM UPDFLAG,INCOR INCORE UPDATE ??? @V2D4821 01900000
  1909. BZ PASS1A NO @V2D4821 01901000
  1910. LA R1,INPLINE ADDRESS OF LINE TO BE WRITTEN @V2D4821 01902000
  1911. BAL R14,XWRITE CHAIN LINE INTO LIST @V2D4821 01903000
  1912. B PASS1B @V2D4821 01904000
  1913. PASS1A EQU * @V2D4821 01905000
  1914. FSWRITE FSCB=UT1FILE,ERROR=OUTERR WRITE UTILITY FILE 01906000
  1915. PASS1B EQU * @V2D4821 01907000
  1916. NI UPDFLAG,X'FF'-FULL BUFFER IS NOW EMPTY 01908000
  1917. SPACE 01909000
  1918. * WE NOW CHECK FOR SEQUENCE ERRORS. WE FIRST CHECK TO SEE IF THE NEW 01910000
  1919. * SEQUENCE NUMBER EXCEEDS THE LAST SEQUENCE NUMBER. 01911000
  1920. LA R4,INPLINE+SEQFELD+7 GET CURRENT SEQUENCE NUMBER 01912000
  1921. CLC INPLINE+SEQFELD(8),BLANKS BLANK SEQ. FILED? @VA05075 01913000
  1922. BE PASSSET YES SKIP THIS CARD @VA05075 01914000
  1923. SLR R4,R10 POINT TO ITS ADDR (COL 73 OR 76) 01915000
  1924. CLCOLAST CLC OSEQLAST(*-*),0(R4) MOVE INTO OUTPUT SEQ. # FIE@V2D4821 01916000
  1925. BL PASSSET NOTHING TO DO IF LAST WAS LOWER 01917000
  1926. SPACE 01918000
  1927. SPACE 1 01919000
  1928. * WE HAVE DISCOVERED A SEQUENCE ERROR. WE MUST DETERMINE WHETHER 01920000
  1929. * IT'S A VALID ERROR AND, IF SO, WHAT MESSAGE TO TYPE. 01921000
  1930. * FIRST, IF WE ARE RESEQUENCING (WITH ./ S), THEN IT'S DUE EITHER 01922000
  1931. * TO A ZERO SEQUENCE INCREMENT OR TO A SEQUENCE NUMBER OVERFLOW, 01923000
  1932. * AND SO THERE'S NO NEED FOR AN EXTRA ERROR MESSAGE. 01924000
  1933. TM UPDFLAG,RSEQ ARE WE RESEQUENCING? P3027 01925000
  1934. BO PASSSET GO IF NOT -- NOTHING TO DO P3027 01926000
  1935. SPACE 1 01927000
  1936. * NEXT, IF WE ARE NOT INCLUDING SEQUENCE NUMBERS, THEN WE DON'T 01928000
  1937. * FLAG THE PROBLEM. 01929000
  1938. TM GLOBALS,INCL ARE WE INCLUDING? P3027 01930000
  1939. BZ PASSSET NOTHING TO DO IF NOT P3027 01931000
  1940. SPACE 1 01932000
  1941. * THE NATURE OF THE ACTUAL ERROR DEPENDS UPON WHERE THE LAST TWO 01933000
  1942. * LINES OF OUTPUT CAME FROM -- THE INPUT FILE OR THE UPDATE FILE 01934000
  1943. * (THE LATTER IN THE CASE OF AN INSERT). 01935000
  1944. SR R1,R1 P3027 01936000
  1945. TM UPDFLAG,FULI IS CURRENT LINE FROM INPUT?P3027 01937000
  1946. BZ *+8 SKIP IF IT IS NOT P3027 01938000
  1947. LA R1,4 4 = THIS RECORD FROM INPUT P3027*01939000
  1948. FILE P3027 01940000
  1949. CLI PASSFLG,0 LAST RECORD FROM INPUTFILE?P3027 01941000
  1950. BNE *+8 SKIP IF NOT P3027 01942000
  1951. LA R1,8(,R1) ADD 8 IF PREV RECORD FROM P3027*01943000
  1952. INPUT FILE P3027 01944000
  1953. B *+4(R1) BRANCH BASED ON CASE P3027 01945000
  1954. B PASSUU 0 BOTH RECORDS FROM UPDATE P3027 01946000
  1955. B PASSUI 4 PREV FROM UPDATE, CURRENT P3027*01947000
  1956. FROM INPUT P3027 01948000
  1957. B PASSIU 8 PREV FROM INPUT, THIS FROM P3027*01949000
  1958. UPDATE P3027 01950000
  1959. B PASSSET 12 BOTH FROM INPUT -- A MSG P3027*01951000
  1960. HAS ALREADY BEEN TYPED P3027 01952000
  1961. SPACE 1 01953000
  1962. * COME HERE IF BOTH RECORDS ARE INSERTED FROM THE UPDATE FILE. 01954000
  1963. * THERE ARE TWO CASES HERE. 01955000
  1964. SPACE 1 01956000
  1965. * (1) BOTH CARDS ARE FROM THE SAME INSERT "GROUP". THIS @VA04290 01957000
  1966. * SITUATION CAN ONLY OCCUR IF THE SEQUENCE INCREMENT IS @VA04290 01958000
  1967. * ZERO, WHICH WOULD RESULT IN IDENTICAL SEQUENCE NUMBERS, @VA04290 01959000
  1968. * OR IF THE SEQUENCE NUMBER OVERFLOWED. FOR AN EXPLICIT @VA04290 01960000
  1969. * "INSERT", BOTH OF THESE SITUATIONS WOULD ALREADY HAVE @VA04290 01961000
  1970. * BEEN NOTED VIA AN ERROR MESSAGE, BUT FOR AN INSERTION @VA04290 01962000
  1971. * DUE TO A "REPLACE", NO SUCH MESSAGE WOULD HAVE BEEN @VA04290 01963000
  1972. * ISSUED, SO WE ISSUE ONE VIA "PASSIU". @VA04290 01964000
  1973. SPACE 1 @VA04290 01965000
  1974. * (2) THE TWO CARDS ARE FROM DIFFERENT INSERT GROUPS. IN @VA04290 01966000
  1975. * THIS CASE, BOTH THE PREVIOUS AND CURRENT CONTROL CARDS @VA04290 01967000
  1976. * ARE RELEVANT, SO WE DISPLAY THEM BOTH, THEN ISSUE THE @VA04290 01968000
  1977. * ERROR MESSAGE. @VA04290 01969000
  1978. PASSUU TM UPDFLAG,SGEN "$" IN LAST CONTROL CARD? @VA04290 01970000
  1979. BZ PASSIU NO; CONTINUE @VA04290 01971000
  1980. LH R1,UPDFILE+ITEM GET ITEM NUMBER OF THE @VA04290*01972000
  1981. CURRENT RECORD BEING INSERTED @VA04290 01973000
  1982. LA R1,0(,R1) CLEAR ANY HI-ORDER BYTE @VA04290 01974000
  1983. LH R2,LASTCTLI GET ITEM # OF LAST CONTROL CARD @VA04290 01975000
  1984. LA R2,3(,R2) INCREMENT IT FOR COMPARISON @VA04290 01976000
  1985. CLR R1,R2 MORE THAN 2 CARDS SINCE LAST @VA04290*01977000
  1986. CONTROL CARD? @VA04290 01978000
  1987. BH PASSSET YES; NOTHING ELSE TO DO @VA04290 01979000
  1988. BL PASSUU2 NO; MUST BE 2 DIFFERENT GROUPS @VA04290 01980000
  1989. CLI UPDCODE,C'R' NO; SAME GROUP; WAS IT "REPLACE"?@VA04290 01981000
  1990. BNE PASSSET NO; JUST CONTINUE @VA04290 01982000
  1991. B PASSIU YES; ISSUE MESSAGE THIS TIME @VA04290 01983000
  1992. PASSUU2 BAL R14,CTLPTYPE 2 GROUPS; TYPE PREVIOUS CTL CARD @VA04290 01984000
  1993. SPACE 1 01985000
  1994. * COME HERE IF PREVIOUS CARD WAS FROM THE INPUT FILE AND THE 01986000
  1995. * CURRENT CARD IS BEING INSERTED FROM THE UPDATE FILE. 01987000
  1996. PASSIU EQU * P3027 01988000
  1997. BAL R14,CTLTYPE TYPE LAST CONTROL CARD P3027 01989000
  1998. B PASSW GO TYPE WARNING MESSAGE P3027 01990000
  1999. SPACE 1 01991000
  2000. * COME HERE IF THE PREVIOUS CARD WAS FROM THE UPDATE FILE, BUT 01992000
  2001. * THE CURRENT CARD IS FROM THE INPUT FILE. IN THIS CASE, THERE IS 01993000
  2002. * NO NEED TO TYPE THE LAST CONTROL CARD, SO WE TYPE THE PREVIOUS 01994000
  2003. * CONTROL CARD. 01995000
  2004. PASSUI EQU * P3027 01996000
  2005. TM UPDFLAG,TAIL HAS EOF BEEN REACHED P3059 01997000
  2006. BO PASSIU YES, THEN TYPE OUT CURRENT CARD P3059 01998000
  2007. BAL R14,CTLPTYPE TYPE PREVIOUS CTL CARD P3027 01999000
  2008. SPACE 1 02000000
  2009. PASSW EQU * P3027 02001000
  2010. LA R10,1(,R10) INCREMENT R10 TEMPORARILY 02002000
  2011. DMSERR DISP=NONE,BUFFA=ERRBUFF,NUM=174,LET=W,RENT=NO, *02003000
  2012. SUB=(CHARA,(OSEQLAST,(R10)),CHARA,((R4),(R10))), *02004000
  2013. TEXT='SEQUENCE ERROR INTRODUCED IN OUTPUT FILE: ''......*02005000
  2014. ..'' TO ''........''' 02006000
  2015. BCTR R10,0 RESTORE VALUE IN R10 02007000
  2016. BAL R14,BUFFOUT TYPE AND PRINT MESSAGE 02008000
  2017. WARN 8 SET RETURN CODE TO 8 02009000
  2018. SPACE 3 02010000
  2019. * FINALLY, WE SET PASSFLG TO INDICATE WHETHER THE CURRENT LINE 02011000
  2020. * IS FROM THE INPUT FILE OR FROM THE UPDATE FILE. 02012000
  2021. PASSSET EQU * 02013000
  2022. MVI PASSFLG,0 ASSUME FROM INPUT FILE 02014000
  2023. TM UPDFLAG,FULI WAS IT? 02015000
  2024. BO *+8 SKIP IF SO 02016000
  2025. MVI PASSFLG,X'FF' IT'S FROM THE UPDATE FILE 02017000
  2026. EX R10,MVCOLAST COPY LAST OUTPUT SEQUENCE NUMBER 02018000
  2027. TM UPDFLAG2,FINISH ARE WE FINISHED? @V2D4821 02019000
  2028. BO UPDFERR3 YES @V2D4821 02020000
  2029. BR R7 RETURN TO CALLER 02021000
  2030. SPACE 2 02022000
  2031. * 0 IN THE FOLLOWING FLAG MEANS THAT THE LAST CARD WAS FROM THE INPUT 02023000
  2032. * FILE, WHILE FF MEANS IT WAS FROM THE UPDATE FILE. 02024000
  2033. PASSFLG DC X'00' 02025000
  2034. DS 0H 02026000
  2035. EJECT 02027000
  2036. * SUBROUTINE TO TYPE OUT THE WARNING MESSAGE INDICATING THAT A 02028000
  2037. * SEQUENCE ERROR WAS DETECTED IN THE INPUT FILE. 02029000
  2038. INSEQW EQU * P3027 02030000
  2039. CLC ITEM+INPFILE(2),=H'1' IF THIS IS FIRST RECORD V0026 02031000
  2040. BCR 8,R14 READ,THEN SEQ IS ALL ZEROS V0026 02032000
  2041. TM GLOBALS,UPDN HAVE WE ALREADY DONE AN P3027*02033000
  2042. UPDATE? P3027 02034000
  2043. BCR 1,R14 DON'T MENTION IT AGAIN P3027 02035000
  2044. ST R14,INSW14 SAVE OLD REG 14 P3027 02036000
  2045. BAL R14,CTLTYPE TYPE LAST CONTROL CARD P3027 02037000
  2046. LA R1,INPFILE TYPE CURRENT LINE FROM P3027 02038000
  2047. BAL R14,LINTYPE INPUT FILE P3027 02039000
  2048. LA R10,1(,R10) TEMPORARILY INCREASE R10 P3027 02040000
  2049. DMSERR DISP=NONE,BUFFA=ERRBUFF, P3027*02041000
  2050. LET=W,NUM=210,RENT=NO, P3027*02042000
  2051. SUB=(CHARA,(ISEQLAST,(R10)),CHARA,((R4),(R10))), P3027*02043000
  2052. TEXT=('INPUT FILE SEQUENCE ERROR:', P3027*02044000
  2053. ' ''........'' TO ''........''') P3027 02045000
  2054. BCTR R10,0 RESET R10 P3027 02046000
  2055. BAL R14,BUFFOUT PUT OUT THE MESSAGE P3027 02047000
  2056. WARN 4 SET RETURN CODE TO 4 P3027 02048000
  2057. L R14,INSW14 RESTORE REG 14 P3027 02049000
  2058. BR R14 RETURN TO CALLER P3027 02050000
  2059. SPACE 1 02051000
  2060. INSW14 DS F P3027 02052000
  2061. EJECT 02053000
  2062. * 'LOCATE' SUBROUTINE. CALLS THE CMS 'STATE' FUNCTION TO DETERMINE 02054000
  2063. * THE EXISTENCE OF A FILE. MAKES A NORMAL RETURN IF THE FILE EXISTS, 02055000
  2064. * AND A 'JUMP' RETURN IF IT DOES NOT. OTHER ERRORS (SUCH AS ILLEGAL 02056000
  2065. * FILEMODE) ARE ALSO DETECTED, WITH IMMEDIATE DETECTION AND PROGRAM 02057000
  2066. * TERMINATION. 02058000
  2067. LOCATE EQU * 02059000
  2068. LR R2,R1 SAVE PLIST POINTER 02060000
  2069. FSSTATE FSCB=(1),ERROR=LOCER CALL 'STATE' 02061000
  2070. SPACE 02062000
  2071. * R1 NOW POINTS TO THE STATE FST FOR THE FILE 02063000
  2072. USING STATEFST,R1 HRC015DS 02064100
  2073. L R15,FVSFSTAD Point to ADT for file HRC015DS 02064200
  2074. ST R15,PTRS(,R2) SAVE IN WORD AFTER FSCB 02065000
  2075. USING ADTSECT,R15 02066000
  2076. MVC 24(1,R2),ADTM GET THE RIGHT MODE LETTER 02067000
  2077. L R15,FVSFSTAC Address of real FST HRC015DS 02068100
  2078. DROP R1 HRC015DS 02068200
  2079. ST R15,PTRS+4(,R2) SAVE AFTER ADT POINTER 02069000
  2080. USING FSTSECT,R15 02070000
  2081. MVC 25(1,R2),FSTM+1 GET CORRECT MODE NUMBER 02071000
  2082. CLI FSTFV,C'F' IS THIS FIXED FILE? 02072000
  2083. BNE FMTERR BAD FORMAT IF NOT 02073000
  2084. CLC FSTIL,=F'80' ITEM LENGTH = 80? 02074000
  2085. BNE FMTERR BAD FORMAT IF NOT 02075000
  2086. B 4(,R14) GIVE A 'JUMP' RETURN 02076000
  2087. SPACE 2 02077000
  2088. * COME HERE ON AN ERROR RETURN FROM STATE. 02078000
  2089. LOCER EQU * 02079000
  2090. CH R15,=H'36' DISK NOT ACCESSED @VA12416 02079500
  2091. BE ERRMSG36 YES, ISSUE MSG69E @VA12416 02079600
  2092. CH R15,=H'28' IS IT 'FILE NOT FOUND'? 02080000
  2093. BCR 8,R14 (BE 0(R14)) JUST RETURN IF SO 02081000
  2094. CH R15,=H'1' 02082000
  2095. BCR 8,R14 02083000
  2096. SPACE 02084000
  2097. * OTHERWISE, IT'S SOME IMPORTANT ERROR. 02085000
  2098. STC R15,RC SAVE RETURN CODE FROM 'STATE' 02086000
  2099. B ERETURN GO ABORT 02087000
  2100. EJECT 02088000
  2101. *************************************************************** 02089000
  2102. ** 02090000
  2103. ** XWRITE--INSERT A LINE INTO CORE 02091000
  2104. ** 02092000
  2105. ** INPUT-- 02093000
  2106. ** R1--ADDRESS OF LINE TO BE WRITTEN 02094000
  2107. ** R14--RETURN ADDRESS 02095000
  2108. ** 02096000
  2109. ** OUTPUT-- 02097000
  2110. ** THE UPDATED LIST 02098000
  2111. ** PTR2=>INSERT (AS IF INSERT HAS JUST BEEN READ 02099000
  2112. ** (LINE JUST READ)=>INSERT=>(NEXT LINE) 02100000
  2113. ** 02101000
  2114. ** EXIT-- 02102000
  2115. ** RETURN VIA R14 02103000
  2116. ** RETURN THROUGH CORBUST IF CORE EXHAUSTED 02104000
  2117. ** 02105000
  2118. ** 02106000
  2119. *************************************************************** 02107000
  2120. SPACE 1 02108000
  2121. XWRITE EQU * @V2D4821 02109000
  2122. ST R14,REGSAV SAVE RETURN @V2D4821 02110000
  2123. L R14,SPARES NUMBER OF SPARES LEFT IN CORE @V2D4821 02111000
  2124. LTR R14,R14 ANY? @V2D4821 02112000
  2125. BZ CORBUST BRANCH IF NOT @V2D4821 02113000
  2126. BCTR R14,0 REDUCE BY 1 @V2D4821 02114000
  2127. ST R14,SPARES AND STORE AS NEW VALUE OF SPARES@V2D4821 02115000
  2128. L R15,FPTR LOAD FREE-LIST POINTER @V2D4821 02116000
  2129. LTR R15,R15 IS LIST EMPTY @V2D4821 02117000
  2130. BNZ XWRIT08 NO, WE'RE OK @V2D4821 02118000
  2131. L R15,AEXTEND LIMIT TO WHICH WE'VE GONE SO FAR@V2D4821 02119000
  2132. SR R0,R0 CLEAR FORWARD CHAIN OF NEW LINE@V2D4821 02120000
  2133. ST R0,0(,R15) @V2D4821 02121000
  2134. LR R0,R15 COMPUTE NEW BOUND @V2D4821 02122000
  2135. A R0,CORITEM @V2D4821 02123000
  2136. ST R0,AEXTEND AND SAVE IN AEXTEND @V2D4821 02124000
  2137. SPACE 1 02125000
  2138. XWRIT08 EQU * @V2D4821 02126000
  2139. L R0,0(,R15) LOAD NEXT ENTRY ADDRESS @V2D4821 02127000
  2140. ST R0,FPTR AND UPDATE FREE-LIST POINTER @V2D4821 02128000
  2141. MVC 8(80,R15),0(R1) MOVE IN THE LINE @V2D4821 02129000
  2142. L R1,PTR2 GR1=A(OLD ITEM) @V2D4821 02130000
  2143. ST R15,PTR2 READ PTR POINTS TO ITEM @V2D4821 02131000
  2144. L R14,0(,R1) GR14=A(OLD+1) @V2D4821 02132000
  2145. ST R14,0(,R15) E =>OLD+1 @V2D4821 02133000
  2146. LTR R14,R14 IS OLD+1=EOF @V2D4821 02134000
  2147. BZ SKIPINST YES, SKIP NEXT INS. @V2D4821 02135000
  2148. ST R15,4(,R14) NO, E <= OLD+1 @V2D4821 02136000
  2149. SKIPINST ST R1,4(,R15) OLD <= E @V2D4821 02137000
  2150. ST R15,0(,R1) OLD => E @V2D4821 02138000
  2151. L R14,SPARES @V2D4821 02139000
  2152. LTR R14,R14 HOW MANY SPARES LEFT? @V2D4821 02140000
  2153. BZ CORBUST BRANCH IF NONE @V2D4821 02141000
  2154. SR R15,R15 CLEAR CONDITION CODE @V2D4821 02142000
  2155. XWRITEX EQU * RETURN FROM 'XWRITE' @V2D4821 02143000
  2156. L R14,REGSAV RESTORE RETURN ADDRESS @V2D4821 02144000
  2157. BR R14 RETURN TO CALLER @V2D4821 02145000
  2158. SPACE 2 02146000
  2159. *************************************************************** 02147000
  2160. ** 02148000
  2161. ** XREAD--READ AN LINE FROM CORE 02149000
  2162. ** 02150000
  2163. ** INPUT-- 02151000
  2164. ** R14--RETURN ADDRESS 02152000
  2165. ** 02153000
  2166. ** OUTPUT-- 02154000
  2167. ** THE NEXT LINE IN 'INPLINE' 02155000
  2168. ** 02156000
  2169. ** EXITS-- 02157000
  2170. ** VIA R14 ONLY 02158000
  2171. ** 0(,R14) = END OF FILE 02159000
  2172. ** 4(,R14) = NORMAL READ 02160000
  2173. ** 02161000
  2174. ** 02162000
  2175. *************************************************************** 02163000
  2176. SPACE 1 02164000
  2177. XREAD EQU * @V2D4821 02165000
  2178. UPITEM INPFILE @V2D4821 02166000
  2179. TM UPDFLAG,INCOR IN-CORE FILE?? @V2D4821 02167000
  2180. BNO XREADF NO.. READ FROM DISK @V2D4821 02168000
  2181. ST R14,REGSAV SAVE R14 @V2D4821 02169000
  2182. BAL R14,XNEXT CALL XNEXT TO DO THE WORK @V2D4821 02170000
  2183. B XRDEOF @V2D4821 02171000
  2184. RDMVC MVC INPLINE(80),8(R1) MOVE DATA INTO INPLINE @V2D4821 02172000
  2185. * 02173000
  2186. XREADA EQU * SECONDARY ENTRY POINT @V2D4821 02174000
  2187. L R14,REGSAV RESTORE R14 @V2D4821 02175000
  2188. B 4(,R14) AND RETURN TO CALLER @V2D4821 02176000
  2189. * 02177000
  2190. XRDEOF L R14,REGSAV RESTORE R14 @V2D4821 02178000
  2191. LA R15,12 SET E-O-F RC @V2D4821 02179000
  2192. BR R14 RETURN TO EOF @V2D4821 02180000
  2193. SPACE 1 02181000
  2194. XREADF FSREAD FSCB=INPFILE,ERROR=XREADR @V2D4821 02182000
  2195. B 4(,R14) RETURN @V2D4821 02183000
  2196. XREADR BR R14 @V2D4821 02184000
  2197. EJECT 02185000
  2198. * 02186000
  2199. SPACE 2 02187000
  2200. *************************************************************** 02188000
  2201. ** 02189000
  2202. ** XNEXT -- CHAIN TO NEXT LINE IN CORE 02190000
  2203. ** WITHOUT MOVING THE CONTENTS 02191000
  2204. ** 02192000
  2205. ** CALL: 02193000
  2206. ** BAL 14,XNEXT 02194000
  2207. ** 02195000
  2208. ** ACTION: 02196000
  2209. ** SETS NEW VALUE OF READ POINTER (PTR2); 02197000
  2210. ** 02198000
  2211. ** EXIT: 02199000
  2212. ** BR R14 IF E-O-F DETECTED 02200000
  2213. ** B 4(,R14) NORMALLY 02201000
  2214. ** 02202000
  2215. ** 02203000
  2216. *************************************************************** 02204000
  2217. SPACE 1 02205000
  2218. XNEXT EQU * @V2D4821 02206000
  2219. L R15,PTR2 LOAD POINTER @V2D4821 02207000
  2220. L R1,0(,R15) PTR TO NEXT ITEM @V2D4821 02208000
  2221. LTR R1,R1 EOF? @V2D4821 02209000
  2222. BZ XNEXT1 BRANCH IF SO @V2D4821 02210000
  2223. ST R1,PTR2 SAVE NEW READ PTR @V2D4821 02211000
  2224. B 4(,R14) @V2D4821 02212000
  2225. SPACE 1 02213000
  2226. XNEXT1 EQU * @V2D4821 02214000
  2227. LR R1,R15 RETURN OLD PTR @V2D4821 02215000
  2228. BR R14 RETURN EOF @V2D4821 02216000
  2229. SPACE 2 02217000
  2230. *************************************************************** 02218000
  2231. ** 02219000
  2232. ** XDELE--DELETE LINE FROM CORE 02220000
  2233. ** 02221000
  2234. ** INPUT-- 02222000
  2235. ** R14--RETURN REGISTER 02223000
  2236. ** PTR2-- POINTS TO LINE TO BE REMOVED 02224000
  2237. ** 02225000
  2238. ** OUTPUT-- 02226000
  2239. ** MODIFIED LIST 02227000
  2240. ** 02228000
  2241. ** EXITS-- 02229000
  2242. ** RETURN VIA R14 ONLY 02230000
  2243. ** 02231000
  2244. ** 02232000
  2245. *************************************************************** 02233000
  2246. SPACE 1 02234000
  2247. XDELE EQU * @V2D4821 02235000
  2248. ST R14,REGSAV SAVE RETURN @V2D4821 02236000
  2249. L R1,PTR2 GR1=>DEL-1 @V2D4821 02237000
  2250. L R1,4(,R1) BACKUP ONE @V2D4821 02238000
  2251. ST R1,PTR2 UPDATE POINTER @V2D4821 02239000
  2252. L R15,FPTR LOAD FREE-LIST POINTER @V2D4821 02240000
  2253. L R2,0(,R1) GR2=>DEL @V2D4821 02241000
  2254. L R14,SPARES NUMBER OF SPARES @V2D4821 02242000
  2255. LA R14,1(,R14) ADD ONE @V2D4821 02243000
  2256. ST R14,SPARES AND SAVE AS NEW VALUE @V2D4821 02244000
  2257. L R14,0(,R2) NO, GR14=>DEL+1 @V2D4821 02245000
  2258. ST R14,0(,R1) DEL-1=>DEL+1 @V2D4821 02246000
  2259. LTR R14,R14 IS DEL+1=EOF @V2D4821 02247000
  2260. BZ NOBKCHN YES, DON'T BACK-CHAIN EOF @V2D4821 02248000
  2261. ST R1,4(,R14) NO, DEL-R1<=DEL+R1 @V2D4821 02249000
  2262. NOBKCHN ST R15,0(,R2) DEL=>FREE-LIST @V2D4821 02250000
  2263. ST R2,FPTR FPTR=>DEL @V2D4821 02251000
  2264. B XREADA AND RETURN THROUGH 'XREAD' @V2D4821 02252000
  2265. EJECT 02253000
  2266. * SUBROUTINE TO RIGHT-JUSTIFY AND PAD WITH ZEROES AN EIGHT- 02254000
  2267. * CHARACTER FIELD. ADJUSTED FOR EIGHT OR FIVE-DIGIT SERIALS. 02255000
  2268. * 02256000
  2269. JUSTIFY EQU * 02257000
  2270. STM R0,R5,20(R13) SAVE REGS IN SAVE AREA 02258000
  2271. LA R1,ACTVFLD SCAN THE ACTIVE PARAMETER 02259000
  2272. LA R4,1(0,0) INCREMENT... 02260000
  2273. LA R5,ACTVFLD+7 END OF SCAN 02261000
  2274. LM R2,R3,CZEROES UNPACKED DECIMAL ZEROES 02262000
  2275. JUSTLOP EQU * SCAN INPUT FIELD 02263000
  2276. CLI 0(R1),X'40' STOP ON A BLANK 02264000
  2277. BE JUSTEND 02265000
  2278. CLI 0(R1),C'0' MUST BE VALID NUMERICS 02266000
  2279. BL JUSTSET NO - SET TO ZERO 02267000
  2280. CLI 0(R1),C'9' ...THIS IS UPPER LIMIT 02268000
  2281. BNH JUSTNUM O.K. - LET IT PASS 02269000
  2282. JUSTSET EQU * SET INVALID NUMERIC TO ZERO 02270000
  2283. B INVCHAR INVALID CHAR IN SEQ. NUM P3059 02271000
  2284. JUSTNUM EQU * CONTINUE WITH JUSTIFICATION 02272000
  2285. SLDL R2,8(0) SHIFT LEFT ONE CHARACTER 02273000
  2286. IC R3,0(0,R1) INSERT ONE LOW-ORDER 02274000
  2287. BXLE R1,R4,JUSTLOP ADVANCE + CONTINUE 02275000
  2288. JUSTEND EQU * R2,R3 NOW CONTAIN JUSTIFIED FIELD 02276000
  2289. TM GLOBALS,SEQ8 EIGHT-DIGIT SEQUENCING ? 02277000
  2290. BO *+8 YES - USE FULL FIELD 02278000
  2291. SLDL R2,24(0) LEFT-JUSTIFY FIVE DIGITS FOR COMPARE 02279000
  2292. STM R2,R3,ACTVFLD REPLACE INPUT FIELD 02280000
  2293. LM R0,R5,20(R13) RESTORE REGS USED 02281000
  2294. BR R14 RETURN TO CALLER 02282000
  2295. EJECT 02283000
  2296. * 02284000
  2297. * SUBROUTINE TO SCAN OUT NEXT FIELD FROM UPDATE CONTROL CARD 02285000
  2298. * 02286000
  2299. SCANUPD EQU * SCAN FIELD FROM 'UPDLINE' 02287000
  2300. LA R1,UPDLINE BUFFER START 02288000
  2301. B NXTPARM 02289000
  2302. SCANCTL EQU * SCAN FIELD FROM 'CTLBUFF' 02290000
  2303. LA R1,CTLBUFF BUFFER START 02291000
  2304. SPACE 02292000
  2305. NXTPARM EQU * SCAN OUT BLANK-DELIMITED FIELDS 02293000
  2306. STM R0,R4,20(R13) SAVE VOLATILE REGISTERS 02294000
  2307. LR R4,R1 SAVE BUFFER START ADDRESS 02295000
  2308. LA R3,SEQFELD-1(0,R1) LAST BYTE TO BE SCANNED 02296000
  2309. LA R2,1(0,0) INCREMENT... 02297000
  2310. L R1,80(0,R1) LAST SCANNED BYTE 02298000
  2311. MVC ACTVFLD(9),BLANKS BLANK OUT FIELD P3059 02299000
  2312. CLR R1,R3 ANYTHING LEFT TO SCAN ? 02300000
  2313. BNL NXTPEND NO - HIT END OF LINE 02301000
  2314. NBKSCAN EQU * SCAN TO NON-BLANK 02302000
  2315. CLI 0(R1),X'40' 02303000
  2316. BNE NBKFUND 02304000
  2317. BXLE R1,R2,NBKSCAN ADVANCE + CONTINUE 02305000
  2318. NXTPEND EQU * HIT END OF THE LINE 02306000
  2319. LR R1,R4 RESTORE START ADDRESS 02307000
  2320. ST R1,80(0,R1) RESET POINTERS TO BEGINNING 02308000
  2321. NXTPCC1 EQU * SET CC = 1 02309000
  2322. TM *+1,X'FF' SET COND. CODE ONE 02310000
  2323. B NXTPCCX GO TO RETURN @VA01031 02311000
  2324. NBKFUND EQU * FOUND NON-BLANK START OF FIELD 02312000
  2325. LR R0,R1 REMEMBER WHERE WE ARE 02313000
  2326. LA R1,1(0,R1) SKIP ONE CHARACTER 02314000
  2327. BLKSCAN EQU * SCAN TO BLANK 02315000
  2328. CLI 0(R1),X'40' 02316000
  2329. BE BLKFUND 02317000
  2330. BXLE R1,R2,BLKSCAN ADVANCE + CONTINUE 02318000
  2331. BLKFUND EQU * FOUND END OF FIELD 02319000
  2332. ST R1,80(0,R4) SAVE SCAN POINTER 02320000
  2333. LR R2,R0 START OF FIELD 02321000
  2334. SR R1,R0 FIELD LENGTH 02322000
  2335. BNP NXTPCC1 SET CC = 1 02323000
  2336. CH R1,=H'8' MAXIMUM LENGTH = 8 CHARACTERS 02324000
  2337. BNH MVEPRM O.K. P3059 02325000
  2338. LA R1,8 MOVE 9 CHARACTERS P3059 02326000
  2339. EX R1,NXTPMVC TO ERROR FIELD P3059 02327000
  2340. TM *,X'FF' SET COND. CODE FOUR @VA01031 02328000
  2341. B NXTPCCX GO TO RETURN @VA01031 02329000
  2342. MVEPRM EQU * P3059 02330000
  2343. EX R1,NXTPMVC MOVE DATA TO 'ACTVFLD' 02331000
  2344. CR R1,R1 SET CC = 0 02332000
  2345. NXTPCCX EQU * @VA01031 02333000
  2346. LM R0,R4,20(R13) RESTORE REGISTERS 02334000
  2347. BR R14 02335000
  2348. SPACE 02336000
  2349. NXTPMVC MVC ACTVFLD(*-*),0(R2) MOVE FIELD TO BUFFER 02337000
  2350. EJECT 02338000
  2351. * SUBROUTINES TO TYPE OUT THE LAST CONTROL CARD AND PREVIOUS 02339000
  2352. * CONTROL CARD FROM THE UPDATE FILE 02340000
  2353. * NOTHING IS TYPED IF THE 'NOTERM' OPTION WAS SPECIFIED. 02341000
  2354. CTLTYPE EQU * P3027 02342000
  2355. LA R15,LASTCTLL POINT TO LAST CONTROL CARD P3027 02343000
  2356. B CTL1 GO TO COMMON CODE P3027 02344000
  2357. SPACE 1 02345000
  2358. CTLPTYPE EQU * P3027 02346000
  2359. LA R15,PREVCTLL POINT TO PREV CONTROL CARD P3027 02347000
  2360. SPACE 1 02348000
  2361. * COMMON CODE FOR THE TWO SUBROUTINES. 02349000
  2362. CTL1 EQU * P3027 02350000
  2363. TM GLOBALS,TERM IS 'TERM' IN EFFECT? 02351000
  2364. BCR 8,R14 (BZ 0(R14)) JUST RETURN IF NOT 02352000
  2365. STM R14,R5,LTSAVE SAVE MODIFIED REGISTERS 02353000
  2366. LH R4,LASTCTLI-LASTCTLL(,R15) GET ITEM NUMBER OF THE P3027*02354000
  2367. RECORD TO BE TYPED P3027 02355000
  2368. LR R3,R15 POINT TO TEXT FOR LINE P3027 02356000
  2369. LINEDIT TEXT=' ',DOT=NO 02357000
  2370. LA R2,UPDFILE POINT TO UPDATE FILE FSCB 02358000
  2371. B LINTYPEC ENTER LINTYPE CODE 02359000
  2372. SPACE 3 02360000
  2373. LASTCTLL DS CL80 BUFFER FOR LAST CONTROL CARD 02361000
  2374. LASTCTLI DS H ITEM NUMBER FOR CONTROL CARD 02362000
  2375. PREVCTLL DS CL80 PREVIOUS CONTROL CARD P3027 02363000
  2376. PREVCTLI DS H ITEM NUMBER P3027 02364000
  2377. LTSAVE DS 8F SAVE AREA 02365000
  2378. EJECT 02366000
  2379. * SUBROUTINE TO TYPE A LINE FROM A FILE ON THE TERMINAL. DOES NOT 02367000
  2380. * TYPE IF 'NOTERM' HAS BEEN SPECIFIED. 02368000
  2381. LINTYPE EQU * 02369000
  2382. TM GLOBALS,TERM IS 'TERM' IN EFFECT? 02370000
  2383. BCR 8,R14 (BZ 0(R14)) JUST RETURN IF NOT 02371000
  2384. SPACE 02372000
  2385. * ENTER HERE INSTEAD IF YOU WANT TO TYPE IT EVEN IF 'NOTERM' IS ON. 02373000
  2386. LINTYPEF EQU * 02374000
  2387. STM R14,R5,LTSAVE SAVE REGISTERS 02375000
  2388. LR R2,R1 SAVE POINTER TO FSCB IN R2 02376000
  2389. L R3,BUFF(,R2) POINT TO BUFFER OF FSCB 02377000
  2390. LH R4,ITEM(,R2) LOAD LAST ITEM NUMBER 02378000
  2391. SPACE 3 02379000
  2392. * ENTER HERE FROM CTLTYPE CODE 02380000
  2393. LINTYPEC EQU * 02381000
  2394. LA R1,SHRTLEN ASSUME SHORT LENGTH MESSAGE 02382000
  2395. CLC SEQFELD(8,R3),BLANKS BUT IS THERE A SEQUENCE FIELD? 02383000
  2396. BE *+8 SKIP IF THERE IS NOT 02384000
  2397. LA R1,LNGLEN OTHERWISE, MUST USE LONG MSG 02385000
  2398. STC R1,LINTEXTL SET TEXT LENGTH FOR DMSERR 02386000
  2399. LINEDIT TEXTA=LINTEXTL,RENT=NO, TYPE OUT LINE *02387000
  2400. SUB=(CHAR8A,8(R2),DEC,(R4),CHARA,(R3),CHARA,SEQFELD(R3)) 02388000
  2401. LM R14,R5,LTSAVE RESTORE REGISTERS 02389000
  2402. BR R14 RETURN TO CALLER 02390000
  2403. SPACE 5 02391000
  2404. * TEXT FOR THE LINEDIT CALL 02392000
  2405. LINTEXTL DC AL1(SHRTLEN) TEXT LENGTH 02393000
  2406. LINTEXT DC C'FILE ''',20C'.',C''', REC # ......... = ',72C'.' 02394000
  2407. SHRTLEN EQU *-LINTEXT LENGTH OF SHORT MESSAGE 02395000
  2408. DC C' (........)' 02396000
  2409. LNGLEN EQU *-LINTEXT LENGTH OF LONG MESSAGE 02397000
  2410. DS 0H 02398000
  2411. EJECT 02399000
  2412. * SUBROUTINE TO TYPE AND PRINT THE ERROR MESSAGE IN ERRBUFF. IT IS 02400000
  2413. * NOT PRINTED, HOWEVER, IF THE 'NOTERM' OPTION WAS SPECIFIED. 02401000
  2414. BUFFOUT EQU * 02402000
  2415. TM GLOBALS,TERM IS 'TERM' IN EFFECT? 02403000
  2416. BZ BUFFOUTP GO PRINT IF NOT 02404000
  2417. LINEDIT TEXTA=ERRBUFF,DISP=ERRMSG TYPE OUT ERROR MSG 02405000
  2418. SPACE 02406000
  2419. BUFFOUTP EQU * 02407000
  2420. BAL R1,CLRLOGB CLEAR LOG FILE 02408000
  2421. IC R1,ERRBUFF GET LENGTH OF ERROR MSG 02409000
  2422. BCTR R1,0 GET (LENGTH-1) 02410000
  2423. EX R1,BUFFMVE MOVE INTO LOG BUFFER 02411000
  2424. BAL R15,LOGIT LOG THE LOG BUFFER 02412000
  2425. BR R14 RETURN TO OUR CALLER 02413000
  2426. SPACE 2 02414000
  2427. BUFFMVE MVC LOGBUFF(0),ERRBUFF+1 LENGTH FILLED IN BY EX 02415000
  2428. SPACE 02416000
  2429. ERRBUFF DS 97X,0H 02417000
  2430. EJECT 02418000
  2431. * LOGGING SUBROUTINES 02419000
  2432. SPACE 2 02420000
  2433. * CLEAR THE LOG BUFFER 02421000
  2434. CLRLOGB EQU * 02422000
  2435. MVI LOGBUFF,C' ' 02423000
  2436. MVC LOGBUFF+1(95),LOGBUFF CLEAR THE LOG BUFFER 02424000
  2437. BR R1 RETURN TO CALLER 02425000
  2438. SPACE 5 02426000
  2439. * SUBROUTINE TO LOG A LINE ONTO THE LOG FILE. 02427000
  2440. LOGIT EQU * 02428000
  2441. STM R14,R5,LOGSAVE SAVE IMPORTANT REGISTERS 02429000
  2442. BAL R2,CHKTITL CHECK FOR PAGE OVERFLOW 02430000
  2443. LA R3,LOGBUFF-1 POINT TO LOG BUFFER 02431000
  2444. BAL R2,LOGOUT PUT LINE INTO LOG FILE 02432000
  2445. LM R14,R5,LOGSAVE RESTORE REGS 02433000
  2446. BR R15 RETURN TO CALLER 02434000
  2447. SPACE 2 02435000
  2448. LOGSAVE DS 8F 02436000
  2449. SPACE 1 02437000
  2450. *************************************************************** 02438000
  2451. * 02439000
  2452. * XCLOSE IS A SUBROUTINE WHICH SETS THE TOP LINE AS THE 02440000
  2453. * CURRENT LINE. 02441000
  2454. * 02442000
  2455. * CALL: 02443000
  2456. * BAL 14,XCLOSE 02444000
  2457. * 02445000
  2458. * 02446000
  2459. *************************************************************** 02447000
  2460. SPACE 1 02448000
  2461. XCLOSE EQU * @V2D4821 02449000
  2462. TM UPDFLAG,INCOR IS CMSUT1 IN-CORE ??? @V2D4821 02450000
  2463. BNO 0(,R14) NO, IGNORE THIS CALL @V2D4821 02451000
  2464. LA R1,PTR1 POINT TO 'TOP' OF FILE @V2D4821 02452000
  2465. ST R1,PTR2 RESET READ POINTER @V2D4821 02453000
  2466. BR R14 AND RETURN TO CALLER @V2D4821 02454000
  2467. EJECT 02455000
  2468. ************** 02456000
  2469. * 02457000
  2470. * CORINIT IS A SUBROUTINE WHICH INITIALIZES CORE. 02458000
  2471. * 02459000
  2472. * 1. COMPUTES NO. OF BYTES REQUIRED PER LINE (CORITE 02460000
  2473. * 2. CALLS GETMAIN 02461000
  2474. * 3. COMPUTES NUMBER OF LINES WE CAN FIT IN (SPARES) 02462000
  2475. * 02463000
  2476. * CALL: 02464000
  2477. * BAL R8,CORINIT 02465000
  2478. * 02466000
  2479. * 02467000
  2480. ************** 02468000
  2481. SPACE 1 02469000
  2482. CORINIT EQU * @V2D4821 02470000
  2483. L R0,FFREE ALLOW 5K FOR STACKING & CMS IO @V2D4821 02471000
  2484. DMSFREE DWORDS=(0),ERR=*,MIN=1 @V2D4821 02472000
  2485. LR R2,R1 SAVE STORAGE LOCATION @V2D4821 02473000
  2486. ST R0,FFREE AND NO. DBLWDS OBTAINED @V2D4821 02474000
  2487. GETMAIN VC,LA=LIMITS,A=FREEAD GET ALL WE CAN @V2D4821 02475000
  2488. LR R1,R2 RESTORE STORAGE LOACTION @V2D4821 02476000
  2489. L R0,FFREE AND NO. DBLWDS OBTAINED @V2D4821 02477000
  2490. DMSFRET DWORDS=(0),LOC=(1) GIVE BACK STACKING STORAGE @V2D4821 02478000
  2491. MVC AEXTEND(4),FREEAD @V2D4821 02479000
  2492. L R15,FREELEN @V2D4821 02480000
  2493. SR R14,R14 ZERO FOR DIVIDE @V2D4821 02481000
  2494. D R14,CORITEM NO. OF LINES WE CAN HANDLE @V2D4821 02482000
  2495. ST R15,SPARES SAVE AS SPARES @V2D4821 02483000
  2496. BR R8 RETURN @V2D4821 02484000
  2497. EJECT 02485000
  2498. * SUBROUTINE TO CHECK FOR PAGE OVERFLOW, AND TO PUT A TITLE LINE 02486000
  2499. * INTO THE LOG FILE IF IT OCCURS. 02487000
  2500. CHKTITL EQU * 02488000
  2501. L R1,CURRLINE GET CURRENT LINE NUMBER 02489000
  2502. LA R1,1(,R1) INCREMENT 02490000
  2503. ST R1,CURRLINE 02491000
  2504. C R1,=A(MAXLINE) IS IT LARGER THAN MAX? 02492000
  2505. BCR 13,R2 (BNL 0(R2)) JUST RETURN IF NOT 02493000
  2506. SPACE 02494000
  2507. * OTHERWISE, WE MUST TYPE OUT A TITLE LINE. 02495000
  2508. LA R1,2 RESET LINE NUMBER TO 2 02496000
  2509. ST R1,CURRLINE 02497000
  2510. MVI LOGBCTL,C'0' FORCE NEXT LINE TO DOUBLE SPACE 02498000
  2511. L R1,CURRPAGE INCREMENT PAGE COUNT 02499000
  2512. LA R1,1(,R1) 02500000
  2513. ST R1,CURRPAGE 02501000
  2514. SPACE 02502000
  2515. LINEDIT DISP=NONE,BUFFA=TITLBUFF,TEXTA=TITLEDIT,RENT=NO, *02503000
  2516. DOT=NO,COMP=NO, *02504000
  2517. SUB=(CHAR8A,INPFILE+8,CHAR8A,UPDFILE+8,DECA,CURRPAGE) 02505000
  2518. LA R3,TITLBUFF+1 POINT TO TITLE BUFFER 02506000
  2519. B LOGOUT AND PUT IT INTO LOG BUFFER 02507000
  2520. SPACE 3 02508000
  2521. TITLEDIT DC AL1(97) LENGTH OF BUFFER 02509000
  2522. DC C'1UPDATING ''',20C'.',C''' WITH ''',20C'.',C'''' 02510000
  2523. BLCOUNT EQU 98-25-(*-TITLEDIT) 25 = L'TITUP 02511000
  2524. DC (BLCOUNT)C' ' PAD WITH BLANKS 02512000
  2525. TITUP DC C'UPDATE LOG -- PAGE ......' 02513000
  2526. SPACE 02514000
  2527. TITLBUFF DS AL1(97),C'1',CL96 02515000
  2528. LOGBCTL DC C' ' CONTROL CHAR IS BLANK 02516000
  2529. LOGBUFF DS CL96 02517000
  2530. SPACE 02518000
  2531. BLANKS DC CL97' ' 02519000
  2532. SPACE 02520000
  2533. CURRLINE DC A(MAXLINE) CURRENT LINE NUMBER 02521000
  2534. CURRPAGE DC F'0' CURRENT PAGE NUMBER 02522000
  2535. MAXLINE EQU 60 MAXIMUM LINE NUMBER BEFORE OVFL 02523000
  2536. EJECT 02524000
  2537. * SUBROUTINE TO DO THE ACTUAL READBUF OR PRINTING 02525000
  2538. LOGOUT EQU * 02526000
  2539. TM GLOBALS,DISK IS 'DISK' IN EFFECT, OR 'PRINT'? 02527000
  2540. BO LOGOUTD GO IF 'DISK' 02528000
  2541. SPACE 02529000
  2542. PRINTL (R3),97,ERROR=RETRY @VA03253 02530000
  2543. B LOGOUTX GO FINISH UP 02531000
  2544. RETRY EQU * @VA03253 02532000
  2545. CH R15,=H'2' IS IT 12 PUNCH? @VA03253 02533000
  2546. BE RESTART @VA03253 02534000
  2547. CH R15,=H'3' IS IT 9 PUNCH? @VA03253 02535000
  2548. BE RESTART @VA03253 02536000
  2549. BNE LOGOUTX NO, GET OUT @VA03253 02537000
  2550. RESTART MVI 0(R3),C'+' SUPPRESS SPACE @VA03253 02538000
  2551. PRINTL (R3),97 RETRY @VA03253 02539000
  2552. MVI 0(R3),C' ' RESTORE SINGLE SPACE @VA03253 02540000
  2553. B LOGOUTX RETURN @VA03253 02541000
  2554. SPACE 02542000
  2555. LOGOUTD EQU * 02543000
  2556. FSWRITE FSCB=LOGFILE,BUFFER=(R3),BSIZE=97,ERROR=OUTERR 02544000
  2557. SPACE 2 02545000
  2558. * A KLUDGE: IF WE DOUBLE-SPACED, THEN WE CHANGE CTL CHAR FROM '0' TO 02546000
  2559. * BLANK. 02547000
  2560. LOGOUTX EQU * 02548000
  2561. CLI 0(R3),C'0' DID WE DOUBLE-SPACE? 02549000
  2562. BNE *+8 SKIP IF NOT 02550000
  2563. MVI 0(R3),C' ' RESET TO BLANK 02551000
  2564. BR R2 RETURN TO CALLER 02552000
  2565. EJECT 02553000
  2566. * SUBROUTINE TO CLOSE THE LOG FILE 02554000
  2567. LOGCLOSE EQU * 02555000
  2568. CLC CURRPAGE,=F'0' ANYTHING WRITTEN OUT? 02556000
  2569. BCR 8,R14 (BE 0(R14)) JUST RETURN IF NOT 02557000
  2570. STM R14,R5,LOGSAVE SAVE REGS 02558000
  2571. TM GLOBALS,DISK ARE WE LOGGING TO DISK? 02559000
  2572. BO LOGCLD GO IF WE ARE 02560000
  2573. SPACE 02561000
  2574. * OTHERWISE, WE CLOSE THE PRINTER, SPECIFYING A NAME OF 'FNAME UPDLOG' 02562000
  2575. LINEDIT DISP=CPCOMM,DOT=NO, *02563000
  2576. SUB=(CHAR8A,LOGFILE+8), *02564000
  2577. TEXT='CLOSE PRT NAME .................' 02565000
  2578. B LOGCLC GO RETURN 02566000
  2579. SPACE 02567000
  2580. LOGCLD EQU * 02568000
  2581. FSCLOSE FSCB=LOGFILE CLOSE THE LOG DISK FILE 02569000
  2582. SPACE 02570000
  2583. LOGCLC EQU * 02571000
  2584. LM R14,R5,LOGSAVE RESTORE REGS 02572000
  2585. BR R14 RETURN TO CALLER 02573000
  2586. EJECT 02574000
  2587. * 02575000
  2588. * DATA AREAS, CONSTANTS, STATUS CONTROL, CMS P-LISTS 02576000
  2589. * 02577000
  2590. REPSCAN DS F SCAN SAVE FOR 'REPLACE' FUNCTION 02578000
  2591. SPACE 02579000
  2592. DS 0D 02580000
  2593. SEQSTRT DC CL8'00000000' START SEQ. FOR FUNCTION 02581000
  2594. SEQLAST DC CL8'00000000' ENDNG SEQ. FOR FUNCTION 02582000
  2595. SEQPOSN DC CL8'00000000' FILE POSITION 02583000
  2596. SEQNEXT DC CL8'00000000' NEXT RE-SEQUENCE FIELD 02584000
  2597. ISEQLAST DC CL8'00000000' LAST INPUT FILE SEQUENCE NUMBER 02585000
  2598. OSEQLAST DC CL8'00000000' LAST OUTPUT FILE SEQUENCE NUMBER 02586000
  2599. CORITEM DC F'88' TOTAL ITEM LENGTH IN-CORE @V2D4821 02587000
  2600. FFREE DC F'650' 15K WORTH OF DOUBLE WDS. @V2D4821 02588000
  2601. LIMITS DC F'88' LOWER LIMIT FOR GETMAIN @V2D4821 02589000
  2602. DC X'00FFFFF8' MAX. 16 MEG MACHINE @VA05026 02590000
  2603. FREEAD DC A(0) ADDRESS OF GETMAINED STORAGE @V2D4821 02591000
  2604. FREELEN DC F'0' LENGTH OF GETMAINED STORAGE @V2D4821 02592000
  2605. FPTR DC A(0) START OF FREELIST CHAIN @V2D4821 02593000
  2606. PTR1 DC A(0,0) 'TOP' POINTER @V2D4821 02594000
  2607. PTR2 DC A(PTR1) POINTER TO CURRENT LINE @V2D4821 02595000
  2608. AEXTEND DC A(0) CURRENT LIMIT OF EXTEND @V2D4821 02596000
  2609. SPARES DC F'0' NUMBER OF AVAILABLE LINES LEFT IN CH@V2D4821 02597000
  2610. REGSAV DS 1F REGISTER SAVE AREA @V2D4821 02598000
  2611. SEQFOLD DC PL5'0' NEXT RE-SEQUENCE FIELD VALUE 02599000
  2612. SEQINCR DC PL5'10' RE-SEQUENCE INCREMENT 02600000
  2613. SEQLABL DC CL3'000' THREE-CHAR SEQUENCE ID FIELD 02601000
  2614. SEQFELD EQU 72 SEQUENCE = COLS. 73-80 02602000
  2615. SPACE 02603000
  2616. DC C'* ' MUST PRECEDE 'UPLEVEL' 02604000
  2617. UPLEVEL DC CL5' ' HIGHEST-LEVEL UPDATE APPLIED 02605000
  2618. DFLEVEL DC CL5'TEXT ' CURRENT LEVEL BEING EXAMINED 02606000
  2619. SPACE 02607000
  2620. DS 0F 02608000
  2621. CZEROES DC CL8'00000000' CONSTANT ZEROES FIELD 02609000
  2622. FNAME DS CL8 FILENAME 02610000
  2623. UPDNEXT DC CL8'00000000' NEXT SEQUENCE FIELD FOR UPDATE P3059 02611000
  2624. ACTVFLD DC CL8' ' ACTIVE CONTROL CARD FIELD P3059 02612000
  2625. DC CL1' ' FOR OVERFLOW WHEN TOO MANY CHAR P3059 02613000
  2626. SPACE 2 02614000
  2627. UPDSTRT DC PL5'0' START FOR GENERATING SEQUENCE ON UPDATES 02615000
  2628. UPDINCR DC PL5'1000' GENERATION INCREMENT 02616000
  2629. PAKZERO DC PL5'0' CONSTANT DECIMAL ZERO 02617000
  2630. SEQMAX DC P'100000000' MAX SEQUENCE NUMBER P3027 02618000
  2631. UPDCODE DC C' ' FUNCTION-CODE CHARACTER (I,R,S,D) 02619000
  2632. SPACE 02620000
  2633. DS 0F 02621000
  2634. UPDLINE DC CL80' ',A(UPDLINE) CONTROL BUFFER 02622000
  2635. INPLINE DC CL80' ' SOURCE INPUT BUFFER 02623000
  2636. CTLBUFF DC CL80' ',A(CTLBUFF) CNTRL FILE BUFFER 02624000
  2637. SPACE 02625000
  2638. NOINTS DC X'00' SSM FOR NO EXTRANEOUS INTERRUPTS @VM03093 02626000
  2639. SPACE 02627000
  2640. DC C'* ' MUST PRECEDE 'CTLMACS' 02628000
  2641. CTLMACS DC CL72' ' SAVE BUFFER FOR 'MACS' RECORD 02629000
  2642. SPACE 02630000
  2643. ITEM EQU 26 DISP. IN P-LIST + FST TO ITEM NUMBER 02631000
  2644. BUFF EQU 28 02632000
  2645. EJECT 02633000
  2646. * 'GLOBALS' AND 'UPDFLAG' FLAG BYTES 02634000
  2647. SPACE 02635000
  2648. GLOBALS DC X'00' 02636000
  2649. SPACE 02637000
  2650. UPDN EQU X'80' AN UPDATE HAS BEEN DONE 02638000
  2651. SEQ8 EQU X'40' EIGHT-DIGIT SEQUENCE FIELDS 02639000
  2652. CTLF EQU X'20' CONTROL FILE OPTION WAS SPEC'D 02640000
  2653. INCL EQU X'10' 'INCLUDE' SEQ #'S FROM UPDATES 02641000
  2654. NSTK EQU X'08' DO NOT STACK MULTI-LEVEL RESULTS 02642000
  2655. DISK EQU X'04' UPDATE LOG ON DISK (NOT PRINTED) 02643000
  2656. REPL EQU X'02' 'REPLACE' OPTION SPECIFIED 02644000
  2657. TERM EQU X'01' WARNING MESSAGES TO TERMINAL 02645000
  2658. SPACE 2 02646000
  2659. UPDFLAG DC X'00' 02647000
  2660. SPACE 02648000
  2661. RSEQ EQU X'80' RESEQUENCE THE OUTPUT FILE 02649000
  2662. SGEN EQU X'40' GENERATE SEQ FIELDS FOR UPDATES 02650000
  2663. AUXF EQU X'20' WORKING WITH AUXILIARY FILE 02651000
  2664. DELT EQU X'10' DELETE FUNCTION NOW IN PROGRESS 02652000
  2665. FULL EQU X'08' BUFFER CONTAINS DATA IN LIMBO 02653000
  2666. INCOR EQU X'04' PROCESS CMSUT1 FILE IN-CORE @V2D4821 02654000
  2667. TAIL EQU X'02' PROCESSING NORMAL EOF ON INPUT 02655000
  2668. FULI EQU X'01' LAST BUFFER LINE FROM INPUT FILE 02656000
  2669. SPACE 1 02657000
  2670. UPDFLAG2 DC X'00' @V2D4821 02658000
  2671. SPACE 2 02659000
  2672. * FLAG DOSF IS USED TO SAVE THE CONTENTS OF THE DOS SIMULATION FLAGS 02660000
  2673. * LOCATED IN NUCON. 02661000
  2674. DOSF DS X @V305066 02662000
  2675. SPACE 2 02663000
  2676. RC28 EQU 28 RETURN CODE = 28 @V305066 02664000
  2677. SPACE 1 02665000
  2678. FINISH EQU X'01' @V2D4821 02666000
  2679. EJECT 02667000
  2680. * FSCB'S FOR ALL FILES 02668000
  2681. SPACE 02669000
  2682. * FSCB FOR INPUT FILE 02670000
  2683. INPFILE FSCB 'FNAME ASSEMBLE',BUFFER=INPLINE,BSIZE=80 02671000
  2684. INPPTRS DS 2A POINTERS TO ADT AND FST 02672000
  2685. SPACE 02673000
  2686. * FSCB FOR UPDATE FILE 02674000
  2687. UPDFILE FSCB '$FNAME UPDATE',BUFFER=UPDLINE,BSIZE=80 02675000
  2688. UPDPTRS DS 2A POINTERS TO ADT AND FST 02676000
  2689. SPACE 02677000
  2690. * FSCB FOR UTILITY FILE 02678000
  2691. UT1FILE FSCB 'UPDATE CMSUT1',BUFFER=INPLINE,BSIZE=80 02679000
  2692. SPACE 02680000
  2693. * FSCB FOR LOG-TO-DISK FILE 02681000
  2694. LOGFILE FSCB 'FNAME UPDLOG',BUFFER=LOGBUFF,BSIZE=96 02682000
  2695. SPACE 02683000
  2696. * FSCB FOR 'FNAME UPDATES' FILE 02684000
  2697. UPSFILE FSCB 'FNAME UPDATES',BSIZE=80 02685000
  2698. SPACE 02686000
  2699. * FSCB FOR CONTROL FILE 02687000
  2700. CTLFILE FSCB 'FNAME CNTRL',BUFFER=CTLBUFF,BSIZE=80 02688000
  2701. CTLPTRS DS 2A POINTERS TO ADT AND FST 02689000
  2702. SPACE 02690000
  2703. * FSCB FOR AUXILIARY FILE 02691000
  2704. AUXFILE FSCB 'FNAME AUX....',BUFFER=CTLBUFF,BSIZE=80 02692000
  2705. AUXPTRS DS 2A POINTERS TO ADT AND FST 02693000
  2706. SPACE 02694000
  2707. PTRS EQU INPPTRS-INPFILE 02695000
  2708. PADT EQU PTRS 02696000
  2709. PFST EQU PTRS+4 02697000
  2710. FTSAVE DC CL8' ' FOR PREFERRED AUXFILE @V60C5CC 02698000
  2711. LISTMARK EQU X'FE' MARKS AVAILABLE AUXFILE SLOT @V60C5CC 02699000
  2712. LISTADR DC F'0' AUXFILE LIST ADDRESS @V60C5CC 02700000
  2713. RENAME DS 0D RENAME CMSUT1 FILE 02701000
  2714. DC CL8'RENAME' 02702000
  2715. DC CL8'UPDATE',CL8'CMSUT1',CL8'A1' 02703000
  2716. NEWNAME DC CL8'*-*',CL8'ASSEMBLE',CL8'A1' 02704000
  2717. FENCED DC 2F'-1' CONSTANT = 8X'FF' 02705000
  2718. SPACE 02706000
  2719. EJECT 02707000
  2720. STACKER DS 0D STACK A CONSOLE LINE 02708000
  2721. DC CL8'ATTN' 02709000
  2722. DC CL4'LIFO',AL1(74),AL3(CTLMACS-2) 02710000
  2723. SPACE 02711000
  2724. DTSTAMP DS 0D DATE + TIME STAMP A FILE 02712000
  2725. DC 2CL8'*-*',CL8'A1' FILE TO BE RECORDED 02713000
  2726. DTFNAME DC CL8'*-*',CL8'UPDATES',CL8'A1' 02714000
  2727. DC 2F'-1' 02715000
  2728. EJECT 02716000
  2729. LTORG 02717000
  2730. SPACE 2 02718000
  2731. DS 0D CORRECT ALIGNMENT FROM HERE ON 02719000
  2732. EJECT 02720000
  2733. * WE TYPE OUT A MESSAGE INDICATING THE PROBLEM. 02721000
  2734. WOVF EQU * 02722000
  2735. ST R14,WOVF14 SAVE REG 14 02723000
  2736. ST R0,WOVF0 SAVE REG 0 P3027 02724000
  2737. BAL R14,CTLTYPE TYPE LAST UPDATE CONTROL CARD 02725000
  2738. DMSERR DISP=NONE,BUFFA=ERRBUFF,NUM=176,LET=W, *02726000
  2739. SUB=(CHARA,(R0)), P3027*02727000
  2740. TEXT='SEQUENCING OVERFLOW FOLLOWING SEQ NUMBER ''.......*02728000
  2741. .''' 02729000
  2742. BAL R14,BUFFOUT GO TYPE AND PRINT MESSAGE 02730000
  2743. WARN 8 SET RETURN CODE TO 8 02731000
  2744. L R14,WOVF14 RESTORE REG 14 02732000
  2745. BR R14 RETURN TO CALLER 02733000
  2746. SPACE 02734000
  2747. WOVF14 DS A SAVE REG 14 02735000
  2748. WOVF0 DS A P3027 02736000
  2749. EJECT 02737000
  2750. * ABORT ERROR MESSAGES 02738000
  2751. SPACE 02739000
  2752. NOFNAME EQU * 02740000
  2753. DMSERR NUM=1,LET=E,TEXT='NO FILENAME SPECIFIED' 02741000
  2754. MVI RC,24 02742000
  2755. B ERETURN 02743000
  2756. SPACE 3 02744000
  2757. EXCESIV EQU * 02745000
  2758. DMSERR NUM=70,LET=E,SUB=(CHARA,(R2)), *02746000
  2759. TEXT='INVALID PARAMETER ''........''' 02747000
  2760. MVI RC,24 02748000
  2761. B ERETURN 02749000
  2762. SPACE 3 02750000
  2763. BADMODE EQU * 02751000
  2764. DMSERR NUM=48,LET=E,SUB=(CHARA,(R2)), *02752000
  2765. TEXT='INVALID MODE ''........''' 02753000
  2766. MVI RC,24 02754000
  2767. B ERETURN 02755000
  2768. SPACE 3 02756000
  2769. ERCMSUT EQU * 02757000
  2770. DMSERR NUM=24,LET=E,SUB=(CHAR8A,UT1FILE+8), *02758000
  2771. TEXT='FILE ''....................'' ALREADY EXISTS' 02759000
  2772. MVI RC,RC28 RETURN CODE @V305066 02760000
  2773. B ERETURN 02761000
  2774. SPACE 3 02762000
  2775. FMTERR EQU * 02763000
  2776. DMSERR NUM=7,LET=E,SUB=(CHAR8A,8(R2)), *02764000
  2777. TEXT='FILE ''....................'' IS NOT FIXED, 80 CHA*02765000
  2778. R. RECORDS' 02766000
  2779. MVI RC,32 02767000
  2780. B ERETURN 02768000
  2781. SPACE 3 02769000
  2782. NOFILE EQU * 02770000
  2783. DMSERR NUM=2,LET=E,SUB=(CHAR8A,8(R2)), *02771000
  2784. TEXT='FILE ''....................'' NOT FOUND' 02772000
  2785. MVI RC,28 02773000
  2786. B ERETURN 02774000
  2787. SPACE 3 02775000
  2788. NOFILEW EQU * 02776000
  2789. DMSERR NUM=180,LET=W,SUB=(CHAR8A,8(R2)), *02777000
  2790. TEXT='MISSING PTF FILE ''....................''' 02778000
  2791. WARN 12 02779000
  2792. B AUXREAD 02780000
  2793. SPACE 3 02781000
  2794. INPERR EQU * 02782000
  2795. LR R2,R1 SAVE POINTER TO PLIST 02783000
  2796. LR R3,R15 SAVE RETURN CODE 02784000
  2797. DMSERR NUM=104,LET=S,RENT=NO, *02785000
  2798. SUB=(DEC,(R3),CHAR8A,8(R2)), *02786000
  2799. TEXT='ERROR ''.........'' READING FILE ''...............*02787000
  2800. .....''' 02788000
  2801. MVI RC,100 02789000
  2802. B ERETURN 02790000
  2803. SPACE 3 02791000
  2804. OUTERR EQU * 02792000
  2805. LR R2,R1 SAVE PLIST POINTER 02793000
  2806. LR R3,R15 SAVE WRBUF RETURN CODE 02794000
  2807. DMSERR NUM=105,LET=S,RENT=NO, *02795000
  2808. SUB=(DEC,(R3),CHAR8A,8(R2)), *02796000
  2809. TEXT='ERROR ''.........'' WRITING FILE ''...............*02797000
  2810. .....''' 02798000
  2811. MVI RC,100 02799000
  2812. B ERETURN 02800000
  2813. SPACE 3 02801000
  2814. ERMACS EQU * 02802000
  2815. DMSERR NUM=179,LET=E,SUB=(CHAR8A,CTLFILE+8), *02803000
  2816. TEXT='MISSING OR DUPLICATE ''MACS'' CARD IN CONTROL FILE*02804000
  2817. ''....................''' 02805000
  2818. MVI RC,32 02806000
  2819. B ERETURN 02807000
  2820. SPACE 3 02808000
  2821. NOUPDATS EQU * 02809000
  2822. DMSERR NUM=181,LET=E,TEXT='NO UPDATE FILES WERE FOUND' 02810000
  2823. MVI RC,40 RETURN CODE = 40 02811000
  2824. B ERETURN 02812000
  2825. SPACE 3 02813000
  2826. INVOPTN EQU * 02814000
  2827. DMSERR NUM=3,LET=E,SUB=(CHARA,(R2)), *02815000
  2828. TEXT='INVALID OPTION ''........''' 02816000
  2829. MVI RC,24 02817000
  2830. B ERETURN 02818000
  2831. SPACE 3 02819000
  2832. OPTDUP EQU * 02820000
  2833. DMSERR NUM=65,LET=E,SUB=(CHARA,(R7)), *02821000
  2834. TEXT='''........'' OPTION SPECIFIED TWICE' 02822000
  2835. MVI RC,24 02823000
  2836. B ERETURN 02824000
  2837. SPACE 3 02825000
  2838. OPTCONF EQU * 02826000
  2839. DMSERR NUM=66,LET=E,RENT=NO, *02827000
  2840. SUB=(CHARA,(R4),CHARA,(R7)), *02828000
  2841. TEXT='''........'' AND ''........'' ARE CONFLICTING OPTI*02829000
  2842. ONS' 02830000
  2843. MVI RC,24 02831000
  2844. B ERETURN 02832000
  2845. SPACE 3 02833000
  2846. ERRW EQU * 02834000
  2847. DMSERR NUM=37,LET=E,TEXT='DISK ''A'' IS READ/ONLY' 02835000
  2848. MVI RC,36 RETURN CODE IS 36 02836000
  2849. B ERETURN 02837000
  2850. SPACE 3 02838000
  2851. ERRMSG36 EQU * @VA12416 02838500
  2852. LA R0,24(R2) POINT TO MODE LETTER @VA14398 02838600
  2853. B ERRMS36A @VA14398 02838700
  2854. NOTACCER EQU * P3059 02839000
  2855. LA R0,=C'A' POINT TO MODE LETTER @VA14398 02840000
  2856. ERRMS36A EQU * @VA14398 02840500
  2857. DMSERR TEXT='DISK ".." NOT ACCESSED',NUM=69, @VA14398X02841000
  2858. LET=E,SUB=(CHARA,((R0),1)) @VA14398 02841500
  2859. MVI RC,36 RETURN CODE @VA12416 02842000
  2860. B ERETURN RETURN TO CALLER P3059 02843000
  2861. SPACE 2 02844000
  2862. ERSC EQU * 02845000
  2863. DMSERR NUM=187,LET=E, *02846000
  2864. TEXT='OPTION ''STK'' INVALID WITHOUT ''CTL''' 02847000
  2865. MVI RC,24 02848000
  2866. B ERETURN 02849000
  2867. EJECT 02850000
  2868. * BAD CONTROL FILE CARD OR AUXILIARY FILE CARD. 02851000
  2869. BADCTLC EQU * 02852000
  2870. LA R1,CTLFILE POINT TO CONTROL FILE FSCB 02853000
  2871. LA R2,=CL7'CONTROL' FOR ERROR MESSAGE BELOW 02854000
  2872. B BADCARD GO TYPE MESSAGES 02855000
  2873. SPACE 02856000
  2874. BADAUXC EQU * 02857000
  2875. LA R1,AUXFILE POINT TO AUX FILE FSCB 02858000
  2876. LA R2,=CL7'AUX' FOR ERROR MESSAGE BELOW 02859000
  2877. SPACE 2 02860000
  2878. BADCARD EQU * 02861000
  2879. BAL R14,LINTYPEF TYPE OUT LINE OF FILE 02862000
  2880. DMSERR NUM=183,LET=E,SUB=(CHARA,(R2)), *02863000
  2881. TEXT='INVALID ....... FILE CONTROL CARD' 02864000
  2882. MVI RC,32 RETURN CODE = 32 02865000
  2883. B ERETURN 02866000
  2884. SPACE 1 02867000
  2885. SMALLCOR DMSERR NUM=300,LET=E,TEXT='INSUFFICIENT STORAGE TO BEGIN UPDATX02868000
  2886. E' @V2D4821 02869000
  2887. NI UPDFLAG,255-INCOR RESET IN-CORE FLAG @V2D4821 02870000
  2888. L R3,CKCOR CHECK FOR EXPLICIT INCORE OPTION @V2D4821 02871000
  2889. CLI 0(R3),C'S' WAS IT??? @V2D4821 02872000
  2890. BNE IMPLICIT NO... JUST 'CTL' , DO UPDATE ON DISK @V2D4821 02873000
  2891. MVI RC,41 SET RETURN CODE @VA04473 02874000
  2892. B ERETURN @V2D4821 02875000
  2893. SPACE 1 02876000
  2894. IMPLICIT DMSERR NUM=304,LET=I,TEXT='UPDATE PROCESSING WILL BE DONE USINX02877000
  2895. G DISK' @V2D4821 02878000
  2896. B SLOPPY DO UPDATE USING DISK @V2D4821 02879000
  2897. SPACE 2 02880000
  2898. CORBUST DMSERR NUM=299,LET=E,TEXT='INSUFFICIENT STORAGE TO COMPLETE UP*02881000
  2899. DATE' @V2D4821 02882000
  2900. MVI RC,41 SET RETURN CODE @VA04473 02883000
  2901. B ERETURN @V2D4821 02884000
  2902. EJECT 02885000
  2903. LTORG 02886000
  2904. EJECT 02887000
  2905. REGEQU 02888000
  2906. NUCON 02889000
  2907. FSTB 02890000
  2908. ADT 02891000
  2909. FVS HRC015DS 02891100
  2910. SPACE 2 02892000
  2911. LTORG 02893000
  2912. END DMSUPD 02894000