Table of Contents

DMSIFC Source

References

Source Listing

DMSIFC.ASSEMBLE.txt
  1. IFC TITLE 'DMSIFC (CMS) VM/370 - RELEASE 6' 00001000
  2. ISEQ 73,80 00002000
  3. *. 00003000
  4. * MODULE NAME - DMSIFC 00004000
  5. * 00005000
  6. * DESCRIPTIVE NAME - 00006000
  7. * 00007000
  8. * VM/370 INTERFACE MODULE TO THE OS/VS EREP (IFCEREP1) PROGRAM 00008000
  9. * 00009000
  10. * COPYRIGHT - NONE 00010000
  11. * 00011000
  12. * CHANGE ACTIVITY - NOT APPLICABLE 00012000
  13. * 00013000
  14. * CONTENTS - 00014000
  15. * 00015000
  16. * DMSIFC - CALLED BY CPEREP COMMAND. 00016000
  17. * DMSIFC0 - SIMULATE TRAPPED EXCP (SVC 0) TO SYS1.LOGREC. 00017000
  18. * DMSIFC18 - SIMULATE TRAPPED BLDL (SVC 18). 00018000
  19. * DMSIFC76 - HANDLE TRAPPED SVC 76. 00019000
  20. *. 00020000
  21. SPACE 3 00021000
  22. DMSIFC CSECT @V4085A8 00022000
  23. ENTRY DMSIFC0 @V4085A8 00023000
  24. ENTRY DMSIFC18 @V4085A8 00024000
  25. ENTRY DMSIFC76 @V4085A8 00025000
  26. EJECT 00026000
  27. *. 00027000
  28. * SUBROUTINE NAME - DMSIFC 00028000
  29. * 00029000
  30. * FUNCTION - 00030000
  31. * INTERFACE MODULE WHICH ALLOWS CLASS C, E OR 00031000
  32. * F VIRTUAL USERS TO EDIT AND PRINT VM/370 00032000
  33. * ERROR RECORDINGS UNDER CMS VIA THE OS/VS EREP 00033000
  34. * EDIT AND PRINT PROGRAM - IFCEREP1. 00034000
  35. * INTERFACE IS ALSO PROVIDED FOR CLEARING THE VM/370 00035000
  36. * ERROR RECORDING CYLINDERS BY A CLASS F USER. 00036000
  37. * 00037000
  38. * ATTRIBUTES - NON-REUSABLE, CMS USER AREA, CALLED BY CMS. 00038000
  39. * 00039000
  40. * ENTRY CONDITIONS - 00040000
  41. * 00041000
  42. * R1 = POINTER TO CMS PARAMETER LIST. 00042000
  43. * R13 = ADDRESS OF A STANDARD 72 BYTE SAVE AREA. 00043000
  44. * R14 = RETURN ADDRESS. 00044000
  45. * 00045000
  46. * PLIST - 00046000
  47. * CL8'CPEREP' 00047000
  48. * CL8'FILENAME' ---OPTIONAL--- 00048000
  49. * CL8'FILETYPE' ---OPTIONAL--- 00049000
  50. * CL8'FILEMODE' ---OPTIONAL--- 00050000
  51. * 00051000
  52. * EXIT CONDITIONS - 00052000
  53. * R0-R14 = RESTORED. 00053000
  54. * R15 = RETURN CODE. 00054000
  55. * 00055000
  56. * CALLS TO OTHER ROUTINES - 00056000
  57. * 00057000
  58. * IFCEREP1 - LINK TO OS/VS EREP PROGRAM WITH R1 CONTAINING 00058000
  59. * THE ADDRESS OF A FULLWORD WHICH IN TURN 00059000
  60. * CONTAINS THE ADDRESS OF AN OS FORMAT PARM 00060000
  61. * LIST. THE PARM LIST WILL BE AS FOLLOWS: 00061000
  62. * 00062000
  63. * -------------------------------------- 00063000
  64. * |CC| VARIABLE LENGTH CHARACTER STRING 00064000
  65. * ______________________________________ 00065000
  66. * 00066000
  67. * WHERE CC IS A TWO BYTE COUNT OF THE NUMBER 00067000
  68. * OF CHARACTERS OF PARAMETERS THAT FOLLOW. 00068000
  69. * THE VARIABLE LENGTH CHARACTER STRING WILL 00069000
  70. * CONSIST OF ANY PARAMETERS PASSED TO THIS 00070000
  71. * PROGRAM THAT ARE NOT RECOGNIZED AS 'CLEAR' 00071000
  72. * COMMANDS OR 'SHARE=' OR 'CTLCRD=' OR 'TERMINAL' 00072010
  73. * OR 'CONTROLLER='. 00072510
  74. * THERE WILL BE COMMAS BETWEEN THE PARAMETERS 00073000
  75. * IN THE PARM LIST. 00074000
  76. * DMSREA - CALLED VIA BALR, IT READS A SPECIFIED RECORD 00075000
  77. * FROM THE VM/370 ERROR RECORDING CYLINDERS. 00076000
  78. * DMKIOG - CALLED VIA DIAGNOSE TO CLEAR REQUESTED 00077000
  79. * RECORDING CYLINDERS. 00078000
  80. * STATE/STATEW - CMS FUNCTIONS CALLED VIA SVC. 00079000
  81. * ERASE - CMS FUNCTIONS CALLED VIA SVC. 00080000
  82. * INCLUDE - CMS FUNCTIONS CALLED VIA SVC. 00081000
  83. * OTHERS - SEE 'MACROS' SECTION BELOW. 00082000
  84. * 00083000
  85. * EXTERNAL REFERENCES - NONE 00084000
  86. * 00085000
  87. * TABLES / WORK AREAS 00086000
  88. * 00087000
  89. * WORKING STORAGE IS OBTAINED VIA A DMSFREE MACRO 00088000
  90. * FOR USE AS A WORK AREA IN WHICH TO BUILD THE 00089000
  91. * OS FORMAT PARM LIST. 00090000
  92. * 00091000
  93. * MACROS - TH 00092000
  94. * 00093000
  95. * OS MACROS 00094000
  96. * LINK - USED TO LINK TO IFCEREP1. 00095000
  97. * LOAD - LOADS DMSREA. 00096000
  98. * DELETE - DELETES DMSREA. 00097000
  99. * CMS MACROS 00098000
  100. * DMSERR 00099000
  101. * DMSKEY 00100000
  102. * HNDSVC 00101000
  103. * FSSTATE 00102000
  104. * FSOPEN 00103000
  105. * FSWRITE 00104000
  106. * FSCLOSE 00105000
  107. * DMSFREE 00106000
  108. * DMSFRET 00107000
  109. * TAPECTL 00108000
  110. * FSCB 00109000
  111. * WRTERM 00110000
  112. * RDTERM 00111000
  113. * WAITT 00112000
  114. * REGEQU 00113000
  115. * CMS DSECT MACROS 00114000
  116. * SVCSAVE - SYSTEM SAVE AREA. (FOR SVC INTERRUPTS.) 00115000
  117. * ADT - ACTIVE DISK TABLE BLOCK. 00116000
  118. * FSCBD - FILE SYSTEM CONTROL BLOCK. 00117000
  119. * FSTB - FILE STATUS TABLE BLOCK. 00118000
  120. * NUCON - LOW CORE IN CMS NUCLEUS. 00119000
  121. * 00120000
  122. * REGISTER USAGE - 00121000
  123. * 00122000
  124. * R0-R1 = PARAMETER REGS. 00123000
  125. * R2-R9 = SCRATCH. 00124000
  126. * R10-R11 = SPARES, NOT PRESENTLY USED. 00125000
  127. * R12 = BASE REGISTER. 00126000
  128. * R13 = SAVE AREA ADDRESS. 00127000
  129. * R14-R15 = LINK REGS. 00128000
  130. * 00129000
  131. * NOTES - 00130000
  132. * THIS MODULE SHOULD BE LOADED ONLY AT LOCATION X'20000' IN 00131000
  133. * STORAGE BECAUSE IT IS BUILT TO STRADDLE THE 4K PAGE BUFFER 00132000
  134. * WHICH DMSREA REQUIRES AT LOCATION X'21000'. 00133000
  135. * 00134000
  136. * OPERATION - (DMSIFC) 00135000
  137. * 00136000
  138. * 1. PERFORM STANDARD LINKAGE AND ADDRESSABILITY FUNCTIONS. 00137000
  139. * 2. INVOKE CMS LOAD FUNCTION TO LOAD AND RESOLVE VCON'S IN 00138000
  140. * ABOUT A DOZEN EREP OBJECT DECKS. (NOTE: ALL OTHER EREP 00139000
  141. * OBJECT DECKS GET BROUGHT INTO STORAGE LATER, AS NEEDED, 00140000
  142. * BY OS LOAD AND LINK MACROS ISSUED BY OS/VS EREP.) 00141000
  143. * 3. INVOKE 'STRINIT' FUNCTION. INDICATES THAT AREA ABOVE 00142000
  144. * PRESENTLY LOADED PROGRAMS IS BEGINNING OF FREE STORAGE. 00143000
  145. * (NOTE: OS LOAD AND LINK WILL ACQUIRE SPACE FROM FREE 00144000
  146. * STORAGE TO CONTAIN THE PROGRAMS THEY LOAD.) 00145000
  147. * 4. TURN OFF THE 'DOSSVC' FLAG IN THE CMS NUCLEUS SO THAT 00146000
  148. * OS SIMULATION IS USED. BUT SAVE A COPY OF 'DOSSVC' SO IT 00147000
  149. * CAN BE RESTORED LATER. 00148000
  150. * SET COMPSWT IN CMS NUCLEUS SO THAT OS LOAD AND LINK MACROS 00149000
  151. * BRING IN TEXT (OR TXTLIB) FILES RATHER THAN MODULE FILES. 00150000
  152. * 4X. INVOKE OS LOAD TO LOAD DMSREA INTO STORAGE. SAVE ITS 00151000
  153. * ADDRESS SO DMSREA CAN BE CALLED LATER DURING THE EXCP 00152000
  154. * SIMULATION. 00153000
  155. * 5. ESTABLISH HANDLING OF SVC 76 (ERROR LOG), SVC 18 (BLDL), 00154000
  156. * AND SVC 0 (EXCP). 00155000
  157. * 6. INVOKE 'FILEDEF' FUNCTION TO DEFINE: (1) PRINTER FILE FOR 00156000
  158. * EREP, (2) SYSIN FILE TO BE CREATED FOR EREP, (3) DUMMY FILE 00157000
  159. * FOR EREP TO OPEN AND CLOSE AS SYS1.LOGREC (FILE IS A 00158000
  160. * DUMMY BECAUSE ATTEMPTED I/O ACTIVITY IS VIA EXCP WHICH 00159000
  161. * WILL BE INTERCEPTED), (4) 'TOURIST' ERROR FILE TO THE 00160000
  162. * TERMINAL, AND (5) THE 'DIRECTWK' WORK FILE ON DISK. 00161000
  163. * 7. GET THE COMMAND LINE ARGUMENTS AND DETERMINE IF A CONTROL 00162000
  164. * FILE IS PROVIDED FOR INPUT. IF SO, SET UP TO READ 00163000
  165. * PARAMETERS FROM THE CONTROL FILE; OTHERWISE SET UP 00164000
  166. * TO READ PARAMETERS FROM THE TERMINAL. 00165000
  167. * 8. ISSUE A DMSFREE MACRO TO GET CORE IN WHICH TO BUILD AN 00166000
  168. * OS 'PARM' LIST TO BE PASSED TO EREP. 00167000
  169. * 9. GET INPUT PARAMETERS (FROM CONTROL FILE OR TERMINAL) AND 00168000
  170. * CONSTRUCT EQUIVALENT OS/VS EREP PARM LIST AND SYSIN CONTROL 00169000
  171. * CARD FILE. 00170000
  172. * 10. IF CLEAR WAS SPECIFIED AND IT WAS NOT THE ONLY PARAMETER 00171000
  173. * SPECIFIED, THEN TYPE ERROR MESSAGE TO TERMINAL AND 00172000
  174. * SKIP TO 17. 00173000
  175. * 11. IF CLEAR WAS SPECIFIED (CORRECTLY), CALL A SUBROUTINE TO 00174000
  176. * ISSUE THE DIAGNOSE THAT ZEROS OUT THE VM ERROR CYLINDERS, 00175000
  177. * THEN SKIP TO 17. 00176000
  178. * 12. INVOKE 'FILEDEF' TO DEFINE THE ACCUMULATION TAPE FILE 00177000
  179. * IF REQUESTED. ISSUE THE TAPE CONTROL MACROS NECESSARY TO 00178000
  180. * POSITION THE TAPE FOR SUBSEQUENT WRITE OPERATIONS. 00179000
  181. * 13. INVOKE 'FILEDEF' TO DEFINE THE HISTORY INPUT TAPE IF 00180000
  182. * REQUESTED. AND BE SURE IT IS REWOUND. 00181000
  183. * 14. LINK TO OS/VS EREP (IFCEREP1). 00182000
  184. * 15. SIMULATE BLDL SVC'S ISSUED FROM OS/VS EREP. 00183000
  185. * SIMULATE EXCP SVC'S ISSUED FROM OS/VS EREP SO THEY WILL 00184000
  186. * APPEAR TO ACCESS A SYS1.LOGREC DATA SET; SIMULATION WILL 00185000
  187. * RESULT IN CALLS TO DMSREA TO GET RECORDS FROM VM/370 ERROR 00186000
  188. * RECORDING CYLINDERS; AN EXCP THAT ATTEMPTS TO RE-WRITE 00187000
  189. * THE SYS1.LOGREC HEADER IS A RESULT OF THE 'ZERO' FUNCTION 00188000
  190. * AND IS SIMULATED BY CALLING A SUBROUTINE TO ISSUE THE 00189000
  191. * DIAGNOSE THAT ZEROS OUT THE ERROR RECORDING CYLINDERS. 00190000
  192. * 16. EVENTUALLY OS/VS EREP IS DONE AND CONTROL RETURNS HERE 00191000
  193. * FROM THE 'LINK' DONE AT 14. ABOVE 00192000
  194. * 17. HOUSEKEEP ALL INDICATORS AND SWITCHES. FRET ANY CORE 00193000
  195. * OBTAINED FOR THE OS 'PARM' AREA. CLEAR HANDLING OF 00194000
  196. * SVC'S 0, 18, AND 76. CLEAR ANY FILDEFS THAT WERE SET UP 00195000
  197. * BY CPEREP. 00196000
  198. * 18. EXIT TO CMS. 00197000
  199. * 00198000
  200. * RESPONSES - 00199000
  201. * DMSIFC827I 00200000
  202. * DMSIFC828I 00201000
  203. * 00202000
  204. * ERROR MESSAGES - 00203000
  205. * MESSAGE R15 RETURN CODE 00204000
  206. * DMSIFC002E 28 00205000
  207. * DMSIFC007E 32 00206000
  208. * DMSIFC023E 24 00207000
  209. * DMSIFC070E 24 00208000
  210. * DMSIFC104S 100 00209000
  211. * DMSIFC113S 100 00210000
  212. * DMSIFC825E 12 00211000
  213. * DMSIFC829W 88 00212000
  214. * DMSIFC831E 62 00213000
  215. *. 00214000
  216. EJECT 00215000
  217. *********************************************************************** 00216000
  218. * 00217000
  219. * 1. PERFORM STANDARD LINKAGE AND ADDRESSABILITY FUNCTIONS. 00218000
  220. * 00219000
  221. *********************************************************************** 00220000
  222. STM R14,R12,SAVER14(R13) @V4085A8 00221000
  223. BALR R12,0 @V4085A8 00222000
  224. USING *,R12 @V4085A8 00223000
  225. ST R13,SAVEAREA+4 STORE PTR TO OLD SAVE AREA IN @V4085A8 00224000
  226. * NEW SAVE AREA. 00225000
  227. LA R13,SAVEAREA ADDR OF NEW SAVE AREA. @V4085A8 00226000
  228. USING NUCON,0 MAKE LOW CORE AREA ADDRESSABLE. @V4085A8 00227000
  229. SPACE 00228000
  230. *********************************************************************** 00229000
  231. * 00230000
  232. * 2. INVOKE CMS LOAD FUNCTION TO LOAD AND RESOLVE VCON'S IN 00231000
  233. * ABOUT A DOZEN EREP OBJECT DECKS. (NOTE: ALL OTHER EREP 00232000
  234. * OBJECT DECKS GET BROUGHT INTO STORAGE LATER, AS NEEDED, 00233000
  235. * BY OS LOAD AND LINK MACROS ISSUED BY OS/VS EREP.) 00234000
  236. * 00235000
  237. *********************************************************************** 00236000
  238. * FIRST, BEFORE LOADING, VERIFY THAT TXTLIB'S HAVE BEEN 00237000
  239. * GLOBALED IN. 00238000
  240. CLI TXTLIBS,X'FF' IF NOTHING HAS BEEN GLOBALED @V4085A8 00239000
  241. * THEN TXTLIBS NAME FIELD IN THE NUCLEUS 00240000
  242. * WILL STILL BE ALL X'FF'S. 00241000
  243. BNE OPER2D YES, SO THERE IS AT LEAST ONE GLOBALED @V4085A8 00242000
  244. * TXTLIB. 00243000
  245. DMSERR NUM=826,LET=E,TEXT='EREP TXTLIBS NOT FOUND', @V4085A8X00244000
  246. RENT=NO @V4085A8 00245000
  247. LA R15,RC56 SET ERROR RETURN CODE. @V4085A8 00246000
  248. B EXIT0SAV @V4085A8 00247000
  249. SPACE 00248000
  250. OPER2D DS 0H @V4085A8 00249000
  251. * EXECUTE CMS 'INCLUDE' COMMAND (SIMILAR TO 'LOAD'). 00250000
  252. L R1,=A(LOADLIST) ADDR OF PARAMETER LIST. @V4085A8 00251000
  253. SVC 202 @V4085A8 00252000
  254. DC AL4(EXIT0SAV) BRANCH IF ERROR RETURN, OTHERWISE@V4085A8 00253000
  255. * FALL THRU. 00254000
  256. SPACE 00255000
  257. *********************************************************************** 00256000
  258. * 00257000
  259. * 3. INVOKE 'STRINIT' FUNCTION. INDICATES THAT AREA ABOVE 00258000
  260. * PRESENTLY LOADED PROGRAMS IS BEGINNING OF FREE STORAGE. 00259000
  261. * (NOTE: OS LOAD AND LINK WILL ACQUIRE SPACE FROM FREE 00260000
  262. * STORAGE TO CONTAIN THE PROGRAMS THEY LOAD.) 00261000
  263. * 00262000
  264. *********************************************************************** 00263000
  265. STRINIT * @V4085A8 00264000
  266. SPACE 00265000
  267. *********************************************************************** 00266000
  268. * 00267000
  269. * 4. TURN OFF THE 'DOSSVC' FLAG IN THE CMS NUCLEUS SO THAT 00268000
  270. * OS SIMULATION IS USED. BUT SAVE A COPY OF 'DOSSVC' SO IT 00269000
  271. * CAN BE RESTORED LATER. 00270000
  272. * SET COMPSWT IN CMS NUCLEUS SO THAT OS LOAD AND LINK MACROS 00271000
  273. * BRING IN TEXT (OR TXTLIB) FILES RATHER THAN MODULE FILES. 00272000
  274. * 00273000
  275. *********************************************************************** 00274000
  276. DMSKEY NUCLEUS @V4085A8 00275000
  277. MVC DOSSAVE,DOSFLAGS SAVE 'DOSSVC' AND OTHER FLAGS.@V4085A8 00276000
  278. NI DOSFLAGS,X'FF'-DOSSVC FLAG ZEROED TO REQUEST @V4085A8 00277000
  279. * OS SVC SIMULATION. 00278000
  280. MVC OSSSAVE,OSSFLAGS SAVE 'COMPSWT' AND OTHER FLAGS@V4085A8 00279000
  281. NI OSSFLAGS,X'FF'-COMPSWT FLAG ZEROED INDICATES @V4085A8 00280000
  282. * SIMULATED OS LOAD/LINK WILL LOAD 00281000
  283. * FROM 'TEXT' OR 'TXTLIB' RATHER 00282000
  284. * THAN 'MODULE'. 00283000
  285. DMSKEY RESET @V4085A8 00284000
  286. SPACE 00285000
  287. *********************************************************************** 00286000
  288. * 00287000
  289. * 4X. INVOKE OS LOAD TO LOAD DMSREA INTO STORAGE. SAVE ITS 00288000
  290. * ADDRESS SO DMSREA CAN BE CALLED LATER DURING THE EXCP 00289000
  291. * SIMULATION. 00290000
  292. * 00291000
  293. *********************************************************************** 00292000
  294. LOAD EP=DMSREA @V4085A8 00293000
  295. * ADDRESS OF ENTRY POINT IS RETURNED IN R0. 00294000
  296. L R1,=A(DMSREAAD) @V4085A8 00295000
  297. ST R0,0(0,R1) SAVE DMSREA ADDR SO WE CAN CALL @V4085A8 00296000
  298. * DMSREA LATER. 00297000
  299. SPACE 00298000
  300. *********************************************************************** 00299000
  301. * 00300000
  302. * 5. ESTABLISH HANDLING OF SVC 76 (ERROR LOG), SVC 18 (BLDL), 00301000
  303. * AND SVC 0 (EXCP). 00302000
  304. * 00303000
  305. *********************************************************************** 00304000
  306. HNDSVC SET,(0,DMSIFC0),(18,DMSIFC18),(76,DMSIFC76) @V4085A8 00305000
  307. *********************************************************************** 00306000
  308. * 00307000
  309. * 6. INVOKE 'FILEDEF' FUNCTION TO DEFINE: (1) PRINTER FILE FOR 00308000
  310. * EREP, (2) SYSIN FILE TO BE CREATED FOR EREP, (3) DUMMY FILE 00309000
  311. * FOR EREP TO OPEN AND CLOSE AS SYS1.LOGREC (FILE IS A 00310000
  312. * DUMMY BECAUSE ATTEMPTED I/O ACTIVITY IS VIA EXCP WHICH 00311000
  313. * WILL BE INTERCEPTED), (4) 'TOURIST' ERROR FILE TO THE 00312000
  314. * TERMINAL, AND (5) THE 'DIRECTWK' WORK FILE ON DISK. 00313000
  315. * 00314000
  316. * NOTE: THE USER WILL BE PERMITTED TO OVERRIDE THE FILEDEF'S 00315000
  317. * FOR THE PRINTER (EREPPT), HISTORY TAPE (ACCIN), AND 00316000
  318. * ACCUMULATION TAPE (ACCDEV). SEE COMMENTS ON THE PARAMETER 00317000
  319. * LISTS FOR THOSE FILEDEFS. 00318000
  320. * 00319000
  321. *********************************************************************** 00320000
  322. * BEFORE DOING THE FILEDEF'S WE MUST FILL IN THE FILEMODE 00321000
  323. * TO BE USED FOR THE WORK FILES (SYSIN AND DIRECTWK). 00322000
  324. * WE DO THIS AFTER DETERMINING WHICH OF THE READ/WRITE 00323000
  325. * DISKS HAS THE MOST SPACE. WE WILL CALL A ROUTINE IN 00324000
  326. * THE 'DMSLAD' MODULE TO MAKE THE DETERMINATION. THIS 00325000
  327. * ROUTINE REQUIRES A 26 BYTE P-LIST, THE FIRST 24 BYTES OF 00326000
  328. * WHICH ARE IGNORED WHILE THE LAST TWO BYTES MUST CONTAIN 00327000
  329. * '??'. WE WILL BUILD THIS LIST IN OUR SAVE AREA, USED 00328000
  330. * AS A WORK AREA. 00329000
  331. LA R1,SAVER14(0,R13) ADDR OF P-LIST (IN SAVE AREA)@V4085A8 00330000
  332. MVC D24(L2,R1),=CL2'??' COMPLETE THE P-LIST. @V4085A8 00331000
  333. L R15,AADTLKW VCON IN NUCLEUS POINTS TO ROUTINE @V4085A8 00332000
  334. * IN DMSLAD. 00333000
  335. BALR R14,R15 GO FIND ADT OF DISK WITH MOST SPACE. @V4085A8 00334000
  336. LA R2,C'A' ASSUME FILEMODE 'A' TEMPORARILY. @V4085A8 00335000
  337. LTR R15,R15 IF THERE WERE R/W DISKS, RET CODE = 0. @V4085A8 00336000
  338. BNZ NORWDISK THERE ARE NO R/W DISKS. STICK WITH @V4085A8 00337000
  339. * THE 'A' DISK ANYWAY. 00338000
  340. * R1 WAS RETURNED WITH ADDR OF ADT BLOCK FOR DISK WITH THE 00339000
  341. * MOST SPACE. 00340000
  342. * R0 WAS RETURNED WITH THE NUMBER OF AVAILABLE 800 BYTE BLOCKS. 00341000
  343. USING ADTSECT,R1 @V4085A8 00342000
  344. IC R2,ADTM GET MODE LETTER OUT OF ADT. @V4085A8 00343000
  345. DROP R1 @V4085A8 00344000
  346. NORWDISK DS 0H @V4085A8 00345000
  347. SLL R2,8 SHIFT LETTER INTO HIGH BYTE OF HALFWD. @V4085A8 00346000
  348. LA R2,C'3'(0,R2) ADD MODE NUMBER INTO LOW BYTE. @V4085A8 00347000
  349. * FILEMODE IS NOW READY. IN HALFWORD IN R2. 00348000
  350. LA R1,SYSNFSCB FSCB FOR SYSIN FILE. @V4085A8 00349000
  351. USING FSCBD,R1 @V4085A8 00350000
  352. STH R2,FSCBFM STORE FMODE IN SYSIN'S FSCB. @V4085A8 00351000
  353. DROP R1 @V4085A8 00352000
  354. L R1,=A(DATAREA2) MAKE 2ND DATA SECTION... @V4085A8 00353000
  355. USING DATAREA2,R1 ADDRESSABLE. @V4085A8 00354000
  356. STH R2,MODPLUG1 STORE FMODE IN SYSIN'S FILEDEF. @V4085A8 00355000
  357. STH R2,MODPLUG2 STORE FMODE IN DIRECTWK'S FILEDEF. @V4085A8 00356000
  358. MVI MODPLUG2+1,C'4' MODE NUMBER MUST BE 4 IN ORDER @V4085A8 00357000
  359. * FOR DIRECTWK'S COMPLICATED 00358000
  360. * OS I/O TO WORK. 00359000
  361. DROP R1 @V4085A8 00360000
  362. * (WE ARE NOW FINISHED WITH THE FILEMODE IN R2.) 00361000
  363. L R1,=A(FDEFPRT) PARM LIST FOR PRINTER FILEDEF. @V4085A8 00362000
  364. SVC 202 @V4085A8 00363000
  365. * DON'T BOTHER CHECKING FOR ERROR RETURN CODE; ONLY ERRORS 00364000
  366. * FROM FILEDEF ARE FOR INVALID SPECIFICATIONS IN PARM LIST 00365000
  367. * WHICH SHOULD NOT HAPPEN HERE; IF IT DOES HAPPEN, LET IT 00366000
  368. * BOMB LATER WHEN I/O IS ATTEMPTED. 00367000
  369. LA R1,=CL16'SYSIN EREPWORK' ID OF FILE TO ERASE.@V4085A8 00368000
  370. L R15,=A(ERASFILE) CALL ROUTINE TO ERASE FILE @V4085A8 00369000
  371. BALR R14,R15 LEFT ON DISK IF A PRIOR RUN @V4085A8 00370000
  372. * ABENDED. 00371000
  373. LTR R15,R15 ERROR RETURN IS ONLY SET IN THE @V4085A8 00372000
  374. * (UNLIKELY) EVENT THAT 'STATEW' SEES A FILE AND 00373000
  375. * 'ERASE' STILL FAILS. 00374000
  376. BNZ EXIT1SAV EXIT BECAUSE OF PECULIAR ERROR. @V4085A8 00375000
  377. L R1,=A(FDEFSYSI) FILEDEF FOR SYSIN FILE. @V4085A8 00376000
  378. SVC 202 @V4085A8 00377000
  379. L R1,=A(FDEFSERL) FILEDEF FOR DUMMY SYS1.LOGREC. @V4085A8 00378000
  380. SVC 202 @V4085A8 00379000
  381. L R1,=A(FDEFTOUR) FILEDEF FOR TOURIST (ERROR @V4085A8 00380000
  382. * MESSAGE) FILE. 00381000
  383. SVC 202 @V4085A8 00382000
  384. LA R1,=CL16'DIRECTWKEREPWORK' ID OF FILE TO ERASE.@V4085A8 00383000
  385. L R15,=A(ERASFILE) CALL ROUTINE TO ERASE FILE @V4085A8 00384000
  386. BALR R14,R15 LEFT ON DISK IF A PRIOR RUN @V4085A8 00385000
  387. * ABENDED. 00386000
  388. LTR R15,R15 ERROR SET IF 'STATEW' SEES FILE, BUT @V4085A8 00387000
  389. * 'ERASE' STILL FAILS. 00388000
  390. BNZ EXIT1SAV EXIT BECAUSE OF PECULIAR ERROR. @V4085A8 00389000
  391. L R1,=A(FDEFDIRE) FILEDEF THE EREP WORK FILE. @V4085A8 00390000
  392. SVC 202 @V4085A8 00391000
  393. SPACE 00392000
  394. *********************************************************************** 00393000
  395. * 00394000
  396. * 7. GET THE COMMAND LINE ARGUMENTS AND DETERMINE IF A CONTROL 00395000
  397. * FILE IS PROVIDED FOR INPUT. IF SO, SET UP TO READ 00396000
  398. * PARAMETERS FROM THE CONTROL FILE; OTHERWISE SET UP 00397000
  399. * TO READ PARAMETERS FROM THE TERMINAL. 00398000
  400. * 00399000
  401. *********************************************************************** 00400000
  402. * REGISTER R1 IN OLD SAVE AREA POINTS TO THE INPUT PARM LIST. 00401000
  403. L R3,SAVER13B(0,R13) LOAD PTR TO OLD SAVE AREA. @V4085A8 00402000
  404. L R3,SAVER1(0,R3) LOAD PTR TO PARAMETER LIST. @V4085A8 00403000
  405. L R2,=A(RDCTLSW) MAKE SWITCH ADDRESSABLE. @V4085A8 00404000
  406. USING RDCTLSW,R2 @V4085A8 00405000
  407. OI RDCTLSW,X'F0' ASSUME THAT EREP CONTROL DATA @V4085A8 00406000
  408. * WILL BE ENTERED THRU THE TERMINAL AND SET 00407000
  409. * SWITCH IN THE RDCTLREC SUBROUTINE 00408000
  410. * ACCORDINGLY. 00409000
  411. USING INPLIST,R3 @V4085A8 00410000
  412. CLC INPFN,FENCEXFF END OF LIST AFTER 0 PARMS (EMPTY@V4085A8 00411000
  413. * LIST)? 00412000
  414. BE PARMWORK BRANCH IF NO INPUT PARMS. SINCE NO @V4085A8 00413000
  415. * FILEID WAS SPECIFIED, INPUT WILL BE FROM THE 00414000
  416. * TERMINAL RATHER THAN FROM A FILE. 00415000
  417. NI RDCTLSW,X'0F' ASSUMPTION MADE ABOVE WAS WRONG. @V4085A8 00416000
  418. * EREP CONTROL DATA IS TO BE READ FROM THE 00417000
  419. * DISK FILE NAMED IN THE INPUTTED PARAMETER 00418000
  420. * LIST. SET SWITCH IN RDCTLREC SUBROUTINE 00419000
  421. * ACCORDINGLY. 00420000
  422. DROP R2 @V4085A8 00421000
  423. CLC INPFT,FENCEXFF SEE IF 'FENCE' IS IN FTYPE. @V4085A8 00422000
  424. BNE HAVETYPE BRANCH IF FTYPE IS PRESENT. @V4085A8 00423000
  425. DMSERR NUM=023,LET=E,TEXT='NO FILETYPE SPECIFIED', @V4085A8X00424000
  426. RENT=NO @V4085A8 00425000
  427. MVI RETCDE+1,RC24 @V4085A8 00426000
  428. B EXIT1 @V4085A8 00427000
  429. HAVETYPE DS 0H @V4085A8 00428000
  430. SPACE 00429000
  431. * FILENAME AND FILETYPE WERE SPECIFIED. FENCE SHOULD BE IN 00430000
  432. * FILEMODE LOCATION IF FILEMODE WAS OMITTED OR IN FENCE 00431000
  433. * LOCATION IF FILEMODE WAS NOT OMITTED. IF IT IS IN NEITHER, 00432000
  434. * THEN THE USER SUPPLIED AN EXTRA (ILLEGAL) PARAMETER. 00433000
  435. * CHECK FOR EXTRA: 00434000
  436. CLC INPFM,FENCEXFF @V4085A8 00435000
  437. BE NOEXTRA FENCE WAS IN FILEMODE SLOT. @V4085A8 00436000
  438. CLC INPFENCE,FENCEXFF @V4085A8 00437000
  439. BE NOEXTRA FENCE WAS IN END SLOT. @V4085A8 00438000
  440. * IF FALL THRU, FENCE WAS NOT FOUND. THERE MUST BE EXTRA PARM. 00439000
  441. LA R2,INPFENCE ADDRESS OF THE ILLEGAL PARAMETER. @V4085A8 00440000
  442. DMSERR NUM=070,LET=E,TEXT='INVALID PARAMETER ''........''', X00441000
  443. SUB=(CHARA,(R2)),RENT=NO @V4085A8 00442000
  444. MVI RETCDE+1,RC24 @V4085A8 00443000
  445. B EXIT1 @V4085A8 00444000
  446. NOEXTRA DS 0H @V4085A8 00445000
  447. SPACE 00446000
  448. * NOW WE DO AN 'FSSTATE' TO VERIFY THAT FILENAME, FILETYPE, AND 00447000
  449. * OPTIONAL FILEMODE ARE A VALID ID AND THAT THE SPECIFIED FILE 00448000
  450. * EXISTS. 00449000
  451. LA R2,INPFN SKIP INPCOM, POINT TO ID FOLLOWED BY @V4085A8 00450000
  452. * FENCE. 00451000
  453. DROP R3 @V4085A8 00452000
  454. FSSTATE (R2),FSCB=CTLFSCB @V4085A8 00453000
  455. * ERROR RETURN CODE IS IN R15. IF NO ERROR, R1 POINTS TO 00454000
  456. * THE FILE STATUS TABLE (FST). 00455000
  457. LTR R15,R15 TEST FOR ERROR RETURN. @V4085A8 00456000
  458. BZ CHKATTR BRANCH IF NO ERROR; FILE WAS FOUND. @V4085A8 00457000
  459. * AN ERROR RETURN CODE CAME BACK FROM FSSTATE. FOR ALL CODES 00458000
  460. * EXCEPT CODE 28 (FILE NOT FOUND), AN ERROR MESSAGE HAS 00459000
  461. * ALREADY BEEN ISSUED BY CODE CALLED BY FSSTATE. 00460000
  462. STH R15,RETCDE SAVE ERROR CODE. WE WILL RETURN IT @V4085A8 00461000
  463. * AS OUR OWN RETURN CODE. 00462000
  464. CH R15,=Y(RC28) @V4085A8 00463000
  465. BNE EXIT1 MESSAGE WAS ISSUED BY FSSTATE. @V4085A8 00464000
  466. * FILE WAS NOT FOUND, NO ERROR MESSAGE WAS ISSUED. ISSUE NOW. 00465000
  467. LA R3,CTLFSCB FILEID SPECIFIED ON COMMAND LINE BY @V4085A8 00466000
  468. * THE USER WAS MOVED INTO THIS FSCB BY 00467000
  469. * FSSTATE. WE WILL GET IT FROM HERE FOR 00468000
  470. * PRINTING IN ERROR MESSAGE. 00469000
  471. USING FSCBD,R3 @V4085A8 00470000
  472. LA R4,FSCBFN ADDRESS OF FILEID. @V4085A8 00471000
  473. LA R5,L'FSCBFN+L'FSCBFT LENGTH OF FILEID W/O MODE.@V4085A8 00472000
  474. CLC FSCBFM,=X'FFFF' FENCE OCCUPIES MODE FIELD IF @V4085A8 00473000
  475. * NO MODE. 00474000
  476. BE *+8 NO FILEMODE, SO LENGTH IN R5 IS OKAY. @V4085A8 00475000
  477. LA R5,L'FSCBFM(0,R5) FMODE PRESENT, ADD ITS LENGTH@V4085A8 00476000
  478. DROP R3 @V4085A8 00477000
  479. DMSERR NUM=002,LET=E,TEXT='FILE ''.....................'' NOT X00478000
  480. FOUND',SUB=(CHAR8A,((R4),(R5))),RENT=NO @V4085A8 00479000
  481. B EXIT1 @V4085A8 00480000
  482. SPACE 00481000
  483. * CHECK THAT THE FILE IS THE REQUIRED RECFM=F, LRECL=80. 00482000
  484. USING FSTSECT,R1 @V4085A8 00483000
  485. CHKATTR LA R3,CTLFSCB @V4085A8 00484000
  486. USING FSCBD,R3 @V4085A8 00485000
  487. MVC FSCBFM,FSTM GET THE FILEMODE FOUND BY FSSTATE @V4085A8 00486000
  488. * AND PUT IT IN THE FSCB, OVERLAYING X'FFFF' 00487000
  489. * IF USER DID NOT SPECIFY MODE. 00488000
  490. CLI FSTFV,C'F' CHECK FOR FIXED LENGTH FORMAT. @V4085A8 00489000
  491. BNE BADATTR INVALID FORMAT. @V4085A8 00490000
  492. LA R2,80 SET UP FOR LRECL=80 CHECK. @V4085A8 00491000
  493. C R2,FSTIL COMPARE WITH FILE'S RECORD LENGTH. @V4085A8 00492000
  494. DROP R1 @V4085A8 00493000
  495. BE GOODATTR BRANCH IF RECORD LENGTH IS CORRECT. @V4085A8 00494000
  496. BADATTR LA R4,FSCBFN ADDR OF FILEID TO PRINT IN MSG. @V4085A8 00495000
  497. DROP R3 @V4085A8 00496000
  498. DMSERR NUM=007,LET=E,TEXT='FILE ''.....................'' IS NX00497000
  499. OT FIXED, 80 CHAR. RECORDS', @V4085A8X00498000
  500. SUB=(CHAR8A,(R4)),RENT=NO @V4085A8 00499000
  501. MVI RETCDE+1,RC32 @V4085A8 00500000
  502. B EXIT1 @V4085A8 00501000
  503. GOODATTR DS 0H @V4085A8 00502000
  504. FSOPEN FSCB=CTLFSCB @V4085A8 00503000
  505. SPACE 00504000
  506. *********************************************************************** 00505000
  507. * 00506000
  508. * 8. ISSUE A DMSFREE MACRO TO GET CORE IN WHICH TO BUILD AN 00507000
  509. * OS 'PARM' LIST TO BE PASSED TO EREP. 00508000
  510. * 00509000
  511. *********************************************************************** 00510000
  512. PARMWORK LA R0,(PARMBUFL+7)/8 LENGTH OF PARM LIST BUILD @V4085A8 00511000
  513. * AREA IN DOUBLEWORDS. 00512000
  514. DMSFREE DWORDS=(0),TYPE=USER @V4085A8 00513000
  515. STH R15,RETCDE SAVE ANY ERROR RETURN CODE. @V4085A8 00514000
  516. LTR R15,R15 TEST RETURN CODE. @V4085A8 00515000
  517. BNZ EXIT1 NO STORAGE AVAILABLE. @V4085A8 00516000
  518. ST R1,PARMBFAD SAVE ADDR OF PARM LIST BUILD AREA. @V4085A8 00517000
  519. STH R15,0(0,R1) ZERO OUT THE LENGTH HALFWORD AT @V4085A8 00518000
  520. * THE START OF THE PARM LIST. 00519000
  521. LA R1,PARMHDRL(0,R1) SKIP LENGTH FIELD AT START OF@V4085A8 00520000
  522. * PARM LIST. 00521000
  523. ST R1,PARMNEXT ADDR OF NEXT AVAILABLE BYTE IN @V4085A8 00522000
  524. * PARM AREA. 00523000
  525. LA R1,PARMBUFL-PARMHDRL BUF LENGTH LESS HDR IS... @V4085A8 00524000
  526. ST R1,PARMREM NUMBER OF FREE BYTES @V4085A8 00525000
  527. * REMAINING IN WORK AREA. 00526000
  528. EJECT 00527000
  529. *********************************************************************** 00528000
  530. * 00529000
  531. * 9. GET INPUT PARAMETERS (FROM CONTROL FILE OR TERMINAL) AND 00530000
  532. * CONSTRUCT EQUIVALENT OS/VS EREP PARM LIST AND SYSIN CONTROL 00531000
  533. * CARD FILE. 00532000
  534. * 00533000
  535. *********************************************************************** 00534000
  536. * 00535000
  537. * THIS SECTION OF CODE CONTROLS THE SCAN OF INPUT PARAMETERS. 00536000
  538. * 00537000
  539. * PARAMETERS ARE READ FROM THE TERMINAL (AFTER PROMPTING) OR 00538000
  540. * FROM AN INPUT CONTROL FILE IF ONE WAS PROVIDED. ONE OR 00539000
  541. * MORE PARAMETERS MAY BE SPECIFIED IN EACH LINE OF INPUT. 00540000
  542. * BUT THE 'CTLCRD' PARAMETER MUST NOT BE FOLLOWED BY ANY 00541000
  543. * OTHER PARAMETER; ANY PARAMETER THAT FOLLOWS IT WILL APPEAR 00542000
  544. * TO BE PART OF THE 'CTLCRD'S TITLE FIELD AND WILL NOT BE 00543000
  545. * CAUGHT AS AN ERROR. 00544000
  546. * 00545000
  547. * EACH LINE IS SCANNED IMMEDIATELY AFTER IT IS ENTERED. EACH 00546000
  548. * PARAMETER IS ISOLATED AND IDENTIFIED AND PROCESSED BEFORE 00547000
  549. * SCANNING TO THE NEXT PARAMETER. THE PROCESSING INCLUDES ANY 00548000
  550. * SPECIALIZED PROCESSING REQUIRED BY CERTAIN RECOGNIZED 00549000
  551. * PARAMETERS (FOR EXAMPLE, WHEN ACC=Y IS SEEN, SET A FLAG 00550000
  552. * INDICATING THAT AN OUTPUT TAPE WILL HAVE TO BE REWOUND AND 00551000
  553. * POSITIONED FOR OUTPUT). THE MORE GENERALIZED PROCESSING OF 00552000
  554. * COPYING THE PARAMETER TO THE OUTPUT 'PARM' LIST OR TO THE 00553000
  555. * SYSIN CONTROL CARD FILE IS ALSO DONE AT THIS TIME. ANY 00554000
  556. * UNRECOGNIZABLE PARAMETER WILL GO TO THE 'PARM' LIST. 00555000
  557. * 00556000
  558. * THE APPROACH TO THE HANDLING OF ERRORS IN THE INPUT 00557000
  559. * PARAMETERS IS NOT TO DIAGNOSE THEM HERE. INSTEAD THEY ARE 00558000
  560. * PASSED ON INTO THE 'PARM' LIST OR THE SYSIN CONTROL CARD 00559000
  561. * FILE AND EREP WILL DIAGNOSE THEM WHEN IT SEES THEM THERE. 00560000
  562. * 00561000
  563. * WHEN THE USER ENTERS CLEAR AT THE TERMINAL, WE MUST NOT 00562000
  564. * TERMINATE THE PROMPTING FOR MORE INPUT. WE CONTINUE AND THE 00563000
  565. * USER SHOULD ENTER NULL ON THE NEXT LINE. IF HE ENTERS 00564000
  566. * FURTHER PARAMETERS INSTEAD OF NULL THEN HE IS THINKING OF 00565000
  567. * GETTING A REPORT FIRST, THEN CLEARING (WHICH IS NOT 00566000
  568. * PERMITTED SINCE CLEAR ONLY WORKS STANDALONE; HE WANTS 'ZERO'). 00567000
  569. * IF WE HAD TERMINATED PROMPTING IMMEDIATELY AFTER CLEAR, 00568000
  570. * THEN WE WOULD HAVE ERASED HIS DATA MAKING IT IMPOSSIBLE FOR 00569000
  571. * HIM TO GET HIS REPORT. 00570000
  572. * 00571000
  573. * OPERATION 00572000
  574. * 00573000
  575. * 1. CALL SUBROUTINE RDCTLINE TO READ A RECORD FROM THE 00574000
  576. * TERMINAL OR THE INPUT CONTROL FILE. IT RETURNS THE DATA 00575000
  577. * AND THE LENGTH OF THE INPUT LINE. LENGTH IS 0 IF NO RECORD 00576000
  578. * WAS GOTTEN. IF NO RECORD WAS GOTTEN, GO TO 8. 00577000
  579. * 2. INITIALIZE SCAN POINTER TO FIRST BYTE OF RECORD. 00578000
  580. * 3. SKIP BLANKS (AND COMMAS) TO START OF PARAMETER (OR TO END 00579000
  581. * OF RECORD IF NO PARAMETER). IF END OF RECORD, GO TO 1. 00580000
  582. * 4. SCAN POINTER IS NOW AT THE BEGINNING OF A PARAMETER. 00581000
  583. * CALL SUBROUTINE 'PARMSCAN' TO SCAN TO END OF PARAMETER (IT 00582000
  584. * LOOKS FOR A BLANK, OR END-OF-RECORD, OR A COMMA, EXCEPT 00583000
  585. * THAT COMMAS IN PARENTHESIZED AREA DON'T COUNT). SCAN 00584000
  586. * POINTER REMAINS AT THE 1ST BYTE BEYOND THE PARAMETER (A 00585000
  587. * BLANK OR A COMMA OR THE 1ST BYTE BEYOND THE END OF THE 00586000
  588. * RECORD IF PARAMETER RAN OUT TO THE END). THE LENGTH OF 00587000
  589. * THE PARAMETER IS RETURNED. 00588000
  590. * NOTE: CTLCRD IS UNUSUAL IN THAT THE SCAN FINDS THE BLANK 00589000
  591. * AFTER THE WORD 'CTLCRD' AND STOPS BEFORE SCANNING THE REST 00590000
  592. * OF THE DATA. THE SCAN POINTER WILL BE ADJUSTED LATER AFTER 00591000
  593. * THIS PARAMETER HAS BEEN IDENTIFIED. 00592000
  594. * 5. IDENTIFY PARAMETER AND LOAD ADDRESS OF ROUTINE TO HANDLE 00593000
  595. * IT. IF PARAMETER IS NOT IDENTIFIABLE, LOAD ADDRESS OF 00594000
  596. * DEFAULT ROUTINE (WHICH WILL PUT IT IN THE OS PARM LIST). 00595000
  597. * 6. CALL SUBROUTINE WHOSE ADDRESS WAS LOADED. SUBROUTINE 00596000
  598. * PROCESSES THE PARTICULAR PARAMETER, INCLUDING PUTTING IT 00597000
  599. * INTO 'PARM' LIST OR SYSIN FILE IF APPROPRIATE. 00598000
  600. * NOTE: HANDLING OF CTLCRD INCLUDES MOVING SCAN POINTER 00599000
  601. * TO END OF RECORD. 00600000
  602. * 7. IF SCAN POINTER IS AT END OF RECORD, GO TO 1; 00601000
  603. * OTHERWISE, GO TO 3. 00602000
  604. * 8. THE PROCESSING OF INPUT PARAMETERS IS COMPLETE. 00603000
  605. * 00604000
  606. *********************************************************************** 00605000
  607. * 00606000
  608. * REGISTER USAGE DURING THE CONTROL PARAMETER SCANNING: 00607000
  609. * 00608000
  610. * PARMPTR - R6 - HOLDS STARTING ADDRESS OF THE PARAMETER 00609000
  611. * CURRENTLY BEING SCANNED, WHOSE FAR (RIGHT) END 00610000
  612. * MAY OR MAY NOT HAVE BEEN LOCATED YET. 00611000
  613. * SCANLEN - R7 - HOLDS LENGTH LESS ONE FOR EX'ING TRT INSTR. 00612000
  614. * SCANPTR - R8 - THIS IS THE 'SCAN POINTER'. AS WE MOVE 00613000
  615. * ACROSS A LINE OF INPUT, IT CONTAINS THE 00614000
  616. * ADDRESS OF THE RIGHTMOST BYTE SCANNED SO FAR. 00615000
  617. * SCANEND - R9 - CONTAINS THE SCAN END POINT. THIS IS ALWAYS 00616000
  618. * THE ADDRESS OF THE FIRST BYTE BEYOND THE END 00617000
  619. * OF THE LINE OF DATA. 00618000
  620. * TABLEREG- R15- CONTAINS THE ADDRESS OF ANY ONE OF SEVERAL 00619000
  621. * TRT TABLES USED DURING THE SCANNING. 00620000
  622. * 00621000
  623. *********************************************************************** 00622000
  624. FSOPEN FSCB=SYSNFSCB @V4085A8 00623000
  625. OPER9X1 L R15,=A(RDCTLINE) @V4085A8 00624000
  626. BALR R14,R15 CALL TO READ A LINE OF INPUT FROM @V4085A8 00625000
  627. * TERMINAL OR INPUT FILE. 00626000
  628. * R1 IS RETURNED WITH THE ADDRESS OF THE LINE OF INPUT AND 00627000
  629. * R0 HAS ITS LENGTH (OR R0 IS ZERO IF EOF). 00628000
  630. * R15 MAY CONTAIN AN ERROR RETURN CODE AT THIS POINT. BUT IF 00629000
  631. * IT DOES, R0 WILL BE SIGNALING END-OF-FILE ALSO. THEREFORE, 00630000
  632. * JUST CHECK R0 FOR END-OF-FILE NOW. IF WE FIND EOF, THEN 00631000
  633. * WE WILL CHECK R15 FOR AN ERROR RETURN, OTHERWISE THERE IS 00632000
  634. * NO NEED TO CHECK R15. 00633000
  635. LTR R0,R0 TEST LENGTH IN R0 FOR EOF SIGNAL. @V4085A8 00634000
  636. BZ OPER9X8 BRANCH IF EOF. @V4085A8 00635000
  637. OPER9X2 LR R8,R1 INITIALIZE 'SCAN POINTER' REG. @V4085A8 00636000
  638. LR R9,R1 @V4085A8 00637000
  639. AR R9,R0 INITIALIZE 'SCAN END' REG TO 1ST @V4085A8 00638000
  640. * BYTE BEYOND THE LINE OF DATA. 00639000
  641. OPER9X3 LR R7,R9 SCAN END... @V4085A8 00640000
  642. SR R7,R8 LESS STARTING POINT IS LENGTH... @V4085A8 00641000
  643. BCTR R7,0 LESS ONE IS LENGTH FOR EX OF TRT. @V4085A8 00642000
  644. L R15,=A(TABSKIP2) TABLE FOR SKIPPING BLANKS AND @V4085A8 00643000
  645. * COMMAS. 00644000
  646. EX R7,TRTXR8 SCAN TO NON-BLANK,NON-COMMA,OR TO END@V4085A8 00645000
  647. BC 8,OPER9X1 SCAN RAN ALL THE WAY TO END AND @V4085A8 00646000
  648. * HIT NOTHING. 00647000
  649. LR R8,R1 SET 'SCAN POINTER' TO ADDRESS OF DATA @V4085A8 00648000
  650. * FOUND. 00649000
  651. LR R6,R1 SET 'PARMPTR' TO ADDRESS OF DATA FOUND. @V4085A8 00650000
  652. OPER9X4 LR R0,R9 ARG FOR PARMSCAN: R0 = END OF RECORD ADDR@V4085A8 00651000
  653. * ARG FOR PARMSCAN: R1 = PARM STARTING ADDR 00652000
  654. L R15,=A(PARMSCAN) PREPARE TO CALL PARMSCAN. @V4085A8 00653000
  655. BALR R14,R15 GO SCAN TO END OF CURRENT PARM & RETURN@V4085A8 00654000
  656. * OUTPUTS RETURNED FROM PARMSCAN: 00655000
  657. * R0 = LENGTH OF THE PARAMETER, EXCLUDING DELIMITER AT 00656000
  658. * END (NOTE: THERE WAS A PARAMETER, SO LENGTH WILL BE 00657000
  659. * GREATER THAN ZERO). 00658000
  660. * R1 = CURRENT VALUE OF SCAN POINTER (ADDR OF THE 1ST 00659000
  661. * BYTE BEYOND THE PARAMETER, I.E., DELIMITER ADDR). 00660000
  662. * R15 = 0 OR ERROR RETURN CODE INDICATING UNBALANCED 00661000
  663. * PARENTHESES WERE DETECTED. BUT WE IGNORE THIS, ALLOWING 00662000
  664. * THE PARENTHESES TO BE PASSED ON TO EREP FOR DIAGNOSIS. 00663000
  665. LR R8,R1 SAVE REVISED 'SCAN POINTER' ADDRESS. @V4085A8 00664000
  666. LR R7,R0 @V4085A8 00665000
  667. BCTR R7,0 SAVE LENGTH LESS ONE FOR EX'ING TRT, MVC.@V4085A8 00666000
  668. SPACE 00667000
  669. *---------------------------------------------------------------------- 00668000
  670. * STATUS SUMMARY: 00669000
  671. * WE HAVE NOW ISOLATED (BUT HAVE NOT YET IDENTIFIED) ONE 00670000
  672. * PARAMETER. 00671000
  673. * THE FOLLOWING REGISTER VALUES WILL REMAIN UNCHANGED DOWN 00672000
  674. * THRU 'OP9X7' WITH THE EXCEPTION THAT IF THE PARAMETER IS 00673000
  675. * 'CTLCRD', THEN R8 WILL HAVE TO BE ADVANCED TO END OF RECORD: 00674000
  676. * R6 = STARTING ADDRESS OF PARAMETER. 00675000
  677. * R7 = PARAMETER LENGTH (EXCLUDING ENDING DELIMITER) LESS 00676000
  678. * ONE. 00677000
  679. * R8 = THE 'SCAN POINTER' VALUE: ADDR OF THE PARAMETER'S 00678000
  680. * ENDING DELIMITER OR ADDR OF 1ST BYTE BEYOND THE 00679000
  681. * END OF THE RECORD IF PARAMETER EXTENDS TO END. 00680000
  682. * R9 = END OF RECORD ADDRESS, I.E., ADDR OF 1ST BYTE 00681000
  683. * BEYOND END OF RECORD. 00682000
  684. *---------------------------------------------------------------------- 00683000
  685. OPER9X5 DS 0H NOW WE HAVE TO IDENTIFY THE PARAMETER. THIS@V4085A8 00684000
  686. * INVOLVES ISOLATING THE KEYWORD UP TO THE '=' IF 00685000
  687. * PRESENT, OTHERWISE KEYWORD EXTENDS TO THE FIRST 00686000
  688. * DELIMITER ENCOUNTERED. 00687000
  689. L R15,=A(TABDLIM) ADDR OF TRT TABLE FOR FINDING @V4085A8 00688000
  690. * DELIMITERS, BUT UNFORTUNATELY IT DOES 00689000
  691. * NOT INCLUDE '=' AS A DELIMITER. 00690000
  692. MVI C'='(R15),X'FF' MODIFY THE TABLE MOMENTARILY @V4085A8 00691000
  693. * TO INCLUDE '=' AMONG THE DELIMITERS. 00692000
  694. SR R2,R2 CLEAR TO RECEIVE FUNCTION BYTE FROM TRT. @V4085A8 00693000
  695. LR R1,R8 THE LENGTH WE WILL USE WHEN EX'ING THE @V4085A8 00694000
  696. * TRT BELOW FALLS ONE BYTE SHORT OF THE DELIMITER 00695000
  697. * AT THE END OF THE PARAMETER, SO IT IS POSSIBLE 00696000
  698. * TRT WILL END BEFORE HITTING ANYTHING. THEREFORE 00697000
  699. * WE INITIALIZE R1 HERE SO THAT R1 WILL LOOK LIKE 00698000
  700. * TRT RAN ALL THE WAY TO A DELIMITER AT THE END 00699000
  701. * OF THE PARAMETER IN THE EVENT TRT FINDS NOTHING. 00700000
  702. * (NOTE: THE LENGTH WE USE WITH TRT HAS TO BE 00701000
  703. * ONE BYTE SHORT OF REACHING THE DELIMITER AT THE 00702000
  704. * END OF THE PARAMETER BECAUSE THERE WILL BE NO 00703000
  705. * ENDING DELIMITER IN THE CASE OF A PARAMETER 00704000
  706. * THAT RUNS OUT TO THE END OF THE INPUT RECORD.) 00705000
  707. EX R7,TRTXR6 SCAN THE PARAMETER TO '=' OR OTHER @V4085A8 00706000
  708. * DELIMITER. 00707000
  709. MVI C'='(R15),X'00' RESTORE TRT TABLE TO NORMAL @V4085A8 00708000
  710. * ('=' IS NO LONGER A DELIMITER). 00709000
  711. LR R3,R1 SAVE ADDR OF THE '=' OR OTHER DELIMITER. @V4085A8 00710000
  712. SR R1,R6 COMPUTE LENGTH OF PARAMETER TO (BUT NOT @V4085A8 00711000
  713. * INCLUDING) THE '=' OR OTHER DELIMITER. 00712000
  714. CH R2,=Y(X'FF') CHECK TRT FUNCTION BYTE IN R2 TO @V4085A8 00713000
  715. * SEE IF DELIMITER WAS A '='. (NOTE: WE 00714000
  716. * CANNOT LOOK AT THE DELIMITER ITSELF TO SEE 00715000
  717. * IF IT IS AN '=' BECAUSE THERE MIGHT NOT 00716000
  718. * BE A DELIMITER, WE COULD HAVE GONE TO END 00717000
  719. * OF RECORD. BUT THE FUNCTION BYTE IS 00718000
  720. * STILL OKAY, BEING X'00' IN THIS CASE.) 00719000
  721. BE *+6 BRANCH IF '='. @V4085A8 00720000
  722. SR R3,R3 SET ADDR OF DELIMITER TO 0 TO INDICATE IT@V4085A8 00721000
  723. * WAS NOT A '='. 00722000
  724. *---------------------------------------------------------------------- 00723000
  725. * STATUS SUMMARY: 00724000
  726. * WE HAVE ISOLATED A PARAMETER AND HAVE ISOLATED ITS KEYWORD 00725000
  727. * PORTION, I.E., THE PART EXTENDING OUT TO THE '=' OR TO THE 00726000
  728. * FIRST DELIMITER IF IT HAS NO '='. 00727000
  729. * REGISTERS CONTAIN THE FOLLOWING: 00728000
  730. * R6 = STARTING ADDRESS OF PARAMETER. 00729000
  731. * R7 = PARAMETER LENGTH (EXCLUDING ENDING DELIMITER) LESS 00730000
  732. * ONE. 00731000
  733. * R1 = KEYWORD LENGTH (EXCLUDING '=' DELIMITER). (OR 00732000
  734. * LENGTH TO FIRST DELIMITER OF ANY KIND IF NO '='.) 00733000
  735. * THIS IS TRUE LENGTH, NOT LESS ONE. 00734000
  736. * R3 = ADDRESS OF THE '=' IN THE PARAMETER IF '=' IS 00735000
  737. * PRESENT. ADDRESS IS ZERO IF THERE IS NO '='. 00736000
  738. * R8 = THE 'SCAN POINTER' VALUE: ADDRESS OF THE 00737000
  739. * PARAMETER'S ENDING DELIMITER OR ADDR OF 1ST BYTE 00738000
  740. * BEYOND END OF RECORD IF PARAMETER EXTENDS TO END. 00739000
  741. * R9 = END OF RECORD ADDRESS, I.E., ADDR OF 1ST BYTE 00740000
  742. * BEYOND END OF RECORD. 00741000
  743. *---------------------------------------------------------------------- 00742000
  744. * 00743000
  745. * NOW WE WILL COMPARE THE IDENTIFIED KEYWORD WITH THE KEYWORD 00744000
  746. * ENTRIES IN A TABLE, LOOKING FOR A MATCH. EACH ENTRY IN THE 00745000
  747. * TABLE CONSISTS OF 16 BYTES: 00746000
  748. * DC AL1(TRUE-LENGTH-OF-KEYWORD) 00747000
  749. * DC CL12'KEYWORD' 00748000
  750. * DC AL3(NAME-OF-SUBROUTINE-TO-PROCESS-PARAMETER) 00749000
  751. * TO FACILITATE COMPARISON, WE WILL NOW COPY THE KEYWORD FROM 00750000
  752. * THE PARAMETER TO A 13 BYTE WORKAREA WHERE THE KEYWORD CAN BE 00751000
  753. * PRECEEDED BY A LENGTH BYTE SIMILAR TO THE ENTRIES IN THE 00752000
  754. * KEYWORD TABLE. THEN THIS WORK AREA CAN BE COMPARED WITH 00753000
  755. * TABLE ENTRIES VIA A CLC. 00754000
  756. STC R1,KEYWORK PUT LENGTH IN 1ST BYTE OF WORK AREA.@V4085A8 00755000
  757. MVC KEYWORK+1(L12),0(R6) PUT KEYWORD (PADDED WITH @V4085A8 00756000
  758. * GARBAGE TO A LENGTH OF 12) INTO 00757000
  759. * WORK AREA. 00758000
  760. L R2,=A(KEYTAB-KEYTABLN) ADDR OF 1ST ENTRY LESS @V4085A8 00759000
  761. * ONE IN KEYWORD TABLE. BXH WILL 00760000
  762. * CAUSE R2 TO STEP THRU THE TABLE. 00761000
  763. LM R4,R5,=A(KEYTABLN,KEYTABZ-KEYTABLN) INCREMNT & @V4085A8 00762000
  764. * COMPARAND FOR BXH. 00763000
  765. L R15,=A(PLISTBLD) ADDR OF DEFAULT SUBROUTINE TO @V4085A8 00764000
  766. * BE CALLED IN CASE KEYWORD IS NOT 00765000
  767. * FOUND IN THE TABLE. 00766000
  768. SPACE 00767000
  769. KEYLOOP BXH R2,R4,KEYLOOPX ADVANCE TO NEXT ENTRY OF THE @V4085A8 00768000
  770. * TABLE. BRANCH OUT IF NO MORE ENTRIES. 00769000
  771. EX R1,KEYCLC EX OF CLC COMPARES WORK AREA LENGTH @V4085A8 00770000
  772. * BYTE AND KEYWORD WITH TABLE ENTRY LENGTH BYTE 00771000
  773. * AND KEYWORD. 00772000
  774. BNE KEYLOOP NO MATCH. GO CONTINUE SEARCH. @V4085A8 00773000
  775. SPACE 00774000
  776. * FALL THRU INDICATES KEYWORD OF THE PARAMETER MATCHES ENTRY 00775000
  777. * IN TABLE. 00776000
  778. L R15,KEYTABAD(0,R2) GET ADDR OF SUBROUTINE FROM @V4085A8 00777000
  779. * KEYWORD TABLE ENTRY. 00778000
  780. KEYLOOPX DS 0H @V4085A8 00779000
  781. SPACE 3 00780000
  782. * CALL ROUTINE TO HANDLE THE PARTICULAR CONTROL PARAMETER THAT 00781000
  783. * HAS BEEN IDENTIFIED. ARGUMENTS PASSED ARE IN REGISTERS: 00782000
  784. * R6 = STARTING ADDRESS OF PARAMETER. 00783000
  785. * R7 = PARAMETER LENGTH (EXCLUDING ENDING DELIMITER) LESS 00784000
  786. * ONE. 00785000
  787. * R3 = ADDRESS OF THE '=' IN THE PARAMETER. OR ZERO 00786000
  788. * IF '=' IS NOT PRESENT. 00787000
  789. OPER9X6 LH R4,PARMCNT INCREMENT COUNT OF CONTROL PARMS. @V4085A8 00788000
  790. LA R4,1(0,R4) (COUNT IS USED LATER IN DETERMINING @V4085A8 00789000
  791. STH R4,PARMCNT WHETHER OR NOT 'CLEAR' IS ONLY @V4085A8 00790000
  792. * PARAMETER.) 00791000
  793. BALR R14,R15 GO PROCESS THE IDENTIFIED CONTROL PARM.@V4085A8 00792000
  794. LTR R15,R15 TEST POSSIBLE ERROR RETURN CODE. @V4085A8 00793000
  795. BNZ OPER9X8 GO DO FSCLOSE, THEN EXIT. @V4085A8 00794000
  796. SPACE 00795000
  797. OPER9X7 CR R8,R9 IS 'SCAN POINTER' AT END OF RECORD? @V4085A8 00796000
  798. BNE OPER9X3 NO. GO LOOK FOR ANOTHER PARAMETER ON @V4085A8 00797000
  799. * CURRENT RECORD. 00798000
  800. B OPER9X1 YES, GO START A NEW RECORD. @V4085A8 00799000
  801. SPACE 3 00800000
  802. TRTXR8 TRT 0(0,R8),0(R15) EX'ED REMOTELY, LENGTH SUPPLIED.@V4085A8 00801000
  803. TRTXR6 TRT 0(0,R6),0(R15) EX'ED REMOTELY, LENGTH SUPPLIED.@V4085A8 00802000
  804. KEYCLC CLC 0(0,R2),KEYWORK EX'ED REMOTELY, LEN SUPPLIED. @V4085A8 00803000
  805. SPACE 3 00804000
  806. OPER9X8 LR R2,R15 SAVE POSSIBLE ERROR RETURN CODE UNTIL @V4085A8 00805000
  807. * AFTER FSCLOSE. 00806000
  808. FSCLOSE FSCB=SYSNFSCB SYSIN FILE BUILT FOR @V4085A8X00807000
  809. OS/VS EREP TO READ. @V4085A8 00808000
  810. LR R1,R15 SAVE POSSIBLE ERROR FROM FSCLOSE. @V4085A8 00809000
  811. * IF THERE WAS AN ERROR PRIOR TO THE FSCLOSE, THEN WE EXIT NOW 00810000
  812. * WITH THAT PRIOR ERROR SUPPLYING THE EXIT RETURN CODE. 00811000
  813. LTR R15,R2 TEST PRIOR RETURN CODE. @V4085A8 00812000
  814. BNZ EXIT3SAV @V4085A8 00813000
  815. * OTHERWISE, WE SEE IF FSCLOSE GAVE AN ERROR RETURN. 00814000
  816. LTR R15,R1 TEST FSCLOSE RETURN CODE. @V4085A8 00815000
  817. BZ OPER9XX NO ERROR, FSCLOSE WAS GOOD. @V4085A8 00816000
  818. CH R15,=Y(RC6) CODE 6 MEANS FSCLOSE FOUND FILE @V4085A8 00817000
  819. * EMPTY AND COULD NOT CLOSE IT. 00818000
  820. BNE EXIT3SAV ANYTHING ELSE IS A TRUE ERROR. @V4085A8 00819000
  821. * RETURN CODE FROM FSCLOSE SAYS NO SYSIN FILE WAS CREATED. 00820000
  822. * SO WE NOW HAVE TO REDEFINE THE FILEDEF TO A DUMMY SO THAT 00821000
  823. * OS/VS EREP WILL SEE A NULL FILE IF IT TRIES TO READ 00822000
  824. * FROM SYSIN. 00823000
  825. L R1,=A(FDEFSYS2) PARAMETER LIST TO FILEDEF @V4085A8 00824000
  826. * SYSIN AS A DUMMY. 00825000
  827. SVC 202 @V4085A8 00826000
  828. DC AL4(EXIT3SAV) EXIT POINT IN THE UNLIKELY @V4085A8 00827000
  829. * EVENT THAT FILEDEF FAILS. 00828000
  830. OPER9XX DS 0H @V4085A8 00829000
  831. EJECT 00830000
  832. *********************************************************************** 00831000
  833. * 00832000
  834. * 10. IF CLEAR WAS SPECIFIED AND IT WAS NOT THE ONLY PARAMETER 00833000
  835. * SPECIFIED, THEN TYPE ERROR MESSAGE TO TERMINAL AND 00834000
  836. * SKIP TO 17. 00835000
  837. * 00836000
  838. * NOTE: WHEN WE REFER TO A 'CLEAR' PARAMETER WE GENERALLY 00837000
  839. * MEAN TO INCLUDE ANY OF THE SEVERAL VARIANTS OF CLEAR. 00838000
  840. * 00839000
  841. *********************************************************************** 00840000
  842. TM CLRFLAGS,ERRFLG+FRMFLAG ANY 'CLEAR' PARM FOUND?@V5088AA 00841000
  843. BZ OPER12 THERE WERE NO 'CLEAR' PARAMETERS. @V4085A8 00842000
  844. * WAS THE 'CLEAR' PARAMETER THE ONLY PARAMETER? 00843000
  845. LH R1,PARMCNT @V4085A8 00844000
  846. CH R1,=H'1' PARAMETER COUNT SHOULD BE 1. @V4085A8 00845000
  847. BE WANTCLR BRANCH IF 'CLEAR' WAS THE ONLY PARM. @V4085A8 00846000
  848. DMSERR NUM=825,LET=E,TEXT='''CLEAR'' IS VALID ONLY WHEN SPECIFX00847000
  849. IED BY ITSELF',RENT=NO @V4085A8 00848000
  850. MVI RETCDE+1,RC12 @V4085A8 00849000
  851. B EXIT3 @V4085A8 00850000
  852. WANTCLR DS 0H @V4085A8 00851000
  853. SPACE 00852000
  854. *********************************************************************** 00853000
  855. * 00854000
  856. * 11. IF CLEAR WAS SPECIFIED (CORRECTLY), CALL A SUBROUTINE TO 00855000
  857. * ISSUE THE DIAGNOSE THAT ZEROS OUT THE VM ERROR CYLINDERS, 00856000
  858. * THEN SKIP TO 17. 00857000
  859. * 00858000
  860. *********************************************************************** 00859000
  861. SR R1,R1 @V4085A8 00860000
  862. IC R1,CLRFLAGS ARG FOR CLEARRTN SPECIFIES CLR TYPE@V4085A8 00861000
  863. L R15,=A(CLEARRTN) @V4085A8 00862000
  864. BALR R14,R15 CALL SUBROUTINE TO PERFORM CLEAR. @V4085A8 00863000
  865. STH R15,RETCDE SAVE POSSIBLE ERROR RETURN CODE. @V4085A8 00864000
  866. B EXIT3 @V4085A8 00865000
  867. SPACE 00866000
  868. *********************************************************************** 00867000
  869. * 00868000
  870. * 12. INVOKE 'FILEDEF' TO DEFINE THE ACCUMULATION TAPE FILE 00869000
  871. * IF REQUESTED. ISSUE THE TAPE CONTROL MACROS NECESSARY TO 00870000
  872. * POSITION THE TAPE FOR SUBSEQUENT WRITE OPERATIONS. 00871000
  873. * 00872000
  874. *********************************************************************** 00873000
  875. OPER12 TM ACCFLGS,OVRIDFLG+YSPECFLG ANY OVERRIDING CON- @V4085A8 00874000
  876. * SIDERATION FOR ACC=Y? 00875000
  877. * OR USER REQUESTED ACC=Y? 00876000
  878. BNZ RDYACC ACC=Y IS MANDATORY OR WAS REQUESTED. @V4085A8 00877000
  879. TM ACCFLGS,NSPECFLG USER REQUESTED ACC=N? @V4085A8 00878000
  880. BNZ ACCEND ACC=N IS REQUESTED. @V4085A8 00879000
  881. * ACC WAS NOT SPECIFIED EXPLICITELY. 00880000
  882. TM ACCFLGS,DFLTFLG TEST FLAG TO SEE WHAT THE @V4085A8 00881000
  883. * ACC DEFAULT SHOULD BE. 00882000
  884. * NOTE: DEFAULT IS NOT FIXED. IT DEPENDS ON THE TYPE OF REPORT. 00883000
  885. BZ ACCEND DEFAULT IS SUPPOSED TO BE ACC=N. @V4085A8 00884000
  886. RDYACC L R1,=A(FDEFACCD) PARM LIST FOR ACC TAPE FILEDEF.@V4085A8 00885000
  887. SVC 202 @V4085A8 00886000
  888. TAPECTL REW,TAP1 @V4085A8 00887000
  889. LTR R15,R15 TEST RETURN CODE FROM REWIND. @V4085A8 00888000
  890. BZ ACCFSF NO PROBLEMS. @V4085A8 00889000
  891. * SOME ERROR CODE WAS RETURNED. 00890000
  892. CH R15,=Y(RC5) TAPE NOT ATTACHED? @V4085A8 00891000
  893. BNE TAPERROR NO, SOME OTHER ERROR. @V4085A8 00892000
  894. * TAPE WAS NOT ATTACHED. WE WILL NOT ISSUE A DIAGNOSTIC AS 00893000
  895. * THE USER MAY BE SUPPLYING HIS OWN FILEDEF FOR THE ACC FILE 00894000
  896. * IN WHICH CASE THERE IS NOT NECESSARILY A REQUIREMENT FOR 00895000
  897. * A 'TAP1'. ON THE OTHER HAND, IF TAP1 SHOULD HAVE BEEN 00896000
  898. * ATTACHED, OS/VS EREP WILL INFORM THE USER VIA AN I/O ERROR 00897000
  899. * MESSAGE LATER. 00898000
  900. B ACCEND @V4085A8 00899000
  901. SPACE 00900000
  902. ACCFSF TAPECTL FSF,TAP1,ERROR=TAPERROR SKIP PREVIOUSLY @V4085A8 00901000
  903. * ACCUMULATED DATA. 00902000
  904. TAPECTL BSF,TAP1,ERROR=TAPERROR POSITION TO ADD TO @V4085A8 00903000
  905. * EXISTING FILE. 00904000
  906. ACCEND DS 0H @V4085A8 00905000
  907. SPACE 00906000
  908. *********************************************************************** 00907000
  909. * 00908000
  910. * 13. INVOKE 'FILEDEF' TO DEFINE THE HISTORY INPUT TAPE IF 00909000
  911. * REQUESTED. AND BE SURE IT IS REWOUND. 00910000
  912. * 00911000
  913. *********************************************************************** 00912000
  914. * NOTE: MERGE AND HIST BOTH USE THE HIST FLAGS. 00913000
  915. OPER13 TM HISTFLGS,OVRIDFLG+YSPECFLG ANY OVERRIDING CON- @V4085A8 00914000
  916. * SIDERATION FOR HIST=Y? 00915000
  917. * OR USER REQUESTED HIST=Y? 00916000
  918. BNZ RDYHIST HIST=Y IS MANDATORY OR WAS REQUESTED. @V4085A8 00917000
  919. TM HISTFLGS,NSPECFLG USER REQUESTED HIST=N? @V4085A8 00918000
  920. BNZ HISTEND HIST=N IS REQUESTED. @V4085A8 00919000
  921. * HIST WAS NOT SPECIFIED EXPLICITELY. 00920000
  922. TM HISTFLGS,DFLTFLG TEST FLAG TO SEE WHAT THE @V4085A8 00921000
  923. * HIST DEFAULT SHOULD BE. 00922000
  924. * NOTE: DEFAULT IS NOT FIXED. IT DEPENDS ON THE REPORT. 00923000
  925. BZ HISTEND DEFAULT IS SUPPOSED TO BE HIST=N. @V4085A8 00924000
  926. RDYHIST L R1,=A(FDEFACCI) PARM LIST FOR FILEDEF OF @V4085A8 00925000
  927. * HIST TAPE. 00926000
  928. SVC 202 @V4085A8 00927000
  929. TAPECTL REW,TAP2 @V4085A8 00928000
  930. LTR R15,R15 TEST RETURN CODE FROM REWIND. @V4085A8 00929000
  931. BZ HISTEND NO PROBLEMS. @V4085A8 00930000
  932. * SOME ERROR CODE WAS RETURNED. 00931000
  933. CH R15,=Y(RC5) TAPE NOT ATTACHED? @V4085A8 00932000
  934. BNE TAPERROR NO, SOME OTHER ERROR. @V4085A8 00933000
  935. * TAPE WAS NOT ATTACHED. WE WILL NOT ISSUE A DIAGNOSTIC AS THE 00934000
  936. * USER MAY BE SUPPLYING HIS OWN FILEDEF FOR THE HIST FILE IN 00935000
  937. * WHICH CASE THERE IS NOT NECESSARILY A REQUIREMENT FOR 00936000
  938. * A 'TAP2'. ON THE OTHER HAND, IF TAP2 SHOULD HAVE BEEN 00937000
  939. * ATTACHED, OS/VS EREP WILL INFORM THE USER VIA AN I/O ERROR 00938000
  940. * MESSAGE LATER. 00939000
  941. HISTEND DS 0H @V4085A8 00940000
  942. SPACE 00941000
  943. *********************************************************************** 00942000
  944. * 00943000
  945. * 14. LINK TO OS/VS EREP (IFCEREP1). 00944000
  946. * 00945000
  947. *********************************************************************** 00946000
  948. LA R1,PARMBFAD LOAD ADDR OF WORD THAT POINTS TO @V4085A8 00947000
  949. * THE OS PARM LIST THAT WE BUILT. 00948000
  950. LINK EP=IFCEREP1 BEGIN EXECUTION OF OS/VS EREP. @V4085A8 00949000
  951. * CONTROL EVENTUALLY RETURNS HERE AND FALLS THRU TO 16. 00950000
  952. SPACE 00951000
  953. *********************************************************************** 00952000
  954. * 00953000
  955. * 15. SIMULATE BLDL SVC'S ISSUED FROM OS/VS EREP. 00954000
  956. * SIMULATE EXCP SVC'S ISSUED FROM OS/VS EREP SO THEY WILL 00955000
  957. * APPEAR TO ACCESS A SYS1.LOGREC DATA SET; SIMULATION WILL 00956000
  958. * RESULT IN CALLS TO DMSREA TO GET RECORDS FROM VM/370 ERROR 00957000
  959. * RECORDING CYLINDERS; AN EXCP THAT ATTEMPTS TO RE-WRITE 00958000
  960. * THE SYS1.LOGREC HEADER IS A RESULT OF THE 'ZERO' FUNCTION 00959000
  961. * AND IS SIMULATED BY CALLING A SUBROUTINE TO ISSUE THE 00960000
  962. * DIAGNOSE THAT ZEROS OUT THE ERROR RECORDING CYLINDERS. 00961000
  963. * 00962000
  964. *********************************************************************** 00963000
  965. SPACE 00964000
  966. * NOTE: THE SVC SIMULATING CODE IS LOCATED AT LABELS DMSIFC0, 00965000
  967. * DMSIFC18, AND DMSIFC76. 00966000
  968. SPACE 6 00967000
  969. *********************************************************************** 00968000
  970. * 00969000
  971. * 16. EVENTUALLY OS/VS EREP IS DONE AND CONTROL RETURNS HERE 00970000
  972. * FROM THE 'LINK' DONE AT 14. ABOVE 00971000
  973. * 00972000
  974. *********************************************************************** 00973000
  975. * DECIDE WHETHER OR NOT TO STORE THE RETURN CODE SENT BACK 00974000
  976. * FROM OS/VS EREP. WE STORE IT IN 'RETCDE' ONLY IF 'RETCDE' 00975000
  977. * WAS NOT SET EARLIER. 'RETCDE' MAY ALREADY CONTAIN AN ERROR 00976000
  978. * CODE FROM ERRORS DETECTED BY THE SVC SIMULATION CODE AND 00977000
  979. * THIS TAKES PRECEDENCE OVER ANY ERRORS FROM OS/VS EREP WHICH 00978000
  980. * ARE PROBABLY A LATER INDICATION OF THE SAME PROBLEM. 00979000
  981. CLI RETCDE+1,0 @V4085A8 00980000
  982. BNE *+8 EXIT WITHOUT STORING R15 IN RETCDE. @V4085A8 00981000
  983. STH R15,RETCDE SAVE ERROR CODE TO PASS BACK TO CMS.@V4085A8 00982000
  984. SPACE 00983000
  985. *********************************************************************** 00984000
  986. * 00985000
  987. * 17. HOUSEKEEP ALL INDICATORS AND SWITCHES. FRET ANY CORE 00986000
  988. * OBTAINED FOR THE OS 'PARM' AREA. CLEAR HANDLING OF 00987000
  989. * SVC'S 0, 18, AND 76. CLEAR ANY FILEDEFS THAT WERE SET UP 00988000
  990. * BY CPEREP. 00989000
  991. * 00990000
  992. *********************************************************************** 00991000
  993. EXIT9 DS 0H @V4085A8 00992000
  994. * FREE ANY STORAGE ALLOCATED FOR THE SVC SIMULATION. 00993000
  995. EXIT3 DS 0H @V4085A8 00994000
  996. * FREE THE STORAGE ALLOCATED FOR OS PARM LIST. 00995000
  997. LA R0,(PARMBUFL+7)/8 LENGTH OF PARM BUILD AREA @V4085A8 00996000
  998. * IN DOUBLEWORDS. 00997000
  999. L R1,PARMBFAD ADDRESS OF ALLOCATED PARM BLD AREA.@V4085A8 00998000
  1000. DMSFRET DWORDS=(0),LOC=(1) @V4085A8 00999000
  1001. EXIT1 DS 0H @V4085A8 01000000
  1002. * 01001000
  1003. * ERASE THE 'DIRECTWK' WORK FILE. (NOTE: THE 'SYSIN' WORK FILE 01002000
  1004. * WILL ERASE ITSELF SINCE IT HAS FILEMODE 3.) 01003000
  1005. LA R1,=CL16'DIRECTWKEREPWORK' ID OF FILE TO ERASE.@V4085A8 01004000
  1006. L R15,=A(ERASFILE) @V4085A8 01005000
  1007. BALR R14,R15 RTN ERASES FROM WHATEVER DISK IT'S ON. @V4085A8 01006000
  1008. * CLEAR ANY FILEDEF'S ESTABLISHED BY THIS PROGRAM. 01007000
  1009. * NOTE: WE WILL NOT CLEAR THE EREPPT, ACCIN, AND ACCDEV 01008000
  1010. * FILEDEF'S BECAUSE THEY MAY HAVE COME FROM THE USER (AND THEY 01009000
  1011. * MAY EVEN BE 'PERM'). 01010000
  1012. L R1,=A(FDEFCLR) @V4085A8 01011000
  1013. USING FDEFCLR,R1 @V4085A8 01012000
  1014. LA R3,CLRLIST BXLE LOOP ADVANCES R3 THRU LIST. @V4085A8 01013000
  1015. LA R4,L8 BXLE INCREMENT: LENGTH OF DDNAME. @V4085A8 01014000
  1016. LA R5,CLRLISTZ BXLE COMPARAND: END OF LIST. @V4085A8 01015000
  1017. * ENTER LOOP WITH R1 POINTING TO FILEDEF PLIST WHICH ALREADY 01016000
  1018. * CONTAINS NAME OF FIRST FILEDEF TO BE CLEARED. 01017000
  1019. CLRLOOP SVC 202 CLEAR ONE FILEDEF. @V4085A8 01018000
  1020. * IGNORE ANY ERROR RETURNS. 01019000
  1021. MVC FDEFCLRN(L8),0(R3) PUT NEXT NAME INTO PLIST. @V4085A8 01020000
  1022. BXLE R3,R4,CLRLOOP LOOP UNTIL END OF LIST. @V4085A8 01021000
  1023. DROP R1 @V4085A8 01022000
  1024. * 01023000
  1025. * CLEAR HANDLING OF SVC'S. 01024000
  1026. HNDSVC CLR,0,18,76 @V4085A8 01025000
  1027. * 01026000
  1028. * DELETE DMSREA THAT WAS LOADED BY OS SIMULATED LOAD. 01027000
  1029. DELETE EP=DMSREA @V4085A8 01028000
  1030. * 01029000
  1031. * RESTORE FLAGS IN THE CMS NUCLEUS TO THEIR ORIGINAL VALUES. 01030000
  1032. DMSKEY NUCLEUS @V4085A8 01031000
  1033. NI DOSSAVE,DOSSVC KEEP 'DOSSVC' FLAG'S INITIAL @V4085A8 01032000
  1034. * VALUE, GET RID OF OTHER FLAGS. 01033000
  1035. OC DOSFLAGS,DOSSAVE RESTORE 'DOSSVC' FLAG TO @V4085A8 01034000
  1036. * THE NUCLEUS. 01035000
  1037. NI OSSSAVE,COMPSWT KEEP 'COMPSWT' FLAG'S INITIAL @V4085A8 01036000
  1038. * VALUE, BUT GET RID OF OTHER FLAGS. 01037000
  1039. OC OSSFLAGS,OSSSAVE RESTORE 'COMPSWT' FLAG TO @V4085A8 01038000
  1040. * THE NUCLEUS. 01039000
  1041. DMSKEY RESET @V4085A8 01040000
  1042. SPACE 01041000
  1043. *********************************************************************** 01042000
  1044. * 01043000
  1045. * 18. EXIT TO CMS. 01044000
  1046. * 01045000
  1047. *********************************************************************** 01046000
  1048. EXIT0 L R13,SAVER13B(0,R13) @V4085A8 01047000
  1049. L R14,SAVER14(0,R13) @V4085A8 01048000
  1050. LH R15,RETCDE @V4085A8 01049000
  1051. LM R0,R12,SAVER0(R13) @V4085A8 01050000
  1052. BR R14 @V4085A8 01051000
  1053. SPACE 3 01052000
  1054. EXIT0SAV STH R15,RETCDE SAVE THE RETURN CODE. @V4085A8 01053000
  1055. B EXIT0 @V4085A8 01054000
  1056. SPACE 3 01055000
  1057. EXIT1SAV STH R15,RETCDE SAVE THE RETURN CODE. @V4085A8 01056000
  1058. B EXIT1 @V4085A8 01057000
  1059. SPACE 3 01058000
  1060. EXIT3SAV STH R15,RETCDE SAVE THE RETURN CODE. @V4085A8 01059000
  1061. TAPERROR EQU EXIT3SAV @V4085A8 01060000
  1062. B EXIT3 @V4085A8 01061000
  1063. DROP R12 @V4085A8 01062000
  1064. EJECT 01063000
  1065. *********************************************************************** 01064000
  1066. * 01065000
  1067. * HCLEARF: HANDLER ROUTINE FOR 'CLEARF' PARAMETER. 01066000
  1068. * 01067000
  1069. *********************************************************************** 01068000
  1070. * 01069000
  1071. * INPUTS: SEE COMMENTS IN THE HCLEAR ROUTINE BELOW. 01070000
  1072. * OUTPUTS: SEE COMMENTS IN THE HCLEAR ROUTINE BELOW. 01071000
  1073. * 01072000
  1074. *********************************************************************** 01073000
  1075. HCLEARF SR R15,R15 INITIALIZE RETURN CODE TO 0 @V5088AA 01074000
  1076. STM R14,R12,SAVER14(R13) @V5088AA 01075000
  1077. LA R0,FRMFLAG R0 CONTAINS CLEAR TYPE @V5088AA 01076000
  1078. BALR R12,0 @V5088AA 01077000
  1079. USING *,R12 @V5088AA 01078000
  1080. B HCLEAR1 GO TO SHARED CODE FOR CLEAR PARMS@V5088AA 01079000
  1081. DROP R12 @V5088AA 01080000
  1082. *********************************************************************** 01081000
  1083. * 01082000
  1084. * HCLEAR: HANDLER ROUTINE FOR THE 'CLEAR' PARAMETER * 01083000
  1085. * 01084000
  1086. *********************************************************************** 01085000
  1087. * 01086000
  1088. * INPUTS: R3 - ADDRESS OF THE '=' IN THE PARAMETER. OR ZERO IF '=' 01087000
  1089. * IS NOT PRESENT. 01088000
  1090. * R6 - STARTING ADDRESS OF PARAMETER. 01089000
  1091. * R7 - PARAMETER LENGTH LESS ONE. 01090000
  1092. * 01091000
  1093. * OUTPUTS: CLRFLAGS - CONTAINS BIT FLAGS REQUESTING CLEAR. 01092000
  1094. * PARM LIST - PARAMETER IS ADDED TO OS PARM LIST TO BE 01093000
  1095. * PASSED TO EREP FOR DIAGNOSIS IF IT CONTAINS '=' 01094000
  1096. * FOLLOWED BY SOMETHING OTHER THAN Y OR N. 01095000
  1097. * R15 - CONTAINS AN ERROR RETURN CODE ONLY IF ERROR REQUIRES 01096000
  1098. * US TO PUT IT IN OS PARM LIST AND THEN THERE 01097000
  1099. * HAPPENS TO BE NO MORE ROOM IN THE PARM LIST. 01098000
  1100. * 01099000
  1101. *********************************************************************** 01100000
  1102. HCLEAR SR R15,R15 INITIALIZE RETURN CODE TO 0. @V4085A8 01101000
  1103. STM R14,R12,SAVER14(R13) @V4085A8 01102000
  1104. LA R0,ERRFLG R0 CONTAINS FLAGS INDICATING TYPE OF@V5088AA 01103000
  1105. * CLEAR. 01104000
  1106. HCLEAR1 BALR R12,0 HCLEAR1 IS SHARED ENTRY POINT FROM @V4085A8 01105000
  1107. * HCLEARMC AND HCLEARIO. 01106000
  1108. USING *,R12 @V4085A8 01107000
  1109. ST R13,SAVE2+SAVER13B PTR TO OLD SAVE AREA IN @V4085A8 01108000
  1110. * NEW SAVE AREA. 01109000
  1111. LA R13,SAVE2 NEW SAVE AREA. @V4085A8 01110000
  1112. LTR R3,R3 WAS THERE AN '='? @V4085A8 01111000
  1113. BZ HCLY NO, THERE WAS NO '='. TREAT IT AS '=Y'. @V4085A8 01112000
  1114. * COMPUTE ENDING ADDR TO SEE THAT ONLY ONE CHAR FOLLOWED THE '=' 01113000
  1115. LA R1,0(R7,R6) ADDR OF FINAL CHARACTER. @V4085A8 01114000
  1116. LA R3,L1(0,R3) ADDR OF CHAR BEYOND THE '='. @V4085A8 01115000
  1117. CR R3,R1 THESE SHOULD BOTH BE THE SAME ADDR. @V4085A8 01116000
  1118. BNE HCLPLIST ERROR. SEND IT TO THE PARM LIST. @V4085A8 01117000
  1119. * R3 NOW POINTS TO THE CHAR BEYOND '='. 01118000
  1120. CLI 0(R3),C'Y' @V4085A8 01119000
  1121. BE HCLY CLEAR=Y IS WANTED. @V4085A8 01120000
  1122. CLI 0(R3),C'N' @V4085A8 01121000
  1123. BE HCLEXIT CLEAR=N IS WANTED. @V4085A8 01122000
  1124. * FALL THRU MEANS NEITHER =Y NOR =N, AN ERROR. 01123000
  1125. * SEND THE PARAMETER TO THE OS PARM LIST. 01124000
  1126. HCLPLIST L R15,=A(PLISTBLD) @V4085A8 01125000
  1127. BALR R14,R15 @V4085A8 01126000
  1128. * R15 CONTAINS AN ERROR RETURN CODE OR ZERO. PUT IT IN 01127000
  1129. * R15 IN OLD SAVE AREA. 01128000
  1130. L R1,SAVER13B(R13) GET ADDR OF OLD SAVE AREA. @V4085A8 01129000
  1131. ST R15,SAVER15(0,R1) PUT R15 IN OLD SAVE AREA. @V4085A8 01130000
  1132. B HCLEXIT @V4085A8 01131000
  1133. SPACE 01132000
  1134. HCLY STC R0,CLRFLAGS SET FLAGS REQUESTING CLEAR. @V4085A8 01133000
  1135. HCLEXIT L R13,SAVER13B(R13) GET ADDR OF OLD SAVE AREA. @V4085A8 01134000
  1136. LM R14,R12,SAVER14(R13) @V4085A8 01135000
  1137. DROP R12 @V4085A8 01136000
  1138. BR R14 @V4085A8 01137000
  1139. EJECT 01138000
  1140. *********************************************************************** 01139000
  1141. * 01140000
  1142. * HTERM: HANDLER ROUTINE FOR THE 'TERMINAL' PARAMETER. 01141000
  1143. * 01142000
  1144. *********************************************************************** 01143000
  1145. * 01144000
  1146. * THE 'TERMINAL' PARAMETER CAUSES US TO SWITCH FROM READING 01145000
  1147. * INPUT FROM A CONTROL FILE ON DISK TO READING INPUT FROM THE 01146000
  1148. * TERMINAL WITH PROMPTING. 01147000
  1149. * 01148000
  1150. * INPUTS: R3 - ADDRESS OF AN '=' FOLLOWING THE PARAMETER, IF 01149000
  1151. * PRESENT. OR ZERO IS '=' IS NOT PRESENT. 01150000
  1152. * 01151000
  1153. * OUTPUTS: RDCTLSW - THIS SWITCH IN THE READ ROUTINE IS SET SO 01152000
  1154. * THAT SUBSEQUENT READING WILL BE FROM THE TERMINAL. 01153000
  1155. * 01154000
  1156. *********************************************************************** 01155000
  1157. HTERM SR R15,R15 SET ERROR RETURN CODE. NO ERRORS ARE @V4085A8 01156000
  1158. * RECOGNIZED IN THIS ROUTINE. 01157000
  1159. STM R14,R12,SAVER14(R13) @V4085A8 01158000
  1160. BALR R12,0 @V4085A8 01159000
  1161. USING *,R12 @V4085A8 01160000
  1162. L R2,=A(RDCTLSW) MAKE SWITCH ADDRESSABLE. @V4085A8 01161000
  1163. USING RDCTLSW,R2 @V4085A8 01162000
  1164. LTR R3,R3 WAS THERE AN '=' ? @V4085A8 01163000
  1165. BZ HTERMY BRANCH IF NO '='. @V4085A8 01164000
  1166. CLI D1(R3),C'N' TEST FOR TERMINAL=N @V4085A8 01165000
  1167. BE HTERMX RETURN WITHOUT SETTING SWITCH. @V4085A8 01166000
  1168. HTERMY OI RDCTLSW,X'F0' SET SWITCH TO READ TERMINAL. @V4085A8 01167000
  1169. DROP R2 @V4085A8 01168000
  1170. HTERMX LM R14,R12,SAVER14(R13) @V4085A8 01169000
  1171. DROP R12 @V4085A8 01170000
  1172. BR R14 @V4085A8 01171000
  1173. EJECT 01172000
  1174. *********************************************************************** 01173000
  1175. * 01173300
  1176. * HCONTROL: HANDLER ROUTINE FOR THE 'CONTROLLER' PARAMETER. 01173600
  1177. * 01174000
  1178. * HSHARE: HANDLER ROUTINE FOR THE 'SHARE' PARAMETER. 01175000
  1179. * 01176000
  1180. *********************************************************************** 01177000
  1181. * 01178000
  1182. * INPUTS: R6 - STARTING ADDRESS OF THE PARAMETER. 01179000
  1183. * R7 - PARAMETER LENGTH LESS ONE. 01180000
  1184. * 01181000
  1185. * OUTPUTS: - AN 80 BYTE RECORD CONTAINING THIS SHARE PARAMETER 01182000
  1186. * ALONE IS WRITTEN INTO THE SYSIN FILE FOR EREP TO 01183000
  1187. * READ LATER. 01184000
  1188. * R15- AN ERROR RETURN CODE IF THE WRITE TO THE SYSIN 01185000
  1189. * FILE FAILS. 01186000
  1190. * 01187000
  1191. *********************************************************************** 01188000
  1192. HCONTROL EQU * CONTROLLER PARAMETER @VA09381 01188500
  1193. HSHARE STM R14,R12,SAVER14(R13) @V4085A8 01189000
  1194. BALR R12,0 @V4085A8 01190000
  1195. USING *,R12 @V4085A8 01191000
  1196. ST R13,SAVE2+SAVER13B PTR TO OLD SAVE AREA IN NEW @V4085A8 01192000
  1197. * SAVE AREA. 01193000
  1198. LA R13,SAVE2 NEW SAVE AREA. @V4085A8 01194000
  1199. * IF THE PARAMETER IS TOO LONG TO FIT ON A RECORD OF THE SYSIN 01195000
  1200. * FILE, WE SIMPLY TRUNCATE IT. EREP SHOULD DIAGNOSE IT WHEN 01196000
  1201. * IT SEES UNBALANCED PARENTHESES BECAUSE THE RIGHT PARENTHESIS 01197000
  1202. * IS CUT OFF. 01198000
  1203. CH R7,=Y(L'SYSNBUF) @V4085A8 01199000
  1204. BL *+8 BRANCH IF LENGTH IS OKAY. @V4085A8 01200000
  1205. LA R7,L'SYSNBUF-1 REVISE LENGTH TO RECORD @V4085A8 01201000
  1206. * LENGTH LESS ONE. 01202000
  1207. * NOW WE MOVE THE PARAMETER TO THE BUFFER. NOTE THAT THE 01203000
  1208. * BUFFER CONTAINS BLANKS NOW. THE WRITSYSN ROUTINE RESETS IT 01204000
  1209. * TO BLANKS AFTER EACH USE. 01205000
  1210. L R1,=A(SYSNBUF) BUFFER ADDR NEEDED BY EX'ED MVC.@V4085A8 01206000
  1211. EX R7,HSHARMVC MOVE PARAMETER TO BUFFER. @V4085A8 01207000
  1212. L R15,=A(WRITSYSN) @V4085A8 01208000
  1213. BALR R14,R15 CALL RTN TO WRITE THE BUFFER TO SYSIN. @V4085A8 01209000
  1214. * R15 IS RETURNED WITH A RETURN CODE. 01210000
  1215. L R13,SAVER13B(0,R13) GET ADDR OF OLD SAVE AREA. @V4085A8 01211000
  1216. L R14,SAVER14(0,R13) RESTORE FROM OLD SAVE AREA. @V4085A8 01212000
  1217. LM R0,R12,SAVER0(R13) RESTORE FROM OLD SAVE AREA. @V4085A8 01213000
  1218. DROP R12 @V4085A8 01214000
  1219. BR R14 @V4085A8 01215000
  1220. SPACE 3 01216000
  1221. HSHARMVC MVC 0(0,R1),0(R6) EX'ED REMOTELY, LENGTH SUPPLIED. @V4085A8 01217000
  1222. EJECT 01218000
  1223. *********************************************************************** 01219000
  1224. * 01220000
  1225. * HCTLCRD: HANDLER ROUTINE FOR THE 'CTLCRD PARAMETER. 01221000
  1226. * 01222000
  1227. *********************************************************************** 01223000
  1228. * 01224000
  1229. * INPUTS: 01225000
  1230. * R6 - STARTING ADDRESS OF PARAMETER (I.E., OF THE WORD CTLCRD) 01226000
  1231. * R7 - PARAMETER LENGTH LESS ONE (I.E., 5). 01227000
  1232. * R8 - THE 'SCAN POINTER' VALUE: ADDRESS OF THE BYTE FOLLOWING 01228000
  1233. * THE WORD CTLCRD IN THE INPUT RECORD FROM THE TERMINAL 01229000
  1234. * OR DISK FILE. 01230000
  1235. * R9 - END OF RECORD ADDRESS, I.E., ADDRESS OF 1ST BYTE BEYOND 01231000
  1236. * END OF THE INPUT RECORD. 01232000
  1237. * SYSNBUF - BLANKED BUFFER IN WHICH TO BUILD OS/VS EREP 01233000
  1238. * FORMATTED CTLCRD RECORD. 01234000
  1239. * 01235000
  1240. * OUTPUTS: 01236000
  1241. * - AN 80 BYTE RECORD CONTAINING THE CTLCRD INFORMATION 01237000
  1242. * (IN THE FORMAT REQUIRED BY OS/VS EREP) IS WRITTEN INTO 01238000
  1243. * THE SYSIN FILE FOR EREP TO READ LATER. 01239000
  1244. * R15 - AN ERROR RETURN CODE IF THE WRITE TO THE SYSIN FILE 01240000
  1245. * FAILS. 01241000
  1246. * R8 - THE 'SCAN POINTER' VALUE IS ADVANCED TO END OF INPUT 01242000
  1247. * RECORD, I.E., SAME ADDRESS AS R9. THIS IS DONE BECAUSE 01243000
  1248. * THE CTLCRD PARAMETER IS REGARDED AS INCLUDING 01244000
  1249. * EVERYTHING FOLLOWING THE WORD CTLCRD, NOT JUST THE 01245000
  1250. * WORD ITSELF. 01246000
  1251. * 01247000
  1252. *********************************************************************** 01248000
  1253. HCTLCRD STM R14,R12,SAVER14(R13) @V4085A8 01249000
  1254. BALR R12,0 @V4085A8 01250000
  1255. USING *,R12 @V4085A8 01251000
  1256. ST R13,SAVE2+SAVER13B PTR TO OLD SAVE AREA IN @V4085A8 01252000
  1257. * NEW SAVE AREA. 01253000
  1258. LA R13,SAVE2 NEW SAVE AREA. @V4085A8 01254000
  1259. L R2,=A(SYSNBUF) BUFFER WHERE NEW CTLCRD IS TO @V4085A8 01255000
  1260. * BE BUILT. 01256000
  1261. USING CTLCRD,R2 DSECT FOR CTLCRD LAYOUT IN BUFFER. @V4085A8 01257000
  1262. EX R7,HCTLMVC MOVE 'CTLCRD' INTO PLACE. @V4085A8 01258000
  1263. CR R8,R9 'SCAN POINTER' ALREADY AT END? @V4085A8 01259000
  1264. BE HCTLEOR NO MORE OPERANDS, CTLCRD WAS AT END. @V4085A8 01260000
  1265. LR R5,R9 ADDR 1ST BYTE BEYOND INPUT RECORD. @V4085A8 01261000
  1266. BCTR R5,0 ADDR OF LAST BYTE OF RECORD. IN BXH @V4085A8 01262000
  1267. * COMPARAND REGISTER. 01263000
  1268. LA R4,1 VALUE OF 1 IN BXH INCREMENT REGISTER. @V4085A8 01264000
  1269. * FIND AND HANDLE 'DATE1' PARAMETER. 01265000
  1270. * R8 (SCAN POINTER) IS CURRENTLY AT DELIMITER BEYOND CTLCRD 01266000
  1271. * (PROBABLY A BLANK, BUT POSSIBLY A COMMA). SKIP THAT DELIMITER 01267000
  1272. * IMMEDIATELY (BXH ADDS ONE) AND THEN SKIP ANY FOLLOWING 01268000
  1273. * BLANKS UP TO THE START OF THE NEXT OPERAND (WHICH MAY 01269000
  1274. * CONSIST SOLELY OF A COMMA INDICATING NEXT OPERAND IS OMITTED). 01270000
  1275. HCTLOOP1 BXH R8,R4,HCTLEOR ADVANCE R8 TO NEXT COLUMN. @V4085A8 01271000
  1276. * BRANCH IF AT END OF RECORD. 01272000
  1277. CLI 0(R8),C' ' TEST NEW COLUMN FOR BLANK. @V4085A8 01273000
  1278. BE HCTLOOP1 CONTINUE SKIPPING IF BLANK. @V4085A8 01274000
  1279. * FALL THRU INDICATES R8 POINTS TO START OF NEXT OPERAND. 01275000
  1280. LR R6,R8 SAVE STARTING ADDR OF NEW OPERAND. @V4085A8 01276000
  1281. * CALL 'PARMSCAN' TO SCAN TO END OF OPERAND. 01277000
  1282. LR R0,R9 ARG FOR 'PARMSCAN'. END OF RECORD ADDR. @V4085A8 01278000
  1283. LR R1,R8 ARG FOR 'PARMSCAN'. ADDR OF PARAMETER. @V4085A8 01279000
  1284. L R15,=A(PARMSCAN) @V4085A8 01280000
  1285. BALR R14,R15 @V4085A8 01281000
  1286. LR R8,R1 UPDATED 'SCAN POINTER' RETURNED FROM @V4085A8 01282000
  1287. * PARMSCAN. POINTS TO DELIMITER AT END OF PARM. 01283000
  1288. LTR R0,R0 TEST RETURNED PARAMETER LENGTH. @V4085A8 01284000
  1289. BZ HCTLFIN1 LENGTH ZERO, PARAMETER OMITTED. LEAVE@V4085A8 01285000
  1290. * FIELD IN OUTPUT RECORD BLANK. 01286000
  1291. CH R0,=Y(L'CTLCRDD1) SEE IF PARAMETER IS TOO BIG @V4085A8 01287000
  1292. * FOR OUTPUT FIELD. 01288000
  1293. BNH *+8 BRANCH IF LENGTH OKAY. @V4085A8 01289000
  1294. LA R0,L'CTLCRDD1+1 CHOP LENGTH DOWN TO ALLOWED @V4085A8 01290000
  1295. * WIDTH PLUS 1 SO IT OVERFLOWS INTO THE 01291000
  1296. * NEXT COLUMN (NORMALLY BLANK) SO 01292000
  1297. * OS/VS EREP WILL SEE AN ERROR. 01293000
  1298. LR R7,R0 @V4085A8 01294000
  1299. BCTR R7,0 PARAMETER LENGTH LESS ONE FOR EX OF MVC. @V4085A8 01295000
  1300. EX R7,HCTLMVC1 MOVE 'DATE1' INTO PLACE. @V4085A8 01296000
  1301. HCTLFIN1 CR R8,R9 'SCAN POINTER' NOW AT END? @V4085A8 01297000
  1302. BE HCTLEOR NO MORE OPERANDS, DATE1 WAS AT END. @V4085A8 01298000
  1303. * FIND AND HANDLE 'DATE2' PARAMETER. 01299000
  1304. * R8 (SCAN POINTER) IS CURRENTLY AT DELIMITER BEYOND DATE1 01300000
  1305. * (PROBABLY A BLANK, BUT POSSIBLY A COMMA). SKIP THAT 01301000
  1306. * DELIMITER AND ANY FOLLOWING BLANKS. THIS GETS US UP TO THE 01302000
  1307. * START OF THE NEXT OPERAND (WHICH MAY CONSIST SOLELY OF A 01303000
  1308. * COMMA INDICATING NEXT OPERAND IS OMITTED). 01304000
  1309. HCTLOOP2 BXH R8,R4,HCTLEOR ADVANCE R8 TO NEXT COLUMN. @V4085A8 01305000
  1310. * BRANCH IF AT END OF RECORD. @V4085A8 01306000
  1311. CLI 0(R8),C' ' @V4085A8 01307000
  1312. BE HCTLOOP2 CONTINUE SKIPPING IF BLANK. @V4085A8 01308000
  1313. * FALL THRU INDICATES R8 POINTS TO START OF NEXT OPERAND. 01309000
  1314. LR R6,R8 SAVE STARTING ADDR OF 'DATE2' OPERAND. @V4085A8 01310000
  1315. * CALL 'PARMSCAN' TO SCAN TO END OF OPERAND. 01311000
  1316. LR R0,R9 ARG FOR 'PARMSCAN'. END OF RECORD ADDR. @V4085A8 01312000
  1317. LR R1,R8 ARG FOR 'PARMSCAN'. ADDR OF PARAMETER. @V4085A8 01313000
  1318. L R15,=A(PARMSCAN) @V4085A8 01314000
  1319. BALR R14,R15 @V4085A8 01315000
  1320. LR R8,R1 UPDATED 'SCAN PTR' RETURNED FROM @V4085A8 01316000
  1321. * PARMSCAN. POINTS TO DELIMITER AT END OF 01317000
  1322. * PARAMETER. 01318000
  1323. LTR R0,R0 TEST RETURNED PARAMETER LENGTH. @V4085A8 01319000
  1324. BZ HCTLFIN2 LENGTH ZERO, FIELD OMITTED. LEAVE @V4085A8 01320000
  1325. * FIELD IN OUTPUT RECORD BLANK. 01321000
  1326. CH R0,=Y(L'CTLCRDD2) SEE IF PARMATER IS TOO BIG @V4085A8 01322000
  1327. * FOR OUTPUT FIELD 01323000
  1328. BNH *+8 BRANCH IF LENGTH OKAY. @V4085A8 01324000
  1329. LA R0,L'CTLCRDD2+1 CHOP LENGTH DOWN TO ALLOWED @V4085A8 01325000
  1330. * WIDTH PLUS 1 SO IT OVERFLOWS INTO THE 01326000
  1331. * NEXT COLUMN (NORMALLY BLANK) SO 01327000
  1332. * OS/VS EREP WILL SEE AN ERROR. 01328000
  1333. LR R7,R0 @V4085A8 01329000
  1334. BCTR R7,0 PARAMETER LENGTH LESS ONE FOR EX OF MVC. @V4085A8 01330000
  1335. EX R7,HCTLMVC2 MOVE 'DATE2' INTO PLACE. @V4085A8 01331000
  1336. HCTLFIN2 CR R8,R9 'SCAN POINTER' NOW AT END? @V4085A8 01332000
  1337. BE HCTLEOR NO MORE OPERANDS, DATE2 WAS AT END. @V4085A8 01333000
  1338. * FIND AND HANDLE 'IPL CLUSTERING INTERVAL'. 01334000
  1339. * R8 (SCAN POINTER) IS CURRENTLY AT DELIMITER BEYOND DATE2 01335000
  1340. * (PROBABLY A BLANK, BUT POSSIBLY A COMMA). SKIP THAT 01336000
  1341. * DELIMITER AND ANY FOLLOWING BLANKS. THIS GETS US UP TO THE 01337000
  1342. * START OF THE NEXT OPERAND (WHICH MAY CONSIST SOLELY OF A 01338000
  1343. * COMMA INDICATING NEXT OPERAND IS OMITTED). 01339000
  1344. HCTLOOP3 BXH R8,R4,HCTLEOR ADVANCE R8 TO NEXT COLUMN. @V4085A8 01340000
  1345. * BRANCH IF AT END OF RECORD. 01341000
  1346. CLI 0(R8),C' ' @V4085A8 01342000
  1347. BE HCTLOOP3 CONTINUE SKIPPING IF BLANK. @V4085A8 01343000
  1348. * FALL THRU INDICATES R8 POINTS TO START OF NEXT OPERAND. 01344000
  1349. LR R6,R8 SAVE STARTING ADDR OF 'IPL CLUSTER @V4085A8 01345000
  1350. * INTERVAL'. 01346000
  1351. * CALL 'PARMSCAN' TO SCAN TO END OF OPERAND. 01347000
  1352. LR R0,R9 ARG FOR 'PARMSCAN'. END OF RECORD ADDR. @V4085A8 01348000
  1353. LR R1,R8 ARG FOR 'PARMSCAN'. ADDR OF PARAMETER. @V4085A8 01349000
  1354. L R15,=A(PARMSCAN) @V4085A8 01350000
  1355. BALR R14,R15 @V4085A8 01351000
  1356. LR R8,R1 UPDATED 'SCAN PTR' RETURNED FROM @V4085A8 01352000
  1357. * PARMSCAN. POINTS TO DELIMITER AT END OF PARM. 01353000
  1358. LTR R0,R0 TEST RETURNED PARAMETER LENGTH. @V4085A8 01354000
  1359. BZ HCTLFIN3 LENGTH ZERO, FIELD OMITTED. LEAVE @V4085A8 01355000
  1360. * FIELD IN OUTPUT RECORD BLANK. 01356000
  1361. CH R0,=Y(L'CTLCRDCI) SEE IF PARAMETER IS TOO BIG @V4085A8 01357000
  1362. * FOR OUTPUT FIELD. 01358000
  1363. BNH *+8 BRANCH IF LENGTH OKAY. @V4085A8 01359000
  1364. LA R0,L'CTLCRDCI+1 CHOP LENGTH DOWN TO ALLOWED @V4085A8 01360000
  1365. * WIDTH PLUS 1 SO IT OVERFLOWS INTO THE 01361000
  1366. * NEXT COLUMN (NORMALLY BLANK) SO 01362000
  1367. * OS/VS EREP WILL SEE AN ERROR. 01363000
  1368. LR R7,R0 @V4085A8 01364000
  1369. BCTR R7,0 PARAMETER LENGTH LESS ONE FOR EX OF MVC. @V4085A8 01365000
  1370. EX R7,HCTLMVC3 MOVE 'IPL CLUSTER INTERVAL' INTO @V4085A8 01366000
  1371. * PLACE. 01367000
  1372. HCTLFIN3 CR R8,R9 'SCAN POINTER' NOW AT END? @V4085A8 01368000
  1373. BE HCTLEOR NO MORE OPERANDS, 'IPL CLUSTER @V4085A8 01369000
  1374. * INTERVAL' WAS AT END. 01370000
  1375. * FIND AND HANDLE 'TITLE' FIELD. 01371000
  1376. * R8 (SCAN POINTER) IS CURRENTLY AT DELIMITER BEYOND 'IPL 01372000
  1377. * CLUSTERING INTERVAL' (PROBABLY AT A BLANK, BUT POSSIBLY A 01373000
  1378. * COMMA). SKIP THAT DELIMITER, BUT TAKE EVERYTHING ELSE 01374000
  1379. * (INCLUDING ADDITIONAL LEADING BLANKS) TO BE THE TITLE. 01375000
  1380. BXH R8,R4,HCTLEOR ADVANCE R8 PAST THE DELIMITER. @V4085A8 01376000
  1381. * BRANCH IF BEYOND END OF RECORD. 01377000
  1382. LR R7,R5 ADDR OF LAST BYTE OF RECORD... @V4085A8 01378000
  1383. SR R7,R8 LESS ADDR OF TITLE IS @V4085A8 01379000
  1384. * LENGTH OF TITLE LESS ONE. 01380000
  1385. * IF TITLE IS TOO LONG WE WILL HAVE TO TRUNCATE IT. 01381000
  1386. CH R7,=Y(L'CTLCRDTI) LENGTH LESS ONE SHOULD BE @V4085A8 01382000
  1387. * LESS THAN THIS. 01383000
  1388. BL *+8 BRANCH IF TITLE LENGTH IS OKAY. @V4085A8 01384000
  1389. LA R7,L'CTLCRDTI-1 REVISE LENGTH TO MAX. ALLOWED. @V4085A8 01385000
  1390. EX R7,HCTLMVC4 MOVE 'TITLE' INTO PLACE. @V4085A8 01386000
  1391. LR R8,R9 LOAD VALUE TO BE RETURNED FROM THIS @V4085A8 01387000
  1392. * SUBROUTINE AS OUTPUT: ADDR OF 1ST BYTE 01388000
  1393. * BEYOND RECORD. 01389000
  1394. HCTLEOR DS 0H IN EVERY CASE R8 SHOULD NOW HAVE ADDR OF @V4085A8 01390000
  1395. * 1ST BYTE BEYOND THE INPUT RECORD. 01391000
  1396. * OUTPUT CTLCRD HAS BEEN BUILT IN THE BUFFER. 01392000
  1397. L R15,=A(WRITSYSN) @V4085A8 01393000
  1398. BALR R14,R15 CALL ROUTINE TO WRITE BUFFER TO SYSIN. @V4085A8 01394000
  1399. * EXIT 01395000
  1400. L R13,SAVER13B(0,R13) GET ADDR OF OLD SAVE AREA. @V4085A8 01396000
  1401. L R14,SAVER14(0,R13) @V4085A8 01397000
  1402. LM R0,R7,SAVER0(R13) @V4085A8 01398000
  1403. LM R9,R12,SAVER9(R13) @V4085A8 01399000
  1404. DROP R12 @V4085A8 01400000
  1405. BR R14 @V4085A8 01401000
  1406. SPACE 3 01402000
  1407. HCTLMVC MVC CTLCRDID(0),0(R6) @V4085A8 01403000
  1408. HCTLMVC1 MVC CTLCRDD1(0),0(R6) @V4085A8 01404000
  1409. HCTLMVC2 MVC CTLCRDD2(0),0(R6) @V4085A8 01405000
  1410. HCTLMVC3 MVC CTLCRDCI(0),0(R6) @V4085A8 01406000
  1411. HCTLMVC4 MVC CTLCRDTI(0),0(R8) @V4085A8 01407000
  1412. DROP R2 @V4085A8 01408000
  1413. EJECT 01409000
  1414. *********************************************************************** 01410000
  1415. * 01411000
  1416. * HACC: HANDLER ROUTINE FOR THE 'ACC' PARAMETER. 01412000
  1417. * 01413000
  1418. *********************************************************************** 01414000
  1419. * 01415000
  1420. * INPUTS: 01416000
  1421. * R3 - ADDRESS OF THE '=' IN THE PARAMETER. OR ZERO IF '=' IS 01417000
  1422. * NOT PRESENT. 01418000
  1423. * R6 - STARTING ADDRESS OF PARAMETER. 01419000
  1424. * R7 - PARAMETER LENGTH LESS ONE. 01420000
  1425. * 01421000
  1426. * OUTPUTS: 01422000
  1427. * - PARAMETER IS ADDED TO OS PARM LIST BEING BUILT. 01423000
  1428. * ACCFLGS - CONTAINS BIT FLAGS. 01424000
  1429. * R15 - ERROR RETURN CODE OR ZERO. 01425000
  1430. * 01426000
  1431. *********************************************************************** 01427000
  1432. HACC STM R14,R12,SAVER14(R13) @V4085A8 01428000
  1433. BALR R12,0 @V4085A8 01429000
  1434. USING *,R12 @V4085A8 01430000
  1435. ST R13,SAVE2+SAVER13B PTR TO OLD SAVE AREA IN @V4085A8 01431000
  1436. * NEW SAVE AREA. 01432000
  1437. LA R13,SAVE2 NEW SAVE AREA. @V4085A8 01433000
  1438. LTR R3,R3 WAS THERE AN '='? @V4085A8 01434000
  1439. BZ HACCY BRANCH IF NO '='. @V4085A8 01435000
  1440. CLI D1(R3),C'N' TEST CHAR FOLLOWING '='. @V4085A8 01436000
  1441. BNE *+8 BRANCH IF NOT ACC=N. @V4085A8 01437000
  1442. OI ACCFLGS,NSPECFLG INDICATE ACC=N WAS SPECIFIED @V4085A8 01438000
  1443. CLI D1(R3),C'Y' TEST CHAR FOLLOWING '='. @V4085A8 01439000
  1444. BNE HACCNOTY BRANCH IF NOT ACC=Y. @V4085A8 01440000
  1445. HACCY OI ACCFLGS,YSPECFLG INDICATE ACC OR ACC=Y WAS @V4085A8 01441000
  1446. * SPECIFIED. 01442000
  1447. HACCNOTY L R15,=A(PLISTBLD) CALL ROUTINE TO ADD PRESENT @V4085A8 01443000
  1448. * PARAMETER TO OS PARM LIST. 01444000
  1449. BALR R14,R15 ARGS PASSED IN R6, R7. @V4085A8 01445000
  1450. * RETURN CODE IS NOW IN R15. 01446000
  1451. * EXIT. 01447000
  1452. L R13,SAVER13B(0,R13) GET ADDR OF OLD SAVE AREA. @V4085A8 01448000
  1453. L R14,SAVER14(0,R13) @V4085A8 01449000
  1454. LM R0,R12,SAVER0(R13) @V4085A8 01450000
  1455. DROP R12 @V4085A8 01451000
  1456. BR R14 @V4085A8 01452000
  1457. EJECT 01453000
  1458. *********************************************************************** 01454000
  1459. * 01455000
  1460. * HHIST: HANDLER ROUTINE FOR THE 'HIST' PARAMETER. 01456000
  1461. * 01457000
  1462. *********************************************************************** 01458000
  1463. * 01459000
  1464. * INPUTS: 01460000
  1465. * R3 - ADDRESS OF THE '=' IN THE PARAMETER. OR ZERO IF '=' IS 01461000
  1466. * NOT PRESENT. 01462000
  1467. * R6 - STARTING ADDRESS OF PARAMETER. 01463000
  1468. * R7 - PARAMETER LENGTH LESS ONE. 01464000
  1469. * 01465000
  1470. * OUTPUTS: 01466000
  1471. * - PARAMETER IS ADDED TO OS PARM LIST BEING BUILT. 01467000
  1472. * HISTFLGS - CONTAINS BIT FLAGS. 01468000
  1473. * R15 - ERROR RETURN CODE OR ZERO. 01469000
  1474. * 01470000
  1475. *********************************************************************** 01471000
  1476. HHIST STM R14,R12,SAVER14(R13) @V4085A8 01472000
  1477. BALR R12,0 @V4085A8 01473000
  1478. USING *,R12 @V4085A8 01474000
  1479. ST R13,SAVE2+SAVER13B PTR TO OLD SAVE AREA IN @V4085A8 01475000
  1480. * NEW SAVE AREA. 01476000
  1481. LA R13,SAVE2 NEW SAVE AREA. @V4085A8 01477000
  1482. LTR R3,R3 WAS THERE AN '='? @V4085A8 01478000
  1483. BZ HHISTY BRANCH IF NO '='. @V4085A8 01479000
  1484. CLI D1(R3),C'N' TEST CHAR FOLLOWING '='. @V4085A8 01480000
  1485. BNE *+8 BRANCH IF NOT HIST=N. @V4085A8 01481000
  1486. OI HISTFLGS,NSPECFLG INDICATE HIST=N WAS SPECIFIED@V4085A8 01482000
  1487. CLI D1(R3),C'Y' TEST CHAR FOLLOWING '='. @V4085A8 01483000
  1488. BNE HHISNOTY BRANCH IF NOT HIST=Y. @V4085A8 01484000
  1489. HHISTY OI HISTFLGS,YSPECFLG INDICATE HIST OR HIST=Y WAS @V4085A8 01485000
  1490. * SPECIFIED. 01486000
  1491. HHISNOTY L R15,=A(PLISTBLD) CALL ROUTINE TO ADD PRESENT @V4085A8 01487000
  1492. * PARAMETER TO OS PARM LIST. 01488000
  1493. BALR R14,R15 ARGS PASSED IN R6, R7. @V4085A8 01489000
  1494. * RETURN CODE IS NOW IN R15. 01490000
  1495. * EXIT. 01491000
  1496. L R13,SAVER13B(0,R13) GET ADDR OF OLD SAVE AREA. @V4085A8 01492000
  1497. L R14,SAVER14(0,R13) @V4085A8 01493000
  1498. LM R0,R12,SAVER0(R13) @V4085A8 01494000
  1499. DROP R12 @V4085A8 01495000
  1500. BR R14 @V4085A8 01496000
  1501. EJECT 01497000
  1502. *********************************************************************** 01498000
  1503. * 01499000
  1504. * HMERGE: HANDLER ROUTINE FOR THE 'MERGE' PARAMETER. 01500000
  1505. * 01501000
  1506. *********************************************************************** 01502000
  1507. * 01503000
  1508. * INPUTS: 01504000
  1509. * R3 - ADDRESS OF THE '=' IN THE PARAMETER. OR ZERO IF '=' IS 01505000
  1510. * NOT PRESENT. 01506000
  1511. * R6 - STARTING ADDRESS OF PARAMETER. 01507000
  1512. * R7 - PARAMETER LENGTH LESS ONE. 01508000
  1513. * 01509000
  1514. * OUTPUTS: 01510000
  1515. * - PARAMETER IS ADDED TO OS PARM LIST BEING BUILT. 01511000
  1516. * HISTFLGS - CONTAINS BIT FLAGS. 01512000
  1517. * R15 - ERROR RETURN CODE OR ZERO. 01513000
  1518. * 01514000
  1519. *********************************************************************** 01515000
  1520. HMERGE STM R14,R12,SAVER14(R13) @V4085A8 01516000
  1521. BALR R12,0 @V4085A8 01517000
  1522. USING *,R12 @V4085A8 01518000
  1523. ST R13,SAVE2+SAVER13B PTR TO OLD SAVE AREA IN @V4085A8 01519000
  1524. * NEW SAVE AREA. 01520000
  1525. LA R13,SAVE2 NEW SAVE AREA. @V4085A8 01521000
  1526. LTR R3,R3 WAS THERE AN '='? @V4085A8 01522000
  1527. BZ HMERGY BRANCH IF NO '='. @V4085A8 01523000
  1528. * FOR MERGE=N WE PERFORM NO TEST BECAUSE WE DON'T WANT TO SET 01524000
  1529. * THE FLAG IN THAT CASE SINCE IT IS REALLY THE HIST FLAGS THAT 01525000
  1530. * WE ARE MANIPULATING HERE. 01526000
  1531. CLI D1(R3),C'Y' TEST CHAR FOLLOWING '='. @V4085A8 01527000
  1532. BNE HMERNOTY BRANCH IF NOT MERGE=Y. @V4085A8 01528000
  1533. HMERGY OI HISTFLGS,YSPECFLG INDICATE HIST TAPE WILL BE @V4085A8 01529000
  1534. * NEEDED (BECAUSE MERGE OR MERGE=Y 01530000
  1535. * WAS SPECIFIED). 01531000
  1536. HMERNOTY L R15,=A(PLISTBLD) CALL ROUTINE TO ADD PRESENT @V4085A8 01532000
  1537. * PARAMETER TO OS PARM LIST. 01533000
  1538. BALR R14,R15 ARGS PASSED IN R6, R7. @V4085A8 01534000
  1539. * RETURN CODE IS NOW IN R15. 01535000
  1540. * EXIT. 01536000
  1541. L R13,SAVER13B(0,R13) GET ADDR OF OLD SAVE AREA. @V4085A8 01537000
  1542. L R14,SAVER14(0,R13) @V4085A8 01538000
  1543. LM R0,R12,SAVER0(R13) @V4085A8 01539000
  1544. DROP R12 @V4085A8 01540000
  1545. BR R14 @V4085A8 01541000
  1546. EJECT 01542000
  1547. *********************************************************************** 01543000
  1548. * 01544000
  1549. * HMES: HANDLER ROUTINE FOR THE 'MES' AND 'THRESHOLD' PARAMETERS. 01545000
  1550. * 01546000
  1551. *********************************************************************** 01547000
  1552. * 01548000
  1553. * INPUTS: 01549000
  1554. * R3 - ADDRESS OF THE '=' IN THE PARAMETER. OR ZERO IF '=' IS 01550000
  1555. * NOT PRESENT. 01551000
  1556. * R6 - STARTING ADDRESS OF PARAMETER. 01552000
  1557. * R7 - PARAMETER LENGTH LESS ONE. 01553000
  1558. * 01554000
  1559. * OUTPUTS: 01555000
  1560. * - PARAMETER IS ADDED TO OS PARM LIST BEING BUILT. 01556000
  1561. * ACCFLGS - CONTAINS BIT FLAGS. 01557000
  1562. * R15 - ERROR RETURN CODE OR ZERO. 01558000
  1563. * 01559000
  1564. *********************************************************************** 01560000
  1565. HMES STM R14,R12,SAVER14(R13) @V4085A8 01561000
  1566. BALR R12,0 @V4085A8 01562000
  1567. USING *,R12 @V4085A8 01563000
  1568. ST R13,SAVE2+SAVER13B PTR TO OLD SAVE AREA IN @V4085A8 01564000
  1569. * NEW SAVE AREA. 01565000
  1570. LA R13,SAVE2 NEW SAVE AREA. @V4085A8 01566000
  1571. LTR R3,R3 WAS THERE AN '='? @V4085A8 01567000
  1572. BZ HMESY BRANCH IF NO '='. @V4085A8 01568000
  1573. CLI D1(R3),C'Y' TEST CHAR FOLLOWING '='. @V4085A8 01569000
  1574. BNE HMESNOTY BRANCH IF NOT MES=Y. @V4085A8 01570000
  1575. HMESY NI ACCFLGS,X'FF'-DFLTFLG EITHER 'MES' OR @V4085A8 01571000
  1576. * 'THRESHOLD' IS REQUESTED WHICH 01572000
  1577. * MEANS ACC=N BECOMES THE ACC 01573000
  1578. * DEFAULT. SO WE HAVE JUST CHANGED 01574000
  1579. * THE ACC DEFAULT HERE. 01575000
  1580. HMESNOTY L R15,=A(PLISTBLD) CALL ROUTINE TO ADD PRESENT @V4085A8 01576000
  1581. * PARAMETER TO OS PARM LIST. 01577000
  1582. BALR R14,R15 ARGS PASSED IN R6, R7. @V4085A8 01578000
  1583. * RETURN CODE IS NOW IN R15. 01579000
  1584. * EXIT. 01580000
  1585. L R13,SAVER13B(0,R13) GET ADDR OF OLD SAVE AREA. @V4085A8 01581000
  1586. L R14,SAVER14(0,R13) @V4085A8 01582000
  1587. LM R0,R12,SAVER0(R13) @V4085A8 01583000
  1588. DROP R12 @V4085A8 01584000
  1589. BR R14 @V4085A8 01585000
  1590. EJECT 01586000
  1591. *********************************************************************** 01587000
  1592. * 01588000
  1593. * HRDESUM: HANDLER ROUTINE FOR THE 'RDESUM' PARAMETER. 01589000
  1594. * 01590000
  1595. *********************************************************************** 01591000
  1596. * 01592000
  1597. * INPUTS: 01593000
  1598. * R3 - ADDRESS OF THE '=' IN THE PARAMETER. OR ZERO IF '=' IS 01594000
  1599. * NOT PRESENT. 01595000
  1600. * R6 - STARTING ADDRESS OF PARAMETER. 01596000
  1601. * R7 - PARAMETER LENGTH LESS ONE. 01597000
  1602. * 01598000
  1603. * OUTPUTS: 01599000
  1604. * - PARAMETER IS ADDED TO OS PARM LIST BEING BUILT. 01600000
  1605. * ACCFLGS - CONTAINS BIT FLAGS. 01601000
  1606. * HISTFLGS - CONTAINS BIT FLAGS. 01602000
  1607. * R15 - ERROR RETURN CODE OR ZERO. 01603000
  1608. * 01604000
  1609. *********************************************************************** 01605000
  1610. HRDESUM STM R14,R12,SAVER14(R13) @V4085A8 01606000
  1611. BALR R12,0 @V4085A8 01607000
  1612. USING *,R12 @V4085A8 01608000
  1613. ST R13,SAVE2+SAVER13B PTR TO OLD SAVE AREA IN @V4085A8 01609000
  1614. * NEW SAVE AREA. 01610000
  1615. LA R13,SAVE2 NEW SAVE AREA. @V4085A8 01611000
  1616. LTR R3,R3 WAS THERE AN '='? @V4085A8 01612000
  1617. BZ HRDEY BRANCH IF NO '='. @V4085A8 01613000
  1618. CLI D1(R3),C'Y' TEST CHAR FOLLOWING '='. @V4085A8 01614000
  1619. BNE HRDENOTY BRANCH IF NOT RDESUM=Y. @V4085A8 01615000
  1620. HRDEY NI ACCFLGS,X'FF'-DFLTFLG EITHER 'RDESUM' OR @V4085A8 01616000
  1621. * RDESUM=Y IS REQUESTED WHICH MEANS 01617000
  1622. * ACC=N BECOMES THE ACC DEFAULT. 01618000
  1623. * SO WE CHANGE THE ACC DEFAULT HERE 01619000
  1624. OI HISTFLGS,OVRIDFLG 'RDESUM' REQUIRES HIST TAPE @V4085A8 01620000
  1625. * ALWAYS. SET OVERRIDING FLAG FOR 01621000
  1626. * HIST TAPE. 01622000
  1627. HRDENOTY L R15,=A(PLISTBLD) CALL ROUTINE TO ADD PRESENT @V4085A8 01623000
  1628. * PARAMETER TO OS PARM LIST. 01624000
  1629. BALR R14,R15 ARGS PASSED IN R6, R7. @V4085A8 01625000
  1630. * RETURN CODE IS NOW IN R15. 01626000
  1631. * EXIT. 01627000
  1632. L R13,SAVER13B(0,R13) GET ADDR OF OLD SAVE AREA. @V4085A8 01628000
  1633. L R14,SAVER14(0,R13) @V4085A8 01629000
  1634. LM R0,R12,SAVER0(R13) @V4085A8 01630000
  1635. DROP R12 @V4085A8 01631000
  1636. BR R14 @V4085A8 01632000
  1637. EJECT 01633000
  1638. *********************************************************************** 01634000
  1639. * 01635000
  1640. * HZERO: HANDLER ROUTINE FOR THE 'ZERO' PARAMETER. 01636000
  1641. * 01637000
  1642. *********************************************************************** 01638000
  1643. * 01639000
  1644. * INPUTS: 01640000
  1645. * R3 - ADDRESS OF THE '=' IN THE PARAMETER. OR ZERO IF '=' IS 01641000
  1646. * NOT PRESENT. 01642000
  1647. * R6 - STARTING ADDRESS OF PARAMETER. 01643000
  1648. * R7 - PARAMETER LENGTH LESS ONE. 01644000
  1649. * 01645000
  1650. * OUTPUTS: 01646000
  1651. * - PARAMETER IS ADDED TO OS PARM LIST BEING BUILT. 01647000
  1652. * ACCFLGS - CONTAINS BIT FLAGS. 01648000
  1653. * R15 - ERROR RETURN CODE OR ZERO. 01649000
  1654. * 01650000
  1655. *********************************************************************** 01651000
  1656. HZERO STM R14,R12,SAVER14(R13) @V4085A8 01652000
  1657. BALR R12,0 @V4085A8 01653000
  1658. USING *,R12 @V4085A8 01654000
  1659. ST R13,SAVE2+SAVER13B PTR TO OLD SAVE AREA IN @V4085A8 01655000
  1660. * NEW SAVE AREA. 01656000
  1661. LA R13,SAVE2 NEW SAVE AREA. @V4085A8 01657000
  1662. LTR R3,R3 WAS THERE AN '='? @V4085A8 01658000
  1663. BZ HZERY BRANCH IF NO '='. @V4085A8 01659000
  1664. CLI D1(R3),C'Y' TEST CHAR FOLLOWING '='. @V4085A8 01660000
  1665. BNE HZERNOTY BRANCH IF NOT ZERO=Y. @V4085A8 01661000
  1666. HZERY OI ACCFLGS,OVRIDFLG 'ZERO=Y' REQUIRES ACC TAPE. @V4085A8 01662000
  1667. * SET OVERRIDING FLAG TO FORCE ACC SO 01663000
  1668. * TAPE GETS POSITIONED PROPERLY. 01664000
  1669. HZERNOTY L R15,=A(PLISTBLD) CALL ROUTINE TO ADD PRESENT @V4085A8 01665000
  1670. * PARAMETER TO OS PARM LIST. 01666000
  1671. BALR R14,R15 ARGS PASSED IN R6, R7. @V4085A8 01667000
  1672. * RETURN CODE IS NOW IN R15. 01668000
  1673. * EXIT. 01669000
  1674. L R13,SAVER13B(0,R13) GET ADDR OF OLD SAVE AREA. @V4085A8 01670000
  1675. L R14,SAVER14(0,R13) @V4085A8 01671000
  1676. LM R0,R12,SAVER0(R13) @V4085A8 01672000
  1677. DROP R12 @V4085A8 01673000
  1678. BR R14 @V4085A8 01674000
  1679. EJECT 01675000
  1680. *********************************************************************** 01676000
  1681. * 01677000
  1682. * PLISTBLD: A PARAMETER PASSED TO THIS ROUTINE IS ADDED TO THE 01678000
  1683. * OS FORMAT PARAMETER LIST BEING BUILT FOR OS/VS EREP. 01679000
  1684. * 01680000
  1685. *********************************************************************** 01681000
  1686. * 01682000
  1687. * INPUTS: 01683000
  1688. * R6 - STARTING ADDRESS OF THE PARAMETER TO BE ADDED. 01684000
  1689. * R7 - PARAMETER LENGTH LESS ONE. 01685000
  1690. * R13 - ADDRESS OF A 72 BYTE SAVE AREA. 01686000
  1691. * R14 - RETURN ADDRESS. 01687000
  1692. * PARMBFAD - ADDRESS OF BEGINNING OF AREA WHERE OS PARM LIST 01688000
  1693. * WILL BE BUILT. FIRST TWO BYTES ARE HALFWORD CONTAINING 01689000
  1694. * LENGTH (SO FAR) OF PARM LIST BEING BUILT. 01690000
  1695. * PARMNEXT - ADDRESS OF NEXT FREE BYTE IN PARM LIST BUILD AREA. 01691000
  1696. * PARMREM - COUNT OF UNUSED BYTES REMAINING IN PARM LIST BUILD 01692000
  1697. * AREA. 01693000
  1698. * 01694000
  1699. * OUTPUTS: 01695000
  1700. * R15 - ERROR RETURN CODE (PARM BUILD AREA FULL) OR ZERO. 01696000
  1701. * PARMBFAD - LENGTH HALFWORD AT THIS ADDRESS IS UPDATED. 01697000
  1702. * PARMNEXT - UPDATED. 01698000
  1703. * PARMREM - UPDATED. 01699000
  1704. * 01700000
  1705. *********************************************************************** 01701000
  1706. PLISTBLD SR R15,R15 ASSUME THE RETURN CODE WILL BE 0. @V4085A8 01702000
  1707. STM R14,R12,SAVER14(R13) SAVE RETURN CODE AND @V4085A8 01703000
  1708. * OTHER REGISTERS. 01704000
  1709. BALR R12,0 @V4085A8 01705000
  1710. USING *,R12 @V4085A8 01706000
  1711. L R4,PARMBFAD ADDR OF LENGTH HALFWORD. @V4085A8 01707000
  1712. LH R5,0(0,R4) 'LENGTH-BUILT-SO-FAR' VALUE. @V4085A8 01708000
  1713. L R9,PARMNEXT ADDR OF NEXT UNUSED BYTE. @V4085A8 01709000
  1714. LA R8,1(0,R7) R8 WILL COMPUTE NUMBER OF BYTES @V4085A8 01710000
  1715. * BEING ADDED TO THE PARM LIST. ONE IS ADDED 01711000
  1716. * TO COMPENSATE FOR R7 BEING 'LESS ONE'. 01712000
  1717. C R8,PARMREM COMPARE LENGTH OF CURRENT PARM WITH @V4085A8 01713000
  1718. * UNUSED SPACE REMAINING. 01714000
  1719. BL PLFITS OKAY IF CURRENT PARM LENGTH IS 'LESS'. @V4085A8 01715000
  1720. * (NOTE: 'EQUAL' WOULD USUALLY BE TOO LITTLE 01716000
  1721. * BECAUSE R8 DOES NOT YET INCLUDE LENGTH OF THE 01717000
  1722. * COMMA THAT WILL PROBABLY HAVE TO PRECEED THE 01718000
  1723. * PARAMETER.) 01719000
  1724. DMSERR NUM=831,LET=E,TEXT='MORE THAN 100 CHARS. OF OPTIONS SPEX01720000
  1725. CIFIED',RENT=NO @V4085A8 01721000
  1726. MVI SAVER15+3(R13),RC62 SET ERROR RETURN CODE IN @V4085A8 01722000
  1727. * IN R15 IN SAVE AREA. 01723000
  1728. B PLEXIT @V4085A8 01724000
  1729. SPACE 01725000
  1730. * IF THE PRESENT PARAMETER IS NOT THE FIRST ONE, IT MUST BE 01726000
  1731. * PRECEEDED BY A COMMA IN THE OUTPUT AREA TO SEPARATE IT FROM 01727000
  1732. * THE PRECEEDING PARAMETER. 01728000
  1733. PLFITS LTR R5,R5 TEST VALUE OF 'LENGTH-BUILT-SO-FAR'. @V4085A8 01729000
  1734. BZ PLSKIPCM LENGTH 0 INDICATES NO COMMA NEEDED. @V4085A8 01730000
  1735. LA R8,L1(0,R8) COUNT COMMA IN LENGTH OF NEW DATA. @V4085A8 01731000
  1736. MVI 0(R9),C',' ADD COMMA TO PARM LIST. @V4085A8 01732000
  1737. LA R9,L1(0,R9) ADVANCE TO NEXT UNUSED BYTE. @V4085A8 01733000
  1738. PLSKIPCM DS 0H @V4085A8 01734000
  1739. EX R7,PLISTMVC MOVE NEW PARAMETER INTO PARM LIST. @V4085A8 01735000
  1740. LA R9,L1(R7,R9) ADVANCE TO NEXT UNUSED BYTE. ADD @V4085A8 01736000
  1741. * ONE (L1) BECAUSE R7 HAS LENGTH OF 01737000
  1742. * PARAMETER LESS ONE. 01738000
  1743. ST R9,PARMNEXT SAVE FOR USE NEXT TIME. @V4085A8 01739000
  1744. AR R5,R8 OLD LIST LENGTH PLUS LENGTH ADDED IS NEW @V4085A8 01740000
  1745. * LIST LENGTH. 01741000
  1746. STH R5,0(0,R4) SAVE IN HALFWD AT START OF PARM LIST@V4085A8 01742000
  1747. L R5,PARMREM BYTES REMAINING PREVIOUSLY... @V4085A8 01743000
  1748. SR R5,R8 LESS BYTES ADDED, GIVES SPACE @V4085A8 01744000
  1749. * REMAINING NOW. 01745000
  1750. ST R5,PARMREM SAVE FOR USE NEXT TIME. @V4085A8 01746000
  1751. PLEXIT LM R14,R12,SAVER14(R13) @V4085A8 01747000
  1752. DROP R12 @V4085A8 01748000
  1753. BR R14 @V4085A8 01749000
  1754. SPACE 3 01750000
  1755. PLISTMVC MVC 0(0,R9),0(R6) EX'ED REMOTELY, EX SUPPLIES LEN. @V4085A8 01751000
  1756. EJECT 01752000
  1757. *********************************************************************** 01753000
  1758. * 01754000
  1759. * WRITSYSN: THIS SUBROUTINE WRITES ONE 80 BYTE RECORD OUT TO THE 01755000
  1760. * SYSIN FILE. 01756000
  1761. * 01757000
  1762. *********************************************************************** 01758000
  1763. * 01759000
  1764. * INPUTS: 01760000
  1765. * R13 - ADDRESS OF A 72 BYTE SAVE AREA. 01761000
  1766. * R14 - RETURN ADDRESS. 01762000
  1767. * SYSNBUF - BUFFER CONTAINING THE RECORD TO BE WRITTEN. 01763000
  1768. * 01764000
  1769. * OUTPUTS: 01765000
  1770. * SYSNBUF - BUFFER, RE-INITIALIZED TO BLANKS. 01766000
  1771. * R15 - ERROR RETURN CODE OR ZERO. 01767000
  1772. * 01768000
  1773. *********************************************************************** 01769000
  1774. WRITSYSN STM R14,R12,SAVER14(R13) @V4085A8 01770000
  1775. BALR R12,0 @V4085A8 01771000
  1776. USING *,R12 @V4085A8 01772000
  1777. FSWRITE FSCB=SYSNFSCB @V4085A8 01773000
  1778. USING FSCBD,R1 @V4085A8 01774000
  1779. L R1,FSCBBUFF GET ADDR OF SYSNBUF BUFFER. @V4085A8 01775000
  1780. DROP R1 @V4085A8 01776000
  1781. MVI 0(R1),C' ' BLANK IN 1ST BYTE OF BUFFER. @V4085A8 01777000
  1782. MVC D1(L'SYSNBUF-1,R1),0(R1) PROPAGATE BLANK. @V4085A8 01778000
  1783. L R14,SAVER14(0,R13) @V4085A8 01779000
  1784. LM R0,R12,SAVER0(R13) @V4085A8 01780000
  1785. DROP R12 @V4085A8 01781000
  1786. BR R14 @V4085A8 01782000
  1787. EJECT 01783000
  1788. *********************************************************************** 01784000
  1789. * 01785000
  1790. * DATA AREAS (FIRST SECTION) 01786000
  1791. * 01787000
  1792. *********************************************************************** 01788000
  1793. SPACE 01789000
  1794. RETCDE DC H'0' HOLDS ERROR RETURN CODE UNTIL EXIT TIME. @V4085A8 01790000
  1795. PARMCNT DC H'0' COUNT OF CONTROL PARAMETERS THAT HAVE BEEN@V4085A8 01791000
  1796. * ISOLATED. 01792000
  1797. SPACE 3 01793000
  1798. CLRFLAGS DC X'00' 'CLEAR' PARAMETER REQUEST FLAGS. EQUATES@V4085A8 01794000
  1799. * FOLLOW: 01795000
  1800. ERRFLG EQU X'01' FLAG SET WHEN 'CLEAR' @V5088AA 01796000
  1801. * IS REQUESTED. 01797000
  1802. FRMFLAG EQU X'02' FLAG SET WHEN CLEARF REQUESTED @V5088AA 01798000
  1803. SPACE 3 01799000
  1804. ACCFLGS DC AL1(DFLTFLG) FLAGS (EQUATED BELOW) DETERMINE @V4085A8 01800000
  1805. * WHETHER ACC TAPE IS REQUIRED. 01801000
  1806. HISTFLGS DC AL1(0) FLAGS (EQUATED BELOW) DETERMINE @V4085A8 01802000
  1807. * WHETHER HIST TAPE IS REQUIRED. 01803000
  1808. * EQUATES BELOW ARE FOR BITS IN BOTH ACCFLGS AND HISTFLGS ABOVE. 01804000
  1809. DFLTFLG EQU 128 BIT SET TO 1 MEANS DEFAULT TO Y (TAPE REQD)@V4085A8 01805000
  1810. YSPECFLG EQU 64 BIT SET TO 1 MEANS USER SPECIFIED Y (OVER- @V4085A8 01806000
  1811. * RIDES DFLTFLG). 0 MEANS Y NOT SPECIFIED. 01807000
  1812. NSPECFLG EQU 32 BIT SET TO 1 MEANS USER SPECIFIED N (OVER- @V4085A8 01808000
  1813. * RIDES DFLTFLG). 0 MEANS N NOT SPECIFIED. 01809000
  1814. OVRIDFLG EQU 16 BIT SET TO 1 MEANS SOME OVERRIDING @V4085A8 01810000
  1815. * CONSIDERATION IMPLIES Y REGARDLESS OF WHETHER 01811000
  1816. * THE USER SPECIFIED Y OR N. TAKES PRECEDENCE OVER 01812000
  1817. * ALL OTHER FLAGS. 01813000
  1818. SPACE 3 01814000
  1819. DOSSAVE DC X'00' SAVES INITIAL VALUE OF 'DOSSVC' FLAG @V4085A8 01815000
  1820. * THOUGH THE SAVING CODE IS SOMETIMES SKIPPED. 01816000
  1821. * BUT THE RESTORING CODE AT THE END (AN 'OR' 01817000
  1822. * OPERATION) IS NEVER SKIPPED, SO IT IS NECESSARY 01818000
  1823. * TO INITIALIZE WITH X'00' HERE. 01819000
  1824. OSSSAVE DC X'00' SAVES INITIAL VALUE OF 'COMPSWT' FLAG. @V4085A8 01820000
  1825. * INITIALIZED TO X'00' FOR SAME REASON AS GIVEN 01821000
  1826. * FOR DOSSAVE ABOVE. 01822000
  1827. PARMBFAD DC A(0) ADDRESS OF AREA (ALLOCATED FROM FREE @V4085A8 01823000
  1828. * STORAGE) WHERE OS PARM LIST WILL BE BUILT. THE 01824000
  1829. * LENGTH OF THIS AREA IS GIVEN BY THE PARMBUFL EQU. 01825000
  1830. PARMNEXT DC A(0) ADDRESS OF NEXT FREE BYTE IN PARM LIST @V4085A8 01826000
  1831. * BUILD AREA. 01827000
  1832. PARMREM DC F'0' COUNT OF UNUSED BYTES REMAINING IN PARM @V4085A8 01828000
  1833. * LIST BUILD AREA. 01829000
  1834. FENCEXFF DC 8X'FF' FENCE OF FF'S FOR CHECKING END OF @V4085A8 01830000
  1835. * PARAMETER LISTS. 01831000
  1836. SPACE 3 01832000
  1837. SYSNBUF DC CL80' ' BUFFER FOR WRITING OUT THE SYSIN FILE @V4085A8 01833000
  1838. * THAT IS READ BY EREP LATER. NOTE THAT THE 01834000
  1839. * BUFFER IS INITIALIZED WITH BLANKS NOW. 01835000
  1840. * AND AFTER EACH USE IT WILL BE RESET TO BLANKS. 01836000
  1841. SPACE 3 01837000
  1842. * NOTE: IN THE FSCB THAT FOLLOWS, THE FILEMODE FIELD WILL BE 01838000
  1843. * FILLED IN PRIOR TO ITS FIRST USE. 01839000
  1844. SYSNFSCB FSCB 'SYSIN EREPWORK',BUFFER=SYSNBUF, @V4085A8X01840000
  1845. RECFM=F,BSIZE=80 @V4085A8 01841000
  1846. CTLFSCB FSCB BUFFER=CTLFLBUF FOR READING CONTROL PARAMETERS @V4085A8X01842000
  1847. FROM USER SPECIFIED INPUT FILE.@V4085A8 01843000
  1848. EJECT 01844000
  1849. * THE FOLLOWING TABLE IS USED IN IDENTIFYING THE INPUTTED 01845000
  1850. * CONTROL PARAMETERS. EACH ENTRY OF THE TABLE HAS THE 01846000
  1851. * FOLLOWING FORMAT: 01847000
  1852. * DC AL1(LENGTH-OF-PARAMETER-NAME) 01848000
  1853. * DC CL12'PARAMETER-NAME' 01849000
  1854. * DC AL3(NAME-OF-ROUTINE-TO-PROCESS-PARAMETER) 01850000
  1855. KEYTAB DS 0F ALIGN TABLE FOR EFFICIENCY. @V4085A8 01851000
  1856. DC AL1(5),CL12'SHARE',AL3(HSHARE) @V4085A8 01852000
  1857. DC AL1(10),CL12'CONTROLLER',AL3(HCONTROL) @VA09381 01852500
  1858. DC AL1(5),CL12'CLEAR',AL3(HCLEAR) @V4085A8 01853000
  1859. DC AL1(6),CL12'CLEARF',AL3(HCLEARF) @V5088AA 01854000
  1860. DC AL1(6),CL12'CTLCRD',AL3(HCTLCRD) @V4085A8 01855000
  1861. DC AL1(3),CL12'ACC',AL3(HACC) @V4085A8 01856000
  1862. DC AL1(4),CL12'HIST',AL3(HHIST) @V4085A8 01857000
  1863. DC AL1(5),CL12'MERGE',AL3(HMERGE) @V4085A8 01858000
  1864. DC AL1(3),CL12'MES',AL3(HMES) @V4085A8 01859000
  1865. DC AL1(9),CL12'THRESHOLD',AL3(HMES) @V4085A8 01860000
  1866. DC AL1(6),CL12'RDESUM',AL3(HRDESUM) @V4085A8 01861000
  1867. DC AL1(4),CL12'ZERO',AL3(HZERO) @V4085A8 01862000
  1868. DC AL1(8),CL12'TERMINAL',AL3(HTERM) @V4085A8 01863000
  1869. KEYTABZ EQU * MARKS END OF KEYTAB TABLE. @V4085A8 01864000
  1870. KEYTABAD EQU 12 DISPLACEMENT TO THE 'SUBROUTINE ADDRESS' @V4085A8 01865000
  1871. * WORD OF A KEYTAB ENTRY. 01866000
  1872. KEYTABLN EQU 16 LENGTH OF AN ENTRY IN THE KEYTAB TABLE. @V4085A8 01867000
  1873. EJECT 01868000
  1874. LTORG @V4085A8 01869000
  1875. SPACE 3 01870000
  1876. SAVEAREA DS 9D A STANDARD 72 BYTE SAVE AREA. @V4085A8 01871000
  1877. SAVE2 DS 9D A STANDARD 72 BYTE SAVE AREA. @V4085A8 01872000
  1878. SPACE 3 01873000
  1879. CTLFLBUF DS CL80 BUFFER FOR READING CONTROL PARAMETERS FROM@V4085A8 01874000
  1880. * INPUT FILE. 01875000
  1881. ORG CTLFLBUF TERMINAL AND DISK FILE SHARE SAME @V4085A8 01876000
  1882. * BUFFER AREA SINCE ONLY ONE OR THE OTHER 01877000
  1883. * IS USED. 01878000
  1884. TERMBUF DS CL130 BUFFER FOR READING CONTROL PARAMETERS @V4085A8 01879000
  1885. * FROM THE TERMINAL. 01880000
  1886. ORG 01881000
  1887. SPACE 3 01882000
  1888. DS 0F FOR BEST EFFICIENCY, ALIGN KEYWORK AT FWD. @V4085A8 01883000
  1889. KEYWORK DS CL13 WORK AREA TO CONTAIN KEYWORD TO BE @V4085A8 01884000
  1890. * IDENTIFIED, PRECEEDED BY LENGTH IN 1ST BYTE. 01885000
  1891. SPACE 3 01886000
  1892. *********************************************************************** 01887000
  1893. * 01888000
  1894. * RESERVE SPACE FOR 4K PAGE BUFFER FOR DMSREA AT X'21000'. 01889000
  1895. * 01890000
  1896. *********************************************************************** 01891000
  1897. SPACE 01892000
  1898. ENDSECT1 EQU * @V4085A8 01893000
  1899. ORG DMSIFC+4096 STARTING ADDRESS OF PAGE BUFFER. @V4085A8 01894000
  1900. CHECKSIZ EQU X'80000000'+(*-ENDSECT1) IF SECTION 1 IS TOO @V4085A8 01895000
  1901. * BIG AND SPILLS OVER INTO THE 01896000
  1902. * PAGE BUFFER, THEN THE 01897000
  1903. * PARENTHESIZED PART OF THIS 01898000
  1904. * EQU WILL BE NEGATIVE AND WHEN 01899000
  1905. * ADDED TO THE HEX VALUE, WILL 01900000
  1906. * CAUSE ARITHMETIC UNDERFLOW AND 01901000
  1907. * THE ASSEMBLER WILL FLAG IT, 01902000
  1908. * THUS NOTIFYING THE PROGRAMMER. 01903000
  1909. ORG DMSIFC+8192 STARTING LOCATION FOR SECTION 2 @V4085A8 01904000
  1910. * BEYOND THE BUFFER. 01905000
  1911. EJECT 01906000
  1912. *********************************************************************** 01907000
  1913. * 01908000
  1914. * ERASFILE: ERASE A SPECIFIED FILE FROM AN UNSPECIFIED DISK 01909000
  1915. * PROVIDED THE FILE EXISTS AND THAT IT IS ON A READ/WRITE 01910000
  1916. * DISK. 01911000
  1917. * 01912000
  1918. *********************************************************************** 01913000
  1919. * 01914000
  1920. * NOTE: IF MORE THAN ONE FILE HAS THE SPECIFIED ID (I.E., FILES ON 01915000
  1921. * DIFFERENT DISKS), ALL ARE ERASED. 01916000
  1922. * 01917000
  1923. * INPUTS: 01918000
  1924. * R1 - POINTS TO 16 CHARACTERS SPECIFYING FILENAME FILETYPE. 01919000
  1925. * R13 - ADDRESS OF SAVE AREA. USED AS A WORK AREA. 01920000
  1926. * R14 - RETURN ADDRESS. 01921000
  1927. * 01922000
  1928. * OUTPUTS: 01923000
  1929. * R15 - AN ERROR RETURN CODE (FROM 'ERASE' COMMAND) OR ZERO. 01924000
  1930. * 01925000
  1931. *********************************************************************** 01926000
  1932. ERASFILE SR R15,R15 @V4085A8 01927000
  1933. STM R14,R2,SAVER14(R13) @V4085A8 01928000
  1934. BALR R2,0 @V4085A8 01929000
  1935. USING *,R2 @V4085A8 01930000
  1936. ERASMORE LA R15,SAVER3(0,R13) ADDRESS OF A 5 DOUBLEWORD @V4085A8 01931000
  1937. * WORK AREA (CHOPPED OUT OF OUR SAVE 01932000
  1938. * AREA) IN WHICH WE WILL BUILD A 01933000
  1939. * P-LIST FOR SVC 202. 01934000
  1940. MVC 0(L8,R15),=CL8'STATEW' COMMAND TO BE INVOKED. @V4085A8 01935000
  1941. MVC D8(L16,R15),0(R1) FILENAME AND FILETYPE. @V4085A8 01936000
  1942. MVC D24(L10,R15),=10X'FF' FENCE OF FF'S TO END THE @V4085A8 01937000
  1943. * 'STATEW' P-LIST AND 2 MORE FF'S 01938000
  1944. * TO END THIS P-LIST WHEN USED 01939000
  1945. * FOR 'ERASE'. 01940000
  1946. * NOTE: 'STATEW' COMMAND WILL 01941000
  1947. * REPLACE 1ST 2 BYTES OF FF BY MODE 01942000
  1948. LR R1,R15 P-LIST ADDR IN R1 FOR SVC. @V4085A8 01943000
  1949. SVC 202 @V4085A8 01944000
  1950. DC AL4(ERASEXIT) RETURN IF FILE NOT ON R/W DISK. @V4085A8 01945000
  1951. L R15,D28(0,R1) 'STATEW' STORED FST ADDR AT D28. @V4085A8 01946000
  1952. USING FSTSECT,R15 @V4085A8 01947000
  1953. MVC D24(L2,R1),FSTM GET FILEMODE FROM FST AND PUT @V4085A8 01948000
  1954. * IT IN OUR P-LIST. 01949000
  1955. DROP R15 @V4085A8 01950000
  1956. MVC 0(L8,R1),=CL8'ERASE' COMMAND TO BE INVOKED. @V4085A8 01951000
  1957. SVC 202 @V4085A8 01952000
  1958. DC AL4(ERASERRO) @V4085A8 01953000
  1959. * OKAY, WE ERASED THE FILE. BUT BEFORE LEAVING, TRY AGAIN, 01954000
  1960. * THERE COULD BE ANOTHER FILE WITH SAME NAME AND TYPE ON 01955000
  1961. * ANOTHER DISK. 01956000
  1962. L R1,SAVER1(0,R13) @V4085A8 01957000
  1963. B ERASMORE @V4085A8 01958000
  1964. SPACE 01959000
  1965. ERASERRO ST R15,SAVER15(0,R13) SET ERROR RETURN CODE. @V4085A8 01960000
  1966. ERASEXIT LM R14,R2,SAVER14(R13) @V4085A8 01961000
  1967. DROP R2 @V4085A8 01962000
  1968. BR R14 @V4085A8 01963000
  1969. EJECT 01964000
  1970. *********************************************************************** 01965000
  1971. * 01966000
  1972. * RDCTLINE: THIS SUBROUTINE IS CALLED TO READ AND RETURN ONE LINE 01967000
  1973. * OF CONTROL PARAMETERS FROM THE TERMINAL (WITH PROMPTING) 01968000
  1974. * OR FROM A CONTROL FILE ON A CMS DISK. 01969000
  1975. * 01970000
  1976. *********************************************************************** 01971000
  1977. * 01972000
  1978. * INPUTS: 01973000
  1979. * R13 - ADDRESS OF A 72 BYTE SAVE AREA. 01974000
  1980. * R14 - RETURN ADDRESS. 01975000
  1981. * RDCTLSW - THIS SWITCH, SET PRIOR TO THE FIRST CALL, 01976000
  1982. * DETERMINES WHETHER READING IS FROM THE TERMINAL OR 01977000
  1983. * FROM A DISK FILE. 01978000
  1984. * 01979000
  1985. * OUTPUTS: 01980000
  1986. * R1 - ADDRESS OF THE LINE OF CONTROL PARAMETER DATA. 01981000
  1987. * R0 - LENGTH OF THE LINE OF CONTROL PARAMETER DATA. A LENGTH 01982000
  1988. * OF ZERO SIGNALS END-OF-FILE. 01983000
  1989. * R15 - ZERO IS NORMAL RETURN; NON-ZERO INDICATES A FATAL 01984000
  1990. * ERROR OCCURRED. 01985000
  1991. * 01986000
  1992. *********************************************************************** 01987000
  1993. RDCTLINE STM R14,R12,SAVER14(R13) PRESERVE REGISTER CONTENTS@V4085A8 01988000
  1994. * FOR CALLER. 01989000
  1995. BALR R12,0 @V4085A8 01990000
  1996. USING *,R12 @V4085A8 01991000
  1997. RDCTLSW EQU *+1 @V4085A8 01992000
  1998. BC *-*,RDTERM CONDITION MASK GETS OVERLAID. @V4085A8 01993000
  1999. * BRANCH TO READ FROM TERMINAL. 01994000
  2000. * FALL THRU MEANS READ FROM DISK FILE. 01995000
  2001. L R1,=A(CTLFSCB) FSCB FOR FILE TO BE READ. @V4085A8 01996000
  2002. FSREAD FSCB=(1) READ A RECORD INTO 'CTLFLBUF'. @V4085A8 01997000
  2003. LTR R15,R15 @V4085A8 01998000
  2004. BNZ RDCHECK AN ERROR OR UNUSUAL CONDITION OCCURRED.@V4085A8 01999000
  2005. USING FSCBD,R1 @V4085A8 02000000
  2006. L R1,FSCBBUFF ADDR OF BUFFER CONTAINING RECORD @V4085A8 02001000
  2007. * JUST READ. 02002000
  2008. DROP R1 @V4085A8 02003000
  2009. LA R0,TRUNCLEN LENGTH OF RECORD JUST READ. @V4085A8 02004000
  2010. B RDEXIT @V4085A8 02005000
  2011. SPACE 02006000
  2012. RDCHECK CH R15,=Y(RC12) CHECK FOR RC=12 INDICATING END-OF-@V4085A8 02007000
  2013. * FILE. 02008000
  2014. BNE RDERR1 NOT EOF. MUST BE A FATAL READ ERROR. @V4085A8 02009000
  2015. * FALL THRU IF END-OF-FILE. 02010000
  2016. FSCLOSE FSCB=(R1) R1 WAS LOADED BY FSREAD. @V4085A8 02011000
  2017. SR R15,R15 EOF IS NOT AN ERROR, SET RC=0. @V4085A8 02012000
  2018. SR R0,R0 ZEROED LENGTH SIGNALS EOF. @V4085A8 02013000
  2019. B RDEXIT @V4085A8 02014000
  2020. SPACE 02015000
  2021. USING FSCBD,R1 R1 WAS LOADED BY FSREAD. @V4085A8 02016000
  2022. RDERR1 LA R2,FSCBFN ADDR OF FILEID FOR ERROR MESSAGE. @V4085A8 02017000
  2023. DROP R1 @V4085A8 02018000
  2024. LR R3,R15 PRESERVE ERROR CODE (FOR MSG BELOW). @V4085A8 02019000
  2025. FSCLOSE FSCB=(R1) R1 WAS LOADED BY FSREAD. @V4085A8 02020000
  2026. * NOTE: RC IN R15 IS DESTROYED BY FSCLOSE ABOVE. 02021000
  2027. DMSERR NUM=104,LET=S,TEXT='ERROR ''...'' READING FILE ''......X02022000
  2028. ...............'' FROM DISK', @V4085A8X02023000
  2029. SUB=(HEX,(R3),CHAR8A,(R2)),RENT=NO @V4085A8 02024000
  2030. LA R15,RC100 @V4085A8 02025000
  2031. SR R0,R0 SIGNAL EOF ALSO, WE DO NOT WANT THE @V4085A8 02026000
  2032. * CALLER TRYING TO READ AGAIN. 02027000
  2033. B RDEXIT @V4085A8 02028000
  2034. SPACE 02029000
  2035. * ARRIVE HERE TO READ INPUT FROM THE TERMINAL. 02030000
  2036. RDTERM WRTERM 'ENTER:' PROMPT FOR INPUT. @V4085A8 02031000
  2037. WAITT @V4085A8 02032000
  2038. L R2,=A(TERMBUF) ADDRESS OF BUFFER TO ACCEPT @V4085A8 02033000
  2039. * TERMINAL INPUT. 02034000
  2040. RDTERM (R2),EDIT=UPCASE READ INPUT INTO BUFFER, @V4085A8X02035000
  2041. RETURN LENGTH OF INPUT IN R0.@V4085A8 02036000
  2042. WAITT @V4085A8 02037000
  2043. LR R1,R2 RETURN ADDRESS OF BUFFER IN R1. @V4085A8 02038000
  2044. SPACE 02039000
  2045. RDEXIT L R14,SAVER14(0,R13) RESTORE RETURN ADDRESS. @V4085A8 02040000
  2046. LM R2,R12,SAVER2(R13) RESTORE USER REGISTERS. @V4085A8 02041000
  2047. BR R14 @V4085A8 02042000
  2048. DROP R12 @V4085A8 02043000
  2049. EJECT 02044000
  2050. *********************************************************************** 02045000
  2051. * 02046000
  2052. * PARMSCAN: SCANS A CONTROL PARAMETER, LOCATING DELIMITER AT ITS END. 02047000
  2053. * 02048000
  2054. *********************************************************************** 02049000
  2055. * 02050000
  2056. * INPUTS: R0 = END-OF-RECORD ADDRESS. (ADDRESS OF 1ST BYTE BEYOND 02051000
  2057. * THE END OF THE LINE OF DATA.) 02052000
  2058. * R1 = CURRENT VALUE OF SCAN POINTER. (ADDRESS OF 1ST 02053000
  2059. * BYTE OF THE PARAMETER TO BE SCANNED.) 02054000
  2060. * R13 = ADDRESS OF A STANDARD 72 BYTE SAVE AREA. 02055000
  2061. * R14 = RETURN ADDRESS. 02056000
  2062. * 02057000
  2063. * OUTPUTS: R0 = LENGTH OF THE PARAMETER. EXCLUDES DELIMITER AT END. 02058000
  2064. * R1 = CURRENT VALUE OF SCAN POINTER. (ADDRESS OF 1ST BYTE 02059000
  2065. * BEYOND THE PARAMETER, USUALLY A DELIMITER, BUT 02060000
  2066. * SOMETIMES THE FIRST BYTE BEYOND THE LINE OF DATA.) 02061000
  2067. * R15 = ZERO: NORMAL COMPLETION. 02062000
  2068. * R15 = NON-ZERO: SCAN DETECTED UNBALANCED PARENTHESES. 02063000
  2069. * 02064000
  2070. * OPERATION - 02065000
  2071. * 1. SET R15 TO ZERO AND SAVE REGISTERS. 02066000
  2072. * 2. SCAN UNTIL ONE OF THE FOLLOWING IS ENCOUNTERED: 02067000
  2073. * BLANK - GO TO 5. 02068000
  2074. * COMMA - GO TO 5. 02069000
  2075. * END OF LINE - GO TO 5. 02070000
  2076. * LEFT PARENTHESIS - GO TO 3. 02071000
  2077. * RIGHT PARENTHESIS - SET ERROR CODE IN R15. GO TO 2. 02072000
  2078. * 3. INITIALIZE PARENTHESIS NESTING DEPTH COUNT TO 1. 02073000
  2079. * 4. SCAN UNTIL ONE OF THE FOLLOWING IS ENCOUNTERED: 02074000
  2080. * END OF LINE - SET ERROR CODE IN R15. GO TO 5. 02075000
  2081. * LEFT PARENTHESIS - ADD 1 TO PARENTHESIS DEPTH COUNT. 02076000
  2082. * GO TO 4. 02077000
  2083. * RIGHT PARENTHESIS - SUBTRACT 1 FROM PARENTHESIS DEPTH 02078000
  2084. * COUNT. IF RESULT IS ZERO, GO TO 2; 02079000
  2085. * OTHERWISE GO TO 4. 02080000
  2086. * 5. COMPUTE OUTPUT VALUES FOR R0 AND R1. 02081000
  2087. * 6. RETURN TO CALLER. 02082000
  2088. * 02083000
  2089. *********************************************************************** 02084000
  2090. PARMSCAN SR R15,R15 INITIALIZE RETURN CODE VALUE TO ZERO. @V4085A8 02085000
  2091. STM R14,R12,SAVER14(R13) @V4085A8 02086000
  2092. BALR R12,0 @V4085A8 02087000
  2093. USING *,R12 @V4085A8 02088000
  2094. LR R6,R1 SAVE A COPY OF THE PARAMETER STARTING @V4085A8 02089000
  2095. * ADDRESS THAT WAS RECEIVED IN R1. 02090000
  2096. L R15,=A(TABDLIM) ADDR OF THE ONLY TRT TABLE USED@V4085A8 02091000
  2097. * IN THIS ROUTINE. REMAINS LOADED 02092000
  2098. * IN R15 UNTIL WE EXIT. 02093000
  2099. SR R2,R2 CLEAR TO HOLD FUNCTION BYTE FROM TRT. @V4085A8 02094000
  2100. LR R9,R0 ADDR OF 1ST BYTE BEYOND THE RECORD. @V4085A8 02095000
  2101. BCTR R9,0 ADDR OF LAST BYTE OF RECORD. IN BXH @V4085A8 02096000
  2102. * COMPARAND REGISTER. 02097000
  2103. LA R8,1 VALUE 1 IN BXH INCREMENT REGISTER. @V4085A8 02098000
  2104. BCTR R1,0 BEFORE ENTERING THE 'PSCAN2' LOOP, WE @V4085A8 02099000
  2105. * BACK UP THE STARTING ADDR BY ONE BYTE TO 02100000
  2106. * COMPENSATE FOR 'PSCAN2'S IMMEDIATE ADVANCE OF 02101000
  2107. * ONE BYTE OVER WHAT IT THINKS IS A PREVIOUSLY 02102000
  2108. * SCANNED DELIMITER. 02103000
  2109. SPACE 3 02104000
  2110. PSCAN2 BXH R1,R8,PSCAN5 ADVANCE R1 ONE BYTE TO GET PAST @V4085A8 02105000
  2111. * DELIMITER JUST FOUND. THEN BRANCH IF R1 02106000
  2112. * IS BEYOND LAST BYTE OF RECORD. 02107000
  2113. LR R3,R9 LAST BYTE OF RECORD... @V4085A8 02108000
  2114. SR R3,R1 LESS 1ST BYTE TO BE SCANNED, GIVES @V4085A8 02109000
  2115. * LENGTH LESS ONE. 02110000
  2116. EX R3,PSCANTRT TRT 0(0,R1),0(R15) @V4085A8 02111000
  2117. BNZ BRANTAB(R2) IF A DELIMITER WAS HIT, USE @V4085A8 02112000
  2118. * FUNCTION BYTE TO INDEX BRANCH TABLE. 02113000
  2119. * FALL THRU IF TRT RAN TO END OF RECORD WITHOUT HITTING A 02114000
  2120. * DELIMITER. 02115000
  2121. LR R1,R0 DUMMY UP R1 TO LOOK LIKE THE TRT FOUND A @V4085A8 02116000
  2122. * DELIMITER IN 1ST BYTE BEYOND THE RECORD. 02117000
  2123. * THEN FALL THRU AND TREAT IT LIKE DUMMY DELIMITER WAS A BLANK. 02118000
  2124. BRANTAB EQU *-4 MINUS 4 BECAUSE TABLE HAS NO ZERO-TH ENTRY.@V4085A8 02119000
  2125. B PSCAN5 FUNCTION=4; BLANK WAS FOUND. @V4085A8 02120000
  2126. B PSCAN5 FUNCTION=8; COMMA WAS FOUND. @V4085A8 02121000
  2127. B PSCAN3 FUNCTION=12; LEFT PARENTHESIS WAS FOUND.@V4085A8 02122000
  2128. *--------B-----*+4----FUNCTION=16; RIGHT PARENTHESIS WAS FOUND.@V4085A8 02123000
  2129. MVI SAVER15+3(R13),RC2 UNBALANCED RIGHT @V4085A8 02124000
  2130. * PARENTHESIS; PUT ERROR CODE IN R15 02125000
  2131. * IN SAVE AREA. 02126000
  2132. B PSCAN2 CONTINUE PAST THE BAD PARENTHESIS TO @V4085A8 02127000
  2133. * FIND END OF PARAMETER. 02128000
  2134. SPACE 3 02129000
  2135. PSCAN3 LA R7,1 INITIAL PARENTHESIS NESTING DEPTH CNT=1. @V4085A8 02130000
  2136. SPACE 3 02131000
  2137. * CONTINUE SCANNING, BUT NOW WE ARE TRAVERSING A PARENTHESIZED 02132000
  2138. * AREA AND SO WE ONLY CARE ABOUT PARENTHESES AND END-OF-RECORD, 02133000
  2139. * NOT ABOUT COMMA AND BLANK. 02134000
  2140. PSCAN4 BXH R1,R8,PSCANERR ADVANCE R1 ONE BYTE TO GET PAST @V4085A8 02135000
  2141. * DELIMITER JUST FOUND. THEN BRANCH IF 02136000
  2142. * R1 IS BEYOND LAST BYTE OF RECORD. 02137000
  2143. LR R3,R9 LAST BYTE OF RECORD... @V4085A8 02138000
  2144. SR R3,R1 LESS 1ST BYTE TO BE SCANNED GIVES @V4085A8 02139000
  2145. * LENGTH LESS ONE. 02140000
  2146. EX R3,PSCANTRT TRT 0(0,R1),0(R15) @V4085A8 02141000
  2147. BNZ BRANTAB2(R2) IF A DELIMITER WAS HIT, USE @V4085A8 02142000
  2148. * FUNCTION BYTE TO INDEX BRANCH TABLE. 02143000
  2149. * FALL THRU IF TRT RAN TO END OF RECORD WITHOUT HITTING A 02144000
  2150. * DELIMITER. 02145000
  2151. LR R1,R0 DUMMY UP R1 TO LOOK LIKE THE TRT FOUND A @V4085A8 02146000
  2152. * DELIMITER IN 1ST BYTE BEYOND THE RECORD. 02147000
  2153. PSCANERR MVI SAVER15+3(R13),RC1 UNBALANCED LEFT PARENTHESIS @V4085A8 02148000
  2154. * CAUSED SCAN TO END-OF-RECORD; PUT 02149000
  2155. * ERROR CODE IN R15 IN SAVE AREA. 02150000
  2156. B PSCAN5 TREAT END-OF-RECORD AS END OF PARAMETER.@V4085A8 02151000
  2157. SPACE 02152000
  2158. BRANTAB2 EQU *-4 MINUS 4 BECAUSE TABLE HAS NO ZERO-TH ENTRY.@V4085A8 02153000
  2159. B PSCAN4 FUNCTION=4; BLANK WAS FOUND. IGNORE IT.@V4085A8 02154000
  2160. B PSCAN4 FUNCTION=8; COMMA WAS FOUND. IGNORE IT.@V4085A8 02155000
  2161. B PSCANDEP FUNCTION=12; LEFT PARENTHESIS FOUND. @V4085A8 02156000
  2162. *--------B-----*+4-----FUNCTION=16; RIGHT PARENTHESIS FOUND. @V4085A8 02157000
  2163. BCT R7,PSCAN4 SUBTRACT ONE FROM PARENTHESIS DEPTH @V4085A8 02158000
  2164. * COUNT AND GO TO PSCAN4 IF RESULT IS NOT ZERO. 02159000
  2165. B PSCAN2 PARENTHESIS DEPTH COUNT IS NOW ZERO. @V4085A8 02160000
  2166. * RESUME NORMAL SCAN OUTSIDE PARENTHESIZED AREA. 02161000
  2167. PSCANDEP LA R7,1(0,R7) ADD ONE TO PARENTHESIS DEPTH COUNT. @V4085A8 02162000
  2168. B PSCAN4 @V4085A8 02163000
  2169. SPACE 3 02164000
  2170. * COMPUTE OUTPUT VALUES FOR R0 AND R1. 02165000
  2171. PSCAN5 LR R0,R1 ENDING DELIMITER ADDRESS... @V4085A8 02166000
  2172. SR R0,R6 MINUS PARAMETER STARTING ADDR GIVES @V4085A8 02167000
  2173. * PARAMETER LENGTH. 02168000
  2174. * RETURN TO CALLER. 02169000
  2175. PSCAN6 LM R14,R15,SAVER14(R13) @V4085A8 02170000
  2176. LM R2,R12,SAVER2(R13) @V4085A8 02171000
  2177. DROP R12 @V4085A8 02172000
  2178. BR R14 @V4085A8 02173000
  2179. SPACE 3 02174000
  2180. PSCANTRT TRT 0(0,R1),0(R15) EX'ED REMOTELY WITH LENGTH @V4085A8 02175000
  2181. * SUPPLIED BY EX. 02176000
  2182. EJECT 02177000
  2183. *********************************************************************** 02178000
  2184. * 02179000
  2185. * CLEARRTN: THIS SUBROUTINE IS CALLED TO CLEAR (LOGICALLY ERASE) 02180000
  2186. * THE VM/370 ERROR RECORDING CYLINDERS. 02181000
  2187. * 02182000
  2188. *********************************************************************** 02183000
  2189. * 02184000
  2190. * INPUTS: 02185000
  2191. * R1 - CONTAINS FLAGS THAT WILL TELL THE DIAGNOSE WHICH OF THE 02186000
  2192. * CYLINDERS IS (ARE) TO BE ERASED. 02187000
  2193. * R14 - RETURN ADDRESS. 02188000
  2194. * 02189000
  2195. * OUTPUTS: 02190000
  2196. * MSG - DMSIFC828I IF CLEARED OKAY, DMSIFC829W IF CLEAR FAILED. 02191000
  2197. * R15 - ERROR RETURN CODE IF CLEAR FAILS BECAUSE USER DOES NOT 02192000
  2198. * HAVE PRIVILEGE CLASS F. 02193000
  2199. * 02194000
  2200. *********************************************************************** 02195000
  2201. CLEARRTN STM R14,R12,SAVER14(R13) @V4085A8 02196000
  2202. BALR R12,0 @V4085A8 02197000
  2203. USING *,R12 @V4085A8 02198000
  2204. DMSKEY NUCLEUS RUN WITH SUPERVISOR PROTECT KEY. @V4085A8 02199000
  2205. LM R4,R5,PROGOPSW SAVE OLD PROGRAM CHECK PSW. @V4085A8 02200000
  2206. LM R6,R7,PROGNPSW SAVE NEW PROGRAM CHECK PSW. @V4085A8 02201000
  2207. LA R2,PCHKHNDL @V4085A8 02202000
  2208. ST R2,PROGNPSW+4 ALTER NEW PROGRAM CHECK PSW TO @V4085A8 02203000
  2209. * GIVE US CONTROL. 02204000
  2210. SR R2,R2 USE R2 AS A FLAG: 1 = PROG CHECK, @V4085A8 02205000
  2211. * 0 = NO PROG CHECK. 02206000
  2212. DC X'8310001C' DIAGNOSE TO PERFORM ERASE. IF THE @V4085A8 02207000
  2213. * USER IS NOT IN PRIVILEGE CLASS F, VM/370 02208000
  2214. * WILL REFLECT BACK A PRIVILEGED OPERATION 02209000
  2215. * PROGRAM CHECK. AND WE HAVE ALTERED THE 02210000
  2216. * NEW PROGRAM CHECK PSW TO GO TO 'PCHKHNDL' 02211000
  2217. * IN THAT CASE, BEFORE CONTINUING ON HERE. 02212000
  2218. * OTHERWISE, (WHEN USER HAS CLASS F) CONTROL DROPS STRAIGHT THRU 02213000
  2219. STM R4,R5,PROGOPSW RESTORE OLD PROG CHECK PSW TO @V4085A8 02214000
  2220. * NORMAL VALUE. 02215000
  2221. STM R6,R7,PROGNPSW RESTORE NEW PROG CHECK PSW TO @V4085A8 02216000
  2222. * NORMAL VALUE. 02217000
  2223. DMSKEY RESET CHANGE BACK TO 'USER' PROTECT KEY. @V4085A8 02218000
  2224. * NOW TEST THE FLAG IN R2 TO DECIDE WHICH MESSAGE TO ISSUE. 02219000
  2225. BCT R2,CLROKAY BRANCH IF FLAG=0. @V4085A8 02220000
  2226. * FALL THRU IF FLAG=1. PROG CHECK OCCURRED BECAUSE USER WAS 02221000
  2227. * NOT CLASS F. 02222000
  2228. DMSERR NUM=829,LET=W,TEXT='ATTEMPTED ''ZERO'' WAS SUPPRESSED. X02223000
  2229. REQUIRES PRIVILEGE CLASS F',RENT=NO @V4085A8 02224000
  2230. LA R15,RC88 SET ERROR RETURN CODE. @V4085A8 02225000
  2231. B CLREXIT @V4085A8 02226000
  2232. SPACE 02227000
  2233. CLROKAY DMSERR NUM=828,LET=I,TEXT='CPEREP ZERO OR CLEAR HAS BEEN COMPLX02228000
  2234. ETED',RENT=NO @V4085A8 02229000
  2235. SR R15,R15 NORMAL RETURN CODE. @V4085A8 02230000
  2236. CLREXIT L R14,SAVER14(0,R13) @V4085A8 02231000
  2237. LM R0,R12,SAVER0(R13) @V4085A8 02232000
  2238. BR R14 @V4085A8 02233000
  2239. DROP R12 @V4085A8 02234000
  2240. SPACE 3 02235000
  2241. PCHKHNDL LA R2,1 SET R2 FLAG: 1 INDICATES PROGRAM CHECK @V4085A8 02236000
  2242. * OCCURRED. 02237000
  2243. LPSW PROGOPSW RETURN TO INSTRUCTION FOLLOWING THE @V4085A8 02238000
  2244. * DIAGNOSE THAT PROGRAM CHECKED. 02239000
  2245. EJECT 02240000
  2246. *********************************************************************** 02241000
  2247. *. 02242000
  2248. * SUBROUTINE NAME - DMSIFC18 02243000
  2249. * 02244000
  2250. * FUNCTION - 02245000
  2251. * HANDLES TRAPPED OS BLDL MACROS ISSUED BY OS/VS EREP. 02246000
  2252. * BLDL ISSUES SVC 18 WHICH IS TRAPPED VIA CMS HNDSVC MACRO 02247000
  2253. * ISSUED EARLIER. CMS SUPPORTS MOST FUNCTIONS OF OS BLDL, BUT 02248000
  2254. * NOT THE FUNCTION WHERE BLDL IS ISSUED WITH R1 CONTAINING 02249000
  2255. * ZERO WHICH INDICATES OS JOBLIB/STEPLIB PROCESSING IS 02250000
  2256. * WANTED. SINCE OS/VS EREP ATTEMPTS TO USE THIS FUNCTION 02251000
  2257. * WHICH IS NOT SUPPORTED BY CMS, WE HAVE TO TRAP THE BLDL 02252000
  2258. * OURSELVES AND SIMULATE IT. 02253000
  2259. * 02254000
  2260. * WHEN OS JOBLIB/STEPLIB PROCESSING IS REQUESTED, AN OS 02255000
  2261. * PROGRAM IS USING BLDL TO SEARCH THE DIRECTORY OF A PDS(S) 02256000
  2262. * CONTAINING OS LOAD MODULES. THE ANALOGOUS SITUATION HERE IN 02257000
  2263. * CMS IS TO SEARCH THE DIRECTORY(S) OF ANY GLOBAL TXTLIB(S) 02258000
  2264. * FOR THE DESIRED OBJECT MODULE AND THAT IS WHAT OUR SIMULATION 02259000
  2265. * DOES. 02260000
  2266. * 02261000
  2267. * ATTRIBUTES - 02262000
  2268. * SERIALLY REUSABLE, CMS USER AREA, ENTERED VIA HNDSVC TRAPPING. 02263000
  2269. * 02264000
  2270. * ENTRY CONDITIONS - 02265000
  2271. * R0 = ADDRESS OF BLDL'S LIST. 02266000
  2272. * R13 = ADDRESS OF AN EMPTY 72 BYTE SAVE AREA. 02267000
  2273. * R14 = RETURN ADDRESS (TO DMSITS). 02268000
  2274. * 02269000
  2275. * EXIT CONDITIONS - 02270000
  2276. * R0-R15 = RESTORED. 02271000
  2277. * 02272000
  2278. * CALLS TO OTHER ROUTINES - NONE. 02273000
  2279. * 02274000
  2280. * EXTERNAL REFERENCES - NONE. 02275000
  2281. * 02276000
  2282. * TABLES/WORK AREAS - NONE. 02277000
  2283. * 02278000
  2284. * MACROS - DMSKEY, DMSERR. 02279000
  2285. * 02280000
  2286. * REGISTER USAGE - 02281000
  2287. * R0-R9 = SCRATCH. 02282000
  2288. * R10-R11 = SPARES, NOT PRESENTLY USED. 02283000
  2289. * R12 = BASE REGISTER. 02284000
  2290. * R13 = SAVE AREA. 02285000
  2291. * R14-R15 = SCRATCH. 02286000
  2292. * 02287000
  2293. * NOTES - NONE. 02288000
  2294. * 02289000
  2295. * OPERATION - 02290000
  2296. * 02291000
  2297. * OS/VS EREP ISSUES THE BLDL WITH A VALUE OF 0 IN R1 TO 02292000
  2298. * INDICATE JOBLIB/STEPLIB PROCESSING WHICH CMS DOES NOT 02293000
  2299. * SIMULATE. THEREFORE WE MUST SIMULATE THE BLDL HERE. THE 02294000
  2300. * OUTPUT OF OUR SIMULATION IS SIMPLY A RETURN CODE PASSED BACK 02295000
  2301. * TO BLDL IN R15; THE TTR FIELD IN THE BLDL'S LIST WHICH (UNDER 02296000
  2302. * OS) IS NORMALLY FILLED IN IS NOT FILLED IN HERE BECAUSE WE 02297000
  2303. * KNOW EREP WILL IGNORE IT ANYWAY. (NOTE: EREP ONLY USES 02298000
  2304. * BLDL TO TEST DEVICE NAMES (BY CREATING CORRESPONDING 02299000
  2305. * ROUTINE NAMES) TO SEE IF THE DEVICES ARE KNOWN OR UNKNOWN.) 02300000
  2306. * 02301000
  2307. * CONTROL IS RECEIVED FROM OS/VS EREP THROUGH DMSITS WITH 02302000
  2308. * R0 POINTING TO THE BLDL LIST CONTAINING THE 8 CHARACTER 02303000
  2309. * MODULE NAME THAT WILL BE SEARCHED FOR; THE OTHER REGISTERS 02304000
  2310. * CONTAIN A MIXTURE OF EREP AND DMSITS VALUES. R14 HAS THE 02305000
  2311. * RETURN ADDRESS TO DMSITS. 02306000
  2312. * 02307000
  2313. * THE PROCESSING OF THE BLDL REQUEST IS PERFORMED AS FOLLOWS: 02308000
  2314. * 1. REGISTERS ARE SAVED AND ADDRESSABILITY FOR THIS ROUTINE 02309000
  2315. * IS ESTABLISHED. 02310000
  2316. * 2. REGISTERS 7 AND 8 ARE LOADED WITH THE MODULE NAME 02311000
  2317. * FOR USE IN LATER COMPARES. 02312000
  2318. * 3. BY LOADING R6 FROM TXTDIRC IN THE NUCON, R6 IS 02313000
  2319. * INITIALIZED TO POINT TO THE HEADER (DESCRIBED BY 02314000
  2320. * TXTDSECT DSECT) OF THE FIRST TXTLIB ON THE CHAIN OF 02315000
  2321. * GLOBALED TXTLIBS. BUT IF THERE ARE NO GLOBAL TXTLIBS 02316000
  2322. * (R6=0) THEN AN ERROR MESSAGE IS ISUED AND THE BLDL 02317000
  2323. * IS SIMULATED AS A MEMBER-NOT-FOUND. 02318000
  2324. * 4. THE DIRECTORY OF THE CURRENT GLOBAL TXTLIB IS 02319000
  2325. * SEARCHED FOR THE MEMBER NAME SPECIFIED BY THE BLDL. 02320000
  2326. * THIS IS DONE BY THE LOOP WHICH BEGINS WITH THE LABEL 02321000
  2327. * 'BLOOPENT'. EACH TIME THRU THIS LOOP ONE ENTRY IN THE 02322000
  2328. * DIRECTORY IS CHECKED. (THE MODNAME DSECT DESCRIBES 02323000
  2329. * A DIRECTORY ENTRY.) THE LOOP ENDS WHEN THE DESIRED 02324000
  2330. * MEMBER ENTRY IS LOCATED OR WHEN 'NXTAVAIL' (THE START 02325000
  2331. * OF UNUSED ENTRIES) IS REACHED. 02326000
  2332. * 5. IF THE DESIRED MEMBER IS LOCATED, THE BLDL IS 02327000
  2333. * SIMULATED BY SIMPLY PASSING BACK A RETURN CODE OF 0 02328000
  2334. * TO THE BLDL IN R15. NOTHING ELSE IS DONE; NO DATA IS 02329000
  2335. * INSERTED IN THE LIST OF THE BLDL (NORMALLY TTR DATA 02330000
  2336. * IS WANTED, BUT WE KNOW THAT EREP ONLY WANTS THE RETURN 02331000
  2337. * CODE IN R15). 02332000
  2338. * 6. IF THE DESIRED MEMBER ENTRY WAS NOT FOUND IN THE LOOP 02333000
  2339. * IN 4. ABOVE, WE ADVANCE TO THE NEXT GLOBAL TXTLIB IN 02334000
  2340. * THE CHAIN OF GLOBAL TXTLIBS AND GO BACK TO THE LOGIC 02335000
  2341. * AT 4. BUT IF THERE IS NOT ANOTHER GLOBAL TXTLIB, 02336000
  2342. * THEN GO TO 7. 02337000
  2343. * 7. ALL GLOBAL TXTLIBS WERE SEARCHED AND THE MEMBER 02338000
  2344. * REQUESTED BY BLDL WAS NOT FOUND. SO WE SIMULATE A 02339000
  2345. * MEMBER-NOT-FOUND RESPONSE TO THE BLDL. THIS CONSISTS 02340000
  2346. * OF RETURNING A RETURN CODE OF 4 TO BLDL IN R15 AND OF 02341000
  2347. * PLACING A ZERO IN THE R BYTE OF THE TTR FIELD OF THE 02342000
  2348. * BLDL LIST. 02343000
  2349. * 8. THE R15 RETURN CODE IS SENT BACK TO BLDL AS FOLLOWS: 02344000
  2350. * THE CURRSAVE FIELD IN THE NUCON POINTS TO THE CURRENT 02345000
  2351. * SYSTEM SAVE AREA (DESCRIBED BY THE SSAVE DSECT). THIS 02346000
  2352. * CONTAINS THE REGISTER CONTENTS AS THEY EXISTED WHEN 02347000
  2353. * THE BLDL SVC WAS EXECUTED AND THE REGISTERS WILL BE 02348000
  2354. * RESTORED FROM THIS SAVE AREA BY DMSITS WHEN IT 02349000
  2355. * RETURNS TO THE BLDL. SO WE MODIFY R15 IN THIS SYSTEM 02350000
  2356. * SAVE AREA. 02351000
  2357. * 02352000
  2358. * RESPONSES - NONE. 02353000
  2359. * 02354000
  2360. * ERROR MESSAGES - 02355000
  2361. * DMSIFC826E R15 RETURN CODE = 56 02356000
  2362. *. 02357000
  2363. *********************************************************************** 02358000
  2364. DMSIFC18 STM R14,R12,SAVER14(R13) SAVE R14 AT LEAST. DMSITS@V4085A8 02359000
  2365. * PROVIDES THE SAVE AREA. 02360000
  2366. BALR R12,0 @V4085A8 02361000
  2367. USING *,R12 @V4085A8 02362000
  2368. USING NUCON,0 MAKE LOW CORE AREA ADDRESSABLE. @V4085A8 02363000
  2369. L R2,CURRSAVE GET ADDR OF CURRENT SYSTEM SAVE @V4085A8 02364000
  2370. * AREA BEFORE ANOTHER SVC CHANGES IT. 02365000
  2371. USING SSAVE,R2 @V4085A8 02366000
  2372. LR R9,R0 SAVE ADDR OF BLDL LIST THAT BLDL PUT @V4085A8 02367000
  2373. * IN R0. 02368000
  2374. USING BLDLIST,R9 @V4085A8 02369000
  2375. LM R7,R8,BLDLNAM PUT 8 CHAR NAME INTO TWO REGS. @V4085A8 02370000
  2376. L R6,TXTDIRC GET POINTER TO 1ST LIBRARY. @V4085A8 02371000
  2377. LTR R6,R6 ARE ANY TXTLIBS GLOBALED IN? @V4085A8 02372000
  2378. BZ BLDNOFND NO. GO SIMULATE AS MEMBER-NOT-FOUND. @V4085A8 02373000
  2379. USING TXTDSECT,R6 @V4085A8 02374000
  2380. BLOOPLIB L R3,ENTRY1 BXH INDEX: ADDR 1ST ENTRY OF LIB. @V4085A8 02375000
  2381. L R4,LENTRY BXH INCR: LENGTH OF AN ENTRY. @V4085A8 02376000
  2382. L R5,NXTAVAIL BXH COMPARAND: ADDR 1ST UNUSED @V4085A8 02377000
  2383. * ENTRY OF LIB. 02378000
  2384. SR R3,R4 BACK UP ONE ENTRY SINCE BXH WILL @V4085A8 02379000
  2385. * INITIALLY ADVANCE ONE. 02380000
  2386. SR R5,R4 BACK COMPARAND UP BY ONE ENTRY BECAUSE @V4085A8 02381000
  2387. * WE HAVE ONLY BXH, NOT BXHE. 02382000
  2388. BLOOPENT BXH R3,R4,BLDNXTLB BRANCH IF NO MORE ENTRIES IN @V4085A8 02383000
  2389. * THIS LIB. 02384000
  2390. USING MODNAME,R3 DSECT FOR ENTRY IN LIB DIRECTORY. @V4085A8 02385000
  2391. CL R8,NMELST4 COMPARE LAST 4 CHARS OF REQUESTED @V4085A8 02386000
  2392. * MEMBER (IN R8) WITH LAST 4 CHARS IN 02387000
  2393. * PRESENT ENTRY. 02388000
  2394. BNE BLOOPENT NO MATCH, GO TRY NEXT ENTRY. @V4085A8 02389000
  2395. CL R7,NME1ST4 LAST 4 MATCHED. HOW ABOUT 1ST 4? @V4085A8 02390000
  2396. BNE BLOOPENT NO MATCH, GO TRY NEXT ENTRY. @V4085A8 02391000
  2397. DROP R3 @V4085A8 02392000
  2398. * FALL THRU INDICATES WE FOUND A MATCH. 02393000
  2399. SR R3,R3 RETURN CODE 0 FOR SIMULATED BLDL. @V4085A8 02394000
  2400. B BLDEXIT @V4085A8 02395000
  2401. SPACE 02396000
  2402. BLDNXTLB DS 0H DID NOT FIND IT IN CURRENT LIB. TRY NEXT @V4085A8 02397000
  2403. * LIB IN CHAIN. 02398000
  2404. L R6,NXTLIB GET POINTER TO NEXT TXTLIB. @V4085A8 02399000
  2405. LTR R6,R6 TEST POINTER FOR 0 (END OF CHAIN). @V4085A8 02400000
  2406. BNZ BLOOPLIB IF WE HAVE ANOTHER LIB, GO SEARCH IT. @V4085A8 02401000
  2407. DROP R6 @V4085A8 02402000
  2408. * FALL THRU INDICATES REQUESTED MEMBER NOT FOUND IN ANY 02403000
  2409. * GLOBALED TXTLIB. 02404000
  2410. BLDNOFND LA R3,RC4 RETURN CODE 4 FOR SIMULATED BLDL R15. @V4085A8 02405000
  2411. MVI BLDLTTR+2,X'00' 0 IN R OF TTR INDICATES MEMBER @V4085A8 02406000
  2412. * NOT FOUND. 02407000
  2413. DROP R9 ADDR OF BLDL LIST. @V4085A8 02408000
  2414. SPACE 02409000
  2415. BLDEXIT DMSKEY NUCLEUS SET KEY FOR STORING RETURN CODE IN R15@V4085A8 02410000
  2416. * OF BLDL SAVE AREA. 02411000
  2417. ST R3,EGPR15 SIMULATED CODE TO BE RETURNED TO BLDL@V4085A8 02412000
  2418. DROP R2 @V4085A8 02413000
  2419. DMSKEY RESET @V4085A8 02414000
  2420. LM R14,R12,SAVER14(R13) @V4085A8 02415000
  2421. DROP R12 @V4085A8 02416000
  2422. BR R14 @V4085A8 02417000
  2423. EJECT 02418000
  2424. *********************************************************************** 02419000
  2425. *. 02420000
  2426. * SUBROUTINE NAME - DMSIFC76 02421000
  2427. * 02422000
  2428. * FUNCTION - 02423000
  2429. * IT IS DOUBTFUL IF THIS SUBROUTINE HAS ANY FUNCTION AT ALL. 02424000
  2430. * IT IS INCLUDED HERE AS A NO-OP (I.E., BR R14) BECAUSE IT 02425000
  2431. * ALSO APPEARED IN THE EARLIER VERSION (AS A NO-OP THERE ALSO). 02426000
  2432. * THE PURPOSE, AT SOME TIME IN THE PAST, MAY HAVE BEEN 02427000
  2433. * TO PREVENT ADDITIONAL ERROR RECORDS FROM BEING PUT INTO THE 02428000
  2434. * ERROR RECORDING CYLINDERS ONCE CPEREP BEGAN PROCESSING THE 02429000
  2435. * RECORDS. HOWEVER IT IS DIFFICULT TO UNDERSTAND HOW 02430000
  2436. * INTERCEPTING SVC 76 AND NO-OPING IT COULD HAVE ACCOMPLISHED 02431000
  2437. * THIS. FOR ONE THING, HNDSVC'S TRAPPING OF SVC 76 WOULD 02432000
  2438. * ONLY INTERCEPT SVC 76 ISSUED FROM THE VIRTUAL MACHINE IN 02433000
  2439. * WHICH CPEREP WAS RUNNING. SVC 76 FROM OTHER VIRTUAL 02434000
  2440. * MACHINES WOULD STILL CAUSE NEW ENTRIES IN THE ERROR RECORDING 02435000
  2441. * CYLINDERS. FOR ANOTHER THING, IT IS DOUBTFUL IF THE 02436000
  2442. * HNDSVC WILL EVER SUCCEED IN TRAPPING ANY SVC 76'S BECAUSE 02437000
  2443. * VM TRAPS THEM BEFORE CMS AND DOES NOT SHOW THEM TO CMS. 02438000
  2444. * AN OPERATING SYSTEM IN A REAL MACHINE CAN SEND ITSELF ERROR 02439000
  2445. * RECORDS VIA SVC 76, BUT IN A VM VIRTUAL MACHINE, VM TRAPS 02440000
  2446. * THE SVC AND KEEPS THE ERROR RECORD FOR ITS OWN ERROR 02441000
  2447. * RECORDING CYLINDERS. 02442000
  2448. * 02443000
  2449. * ANOTHER POSSIBLE EXPLANATION FOR THE EXISTENCE OF THIS NO-OP 02444000
  2450. * ROUTINE IS THAT IN THE EVENT THAT CMS (OR OS/VS EREP RUNNING 02445000
  2451. * UNDER CMS) ISSUES SVC 76 AND SENDS BAD PARAMETERS ALONG WITH 02446000
  2452. * THE SVC THEN, BECAUSE OF THE BAD PARAMETERS, VM MIGHT REFLECT 02447000
  2453. * THE SVC BACK UP TO CMS INSTEAD OF HIDING IT. SO IN THIS CASE 02448000
  2454. * THE EXISTENCE OF THE NO-OP IS JUSTIFIED. 02449000
  2455. *. 02450000
  2456. *********************************************************************** 02451000
  2457. SPACE 02452000
  2458. DMSIFC76 BR R14 THIS ROUTINE IS IN EFFECT A NO-OP. @V4085A8 02453000
  2459. EJECT 02454000
  2460. *********************************************************************** 02455000
  2461. *. 02456000
  2462. * SUBROUTINE NAME - DMSIFC0 02457000
  2463. * 02458000
  2464. * FUNCTION - 02459000
  2465. * HANDLE TRAPPED EXCP'S (SVC 0). 02460000
  2466. * OS/VS EREP USES EXCP TO ACCESS THE SYS1.LOGREC DATA SET. THIS 02461000
  2467. * ROUTINE SIMULATES EXCP TO OS SYS1.LOGREC BY READING DATA 02462000
  2468. * FROM THE VM/370 ERROR RECORDING CYLINDERS AND PASSING IT 02463000
  2469. * BACK THRU THE EXCP AS IF IT CAME FROM A SYS1.LOGREC DATA SET. 02464000
  2470. * 02465000
  2471. * ATTRIBUTES - 02466000
  2472. * NON-REUSABLE, CMS USER AREA, ENTERED VIA HNDSVC MACRO. 02467000
  2473. * 02468000
  2474. * ENTRY CONDITIONS - 02469000
  2475. * SYSTEM MASK ENABLED, USER PROTECT KEY, SUPERVISOR STATE 02470000
  2476. * (CHANGED TO PROBLEM STATE SOON AFTER ENTRY). 02471000
  2477. * R0-R11 - SAME AS WHEN SVC WAS EXECUTED (R1 = ADDRESS OF 02472000
  2478. * THE OS IOB). 02473000
  2479. * R12 - ADDRESS OF THE CALLING SVC. 02474000
  2480. * R13 - ADDRESS OF AN EMPTY SAVE AREA TO BE USED BY THIS ROUTINE 02475000
  2481. * R14 - RETURN ADDRESS (TO DMSITS). 02476000
  2482. * R15 - SAME AS WHEN SVC WAS EXECUTED. 02477000
  2483. * CURRSAVE - THIS FIELD IN THE NUCON POINTS TO THE CURRENT 02478000
  2484. * SYSTEM SAVE AREA (DESCRIBED BY THE SSAVE DSECT). 02479000
  2485. * THIS CONTAINS THE REGISTER CONTENTS AS THEY 02480000
  2486. * EXISTED WHEN THE BLDL SVC WAS EXECUTED AND THESE 02481000
  2487. * CONTENTS WILL BE RESTORED BY DMSITS WHEN IT RETURNS 02482000
  2488. * TO THE SVC. 02483000
  2489. * 02484000
  2490. * EXIT CONDITIONS - 02485000
  2491. * R0-R15 - RESTORED TO ENTRY VALUES. HOWEVER DMSITS RESTORES 02486000
  2492. * ANOTHER LEVEL FROM A SYSTEM SAVE AREA BEFORE 02487000
  2493. * TRANSFERING CONTROL BACK TO THE BLDL AND R15 IN THAT 02488000
  2494. * SAVE AREA HAS THE SIMULATED RETURN CODE IN R15 TO 02489000
  2495. * BE RETURNED TO THE BLDL. 02490000
  2496. * 02491000
  2497. * CALLS TO OTHER ROUTINES - DMSREA 02492000
  2498. * 02493000
  2499. * EXTERNAL REFERENCES - NONE 02494000
  2500. * 02495000
  2501. * TABLES/WORK AREAS - 02496000
  2502. * 02497000
  2503. * MACROS - DMSERR 02498000
  2504. * 02499000
  2505. * REGISTER USAGE - 02500000
  2506. * R0-R9 - SCRATCH. 02501000
  2507. * R10-R11 - SPARES, NOT PRESENTLY USED. 02502000
  2508. * R12 - BASE REGISTER. 02503000
  2509. * R13 - SAVE AREA ADDRESS. 02504000
  2510. * R14-R15 - SCRATCH. 02505000
  2511. * 02506000
  2512. * NOTES - NONE 02507000
  2513. * 02508000
  2514. * OPERATION - SEE BELOW. 02509000
  2515. * 02510000
  2516. * RESPONSES - NONE 02511000
  2517. * 02512000
  2518. * ERROR MESSAGES - DMSIFC832S, R15 RETURN CODE = 104. 02513000
  2519. * 02514000
  2520. *********************************************************************** 02515000
  2521. * 02516000
  2522. * THE CHANNEL PROGRAM AND ITS FUNCTIONS 02517000
  2523. * 02518000
  2524. * OS/VS EREP USES EXCP (SVC 0) TO ACCESS THE SYS1.LOGREC 02519000
  2525. * DATA SET. OS/VS EREP CONTAINS ONLY ONE EXCP (LOCATED NEAR 02520000
  2526. * THE EXCPLOOP LABEL IN IFCIOHND) AND THAT EXCP USES JUST ONE 02521000
  2527. * CHANNEL PROGRAM. THE CHANNEL PROGRAM CONTAINS JUST THREE 02522000
  2528. * COMMANDS: (1) SEARCH ID EQUAL; (2) TIC *-8; (3) READ OR WRITE 02523000
  2529. * COMMAND (OPCODE GETS MODIFIED). 02524000
  2530. * 02525000
  2531. * CODE EXISTS IN IFCIOHND TO USE THE CHANNEL PROGRAM TO PERFORM 02526000
  2532. * ANY OF FOUR DIFFERENT FUNCTIONS. THE OPCODE STORED IN THE 02527000
  2533. * READ/WRITE COMMAND (THE THIRD COMMAND) VARIES ACCORDING TO 02528000
  2534. * THE FUNCTION THAT IS TO BE PERFORMED: 02529000
  2535. * (1) READ HEADER RECORD OF SYS1.LOGREC. 02530000
  2536. * OPCODE: X'06' = READ DATA 02531000
  2537. * (2) WRITE HEADER RECORD OF SYS1.LOGREC. 02532000
  2538. * OPCODE: X'05' = WRITE DATA 02533000
  2539. * (3) READ THE NEXT RECORD THAT FOLLOWS THE RECORD WHOSE 02534000
  2540. * ADDRESS (ID) IS SPECIFIED. 02535000
  2541. * OPCODE: X'9E' = READ COUNT KEY AND DATA 02536000
  2542. * (4) ZERO OUT AN ARBITRARY RECORD IN THE FILE. 02537000
  2543. * OPCODE: X'05' = WRITE DATA 02538000
  2544. * THE FOURTH FUNCTION IS NO LONGER USED ANYWHERE IN EREP, SO 02539000
  2545. * ONLY THE FIRST THREE FUNCTIONS MUST BE SIMULATED. EACH OF 02540000
  2546. * THESE THREE FUNCTIONS HAS A UNIQUE OPCODE IN THE READ/WRITE 02541000
  2547. * COMMAND AND THIS WILL BE USED TO DETERMINE WHICH FUNCTION 02542000
  2548. * IS TO BE SIMULATED WHENEVER AN EXCP IS TRAPPED. 02543000
  2549. * 02544000
  2550. * MANIPULATION OF MBBCCHHR ADDRESSES BY OS/VS EREP 02545000
  2551. * 02546000
  2552. * OS/VS EREP USES ABSOLUTE RECORD ADDRESSES (MBBCCHHR FORMAT) 02547000
  2553. * TO ACCESS THE SYS1.LOGREC DATA SET, NOT ONLY BECAUSE EXCP 02548000
  2554. * IS USED, BUT ALSO BECAUSE OS/VS MAINTAINS SEVERAL ABSOLUTE 02549000
  2555. * ADDRESSES IN THE SYS1.LOGREC HEADER RECORD. 02550000
  2556. * 02551000
  2557. * EREP'S MANIPULATION OF MBBCCHHR ADDRESSES IS MINIMAL. TO 02552000
  2558. * READ OR WRITE THE SYS1.LOGREC HEADER RECORD, EREP SETS M 02553000
  2559. * TO X'00', SETS R TO X'01', AND TAKES BBCCHH FROM THE DEB 02554000
  2560. * (DATA EXTENT BLOCK) WHICH IS POINTED TO BY A FIELD OF THE 02555000
  2561. * DCB. RECORDS OTHER THAN THE HEADER ARE ONLY READ, NEVER 02556000
  2562. * WRITTEN. EREP READS THRU THESE ERROR DATA RECORDS ONCE 02557000
  2563. * SEQUENTIALLY AND THEN (SOMETIMES) IT GOES BACK AND READS 02558000
  2564. * THEM RANDOMLY. THE ADDRESS (BBCCHHR) OF THE FIRST OF THE 02559000
  2565. * ERROR RECORDS IS FOUND IN THE HEADER RECORD, SO INITIALLY 02560000
  2566. * EREP READS THE HEADER AND GETS THIS ADDRESS. EREP THEN STARTS 02561000
  2567. * WITH THIS ADDRESS WHEN IT READS ERROR RECORDS SEQUENTIALLY. 02562000
  2568. * BECAUSE OF THE NATURE OF THE CHANNEL PROGRAM USED TO READ 02563000
  2569. * THE ERROR RECORDS, EREP NEVER HAS TO INCREMENT THE BBCCHHR 02564000
  2570. * ADDRESS WHEN IT READS THRU THE ERROR RECORDS SEQUENTIALLY. 02565000
  2571. * THE SEARCH COMMAND LOCATES THE RECORD SPECIFIED BY BBCCHHR, 02566000
  2572. * BUT BECAUSE THE READ OPCODE IS X'9E' (READ COUNT KEY AND 02567000
  2573. * DATA WITH MULTIPLE TRACK OPERATION), THE NEXT RECORD IS 02568000
  2574. * READ RATHER THAN THE ONE WHOSE ADDRESS WAS SEARCHED FOR. 02569000
  2575. * (SINCE X'9E' READS THE COUNT WHICH ALREADY PASSED UNDER 02570000
  2576. * THE HEAD FOR THE SEARCH COMMAND, IT IS TOO LATE TO READ THE 02571000
  2577. * CURRENT RECORD, SO IT READS THE NEXT ONE.) AND SINCE IT READS 02572000
  2578. * THE COUNT FIELD (CONTAINING CCHHR) OF THIS NEXT RECORD, IT 02573000
  2579. * CONVENIENTLY RETURNS THE CCHHR ADDRESS 02574000
  2580. * OF THIS NEW RECORD. THUS IN SEQUENTIAL 02575000
  2581. * READING, THE RECORD READ IS ALWAYS ONE BEYOND THE ADDRESS 02576000
  2582. * SPECIFIED AND EACH READ RETURNS THE CCHHR ADDRESS TO BE USED 02577000
  2583. * FOR THE NEXT READ. 02578000
  2584. * 02579000
  2585. * THE END OF FILE DETECTION DURING THE SEQUENTIAL READING IS 02580000
  2586. * NOT VIA A TRUE EOF. INSTEAD, EREP COMPARES THE ADDRESS OF 02581000
  2587. * THE LAST ERROR RECORD WRITTEN (AN ADDRESS FOUND 02582000
  2588. * IN THE SYS1.LOGREC HEADER RECORD) 02583000
  2589. * WITH THE CCHHR ABOUT TO BE USED TO READ THE NEXT RECORD. IF 02584000
  2590. * THEY ARE EQUAL THEN THERE IS NO NEXT RECORD. 02585000
  2591. * 02586000
  2592. * AFTER EOF HAS BEEN DETECTED DURING THE SEQUENTIAL READ OF 02587000
  2593. * ERROR RECORDS, EREP WILL EXAMINE THE HEADER RECORD TO SEE IF 02588000
  2594. * FRAME RECORDS ARE PRESENT IN SYS1.LOGREC. IF SO, EREP READS 02589000
  2595. * THROUGH THE FRAME RECORDS SEQUENTIALLY. THE STARTING ADDRESS 02590000
  2596. * FOR THE SEQUENTIAL READ OF THE FRAME RECORDS WILL BE M OF 02591000
  2597. * X'00', BBCCHH THE SAME AS THAT USED TO READ THE HEADER 02592000
  2598. * RECORD, AND R = X'02'. (THIS IS THE ADDRESS OF THE TIMESTAMP 02593000
  2599. * RECORD ON SYS1.LOGREC. NOTE THAT THE ADDRESS IS ONE RECORD 02594000
  2600. * BEFORE THE RECORD THAT IS ACTUALLY DESIRED.) THE ENDING ADDRES 02595000
  2601. * FOR THIS SEQUENTIAL READ IS THE ADDRESS OF THE FIRST ERROR 02596000
  2602. * RECORD FOUND IN THE HEADER. 02597000
  2603. * 02598000
  2604. * WHEN ERROR (AND POSSIBLY FRAME) RECORDS ARE READ RANDOMLY, 02599000
  2605. * (AFTER HAVING BEEN READ ONCE SEQUENTIALLY), THE EXCP USES 02600000
  2606. * THE SAME CHANNEL PROGRAM AND READ COMMAND (X'9E'). AND SO 02601000
  2607. * ONCE AGAIN, THE CCHHR ADDRESS USED MUST BE THE ADDRESS 02602000
  2608. * OF THE RECORD PRIOR TO THE RECORD THAT IS ACTUALLY WANTED. 02603000
  2609. * THE ADDRESSES THAT EREP USES DURING THE RANDOM READING 02604000
  2610. * ARE ADDRESSES THAT IT STORED IN A TABLE DURING THE 02605000
  2611. * SEQUENTIAL READING. NOW, WITH EVERY READ, WHETHER RANDOM OR 02606000
  2612. * SEQUENTIAL, THERE ARE TWO CCHHR ADDRESSES INVOLVED. 02607000
  2613. * FIRST, THERE IS THE ADDRESS OF THE PRIOR RECORD, USED 02608000
  2614. * FOR THE SEARCH, AND SECOND, THERE IS THE ADDRESS OF THE 02609000
  2615. * CURRENT RECORD, THAT IS READ FROM THE COUNT FIELD. 02610000
  2616. * WHEN EREP DOES RANDOM READING IT COULD USE THE FIRST 02611000
  2617. * ADDRESS AS A SEARCH ADDRESS, THE SAME AS IT DID DURING 02612000
  2618. * THE SEQUENTIAL READING, BUT IT DOESN'T. INSTEAD IT USES 02613000
  2619. * THE SECOND ADDRESS, THE ONE FROM THE COUNT FIELD OF THE 02614000
  2620. * RECORD ACTUALLY READ. THIS SECOND ADDRESS IS THE ONE 02615000
  2621. * THAT EREP SAVES IN A TABLE DURING THE SEQUENTIAL READING. 02616000
  2622. * BUT SINCE THIS IS THE ADDRESS OF THE DESIRED RECORD (AND 02617000
  2623. * NOT THE ADDRESS OF THE PRECEEDING RECORD AS REQUIRED BY 02618000
  2624. * THE CHANNEL PROGRAM), EREP HAS TO MODIFY THE ADDRESSES 02619000
  2625. * THAT IT PULLS OUT OF THE TABLE BEFORE IT CAN USE THEM IN 02620000
  2626. * THE CHANNEL PROGRAM. THIS MODIFICATION CONSISTS SIMPLY 02621000
  2627. * OF SUBTRACTING ONE FROM THE R FIELD OF CCHHR. SINCE THE 02622000
  2628. * DATA RECORDS ARE NUMBERED 1 THRU N, THE DECREMENTED VALUE 02623000
  2629. * OF R HAS THE RANGE 0 THRU (N-1). SEARCHING FOR A RECORD 0 02624000
  2630. * WHEN READING DATA RECORD 1 IS NO PROBLEM, BECAUSE EACH 02625000
  2631. * TRACK HAS A (NON-DATA) RECORD 0 WHICH IS THE STANDARD 02626000
  2632. * 8 BYTE TRACK CAPACITY RECORD (R0). (NOTE: THE DISTINCTION 02627000
  2633. * BETWEEN EREP'S USE OF 'SECOND' RATHER THAN 'FIRST' RECORD 02628000
  2634. * ADDRESSES IS EXPLAINED HERE BECAUSE WE WILL SEE LATER 02629000
  2635. * THAT IT MAKES A DIFFERENCE IN THE WAY WE DEAL WITH I/O 02630000
  2636. * ERRORS WE ENCOUNTER WHEN READING FROM THE VM/370 ERROR 02631000
  2637. * RECORDING CYLINDERS IN THE PROCESS OF SIMULATING THE 02632000
  2638. * EREP EXCP'S RANDOM READING.) 02633000
  2639. * 02634000
  2640. * SIMULATION OF THE EXCP IN GENERAL 02635000
  2641. * 02636000
  2642. * THE SYS1.LOGREC DATA SET WILL BE FILEDEF'ED AS A DUMMY AND 02637000
  2643. * THE OPEN AND THE CLOSE OF THE DATA SET WILL BE ALLOWED TO 02638000
  2644. * EXECUTE AS USUAL WITHOUT INTERCEPTION. EXCP WILL BE TRAPPED. 02639000
  2645. * WAIT WILL BE EXECUTED NORMALLY AND WILL FALL STRAIGHT THRU 02640000
  2646. * BECAUSE THE ECB WILL BE POSTED COMPLETE EACH TIME EXCP IS 02641000
  2647. * SIMULATED. A SIMULATED SYS1.LOGREC HEADER RECORD (RECORD 1) 02642000
  2648. * WILL BE MAINTAINED (IT IS DESCRIBED BY THE HDRLOGRC DSECT). 02643000
  2649. * A SIMULATED TIME STAMP RECORD (RECORD 2) WILL NOT BE 02644000
  2650. * NECESSARY SINCE EREP DOES NOT READ IT. EACH TIME AN EXCP 02645000
  2651. * IS INTERCEPTED, THE OPCODE OF THE READ/WRITE COMMAND OF THE 02646000
  2652. * CHANNEL PROGRAM IS EXAMINED TO DETERMINE WHAT FUNCTION IS TO 02647000
  2653. * BE PERFORMED. 02648000
  2654. * 02649000
  2655. * SIMULATION OF A READ OF THE HEADER RECORD 02650000
  2656. * 02651000
  2657. * THE FIRST TRAPPED EXCP SHOULD TURN OUT TO BE A READ OF THE 02652000
  2658. * HEADER RECORD. FIELDS IN THE SIMULATED HEADER RECORD WILL 02653000
  2659. * BE INITIALIZED THIS FIRST TIME, THEN A COPY OF IT WILL BE 02654000
  2660. * RETURNED TO THE CHANNEL PROGRAM'S I/O BUFFER. FOR 02655000
  2661. * SUBSEQUENT READS OF THE HEADER NO INITIALIZATION WILL BE 02656000
  2662. * NECESSARY. INITIALIZATION OF THE SIMULATED HEADER RECORD 02657000
  2663. * REQUIRES A CALL TO DMSREA TO READ THE FIRST ERROR RECORD 02658000
  2664. * FROM THE VM/370 ERROR RECORDING CYLINDERS BECAUSE: IF THE 02659000
  2665. * ATTEMPT TO READ THE FIRST ERROR RECORD SHOWS 02660000
  2666. * THAT THE ERROR CYLINDERS ARE EMPTY, THEN THE 02661000
  2667. * 'HDRLAST' FIELD OF THE SIMULATED HEADER RECORD WILL HAVE TO 02662000
  2668. * BE SET TO THE SAME VALUE AS IS IN THE 'HDRSTART' FIELD SO 02663000
  2669. * THAT THE SIMULATED SYS1.LOGREC APPEARS EMPTY IF EREP LOOKS 02664000
  2670. * AT THE HEADER. (NOTE: ACTUALLY IT APPEARS THAT EREP WILL 02665000
  2671. * NOT BOTHER COMPARING THESE TWO FIELDS WHEN IT FIRST READS 02666000
  2672. * THE HEADER AND SO IT WILL NOT FIND OUT THAT SYS1.LOGREC IS 02667000
  2673. * EMPTY UNTIL JUST BEFORE IT IS READY TO ATTEMPT 02668000
  2674. * THE FIRST SEQUENTIAL READ. NEVERTHELESS, WE 02669000
  2675. * WILL CALL DMSREA FOR THE FIRST READ NOW 02670000
  2676. * ANYWAY SINCE: (1) THE SIMULATION IS MORE REALISTIC AND IT 02671000
  2677. * MIGHT BE NECESSARY IF EREP GETS MODIFIED IN THE FUTURE; 02672000
  2678. * (2) WE HAVE TO CALL DMSREA ONCE BEFORE THE FIRST SEQUENTIAL 02673000
  2679. * READ ANYWAY AS WE HAVE TO ALWAYS BE ONE RECORD AHEAD (THIS 02674000
  2680. * IS EXPLAINED UNDER 'SIMULATION OF SEQUENTIAL READS OF ERROR 02675000
  2681. * RECORDS'). 02676000
  2682. * 02677000
  2683. * IF THE ATTEMPT TO READ THE FIRST ERROR RECORD SHOWS THAT 02678000
  2684. * ERROR RECORDS ARE PRESENT, THEN THE 'HDRLAST' FIELD OF 02679000
  2685. * THE SIMULATED HEADER RECORD WILL BE SET TO THE ADDRESS OF 02680000
  2686. * THE LAST OF THE ERROR RECORDS. BUT THE LAST RECORD IS 02681000
  2687. * UNKNOWN AT THIS POINT, SO AN ARBITRARY HIGH ADDRESS 02682000
  2688. * (ALL X'FF') WILL BE PUT IN 'HDRLAST'. THEN LATER THE 02683000
  2689. * ACTUAL LAST RECORD WILL BE SIMULATED AS IF ITS ADDRESS 02684000
  2690. * IS ALL X'FF'. 02685000
  2691. * 02686000
  2692. * SIMULATION OF A WRITE OF THE HEADER RECORD 02687000
  2693. * 02688000
  2694. * WHEN A WRITE OF THE HEADER RECORD IS DETECTED, THE EXCP'S 02689000
  2695. * WRITE BUFFER WILL BE LOCATED AND THE DATA IN IT (A REVISED 02690000
  2696. * HEADER BUILT BY EREP) WILL BE COPIED INTO THE SIMULATED 02691000
  2697. * HEADER. BEFORE COPYING IT THOUGH (I.E., WHILE WE STILL 02692000
  2698. * HAVE THE OLD HEADER), THE NEW HEADER WILL BE CHECKED TO SEE 02693000
  2699. * IF EREP IS ATTEMPTING TO ZERO SYS1.LOGREC (BY RESETTING THE 02694000
  2700. * 'HDRLAST' FIELD IN THE NEW HEADER). IF 'HDRLAST' IN THE 02695000
  2701. * NEW HEADER HAS BEEN SET TO THE SAME VALUE AS 'HDRSTART', 02696000
  2702. * THEN A 'ZERO' IS BEING DONE BY EREP (UNLESS 'HDRLAST' WAS 02697000
  2703. * ALREADY EQUAL TO 'HDRSTART'; THIS CAN BE CHECKED IN THE OLD 02698000
  2704. * HEADER). IF EREP IS DOING A 'ZERO' THEN WE WILL ZERO THE 02699000
  2705. * VM/370 ERROR RECORDING CYLINDERS. 02700000
  2706. * 02701000
  2707. * SIMULATION OF SEQUENTIAL READS OF ERROR RECORDS 02702000
  2708. * 02703000
  2709. * IN GETTING RECORDS FROM THE VM/370 ERROR CYLINDERS AND 02704000
  2710. * PRESENTING THEM TO EREP AS IF THEY CAME FROM A SYS1.LOGREC, 02705000
  2711. * NO RE-FORMATTING OF THE RECORD DATA IS NECESSARY. THE FORMATS 02706000
  2712. * OF ERROR & FRAME RECORDS IN THE OS/VS SYS1.LOGREC AND IN THE 02707000
  2713. * VM/370 ERROR CYLINDERS ARE IDENTICAL EXCEPT THAT VM/370 02708000
  2714. * BLOCKS THE RECORDS INTO 4K BLOCKS WHILE UNDER OS/VS THEY ARE 02709000
  2715. * UNBLOCKED. 02710000
  2716. * 02711000
  2717. * IN HANDLING THE EXCP'S THAT EREP ISSUES TO READ ERROR RECORDS 02712000
  2718. * SEQUENTIALLY FROM SYS1.LOGREC, WE WILL BE CALLING DMSREA TO 02713000
  2719. * READ ONE RECORD AT A TIME FROM THE VM/370 ERROR CYLINDERS. 02714000
  2720. * BUT WE WILL ALWAYS HAVE TO STAY ONE RECORD AHEAD OF THE ONE 02715000
  2721. * CURRENTLY BEING REQUESTED BY THE EXCP. THE REASON FOR 02716000
  2722. * KEEPING ONE RECORD AHEAD IS THAT DURING THE SIMULATION OF 02717000
  2723. * THE CURRENT EXCP WE HAVE TO KNOW WHETHER OR NOT THERE WILL 02718000
  2724. * BE A RECORD FOR THE NEXT EXCP. WE HAVE TO KNOW WHETHER OR 02719000
  2725. * NOT THERE WILL BE A NEXT RECORD BECAUSE OF THE NATURE OF THE 02720000
  2726. * CHANNEL PROGRAM AND BECAUSE OF THE METHOD EREP USES TO 02721000
  2727. * DETECT THE (LOGICAL) END OF FILE. THE CHANNEL PROGRAM 02722000
  2728. * RETURNS THE CCHHR ADDRESS OF THE CURRENT RECORD AFTER EACH 02723000
  2729. * EXCP. NOW IF THE CURRENT RECORD HAPPENS TO BE THE LAST 02724000
  2730. * RECORD, ITS RETURNED CCHHR ADDRESS SHOULD MATCH THE CCHHR 02725000
  2731. * ADDRESS (OF ALL X'FF') IN THE 'HDRLAST' FIELD OF THE 02726000
  2732. * (SIMULATED) HEADER (AND IN FACT EREP LOOKS FOR THIS MATCH). 02727000
  2733. * THEREFORE IN THE CASE OF THE LAST RECORD, THE SIMULATED 02728000
  2734. * CCHHR VALUE RETURNED AFTER THE EXCP MUST BE 02729000
  2735. * THE ALL X'FF' VALUE FOUND IN 'HDRLAST'. AND IN 02730000
  2736. * SIMULATING THE EXCP, THE ONLY WAY WE HAVE OF KNOWING WHETHER 02731000
  2737. * OR NOT TO RETURN THE 'HDRLAST' VALUE AS THE RETURNED CCHHR 02732000
  2738. * IS TO KNOW WHETHER OR NOT THE VM/370 ERROR CYLINDERS CONTAIN 02733000
  2739. * ANOTHER RECORD. THIS WE DETERMINE BY READING ONE RECORD 02734000
  2740. * AHEAD. (NOTE: THE RECORD READ AHEAD CAN REMAIN IN THE 02735000
  2741. * I/O BUFFER OF DMSREA UNTIL IT IS NEEDED FOR THE NEXT EXCP. 02736000
  2742. * DMSREA DOES NOT RETURN DATA TO A BUFFER OF THE CALLER; 02737000
  2743. * INSTEAD IT JUST RETURNS A POINTER TO THE DATA SO THE 02738000
  2744. * CALLER CAN GET IT ANYTIME PRIOR TO HIS NEXT CALL.) 02739000
  2745. * 02740000
  2746. * IN THE CASE OF ALL OTHER ERROR RECORDS (I.E., ALL BUT THE 02741000
  2747. * LAST), THE CCHHR VALUE RETURNED TO EREP WITH THE RECORD IS 02742000
  2748. * RATHER ARBITRARY AS FAR AS EREP IS CONCERNED; EREP NEVER 02743000
  2749. * LOOKS AT IT EXCEPT TO COMPARE IT WITH 'HDRLAST' IN THE 02744000
  2750. * CASE OF SEQUENTIAL I/O, OR TO DECREMENT THE R FIELD BY 02745000
  2751. * ONE IN THE CASE OF RANDOM I/O. 02746000
  2752. * THE ARBITRARY VALUE WE WILL USE IN THE SIMULATION WILL 02747000
  2753. * BE THE 'CCB0R' VALUE DESCRIBED IN THE PROLOGUE OF DMSREA. 02748000
  2754. * 02749000
  2755. * IN THE CASE OF SEQUENTIAL I/O, THE CCB0R VALUE THAT WE 02750000
  2756. * PASS TO EREP ON ONE READ IS PASSED BACK TO US BY EREP ON 02751000
  2757. * THE NEXT READ AS THE SEARCH ADDRESS. NOTE: WHEN WE SEE 02752000
  2758. * IT AS A SEARCH ADDRESS WE HAVE TO ADD ONE TO IT BEFORE 02753000
  2759. * PASSING IT TO DMSREA SINCE THE RECORD WE WANT IS THE 02754000
  2760. * ONE FOLLOWING THE ONE THAT THE SEARCH COMMAND FINDS. 02755000
  2761. * 02756000
  2762. * SIMULATION OF RANDOM READING OF ERROR RECORDS 02757000
  2763. * 02758000
  2764. * AFTER THE END-OF-FILE INDICATION IS GIVEN TO EREP DURING 02759000
  2765. * THE SEQUENTIAL READ, WE CHANGE OUR MODE OF SIMULATION. 02760000
  2766. * ALL SUBSEQUENT EXCP'S SHOULD BE ATTEMPTING RANDOM READS. 02761000
  2767. * WE WILL NO LONGER KEEP ONE RECORD AHEAD. EREP WILL DO 02762000
  2768. * RANDOM READING USING THE RECORD ADDRESSES THAT WERE SEEN 02763000
  2769. * BY EREP DURING THE SEQUENTIAL READING. ALL OF THE DISK 02764000
  2770. * ADDRESSES (CCHHR) SEEN BY EREP DURING THE SEQUENTIAL READING 02765000
  2771. * ARE REALLY IN THE CCB0R FORMAT RECOGNIZED BY DMSREA, SO 02766000
  2772. * WHEN EREP PASSES THEM BACK TO US NOW DURING THE RANDOM 02767000
  2773. * READING, WE CAN SIMPLY PASS THEM TO DMSREA AND DMSREA WIIL 02768000
  2774. * RETURN THE DESIRED RECORD TO US FROM THE VM/370 ERROR 02769000
  2775. * RECORDING CYLINDERS. (ACTUALLY, BEFORE PASSING THEM TO 02770000
  2776. * DMSREA, WE MUST FIRST INCREMENT THE R BYTE BY ONE SINCE EREP 02771000
  2777. * HAS DECREMENTED THE R BYTE TO MAKE IT A SEARCH ADDRESS 02772000
  2778. * RATHER THAN THE DESIRED-RECORD-ADDRESS WHICH DMSREA GOES 02773000
  2779. * BY.) THERE IS ONE EXCEPTION WHERE THE CCHHR ADDRESS PASSED 02774000
  2780. * BY EREP IS NOT IN THE DESIRED CCB0R FORMAT. THIS OCCURS 02775000
  2781. * IF EREP TRIES TO READ THE VERY LAST ERROR RECORD BECAUSE 02776000
  2782. * FOR THIS RECORD WE SHOWED EREP A CCHHR ADDRESS OF ALL X'FF' 02777000
  2783. * (I.E., END-OF-FILE SIGNAL) DURING THE SEQUENTIAL READING. 02778000
  2784. * SO DURING THE RANDOM READING WE WILL WATCH THE ADDRESSES 02779000
  2785. * THAT EREP PASSES AND IF WE SEE THE ALL X'FF' ADDRESS, WE 02780000
  2786. * WILL SUBSTITUTE THE PROPER CCB0R ADDRESS IN PLACE OF IT 02781000
  2787. * WHEN WE CALL DMSREA. (WE WILL HAVE TO SAVE A COPY OF THIS 02782000
  2788. * SUBSTITUTION ADDRESS WHEN WE SEE IT AT END-OF-FILE TIME 02783000
  2789. * DURING THE SEQUENTIAL READING.) 02784000
  2790. * 02785000
  2791. * HANDLING OF I/O ERROR AND EMPTY BLOCK INDICATIONS RETURNED BY DMSREA 02786000
  2792. * 02787000
  2793. * DMSREA CAN RETURN SEVERAL INDICATIONS OF UNUSUAL SITUATIONS: 02788000
  2794. * (1) END-OF-FILE, (2) EMPTY 4K BLOCK, (3) I/O ERROR READING 02789000
  2795. * A 4K BLOCK. 02790000
  2796. * 02791000
  2797. * WE CAN HAND I/O ERRORS OVER TO EREP BY SIMPLY 'POST'ING 02792000
  2798. * AN ERROR COMPLETION CODE IN THE EXCP'S ECB. BUT IT APPEARS 02793000
  2799. * THAT EREP WILL THEN DIE IMMEDIATELY, SO WE WANT TO AVOID 02794000
  2800. * POSTING ERRORS BACK TO EREP WHENEVER POSSIBLE. WITH THAT 02795000
  2801. * IN MIND, DMSREA IS DESIGNED TO SKIP PAST TROUBLESOME BLOCKS 02796000
  2802. * TO THE NEXT READABLE RECORD. DURING THE SEQUENTIAL 02797000
  2803. * READING WE CAN EXPECT DMSREA TO SOMETIMES SEE (AND PASS 02798000
  2804. * OVER) A BAD BLOCK. IT GIVES US BACK THE NEXT AVAILABLE 02799000
  2805. * RECORD, ALONG WITH A CODE IN R15 INDICATING A BAD BLOCK 02800000
  2806. * WAS SKIPPED. DURING THE SEQUENTIAL READING WE EXPECT 02801000
  2807. * THAT THIS MAY HAPPEN AND WE IGNORE IT. BUT DURING THE 02802000
  2808. * RANDOM READING, WE DO NOT EXPECT ANY ATTEMPTS TO READ 02803000
  2809. * FROM ANY BAD BLOCK BECAUSE EREP SHOULD ONLY ATTEMPT TO 02804000
  2810. * READ FROM BLOCKS THAT IT SAW DURING THE SEQUENTIAL READING 02805000
  2811. * AND DURING THE SEQUENTIAL READING DMSREA SKIPPED OVER 02806000
  2812. * ALL BAD BLOCKS WITHOUT SHOWING EREP ANY RECORDS FROM THEM. 02807000
  2813. * SO IF WE DO GET AN INDICATION OF A BAD BLOCK DURING THE 02808000
  2814. * RANDOM READING, IT MEANS THE BLOCK WENT BAD SOME TIME AFTER 02809000
  2815. * THE SEQUENTIAL READING. IN THIS CASE WE MUST POST IT BACK 02810000
  2816. * TO EREP AS AN I/O ERROR; WE CAN'T HIDE THE BAD RECORD 02811000
  2817. * BECAUSE EREP HAS ALREADY SEEN IT DURING THE SEQUENTIAL 02812000
  2818. * READING. 02813000
  2819. * 02814000
  2820. * NORMALLY THE 'FIRST' AND 'SECOND' (OR SEARCHED FOR AND 02815000
  2821. * DESIRED) RECORD ADDRESSES ARE TWO LOGICALLY ADJACENT RECORDS. 02816000
  2822. * HOWEVER SINCE DMSREA WILL SKIP OVER ANY TROUBLESOME BLOCKS, 02817000
  2823. * SOME INACCESSIBLE RECORDS MAY LIE BETWEEN THE RECORD HAVING 02818000
  2824. * THE FIRST ADDRESS (SEARCH ADDRESS) AND THE RECORD HAVING 02819000
  2825. * THE SECOND ADDRESS (ADDRESS OF THE RECORD THAT IS READ). 02820000
  2826. * IT WAS MENTIONED EARLIER THAT DURING THE RANDOM READING, 02821000
  2827. * EREP SUBTRACTS ONE FROM THE R FIELD OF THE 'SECOND' 02822000
  2828. * ADDRESS TO COMPUTE A SEARCH ADDRESS. NORMALLY THIS GIVES 02823000
  2829. * THE SAME SEARCH ADDRESS AS WAS USED DURING THE SEQUENTIAL 02824000
  2830. * READING. BUT WHERE INACCESSIBLE RECORDS WERE SKIPPED 02825000
  2831. * OVER IT DOES NOT. IN THIS CASE THE COMPUTED SEARCH ADDRESS 02826000
  2832. * STARTS AT THE FAR SIDE OF THE BAD AREA, SO DMSREA DOES 02827000
  2833. * NOT HAVE TO SKIP OVER THE BAD BLOCKS TO FIND THE DESIRED 02828000
  2834. * RECORD; INSTEAD DMSREA IS SENT DIRECTLY TO THE GOOD RECORD. 02829000
  2835. * THIS IS WHY WE DO NOT EXPECT TO SEE DMSREA SKIPPING BAD 02830000
  2836. * BLOCKS DURING THE RANDOM READING. 02831000
  2837. *. 02832000
  2838. *********************************************************************** 02833000
  2839. DMSIFC0 STM R14,R12,SAVER14(R13) SAVE REGS IN OLD SAVE AREA@V4085A8 02834000
  2840. BALR R12,0 @V4085A8 02835000
  2841. USING *,R12 @V4085A8 02836000
  2842. ST R13,SAVEEXCP+SAVER13B PTR TO OLD SAVE AREA IN @V4085A8 02837000
  2843. * NEW SAVE AREA. 02838000
  2844. LA R13,SAVEEXCP ADDR OF NEW SAVE AREA. @V4085A8 02839000
  2845. SPACE 3 02840000
  2846. * THE 'USING'S BELOW (NUCON, IOBD, CHPD) AND R12 ABOVE, WILL 02841000
  2847. * REMAIN IN EFFECT THROUGHOUT THIS ROUTINE. 02842000
  2848. USING NUCON,0 MAKE LOW CORE AREA ADDRESSABLE. @V4085A8 02843000
  2849. LR R9,R1 ADDR OF THE OS IOB. @V4085A8 02844000
  2850. USING IOBD,R9 MAKE IOB FIELD ADDRESSABLE VIA DSECT. @V4085A8 02845000
  2851. L R8,IOBCCW GET ADDRESS OF THE CHANNEL PROGRAM. @V4085A8 02846000
  2852. USING CHPD,R8 @V4085A8 02847000
  2853. SPACE 3 02848000
  2854. * WE ARE NOW RUNNING IN SUPERVISOR STATE AND THAT IS NO WAY 02849000
  2855. * TO RUN THRU SUCH A LARGE AMOUNT OF CODE, SO WE WILL NOW 02850000
  2856. * SWITCH TO PROBLEM STATE. WE WILL DO A LPSW TO MAKE THE 02851000
  2857. * SWITCH, BUT FIRST WE HAVE TO BUILD A PSW. SINCE WE CANNOT 02852000
  2858. * EASILY SEE THE CURRENT PSW, WE WILL LOOK AT THE ONE EREP 02853000
  2859. * WAS USING BEFORE IT DID THE SVC 0. AND WE WILL USE THE 02854000
  2860. * EMPTY SAVE AREA CURRENTLY POINTED TO BY R13 AS A WORK AREA 02855000
  2861. * IN WHICH TO BUILD IT. 02856000
  2862. L R4,CURRSAVE ADDR OF SYSTEM SAVE AREA WITH @V4085A8 02857000
  2863. * OS/VS EREP OLD PSW. 02858000
  2864. USING SSAVE,R4 @V4085A8 02859000
  2865. L R2,OLDPSW LOAD LEFT HALF OF OLD PSW. @V4085A8 02860000
  2866. LA R3,ECPPRBLM THIS ADDR BECOMES RIGHT HALF OF PSW@V4085A8 02861000
  2867. STM R2,R3,D16(R13) PUT PSW IN WORK AREA. @V4085A8 02862000
  2868. LPSW D16(R13) LOAD PROB. STATE PSW, GO TO ECPPRBLM. @V4085A8 02863000
  2869. DROP R4 @V4085A8 02864000
  2870. ECPPRBLM DS 0H THE LPSW ABOVE RESUMES EXECUTION HERE. @V4085A8 02865000
  2871. ECPSWIT1 BC *-*,ECPNOT1 FALL THRU ON 1ST CALL, BRANCH ON @V4085A8 02866000
  2872. * LATER CALLS. 02867000
  2873. * FALL THRU ON 1ST CALL TO DO ONE-TIME-INITIALIZATION. 02868000
  2874. OI ECPSWIT1+1,X'F0' THROW THE SWITCH SO LATER @V4085A8 02869000
  2875. * CALLS BYPASS THIS. 02870000
  2876. * CERTAIN ADDRESSES WILL BE SAVED PERMANENTLY AND WILL 02871000
  2877. * BE CHECKED FOR EACH EXCP TO SEE THAT THEY ALWAYS 02872000
  2878. * REMAIN THE SAME. 02873000
  2879. ST R9,ADIOB SAVE IOB ADDRESS. @V4085A8 02874000
  2880. MVC ADDCB,IOBDCB SAVE DCB ADDRESS. @V4085A8 02875000
  2881. ST R8,ADCHNPRG SAVE CHANNEL PROGRAM ADDRESS. @V4085A8 02876000
  2882. * PERFORM ONE-TIME-ONLY CHECKS ON THE CHANNEL PROGRAM. 02877000
  2883. CLI CHPSRCH,X'31' OPCODE SHOULD BE SEARCH ID EQUAL.@V4085A8 02878000
  2884. BNE EXCODE7 ERROR. @V4085A8 02879000
  2885. CLI CHPSRCNT+1,5 COUNT SHOULD BE 5 FOR CCHHR. @V4085A8 02880000
  2886. BNE EXCODE7 ERROR. @V4085A8 02881000
  2887. CLI CHPTIC,X'08' OPCODE SHOULD BE TIC. @V4085A8 02882000
  2888. BNE EXCODE7 ERROR. @V4085A8 02883000
  2889. * THIS VERY FIRST EXCP SHOULD BE A READ OF THE HEADER RECORD. 02884000
  2890. CLI CHPRW,CCWRDHDR PROPER COMMAND FOR HEADER READ? @V4085A8 02885000
  2891. BNE EXCODE6 ERROR @V4085A8 02886000
  2892. SPACE 02887000
  2893. * ISSUE DIAGNOSE '2C' TO RETRIEVE THE DASD START (CCPD) 02888000
  2894. * OF THE ERROR RECORDING AREA. THEN ISSUE 02889000
  2895. * DIAGNOSE '2C' TO RETRIEVE THE CCPD ADDRESS OF THE 02890000
  2896. * FIRST ERROR RECORD (TO STORE IN HDRSTART FIELD), AND 02891000
  2897. * INDICATION OF WHETHER FRAME RECORDS ARE PRESENT ON 02892000
  2898. * ERROR RECORDING CYLINDERS. 02893000
  2899. SPACE 02894000
  2900. LA R2,LOGSTART INDICATE WANT ERROR RECORDING @V5088AA 02895000
  2901. * START ADDRESS 02896000
  2902. DC X'8321002C' DIAGNOSE '2C' -- WILL RETURN CCPD@V5088AA 02897000
  2903. * AND COUNT OF RECORDING CYLS, BUT 02898000
  2904. * WE WANT ONLY THE CCPD. 02899000
  2905. SRL R2,16 SHIFT OUT THE 'PD' PORTION @V5088AA 02900000
  2906. SLL R2,16 SHIFT THE 'CC' BACK @V5088AA 02901000
  2907. LA R1,ERRECST+FRAMEIND CODE FOR DIAGNOSE '2C' @V5088AA 02902000
  2908. DC X'8313002C' RETRIEVE HDRSTART AND HDRWFLG @V5088AA 02903000
  2909. * VALUES 02904000
  2910. LA R4,SIMHDR @ OF SIMULATED LOGREC HEADER @V5088AA 02905000
  2911. USING HDRLOGRC,R4 DESCRIBES HEADER RECORD @V5088AA 02906000
  2912. STC R3,HDRWFLG SAVE FRAME RECORD INDICATOR @V5088AA 02907000
  2913. TM HDRWFLG,HDRFRAME ARE THERE FRAME RECS ON CYLS? @VA07900 02908000
  2914. BNO ECPHDRL NO FRAME RECS...HDRSTART REMAINS @VA07900 02909000
  2915. * EQUAL TO CB0R OF TIMESTAMP RECORD 02910000
  2916. SR R1,R2 SUBTRACT STARTING 'CC' FROM THE @V5088AA 02911000
  2917. * 'CCPD' OF THE REC PRIOR TO 1ST ERROR REC. 02912000
  2918. * TO GET THE RELATIVE CYL NUMBER 02913000
  2919. SRL R1,8 SHIFT OUT THE 'D' PORTION @V5088AA 02914000
  2920. SLL R1,16 POSITION THE 'CB0' PART OF CB0R @V5088AA 02915000
  2921. ICM R1,1,=X'FE' MAKE 'R' VERY LARGE RECORD @VA09295 02916000
  2922. * NO. TO INDICATE LAST FRAME RECORD 02917000
  2923. ST R1,NXTCB0R SAVE 'CB0R' OF FIRST ERROR REC. @V5088AA 02918000
  2924. * FOR START OF SEQUENTIAL READING. 02919000
  2925. MVC HDRCB0R(4),NXTCB0R SAVE CB0R OF 1ST ERROR RECORD@V5088AA 02920000
  2926. * IN HDRSTART. THIS VALUE WILL BE 02921000
  2927. * PASSED BACK BY EREP WHEN READING 02922000
  2928. * THE FIRST OF THE ERROR RECORDS. 02923000
  2929. AH R1,=H'1' INCR R OF CBCR BY ONE TO @VA08353 02925000
  2930. * POINT TO FIRST ERROR RCD 02926000
  2931. ST R1,NXTCB0R SAVE UPDATES DISK ADDRESS @VA08353 02927000
  2932. ECPHDRL DS 0H @V5088AA 02928000
  2933. * WE HAVE TO INITIALIZE THE 'HDRLAST' FIELD OF THE 02929000
  2934. * SIMULATED SYS1.LOGREC HEADER RECORD, AND TO DO THAT WE 02930000
  2935. * HAVE TO KNOW WHETHER THERE ARE ANY ERROR RECORDS. SO 02931000
  2936. * ATTEMPT TO READ FIRST ERROR RECORD NOW. 02932000
  2937. LA R1,NXTCCB0R ADDRESS OF FIRST ERROR REC @VA08806 02933000
  2938. * IF THERE IS ONE @VA08806 02934000
  2939. L R15,DMSREAAD ADDRESS OF DMSREA. @V4085A8 02935000
  2940. BALR R14,R15 CALL DMSREA TO READ 1ST RECORD. @V4085A8 02936000
  2941. ST R0,NXTRECAD ASSUMING A RECORD WAS FOUND AND @V4085A8 02937000
  2942. * READ INTO DMSREA'S BUFFER, SAVE ITS STORAGE 02938000
  2943. * ADDRESS. 02939000
  2944. MVC NXTCCB0R(LENCCB0R),0(R1) AND SAVE ITS (POSSIBLY@V4085A8 02940000
  2945. * CORRECTED) DISK ADDRESS. 02941000
  2946. LTR R0,R0 TEST WAS A RECORD REALLY FOUND. @V4085A8 02942000
  2947. BNZ ECPLBL52 BRANCH IF A RECORD WAS FOUND. @V4085A8 02943000
  2948. * FALL THRU INDICATES THERE ARE NO ERROR RECORDS IN THE 02944000
  2949. * VM/370 ERROR RECORDING CYLINDERS. 02945000
  2950. MVC HDRLAST,HDRSTART SINCE THERE ARE NO ERROR @V4085A8 02946000
  2951. * RECORDS, THE HEADER'S PTR TO LAST 02947000
  2952. * RECORD WILL BE SAME AS PTR TO 02948000
  2953. * FIRST RECORD. 02949000
  2954. TM HDRWFLG,HDRFRAME ARE THERE FRAME RECORDS @VA08378 02950000
  2955. BZ ECPLBL52 NO, CONTINUE @VA08378 02951000
  2956. * IF SO, READ AHEAD THE FIRST FRAME RECORD.SINCE THERE 02952000
  2957. * ARE NO ERROR RECORDS,EREP'S FIRST GENERAL READ 02953000
  2958. * WILL BE FOR THE FIRST FRAME RECORD. 02954000
  2959. OI ECPLBL94+1,X'F0' BR ON FIRST SEQUENTIAL READ @VA08378 02955000
  2960. * OF FRAME RECORD. 02956000
  2961. OI ECPRD1SW+1,X'F0' NOT FIRST SEQ READ OF ERR RCD @VA08378 02957000
  2962. MVC NXTCCB0R(LENCCB0R),=X'0000010001' SET UP TO @VA08378 02958000
  2963. * READ FIRST RECORD ON ERR CYL 02959000
  2964. LA R1,NXTCCB0R FULL AMT OF RCD TO READ AHEAD @VA08378 02960000
  2965. L R15,DMSREAAD ADDRESS OF DMSREA @VA08378 02961000
  2966. BALR R14,R15 CALL DMSREA TO READ NEXT REC @VA08378 02962000
  2967. ST R0,NXTRECAD MAIN STOR ADDR OF THE FRAME @VA08378 02963000
  2968. * REC READ INTO DMSREA BUFFER 02964000
  2969. MVC NXTCCB0R(LENCCB0R),0(R1) SAVE ITS DISK ADDR @VA08378 02965000
  2970. DROP R4 @V5088AA 02966000
  2971. ECPLBL52 DS 0H @V4085A8 02967000
  2972. * (NOTE: FIRST-CALL-GENERAL-INITIALIZATION IS NOW COMPLETE.) 02968000
  2973. SPACE 3 02969000
  2974. ECPNOT1 DS 0H BEGIN GENERAL ERROR CHECKING. @V4085A8 02970000
  2975. CLM R9,B'0111',ADIOB+1 COMPARE PRESENT IOB ADDR @V4085A8 02971000
  2976. * WITH IOB ADDR SAVED FROM 1ST CALL. 02972000
  2977. * IT SHOULD BE THE SAME. 02973000
  2978. BNE EXCODE2 ERROR: MORE THAN ONE IOB. @V4085A8 02974000
  2979. CLC IOBDCB+1(L3),ADDCB+1 COMPARE PRESENT DCB ADDR @V4085A8 02975000
  2980. * WITH DCB ADDR OF 1ST CALL. 02976000
  2981. BNE EXCODE1 ERROR: EXCP USED BY MORE THAN ONE DCB. @V4085A8 02977000
  2982. CLM R8,B'0111',ADCHNPRG+1 COMPARE PRESENT CHANNEL @V4085A8 02978000
  2983. * PROGRAM ADDR WITH 1ST CH PRG ADDR 02979000
  2984. BNE EXCODE2 ERROR: MORE THAN ONE CHANNEL PROGRAM. @V4085A8 02980000
  2985. SPACE 02981000
  2986. * FIND THE OS ECB AND POST IT COMPLETE. (IF WE DETECT AN ERROR 02982000
  2987. * FURTHER ALONG WE WILL RE-POST IT WITH AN ERROR COMPLETION.) 02983000
  2988. L R1,IOBECB GET ECB ADDR FROM THE IOB. @V4085A8 02984000
  2989. MVI 0(R1),POSTNORM @V4085A8 02985000
  2990. SPACE 02986000
  2991. * DECIDE WHICH FUNCTION THE EXCP WANTS: READ HEADER, WRITE 02987000
  2992. * HEADER, OR READ A RECORD. 02988000
  2993. CLI CHPRW,CCWRDREC TEST CHANNEL COMMAND OPCODE. @V4085A8 02989000
  2994. BE ECPREAD EXCP WANTS TO DO A GENERAL READ. @V4085A8 02990000
  2995. CLI CHPRW,CCWWRHDR WANT TO WRITE THE HEADER? @V4085A8 02991000
  2996. BE ECPWRHDR YES. GO SIMULATE. @V4085A8 02992000
  2997. CLI CHPRW,CCWRDHDR WANT TO READ THE HEADER? @V4085A8 02993000
  2998. BNE EXCODE3 NO. ERROR, UNRECOGNIZED OPCODE. @V4085A8 02994000
  2999. * FALL THRU IF EXCP IS TRYING TO READ THE HEADER RECORD. 02995000
  3000. EJECT 02996000
  3001. *********************************************************************** 02997000
  3002. * 02998000
  3003. * SIMULATE A READ OF THE SYS1.LOGREC HEADER RECORD. 02999000
  3004. * 03000000
  3005. *********************************************************************** 03001000
  3006. LA R3,HDRLEN LENGTH OF THE HEADER. @V4085A8 03002000
  3007. CH R3,CHPRWCNT IS HEADER LONGER THAN BUFFER? @V4085A8 03003000
  3008. BH EXCODE7 YES, CHANNEL PROGRAM IS BAD. @V4085A8 03004000
  3009. L R1,CHPIDAD ADDRESS OF CCHHR ADDRESS THAT EREP @VA07900 03005000
  3010. * IS USING TO READ HEADER RECORD. EREP 03006000
  3011. * GETS THIS ADDRESS FROM THE LOGREC DEB, 03007000
  3012. * AND IT IS GARBAGE AS FAR AS WE ARE 03008000
  3013. * CONCERNED. BUT WE MUST REMEMBER IT 03009000
  3014. * BECAUSE EREP WILL USE THE SAME CCHH 03010000
  3015. * (WITH RECORD 2) WHEN HE ATTEMPTS TO 03011000
  3016. * START THE SEQUENTIAL READ OF FRAMES. 03012000
  3017. MVC SAVCCHH(LENCCHH),0(R1) REMEMBER THIS CCHH @VA07900 03013000
  3018. L R1,CHPBUFF ADDRESS OF THE READ BUFFER. @V4085A8 03014000
  3019. MVC 0(HDRLEN,R1),SIMHDR MOVE SIMULATED HEADER INTO @V4085A8 03015000
  3020. * READ BUFFER. 03016000
  3021. B ECPEXIT @V4085A8 03017000
  3022. SPACE 3 03018000
  3023. *********************************************************************** 03019000
  3024. * 03020000
  3025. * SIMULATE A WRITE OF THE SYS1.LOGREC HEADER RECORD. 03021000
  3026. * 03022000
  3027. *********************************************************************** 03023000
  3028. ECPWRHDR LA R1,HDRLEN LENGTH OF A HEADER RECORD. @V4085A8 03024000
  3029. CH R1,CHPRWCNT CHECK COUNT FIELD IN THE WRITE CMD.@V4085A8 03025000
  3030. BNE EXCODE7 ERROR, COUNT NOT EQUAL HEADER LENGTH. @V4085A8 03026000
  3031. LA R2,SIMHDR ADDR OF OLD SIMULATED HEADER RECORD. @V4085A8 03027000
  3032. L R3,CHPBUFF ADDR OF NEW SIMULATED HEADER RECORD @V4085A8 03028000
  3033. * IN THE CHANNEL PROG'S WRITE BUFFER. 03029000
  3034. * DETERMINE WHETHER OR NOT THE PRESENT RE-WRITING OF THE HEADER 03030000
  3035. * IS ATTEMPTING THE 'ZERO' FUNCTION. IT IS A 'ZERO' FUNCTION 03031000
  3036. * IF 'HDRLAST' IS BEING SET TO THE SAME VALUE AS 'HDRSTART'. 03032000
  3037. USING HDRLOGRC,R3 @V4085A8 03033000
  3038. CLC HDRLAST,HDRSTART COMPARE FIELDS IN NEW HEADER. @V4085A8 03034000
  3039. BNE ECPLBL78 IT IS DEFINITELY NOT A 'ZERO'. @V4085A8 03035000
  3040. DROP R3 @V4085A8 03036000
  3041. * FALL THRU INDICATES IT IS A 'ZERO', PROVIDED THAT 'HDRLAST' 03037000
  3042. * HAS JUST NOW BEEN RESET, I.E., PROVIDED THAT IT HAS NOT 03038000
  3043. * BEEN RESET ALL ALONG. 03039000
  3044. USING HDRLOGRC,R2 @V4085A8 03040000
  3045. CLC HDRLAST,HDRSTART COMPARE FIELDS IN OLD HEADER. @V4085A8 03041000
  3046. BE ECPLBL78 IT IS NOT A 'ZERO' FUNCTION. @V4085A8 03042000
  3047. * 'HDRLAST' WAS NOT RESET JUST NOW; IT HAS BEEN 03043000
  3048. * RESET ALL ALONG. 03044000
  3049. DROP R2 @V4085A8 03045000
  3050. * FALL THRU INDICATES IT IS A 'ZERO' FUNCTION. 03046000
  3051. LA R1,ERRFLG FLAGS PASSED TO 'CLEARRTN' REQUEST@V5088AA 03047000
  3052. * ERASE OF ALL OF THE VM/370 ERROR REC. CYLS. 03048000
  3053. L R15,=A(CLEARRTN) @V4085A8 03049000
  3054. BALR R14,R15 CALL ROUTINE TO CLEAR ERROR CYLINDERS. 03050000
  3055. * AN ERROR RETURN CODE COMES BACK IN R15 IF CLEAR FAILED 03051000
  3056. * BECAUSE USER DID NOT HAVE PRIVILEGE CLASS F. WE IGNORE IT 03052000
  3057. * AND DO NOT STORE IT IN 'RETCDE' BECAUSE: (1) IT IS NOT 03053000
  3058. * AN ERROR, ZERO IS OFTEN REQUESTED BY EREP IN SPITE OF 03054000
  3059. * THE USER'S WISHES, AND THE NON-CLASS F USERS MAY BE 03055000
  3060. * BOTHERED OR CONFUSED BY SEEING AN ERROR RETURN CODE FROM 03056000
  3061. * IT. FURTHERMORE, THE USER ALREADY HAS BEEN WARNED BY A 03057000
  3062. * MESSAGE FROM 'CLEARRTN'; (2) IF WE STORED AN ERROR CODE 03058000
  3063. * IN 'RETCDE' NOW, IT WOULD PREVENT ANY (GENERALLY MORE 03059000
  3064. * SEVERE) ERROR CODE FROM BEING STORED WHEN OS/VS EREP 03060000
  3065. * RETURNS CONTROL TO DMSIFC AT THE END OF THE RUN. 03061000
  3066. ECPLBL78 MVC 0(HDRLEN,R2),0(R3) COPY NEW HEADER RECORD FROM @V4085A8 03062000
  3067. * WRITE BUFFER INTO SIMULATED HEADER 03063000
  3068. * AREA. IT NOW BECOMES CURRENT HDR. 03064000
  3069. B ECPEXIT @V4085A8 03065000
  3070. EJECT 03066000
  3071. ECPREAD DS 0H @V4085A8 03067000
  3072. *********************************************************************** 03068000
  3073. * 03069000
  3074. * SIMULATE THE READING OF A (NON-HEADER) RECORD FROM SYS1.LOGREC. 03070000
  3075. * 03071000
  3076. *********************************************************************** 03072000
  3077. ECPRNDSW BC *-*,ECPRAND SWITCH WILL BE SET TO BRANCH AFTER @V4085A8 03073000
  3078. * END OF FILE IS DETECTED DURING THE 03074000
  3079. * SEQUENTIAL READING. SUBSEQUENT READING IS 03075000
  3080. * RANDOM. 03076000
  3081. *********************************************************************** 03077000
  3082. * 03078000
  3083. * FALLING THRU HERE MEANS WE ARE STILL IN THE SEQUENTIAL PHASE. 03079000
  3084. * 03080000
  3085. *********************************************************************** 03081000
  3086. ECPRD1SW BC *-*,ECPLBL94 BRANCH IF NOT 1ST SEQ. READ. @V4085A8 03082000
  3087. * FALL THRU ON THE FIRST SEQUENTIAL READ FOR SPECIAL CHECKING. 03083000
  3088. OI ECPRD1SW+1,X'F0' THROW THE ONE TIME SWITCH. @V4085A8 03084000
  3089. MVI SEQRDFRM,X'00' INIIALIZE FLAG @VA07861 03085000
  3090. L R3,CHPIDAD ADDR OF CCHHR DISK ADDR THAT EXCP @V4085A8 03086000
  3091. * IS USING WITH THE FIRST SEQUENTIAL READ. 03087000
  3092. LA R2,SIMHDR ADDR OF SIMULATED HEADER. @V4085A8 03088000
  3093. USING HDRLOGRC,R2 @V4085A8 03089000
  3094. CLC 0(LENCCHHR,R3),HDRSTART+2 COMPARE HDRSTART @V4085A8 03090000
  3095. * ADDR AND THE DISK ADDR THAT 03091000
  3096. * OS/VS EREP IS ACTUALLY TRYING 03092000
  3097. * TO USE TO READ THE FIRST RECORD. 03093000
  3098. * THEY SHOULD BOTH BE THE SAME 03094000
  3099. * SINCE EREP GOT HDRSTART WHEN IT 03095000
  3100. * READ THE HEADER RECORD. 03096000
  3101. DROP R2 @V4085A8 03097000
  3102. BL EXCODE5 ERROR, ACTUAL ADDRESS IS LESS. IT IS @V4085A8 03098000
  3103. * POSSIBLY TRYING TO READ THE TIME STAMP RECORD 03099000
  3104. * (RECORD 2, FOLLOWS HEADER) WHICH WE DO NOT 03100000
  3105. * SIMULATE. 03101000
  3106. BH EXCODE4 ERROR, ACTUAL ADDRESS IS HIGH. IT @V4085A8 03102000
  3107. * APPEARS TO BE TRYING TO READ NON-SEQUENTIALLY. 03103000
  3108. ICM R1,B'1111',NXTRECAD LOAD ADDR OF RECORD THAT @V4085A8 03104000
  3109. * WAS READ-AHEAD INITIALLY (WHEN EXCP 03105000
  3110. * READ THE HEADER, WE READ THE FIRST 03106000
  3111. * ERROR RECORD). 03107000
  3112. BZ EXCODE9 ERROR. NO RECORD WAS READ-AHEAD @V4085A8 03108000
  3113. * BECAUSE ERROR RECORDING CYLINDERS ARE EMPTY OF 03109000
  3114. * ERROR RECORDS. SO OS/VS EREP SHOULD NEVER 03110000
  3115. * HAVE ATTEMPTED THE SEQUENTIAL READING. 03111000
  3116. B ECPLBL97 ALL 'FIRST-READ' CHECKS WERE PASSED @V4085A8 03112000
  3117. * SUCCESSFULLY. GO SIMULATE. 03113000
  3118. SPACE 3 03114000
  3119. ECPLBL94 BC *-*,ECPLBL95 BEGIN HERE FOR ALL SEQUENTIAL @VA07900 03115000
  3120. * READS EXCEPT THE FIRST. SWITCH 03116000
  3121. * WILL BE SET TO BRANCH FOR THE FIRST 03117000
  3122. * SEQUENTIAL READ OF FRAME RECORDS. 03118000
  3123. L R2,CHPIDAD PTR TO CCB0R THAT EXCP IS USING TO @V4085A8 03119000
  3124. * READ WITH. 03120000
  3125. CLC 0(LENCCB0R,R2),LSTCCB0R SHOULD EQUAL THE CCB0R @V4085A8 03121000
  3126. * DISK ADDR THAT WE GAVE EREP 03122000
  3127. * WITH THE PREVIOUS RECORD. 03123000
  3128. BE ECPLBL97 O.K., MOVE RECORD TO EREP BUFFER @VA13316 03124000
  3129. * IF NOT , EREP WANTS TO READ RECORDS@VA13316 03124200
  3130. * RANDOMLY. IF RECORD IS WITHIN LIMIT@VA13316 03124400
  3131. * OF THE LAST RECORD, ALLOW IT. @VA13316 03124600
  3132. BH EXCODE4 ERROR. EREP APPEARS TO BE TRYING TO @VA13316 03124800
  3133. * READ NON-SEQUENTIALLY BEYOND LIMITS. @VA13316 03125000
  3134. L R2,CHPBUFF ADDRESS OF READ BUFFER @VA13316 03125200
  3135. MVC 0(LENCCB0R,R2),=XL5'00FFFFFFFF' EOF IN BUFFER @VA13316 03125400
  3136. MVC SAVELAST,LSTCCB0R CCB0R OF LAST ERROR RECORD @VA13316 03125600
  3137. OI ECPRNDSW+1,X'F0' SET RANDOM READ SWITCH @VA13316 03125800
  3138. B ECPRAND EOF SET AND DIRECT RCORD READ @VA13316 03126000
  3139. ECPLBL95 L R2,CHPIDAD ADDRESS OF CCHH EREP IS USING TO @VA07900 03127000
  3140. * READ THE FIRST FRAME RECORD. THIS CCHH 03128000
  3141. * SHOULD BE THE SAME AS THE CCHH USED TO 03129000
  3142. * READ THE HEADER RECORD, BUT THE RECORD 03130000
  3143. * WILL BE 2 (TIMESTAMP RECORD NO.). 03131000
  3144. CLC 0(LENCCHH,R2),SAVCCHH SEE IF CORRECT CCHH FOR @VA07900 03132000
  3145. * FIRST FRAME RECORD 03133000
  3146. BNE EXCODE4 EREP APPEARS TO BE TRYING TO READ@VA07900 03134000
  3147. * NON-SEQUENTIALLY 03135000
  3148. CLI 4(R2),RECORD2 IS THE RECORD NO. = 2? @VA07900 03136000
  3149. BNE EXCODE4 ERROR IF NOT @VA07900 03137000
  3150. MVI ECPLBL94+1,X'00' FIRST TIME CHECKS FOR THE @VA07900 03138000
  3151. * SEQUENTIAL READING OF FRAMES ARE COMPLETE 03139000
  3152. * SET SWITCH TO REVERT TO NORMAL SEQUENTIAL 03140000
  3153. * PROCESSING. 03141000
  3154. MVI SEQRDFRM,X'FF' SET FLAG TO INDICATE NOW READING @VA07861 03142000
  3155. * FRAME RECORDS SEQUENTIALLY 03143000
  3156. ECPLBL97 DS 0H MOVE THE READ-AHEAD RECORD (COUNT FIELD AND @V4085A8 03144000
  3157. * DATA) INTO EXCP'S READ BUFFER. 03145000
  3158. L R2,NXTRECAD ADDR OF RECORD READ-AHEAD. @V4085A8 03146000
  3159. LH R3,D2(0,R2) LENGTH OF RECORD LOADED FROM @V4085A8 03147000
  3160. * RECORD DESCRIPTOR WORD. 03148000
  3161. LA R2,D4(0,R2) SKIP PTR PAST DESCRIPTOR WORD. @V4085A8 03149000
  3162. * ARGS FOR ECPBFILL: R2 POINTS TO DATA AND R3 SPECIFIES LENGTH. 03150000
  3163. BAL R14,ECPBFILL ROUTINE MOVES DATA INTO BUFFER, @V4085A8 03151000
  3164. * ALSO PUTS KEY LENGTH 0 AND DATA LENGTH 03152000
  3165. * INTO COUNT FIELD AT START OF BUFFER. 03153000
  3166. L R2,CHPBUFF ADDR OF READ BUFFER. @V4085A8 03154000
  3167. MVC 0(LENCCB0R,R2),NXTCCB0R COMPLETE COUNT FIELD IN@V4085A8 03155000
  3168. * READ BUFFER BY SUPPLYING THE 03156000
  3169. * RECORD'S CCB0R ADDRESS. 03157000
  3170. L R1,NXTCB0R GET RECORD'S DISK ADDRESS... @V4085A8 03158000
  3171. ST R1,LSTCB0R AND SAVE FOR ERR CHECK NEXT TIME... @V4085A8 03159000
  3172. AH R1,=H'1' AND INCREMENT R OF CB0R BY ONE TO@VA07861 03160000
  3173. * ADDRESS NEXT RECORD. NOTE THAT LA CANNOT 03161000
  3174. * BE USED TO ADD HERE AS IT WILL WIPE OUT 03162000
  3175. * THE HIGH ORDER BYTE. 03163000
  3176. ST R1,NXTCB0R SAVE AS TENTATIVE ADDR OF NEW @V4085A8 03164000
  3177. * RECORD TO BE READ AHEAD. 03165000
  3178. LA R1,NXTCCB0R FULL (5 BYTE) ADDR OF RECORD TO BE @V4085A8 03166000
  3179. * READ AHEAD. 03167000
  3180. L R15,DMSREAAD ADDRESS OF DMSREA. @V4085A8 03168000
  3181. BALR R14,R15 CALL DMSREA TO READ NEXT RECORD AHEAD. @V4085A8 03169000
  3182. * R0 = PTR TO RECORD IN BUFFER. 03170000
  3183. * R1 = PTR TO (POSSIBLY REVISED) CCB0R DISK ADDRESS. 03171000
  3184. * R15 CONTAINS A POSSIBLE ERROR RETURN CODE. IF R15=60 (I/O 03172000
  3185. * ERROR) SAVE IT; OTHER CODES ARE OF NO CONSEQUENCE DURING 03173000
  3186. * SEQUENTIAL READING. 03174000
  3187. L R3,=A(RETCDE) @V4085A8 03175000
  3188. CLI D1(R3),0 TEST FOR CODE STORED PREVIOUSLY. @V4085A8 03176000
  3189. BNZ ECPLB105 THERE IS A PREVIOUS CODE, KEEP IT. @V4085A8 03177000
  3190. CH R15,=Y(RC60) IS PRESENT CODE RC60? @V4085A8 03178000
  3191. BNE ECPLB105 PRESENT CODE WILL BE DISCARDED. @V4085A8 03179000
  3192. STH R15,0(0,R3) SAVE RC60. @V4085A8 03180000
  3193. ECPLB105 ST R0,NXTRECAD ASSUMING A RECORD WAS FOUND AND @V4085A8 03181000
  3194. * READ INTO DMSREA'S BUFFER, SAVE ITS 03182000
  3195. * MAIN STORAGE ADDRESS. 03183000
  3196. MVC NXTCCB0R(LENCCB0R),0(R1) AND SAVE ITS (POSSIBLY@V4085A8 03184000
  3197. * CORRECTED) DISK ADDRESS. 03185000
  3198. TM SEQRDFRM,X'FF' SEQUENTIAL READ OF FRAMES @VA08378 03186000
  3199. BO ECPLB106 YES @VA08378 03187000
  3200. LTR R0,R0 END OF FILE @VA08378 03188000
  3201. BZ ECPLB107 YES @VA08378 03189000
  3202. B ECPEXIT READ COMPLETED OK @VA08378 03190000
  3203. ECPLB106 DS 0H @VA08378 03191000
  3204. LA R2,SIMHDR ADDR OF SIMULATED LOGREC HDR @VA08378 03192000
  3205. USING HDRLOGRC,R2 03193000
  3206. LTR R0,R0 END FILE READING FRAME RCDS @VA08378 03194000
  3207. BZ ECPL106A YES, HANDLE EOF @VA08378 03195000
  3208. CLC NXTCCB0R(LENCCB0R),HDRSTART+2 IF WE ARE NOW @VA07900 03196000
  3209. * READING THE FRAME RECORDS SEQUENTIALLY, 03197000
  3210. * CHECK TO SEE IF THE RECORD READ AHEAD IS 03198000
  3211. * THE FIRST ERROR RECORD. IF SO, THEN 03199000
  3212. * EREP SHOULD STOP READING FRAME RECORDS 03200000
  3213. * AND BEGIN HIS RANDOM READS. 03201000
  3214. BNH ECPEXIT A RECORD-AHEAD WAS FOUND OK @VA07861 03202000
  3215. ECPL106A DS 0H @VA08378 03203000
  3216. OI ECPRNDSW+1,X'F0' BRANCH FOR EOF @VA08378 03204000
  3217. * READS AS RANDOM RATHER THAN SEQUENTIAL 03205000
  3218. L R15,CHPBUFF ADDRESS OF READ BUFFER @VA07861 03206000
  3219. MVC LASTFRAM(LENCCB0R),0(R15) SAVE THE ACTUAL CCB0R @VA07861 03207000
  3220. * OF THE LAST FRAME RECORD 03208000
  3221. MVC 0(LENCCB0R,R15),HDRSTART+2 MOVE THE HDRSTART @VA07861 03209000
  3222. * VALUE INTO THE RECORD TO BE PASSED BACK 03210000
  3223. * TO EREP. THIS IS SO EREP WILL RECOGNIZE 03211000
  3224. * THAT THE LAST FRAME RECORD HAS BEEN READ. 03212000
  3225. B ECPEXIT PRESENT READ COMPLETED OK @VA07900 03213000
  3226. DROP R2 03214000
  3227. * THE SIMULATION OF THE PRESENT SEQUENTIAL READ 03215000
  3228. * HAS NOW BEEN COMPLETED SUCCESSFULLY. 03216000
  3229. * 03217000
  3230. * HERE IF END-OF-FILE WHILE READING ERROR RECORDS SEQUENTIALLY. 03218000
  3231. * WE MUST REVISE THE CCB0R ADDRESS IN THE COUNT FIELD OF THE 03219000
  3232. * RECORD JUST SIMULATED TO A CCB0R ADDRESS OF ALL X'FF'S TO 03220000
  3233. * INDICATE TO EREP THAT THIS RECORD IS THE LAST. 03221000
  3234. * NOTE: R2 STILL HAS ADDR OF READ BUFFER. 03222000
  3235. ECPLB107 MVC 0(LENCCB0R,R2),=XL5'00FFFFFFFF' @VA07900 03223000
  3236. MVC SAVELAST,LSTCCB0R SAVE CCB0R OF LAST ERROR REC. @VA07900 03224000
  3237. LA R2,SIMHDR ADDRESS OF SIMULATED LOGREC HDR. @VA07900 03225000
  3238. USING HDRLOGRC,R2 03226000
  3239. TM HDRWFLG,HDRFRAME ARE THERE FRAME RECS ON CYLS? @VA07900 03227000
  3240. BO SEQREADF IF SO, SET UP FOR SEQUENTIAL READ@VA07900 03228000
  3241. * OF FRAME RECORDS. 03229000
  3242. DROP R2 03230000
  3243. OI ECPRNDSW+1,X'F0' THROW SWITCH SO FUTURE READS @VA07900 03231000
  3244. * WILL BE HANDLED AS RANDOM READS RATHER 03232000
  3245. * THAN SEQUENTIAL. 03233000
  3246. B ECPEXIT SIMULATION OF PRESENT READ HAS BEEN @V4085A8 03234000
  3247. * COMPLETED SUCCESSFULLY. 03235000
  3248. SEQREADF DS 0H @VA07900 03236000
  3249. * FRAMES ARE ON THE ERROR CYLINDERS, SO EREP WILL NEXT DO A 03237000
  3250. * SEQUENTIAL READ OF FRAME RECORDS. WE MUST DO A READ-AHEAD 03238000
  3251. * OF THE FIRST FRAME RECORD NOW, SO THAT WE CAN KEEP ONE 03239000
  3252. * AHEAD OF EREP'S REQUESTS. 03240000
  3253. OI ECPLBL94+1,X'F0' SET SWITCH TO BRANCH ON FIRST @VA07900 03241000
  3254. * SEQUENTIAL READ OF A FRAME RECORD. 03242000
  3255. MVC NXTCCB0R(LENCCB0R),=X'0000010001' SET UP TO READ@VA07900 03243000
  3256. * THE 1ST REC. ON THE ERROR CYLS. 03244000
  3257. LA R1,NXTCCB0R FULL @ OF RECORD TO BE READ AHEAD@VA07900 03245000
  3258. L R15,DMSREAAD ADDRESS OF DMSREA @VA07900 03246000
  3259. BALR R14,R15 CALL DMSREA TO READ NEXT RECORD @VA07900 03247000
  3260. * 03248000
  3261. * R0 = PTR TO RECORD IN BUFFER 03249000
  3262. * R1 = PTR TO (POSSIBLY REVISED) CCB0R DISK ADDRESS 03250000
  3263. * R15 = POSSIBLE ERROR RETURN CODE 03251000
  3264. L R3,=A(RETCDE) @VA07900 03252000
  3265. CLI D1(R3),0 TEST FOR CODE STORED PREVIOUSLY @VA07900 03253000
  3266. BNE ECPLB110 THERE IS A PREVIOUS CODE;KEEP IT @VA07900 03254000
  3267. CH R15,=Y(RC60) IS PRESENT CODE RC60 (I/O ERROR)?@VA07900 03255000
  3268. BNE ECPLB110 PRESENT CODE WILL BE DISCARDED @VA07900 03256000
  3269. STH R15,0(0,R3) SAVE RC60 @VA07900 03257000
  3270. ECPLB110 ST R0,NXTRECAD SAVE MAIN STORAGE ADDRESS OF THE @VA07900 03258000
  3271. * FRAME REC. READ INTO REA'S BUFFER. 03259000
  3272. MVC NXTCCB0R(LENCCB0R),0(R1) SAVE ITS (POSSIBLY @VA07900 03260000
  3273. * CORRECTED) DISK ADDRESS. 03261000
  3274. B ECPEXIT PRESENT READ COMPLETED OK @VA07900 03262000
  3275. EJECT 03263000
  3276. *********************************************************************** 03264000
  3277. * 03265000
  3278. * SIMULATE THE (RANDOM) READING OF A (NON-HEADER) RECORD FROM THE 03266000
  3279. * SYS1.LOGREC DATA SET. 03267000
  3280. * 03268000
  3281. *********************************************************************** 03269000
  3282. ECPRAND L R1,CHPIDAD ADDR OF CCB0R DISK ADDRESS THAT @V4085A8 03270000
  3283. * EXCP SPECIFIED. 03271000
  3284. MVC NXTCCB0R(LENCCB0R),0(R1) MOVE CCB0R TO MORE @V4085A8 03272000
  3285. * ACCESSIBLE AREA. 03273000
  3286. CLI NXTCCB0R+2,0 CHECK B FIELD; SHOULD BE 1 OR MORE@V4085A8 03274000
  3287. BE EXCODE8 ERROR, EREP USED INVALID CCB0R. @V4085A8 03275000
  3288. * NOTE: IF CC FIELD IS INVALID, DMSREA WILL CATCH IT LATER. 03276000
  3289. L R1,NXTCB0R LOAD CB0R PORTION. @V4085A8 03277000
  3290. AH R1,=H'1' SINCE EREP DECREMENTED THE R FIELD, WE@V4085A8 03278000
  3291. * INCREMENT BY 1 TO GET ADDRESS OF DESIRED 03279000
  3292. * RECORD. (CANNOT USE LA TO ADD HERE, IT WOULD 03280000
  3293. * DESTROY HIGH ORDER BYTE.) 03281000
  3294. ST R1,NXTCB0R @V4085A8 03282000
  3295. C R1,=F'-1' IS THIS CB0R THE ALL X'FF'S DISK @V4085A8 03283000
  3296. * ADDRESS THAT EREP THINKS IS THE ADDRESS OF 03284000
  3297. * THE FINAL RECORD? 03285000
  3298. BE ECPLB116 BRANCH IF THE ALL X'FF'S ADDRESS @VA07861 03286000
  3299. LA R15,SIMHDR ADDRESS OF SIMULATED LOGREC HDR @VA07861 03287000
  3300. USING HDRLOGRC,R15 03288000
  3301. CLM R1,B'1111',HDRSTART+3 SEE IF EREP IS ASKING FOR@VA07861 03289000
  3302. * THE LAST FRAME RECORD 03290000
  3303. DROP R15 03291000
  3304. LA R1,NXTCCB0R PREPARE CCB0R ARG FOR DMSREA @VA07861 03292000
  3305. BNE ECPLB117 BRANCH IF NOT REQUESTING LAST @VA07861 03293000
  3306. * FRAME RECORD 03294000
  3307. LA R1,LASTFRAM RETRIEVE CCB0R OF LAST FRAME REC.@VA07861 03295000
  3308. * USE TRUE VALUE RATHER THAN HDRSTART VALUE 03296000
  3309. B ECPLB117 @VA07861 03297000
  3310. ECPLB116 LA R1,SAVELAST RETRIEVE CCB0R ARG FOR DMSREA.USE@VA07861 03298000
  3311. * TRUE VALUE RATHER THAN ALL X'FF'S. 03299000
  3312. ECPLB117 L R15,DMSREAAD ADDRESS OF DMSREA. @V4085A8 03300000
  3313. BALR R14,R15 CALL DMSREA TO READ THE RECORD EXCP @V4085A8 03301000
  3314. * REQUESTED. 03302000
  3315. * R0 = PTR TO RECORD IN DMSREA'S BUFFER. 03303000
  3316. * R1 = PTR TO CCB0R OF RECORD ACTUALLY GOTTEN (WHICH IN THE 03304000
  3317. * CASE OF RANDOM READING HERE, SHOULD BE THE SAME VALUE 03305000
  3318. * AS THE INPUTTED CCB0R). 03306000
  3319. * R15 = A POSSIBLE ERROR RETURN CODE. 03307000
  3320. LTR R15,R15 ANY ERROR? @V4085A8 03308000
  3321. BZ ECPLB126 BRANCH IF NO ERROR. @V4085A8 03309000
  3322. CH R15,=Y(RC60) TEST FOR I/O ERROR CODE. @V4085A8 03310000
  3323. BNE EXCODE8 BRANCH IF SOME OTHER ERROR: EXCP @V4085A8 03311000
  3324. * SPECIFIED INVALID CCB0R. 03312000
  3325. * FALL THRU FOR I/O ERROR. WE CANNOT BYPASS A BAD RECORD AS WE 03313000
  3326. * DID DURING THE SEQUENTIAL READING BECAUSE EREP SAW THE PRESENT 03314000
  3327. * RECORD THEN (OTHERWISE IT WOULD NOT BE ASKING FOR IT NOW). 03315000
  3328. L R3,=A(RETCDE) RETURN CODE GETS SAVED HERE. @V4085A8 03316000
  3329. CLI D1(R3),0 WAS ANY CODE SAVED PREVIOUSLY? @V4085A8 03317000
  3330. BNZ ECPLB123 YES, KEEP EARLIER CODE. @V4085A8 03318000
  3331. STH R15,0(0,R3) NO, KEEP PRESENT CODE. @V4085A8 03319000
  3332. * SINCE I/O ERROR CANNOT BE BYPASSED, WE POST THE EXCP'S ECB 03320000
  3333. * WITH AN ERROR CODE. 03321000
  3334. ECPLB123 L R3,IOBECB ADDR OF ECB. @V4085A8 03322000
  3335. MVI 0(R3),POSTERR POST ECB WITH ERROR CODE. @V4085A8 03323000
  3336. B ECPEXIT SIMULATION OF THE PRESENT READ EXCP IS @V4085A8 03324000
  3337. * COMPLETE. 03325000
  3338. SPACE 03326000
  3339. * R0 IS STILL PTR TO RECORD IN DMSREA'S BUFFER. 03327000
  3340. ECPLB126 L R3,CHPBUFF ADDR OF EXCP'S READ BUFFER. @V4085A8 03328000
  3341. MVC 0(LENCCB0R,R3),NXTCCB0R MOVE CCB0R RECORD ADDR @V4085A8 03329000
  3342. * INTO THE COUNT FIELD AT THE 03330000
  3343. * BEGINNING OF EXCP'S BUFFER. 03331000
  3344. * NOTE THAT THIS CCB0R MAY BE THE 03332000
  3345. * ALL X'FF'S (WHICH IS OKAY, THAT 03333000
  3346. * IS STILL WHAT EREP SHOULD SEE). 03334000
  3347. LR R2,R0 PTR TO RECORD IN DMSREA'S BUFFER. @V4085A8 03335000
  3348. LH R3,D2(0,R2) LENGTH OF RECORD, LOADED FROM THE @V4085A8 03336000
  3349. * RECORD DESCRIPTOR WORD. 03337000
  3350. LA R2,D4(0,R2) SKIP PTR PAST DESCRIPTOR WORD. @V4085A8 03338000
  3351. * ARGS FOR ECPBFILL: R2 POINTS TO DATA AND R3 SPECIFIES LENGTH. 03339000
  3352. BAL R14,ECPBFILL ROUTINE MOVES DATA INTO EXCP @V4085A8 03340000
  3353. * BUFFER, ALSO COMPLETES COUNT FIELD AT 03341000
  3354. * BEGINNING OF BUFFER BY STORING KEY LENGTH 03342000
  3355. * ZERO AND DATA LENGTH. 03343000
  3356. * SIMULATION OF THE PRESENT READ IS COMPLETE. 03344000
  3357. SPACE 03345000
  3358. ECPEXIT L R13,SAVER13B(0,R13) ADDRESS OF OLD SAVE AREA. @V4085A8 03346000
  3359. LM R14,R12,SAVER14(R13) @V4085A8 03347000
  3360. BR R14 @V4085A8 03348000
  3361. EJECT 03349000
  3362. *********************************************************************** 03350000
  3363. * 03351000
  3364. * ECPBFILL: THIS ROUTINE MOVES DATA INTO THE CHANNEL PROGRAM'S 03352000
  3365. * READ BUFFER. THE DATA IS PRECEEDED BY AN 8 BYTE COUNT 03353000
  3366. * FIELD AND THIS ROUTINE STORES KEY LENGTH (ZERO) AND 03354000
  3367. * DATA LENGTH IN THIS COUNT FIELD. 03355000
  3368. * 03356000
  3369. *********************************************************************** 03357000
  3370. * 03358000
  3371. * INPUTS: 03359000
  3372. * R8 - ADDRESS OF THE CHANNEL PROGRAM, PROVIDING ADDRESSABILITY 03360000
  3373. * VIA THE CHPD DSECT. 03361000
  3374. * CHPBUFF - ADDRESS OF THE READ BUFFER. 03362000
  3375. * R2 - ADDRESS OF DATA TO BE MOVED. 03363000
  3376. * R3 - LENGTH OF DATA TO BE MOVED. (WILL BE OVERRIDDEN IF 03364000
  3377. * COUNT FIELD OF THE READ COMMAND SPECIFIES LESS.) 03365000
  3378. * CHPRWCNT - COUNT FIELD OF THE READ COMMAND. 03366000
  3379. * R14 - RETURN ADDRESS. 03367000
  3380. * R13 - SAVE AREA. 03368000
  3381. * R12 - ADDRESSABILITY ALREADY PROVIDED VIA R12. 03369000
  3382. * 03370000
  3383. * OUTPUTS: 03371000
  3384. * DATA IS LOADED INTO THE READ BUFFER. THE KEY LENGTH AND DATA 03372000
  3385. * LENGTH PORTIONS OF THE COUNT FIELD WILL BE FILLED IN ALSO. 03373000
  3386. * 03374000
  3387. *********************************************************************** 03375000
  3388. ECPBFILL STM R14,R12,SAVER14(R13) @V4085A8 03376000
  3389. L R4,CHPBUFF BUFFER ADDRESS. @V4085A8 03377000
  3390. LH R5,CHPRWCNT READ COMMAND COUNT. @V4085A8 03378000
  3391. * WE MUST SIMULATE THE READING OF A COUNT FIELD INTO THE 03379000
  3392. * BUFFER ALONG WITH THE DATA. 03380000
  3393. LA R6,CNTFLDL LENGTH OF A STANDARD COUNT FIELD. @V4085A8 03381000
  3394. CH R6,CHPRWCNT IF THE READ COMMAND SAYS THE BUFFER@V4085A8 03382000
  3395. * IS TOO SMALL TO CONTAIN EVEN A COUNT 03383000
  3396. * FIELD, SOMETHING IS WRONG. 03384000
  3397. BH EXCODE7 ERROR, UNEXPECTED CHANNEL PROG FORMAT. @V4085A8 03385000
  3398. LTR R3,R3 VALID DATA LENGTH @VA09237 03385250
  3399. BM EXCODEA NO,INVALID INPUT RECORD @VA09237 03385500
  3400. USING CNTFLD,R4 DESCRIBE COUNT FIELD AT FRONT OF BUF.@V4085A8 03386000
  3401. MVI CNTFLDK,0 KEY LENGTH ALWAYS 0. @V4085A8 03387000
  3402. STH R3,CNTFLDLL PUT DATA LENGTH INTO COUNT FIELD. @V4085A8 03388000
  3403. DROP R4 @V4085A8 03389000
  3404. AR R4,R6 SKIP OVER COUNT FIELD, GET TO DATA AREA. @V4085A8 03390000
  3405. SR R5,R6 COMPUTE LENGTH OF DATA PORTION OF BUFFER.@V4085A8 03391000
  3406. CR R5,R3 IS BUFFER LONGER THAN DATA? @V4085A8 03392000
  3407. BNH ECPBF007 NO. @V4085A8 03393000
  3408. LR R5,R3 R5=R3 SO MVCL WILL NOT PAD THE BUFFER. @V4085A8 03394000
  3409. ECPBF007 MVCL R4,R2 MOVE DATA INTO BUFFER. @V4085A8 03395000
  3410. LM R14,R12,SAVER14(R13) @V4085A8 03396000
  3411. BR R14 @V4085A8 03397000
  3412. EJECT 03398000
  3413. *********************************************************************** 03399000
  3414. * 03400000
  3415. * THE FOLLOWING BLOCK OF CODE IS REACHED VIA BRANCH INSTRUCTIONS, 03401000
  3416. * NOT BALR'S. THE CODE SETS UP AN ERROR CODE NUMBER TO BE USED IN 03402000
  3417. * ERROR MESSAGE DMSIFC832S, THEN IT ISSUES THE MESSAGE, THEN IT EXITS. 03403000
  3418. * 03405000
  3419. *********************************************************************** 03406000
  3420. EXCODE1 MVI MSGCODE,1 @V4085A8 03407000
  3421. B EXGENERR @V4085A8 03408000
  3422. EXCODE2 MVI MSGCODE,2 @V4085A8 03409000
  3423. B EXGENERR @V4085A8 03410000
  3424. EXCODE3 MVI MSGCODE,3 @V4085A8 03411000
  3425. B EXGENERR @V4085A8 03412000
  3426. EXCODE4 MVI MSGCODE,4 @V4085A8 03413000
  3427. B EXGENERR @V4085A8 03414000
  3428. EXCODE5 MVI MSGCODE,5 @V4085A8 03415000
  3429. B EXGENERR @V4085A8 03416000
  3430. EXCODE6 MVI MSGCODE,6 @V4085A8 03417000
  3431. B EXGENERR @V4085A8 03418000
  3432. EXCODE7 MVI MSGCODE,7 @V4085A8 03419000
  3433. B EXGENERR @V4085A8 03420000
  3434. EXCODE8 MVI MSGCODE,8 @V4085A8 03421000
  3435. B EXGENERR @V4085A8 03422000
  3436. EXCODE9 MVI MSGCODE,9 @V4085A8 03423000
  3437. B EXGENERR ISSUE MESSAGE @VA09237 03423250
  3438. EXCODEA MVI MSGCODE,10 ERROR ON INPUT RECORD @VA09237 03423500
  3439. SPACE 3 03424000
  3440. EXGENERR DMSERR NUM=832,LET=S,TEXT='SOFTWARE INCOMPATIBILITY AT THE CPEX03425000
  3441. REP-EREP INTERFACE. CODE=...', @V4085A8X03426000
  3442. SUB=(DECA,MSGCODEF),RENT=NO @V4085A8 03427000
  3443. WAITT @V4085A8 03428000
  3444. LA R15,RC104 PUT ERROR RETURN CODE IN R15. @V4085A8 03429000
  3445. L R3,=A(RETCDE) ADDRESS OF RETURN CODE @VA09237 03429300
  3446. CLI D1(R3),0 PREVIOUS ERROR CODE @VA09237 03429600
  3447. BNE EXPOST YES, LEAVE ALONE @VA09237 03429900
  3448. STH R15,0(0,R3) SAVE CMS RETURN CODE @VA09237 03430200
  3449. EXPOST EQU * @VA09237 03430500
  3450. L R3,IOBECB ECB ADDRESS @VA09237 03430800
  3451. MVI 0(R3),POSTERR POST ECB WITH I/O ERROR @VA09237 03431100
  3452. B ECPEXIT RETURN TO CALLER @VA09237 03431400
  3453. DROP 0,R8,R9,R12 @V4085A8 03432000
  3454. EJECT 03433000
  3455. *********************************************************************** 03434000
  3456. * 03435000
  3457. * DATA AREAS (SECOND SECTION) 03436000
  3458. * 03437000
  3459. *********************************************************************** 03438000
  3460. DATAREA2 DS 0F @V4085A8 03439000
  3461. SPACE 03440000
  3462. MSGCODEF DC F'0' CONTAINS CODE NUMBER TO BE INSERTED IN @V4085A8 03441000
  3463. * ERROR MESSAGE. 03442000
  3464. MSGCODE EQU MSGCODEF+3 CODE NUMBER IS PUT IN THIS BYTE. @V4085A8 03443000
  3465. SPACE 3 03444000
  3466. DS 0F PROVIDE FULLWORD ALIGNMENT AT NXTCB0R. @V4085A8 03445000
  3467. DC XL3'000000' UNUSED FILL TO ALIGN NXTCB0R. @V4085A8 03446000
  3468. NXTCCB0R DC XL1'00' START OF THE CCB0R DISK ADDRESS OF THE @V4085A8 03447000
  3469. * RECORD CURRENTLY READ AHEAD DURING THE 03448000
  3470. * SEQUENTIAL READING PHASE. 03449000
  3471. NXTCB0R DC XL4'00010001' CONTINUATION OF THE CCB0R ADDRESS@V4085A8 03450000
  3472. * OF THE RECORD CURRENTLY READ AHEAD 03451000
  3473. * DURING THE SEQUENTIAL READING PHASE. 03452000
  3474. * THIS IS THE SIGNIFICANT PORTION OF CCB0R 03453000
  3475. * SINCE THE HIGH ORDER C IS ALWAYS 0. IT 03454000
  3476. * IS FULLWORD ALIGNED FOR EFFICIENT 03455000
  3477. * ACCESSING. INITIAL VALUE HERE IS THE 03456000
  3478. * ADDR. OF THE 1ST ERROR REC. AFTER 03457000
  3479. * ANY FRAME RECS. ON REC. CYLS. 03458000
  3480. SPACE 3 03459000
  3481. DS 0F PROVIDE FULLWORD ALIGNMENT OF LSTCB0R. @V4085A8 03460000
  3482. DC XL3'0' UNUSED FILL TO ALIGN LSTCB0R. @V4085A8 03461000
  3483. LSTCCB0R DC XL5'0' DURING SEQUENTIAL READING, CONTAINS @V4085A8 03462000
  3484. * CCB0R DISK ADDRESS THAT WAS PASSED BACK TO EREP 03463000
  3485. * IN THE BUFFER (IN COUNT FIELD) AS THE ADDRESS 03464000
  3486. * OF THE LAST RECORD THAT EREP READ SEQUENTIALLY. 03465000
  3487. * DURING RANDOM READING, THIS CONTAINS THE CCB0R 03466000
  3488. * DISK ADDRESS OF THE VERY LAST RECORD, I.E., THE 03467000
  3489. * RECORD THAT WE SHOWED TO EREP AS HAVING THE 03468000
  3490. * ALL X'FF'S ADDRESS TO INDICATE END OF FILE. 03469000
  3491. * SO IF EREP SENDS THE ALL X'FF'S ADDRESS BACK TO 03470000
  3492. * US WHILE READING RANDOMLY, WE WILL COME HERE 03471000
  3493. * FOR THE TRUE CCB0R ADDRESS TO GO TO DMSREA WITH. 03472000
  3494. LSTCB0R EQU LSTCCB0R+1 @V4085A8 03473000
  3495. SPACE 3 03474000
  3496. * THE FOLLOWING CONTIGUOUS FIELDS MAKE UP THE SIMULATED 03475000
  3497. * SYS1.LOGREC HEADER RECORD. THE HDRLOGRC DSECT DESCRIBES IT. 03476000
  3498. SIMHDR DS 0F @V4085A8 03477000
  3499. DC XL2'FFFF' @V4085A8 03478000
  3500. DC XL4'0' @V4085A8 03479000
  3501. DC XL4'FFFFFFFF' @V4085A8 03480000
  3502. DC XL1'0' @V4085A8 03481000
  3503. DC XL7'00000000000002' @V4085A8 03482000
  3504. DC HL2'12960' @V4085A8 03483000
  3505. DC HL2'12960' @V4085A8 03484000
  3506. DC XL7'000000FFFFFFFF' @V4085A8 03485000
  3507. DC XL2'0012' @V4085A8 03486000
  3508. DC XL2'0' @V4085A8 03487000
  3509. DC X'09' @V4085A8 03488000
  3510. DC XL4'FFFFFFFF' @V4085A8 03489000
  3511. DC X'00' @V4085A8 03490000
  3512. DC X'FF' @V4085A8 03491000
  3513. SPACE 3 03492000
  3514. * TABSKIP2 IS A TRT TABLE USED FOR SKIPPING PAST COMMAS AND BLANKS. 03493000
  3515. TABSKIP2 DS 0D @V4085A8 03494000
  3516. DC (C' ')X'01' @V4085A8 03495000
  3517. DC X'00' @V4085A8 03496000
  3518. DC (C','-C' '-1)X'01' @V4085A8 03497000
  3519. DC X'00' @V4085A8 03498000
  3520. DC (255-C',')X'01' @V4085A8 03499000
  3521. SPACE 03500000
  3522. * TABDLIM IS A TRT TABLE USED FOR SCANNING TO FIND ONE OF THE 03501000
  3523. * FOLLOWING DELIMITERS: BLANK, COMMA, LEFT PAREN., RIGHT PAREN. 03502000
  3524. TABDLIM DS 0D @V4085A8 03503000
  3525. DC (C' ')X'00',AL1(4) BLANK @V4085A8 03504000
  3526. DC (C'('-C' '-1)X'00',AL1(12) LEFT PARENTHESIS @V4085A8 03505000
  3527. DC (C')'-C'('-1)X'00',AL1(16) RIGHT PARENTHESIS @V4085A8 03506000
  3528. DC (C','-C')'-1)X'00',AL1(8) COMMA @V4085A8 03507000
  3529. DC (255-C',')X'00' FILL TABLE TO END.@V4085A8 03508000
  3530. SPACE 3 03509000
  3531. LOADLIST DS 0D 03510000
  3532. DC CL8'INCLUDE' @V4085A8 03511000
  3533. DC CL8'IFCEREP1' @V4085A8 03512000
  3534. DC CL8'IFCMSG01' @V4085A8 03513000
  3535. DC CL8'IFCIOHND' @V4085A8 03514000
  3536. DC CL8'IFCEDSUM' @V4085A8 03515000
  3537. DC CL8'IFCEEDIT' @V4085A8 03516000
  3538. DC CL8'IFCESUMS' @V4085A8 03517000
  3539. DC CL8'IFCMES01' @V4085A8 03518000
  3540. DC CL8'IFCPARM1' @V4085A8 03519000
  3541. DC CL8'IFCPARM2' @V4085A8 03520000
  3542. DC CL8'(' @V4085A8 03521000
  3543. DC CL8'NOAUTO' @V4085A8 03522000
  3544. DC CL8'NOMAP' @V4085A8 03523000
  3545. DC 8X'FF' @V4085A8 03524000
  3546. SPACE 3 03525000
  3547. FDEFPRT DS 0D @V4085A8 03526000
  3548. DC CL8'FILEDEF' @V4085A8 03527000
  3549. DC CL8'EREPPT' @V4085A8 03528000
  3550. DC CL8'PRINTER' @V4085A8 03529000
  3551. DC CL8'(' @V4085A8 03530000
  3552. DC CL8'NOCHANGE' LETS THE USER OVERRIDE THIS @V4085A8 03531000
  3553. * FILEDEF IF HE SUPPLIES ONE OF HIS OWN 03532000
  3554. * AHEAD OF TIME. 03533000
  3555. DC CL8'BLKSIZE' @V4085A8 03534000
  3556. DC CL8'133' @V4085A8 03535000
  3557. DC 8X'FF' @V4085A8 03536000
  3558. SPACE 03537000
  3559. FDEFSYSI DS 0D @V4085A8 03538000
  3560. DC CL8'FILEDEF' @V4085A8 03539000
  3561. DC CL8'SYSIN' @V4085A8 03540000
  3562. DC CL8'DISK' @V4085A8 03541000
  3563. DC CL8'SYSIN' @V4085A8 03542000
  3564. DC CL8'EREPWORK' @V4085A8 03543000
  3565. MODPLUG1 DC CL8' ' FMODE GETS FILLED IN PRIOR TO INVOKING. @V4085A8 03544000
  3566. DC 8X'FF' @V4085A8 03545000
  3567. SPACE 03546000
  3568. FDEFSYS2 DS 0D @V4085A8 03547000
  3569. DC CL8'FILEDEF' @V4085A8 03548000
  3570. DC CL8'SYSIN' @V4085A8 03549000
  3571. DC CL8'DUMMY' @V4085A8 03550000
  3572. DC 8X'FF' @V4085A8 03551000
  3573. SPACE 03552000
  3574. FDEFSERL DS 0D THIS DEFINITION IS IN LIEU OF A DUMMY @V4085A8 03553000
  3575. * FILEDEF WHICH IS LOGICALLY WHAT WE WANT HERE SINCE 03554000
  3576. * NO READS OR WRITES WILL EVER GET THRU TO THIS FILE, 03555000
  3577. * ONLY THE OPEN AND CLOSE ARE ACTUALLY ALLOWED TO 03556000
  3578. * EXECUTE. BUT BECAUSE THE FILE IS DEFINED IN EREP'S 03557000
  3579. * DCB AS 'DSORG=DA', A DUMMY FILEDEF FAILS, 03558000
  3580. * APPARENTLY BECAUSE IT MAKES NO SENSE TO HAVE A 03559000
  3581. * DUMMY DATA SET THAT IS RANDOMLY ACCESSED. THE 03560000
  3582. * SOLUTION IS TO HAVE A MINIMAL NON-DUMMY FILEDEF, 03561000
  3583. * AS BELOW, TO GET THRU THE OPEN AND CLOSE. 03562000
  3584. DC CL8'FILEDEF' @V4085A8 03563000
  3585. DC CL8'SERLOG' @V4085A8 03564000
  3586. DC CL8'DISK' @V4085A8 03565000
  3587. DC CL8'SERLOG' @V4085A8 03566000
  3588. DC CL8'EREPWORK' @V4085A8 03567000
  3589. DC CL8'(' @V4085A8 03568000
  3590. DC CL8'BLOCK' @V4085A8 03569000
  3591. DC CL8'4096' @V4085A8 03570000
  3592. DC 8X'FF' @V4085A8 03571000
  3593. SPACE 03572000
  3594. FDEFTOUR DS 0D @V4085A8 03573000
  3595. DC CL8'FILEDEF' @V4085A8 03574000
  3596. DC CL8'TOURIST' @V4085A8 03575000
  3597. DC CL8'TERMINAL' @V4085A8 03576000
  3598. DC CL8'(' @V4085A8 03577000
  3599. DC CL8'BLKSIZE' @V4085A8 03578000
  3600. DC CL8'133' @V4085A8 03579000
  3601. DC 8X'FF' @V4085A8 03580000
  3602. SPACE 03581000
  3603. FDEFDIRE DS 0D @V4085A8 03582000
  3604. DC CL8'FILEDEF' @V4085A8 03583000
  3605. DC CL8'DIRECTWK' @V4085A8 03584000
  3606. DC CL8'DISK' @V4085A8 03585000
  3607. DC CL8'DIRECTWK' @V4085A8 03586000
  3608. DC CL8'EREPWORK' @V4085A8 03587000
  3609. MODPLUG2 DC CL8' ' FMODE GETS FILLED IN PRIOR TO INVOKING. @V4085A8 03588000
  3610. DC 8X'FF' @V4085A8 03589000
  3611. SPACE 03590000
  3612. FDEFACCI DS 0D @V4085A8 03591000
  3613. DC CL8'FILEDEF' @V4085A8 03592000
  3614. DC CL8'ACCIN' @V4085A8 03593000
  3615. DC CL8'TAP2' @V4085A8 03594000
  3616. DC CL8'(' @V4085A8 03595000
  3617. DC CL8'NOCHANGE' LETS THE USER OVERRIDE THIS @V4085A8 03596000
  3618. * FILEDEF IF HE SUPPLIES ONE OF HIS OWN 03597000
  3619. * AHEAD OF TIME. 03598000
  3620. DC CL8'RECFM' @V4085A8 03599000
  3621. DC CL8'VB' @V4085A8 03600000
  3622. DC CL8'BLKSIZE' @V4085A8 03601000
  3623. DC CL8'12000' @V4085A8 03602000
  3624. DC 8X'FF' @V4085A8 03603000
  3625. SPACE 03604000
  3626. FDEFACCD DS 0D @V4085A8 03605000
  3627. DC CL8'FILEDEF' @V4085A8 03606000
  3628. DC CL8'ACCDEV' @V4085A8 03607000
  3629. DC CL8'TAP1' @V4085A8 03608000
  3630. DC CL8'(' @V4085A8 03609000
  3631. DC CL8'NOCHANGE' LETS THE USER OVERRIDE THIS @V4085A8 03610000
  3632. * FILEDEF IF HE SUPPLIES ONE OF HIS OWN 03611000
  3633. * AHEAD OF TIME. 03612000
  3634. DC CL8'RECFM' @V4085A8 03613000
  3635. DC CL8'VB' @V4085A8 03614000
  3636. DC CL8'BLKSIZE' @V4085A8 03615000
  3637. DC CL8'12000' @V4085A8 03616000
  3638. DC 8X'FF' @V4085A8 03617000
  3639. SPACE 03618000
  3640. FDEFCLR DS 0D @V4085A8 03619000
  3641. DC CL8'FILEDEF' @V4085A8 03620000
  3642. FDEFCLRN DC CL8'SYSIN' @V4085A8 03621000
  3643. DC CL8'CLEAR' @V4085A8 03622000
  3644. DC 8X'FF' @V4085A8 03623000
  3645. SPACE 3 03624000
  3646. CLRLIST DS 0D LIST OF FILEDEF'S TO BE CLEARED. @V4085A8 03625000
  3647. DC CL8'SERLOG' @V4085A8 03626000
  3648. DC CL8'TOURIST' @V4085A8 03627000
  3649. DC CL8'DIRECTWK' @V4085A8 03628000
  3650. CLRLISTZ EQU * MARKS END OF CLRLIST. @V4085A8 03629000
  3651. SPACE 3 03630000
  3652. LTORG @V4085A8 03631000
  3653. SPACE 3 03632000
  3654. NXTRECAD DS A STORAGE ADDRESS OF THE RECORD READ AHEAD AND @V4085A8 03633000
  3655. * KEPT IN DMSREA'S BUFFER DURING SEQUENTIAL READING. 03634000
  3656. ADIOB DS A ADDRESS OF THE IOB, RETAINED FROM ONE EXCP @V4085A8 03635000
  3657. * TO THE NEXT. 03636000
  3658. ADDCB DS A ADDRESS OF THE DCB, RETAINED FROM ONE EXCP @V4085A8 03637000
  3659. * TO THE NEXT. 03638000
  3660. ADCHNPRG DS A ADDRESS OF THE CHANNEL PROGRAM, RETAINED @V4085A8 03639000
  3661. * FROM ONE EXCP TO THE NEXT. 03640000
  3662. DMSREAAD DS A CONTAINS ADDRESS OF THE DMSREA ROUTINE AFTER @V4085A8 03641000
  3663. * THAT PROGRAM IS BROUGHT INTO MAIN STORAGE BY OS LOAD. 03642000
  3664. SAVEEXCP DS 9D A STANDARD 72 BYTE SAVE AREA. @V4085A8 03643000
  3665. SAVCCHH DC XL4'0' SAVE AREA FOR 'CCHH' (GARBAGE TO @VA07900 03644000
  3666. * US) THAT EREP USES TO READ THE HEADER 03645000
  3667. * RECORD. 03646000
  3668. SAVELAST DC XL5'0' SAVE AREA FOR THE CCB0R OF THE @VA07900 03647000
  3669. * LAST RECORD ON ERROR CYLINDERS. 03648000
  3670. LASTFRAM DC XL5'0' SAVE AREA FOR THE CCB0R OF THE @VA07861 03649000
  3671. * LAST FRAME REC. ON THE ERROR CYLINDERS 03650000
  3672. SEQRDFRM DC X'00' FLAG TO INDICATE SEQUENTIAL READ @VA07861 03651000
  3673. * OF FRAME RECORDS 03652000
  3674. EJECT 03653000
  3675. SAVER13B EQU 4 DISPLACEMENT FOR SAVING (IN A NEW SAVE @V4085A8 03654000
  3676. * AREA) THE BACKWARD POINTER TO THE OLD SAVE AREA. 03655000
  3677. SAVER14 EQU 12 DISPLACEMENT FOR SAVING R14 IN A STANDARD @V4085A8 03656000
  3678. * 72 BYTE SAVE AREA. 03657000
  3679. SAVER15 EQU SAVER14+4 DISP. FOR SAVING R15 IN A SAVE AREA. @V4085A8 03658000
  3680. SAVER0 EQU SAVER15+4 DISP. FOR SAVING R0 IN A SAVE AREA. @V4085A8 03659000
  3681. SAVER1 EQU SAVER0+4 DISP. FOR SAVING R1 IN A SAVE AREA. @V4085A8 03660000
  3682. SAVER2 EQU SAVER1+4 DISP. FOR SAVING R2 IN A SAVE AREA. @V4085A8 03661000
  3683. SAVER3 EQU SAVER2+4 DISP. FOR SAVING R3 IN A SAVE AREA. @V4085A8 03662000
  3684. SAVER9 EQU SAVER0+9*4 DISP. FOR SAVING R9 IN A SAVE AREA. @V4085A8 03663000
  3685. SPACE 03664000
  3686. D1 EQU 1 SYMBOLIC DISPLACEMENT. @V4085A8 03665000
  3687. D2 EQU 2 SYMBOLIC DISPLACEMENT. @V4085A8 03666000
  3688. D4 EQU 4 SYMBOLIC DISPLACEMENT. @V4085A8 03667000
  3689. D8 EQU 8 SYMBOLIC DISPLACEMENT. @V4085A8 03668000
  3690. D16 EQU 16 SYMBOLIC DISPLACEMENT. @V4085A8 03669000
  3691. D24 EQU 24 SYMBOLIC DISPLACEMENT. @V4085A8 03670000
  3692. D28 EQU 28 SYMBOLIC DISPLACEMENT. @V4085A8 03671000
  3693. L1 EQU 1 SYMBOLIC LENGTH. @V4085A8 03672000
  3694. L2 EQU 2 SYMBOLIC LENGTH. @V4085A8 03673000
  3695. L3 EQU 3 SYMBOLIC LENGTH. @V4085A8 03674000
  3696. L8 EQU 8 SYMBOLIC LENGTH. @V4085A8 03675000
  3697. L10 EQU 10 SYMBOLIC LENGTH. @V4085A8 03676000
  3698. L12 EQU 12 SYMBOLIC LENGTH. @V4085A8 03677000
  3699. L16 EQU 16 SYMBOLIC LENGTH. @V4085A8 03678000
  3700. SPACE 03679000
  3701. RC1 EQU 1 FOR USE AS AN ERROR RETURN CODE. @V4085A8 03680000
  3702. RC2 EQU 2 FOR USE AS AN ERROR RETURN CODE. @V4085A8 03681000
  3703. RC4 EQU 4 FOR USE AS AN ERROR RETURN CODE. @V4085A8 03682000
  3704. RC5 EQU 5 FOR USE AS AN ERROR RETURN CODE. @V4085A8 03683000
  3705. RC6 EQU 6 FOR USE AS AN ERROR RETURN CODE. @V4085A8 03684000
  3706. RC12 EQU 12 FOR USE AS AN ERROR RETURN CODE. @V4085A8 03685000
  3707. RC24 EQU 24 FOR USE AS AN ERROR RETURN CODE. @V4085A8 03686000
  3708. RC28 EQU 28 FOR USE AS AN ERROR RETURN CODE. @V4085A8 03687000
  3709. RC32 EQU 32 FOR USE AS AN ERROR RETURN CODE. @V4085A8 03688000
  3710. RC56 EQU 56 FOR USE AS AN ERROR RETURN CODE. @V4085A8 03689000
  3711. RC60 EQU 60 FOR USE AS AN ERROR RETURN CODE. @V4085A8 03690000
  3712. RC62 EQU 62 FOR USE AS AN ERROR RETURN CODE. @V4085A8 03691000
  3713. RC88 EQU 88 FOR USE AS AN ERROR RETURN CODE. @V4085A8 03692000
  3714. RC100 EQU 100 FOR USE AS AN ERROR RETURN CODE. @V4085A8 03693000
  3715. RC104 EQU 104 FOR USE AS AN ERROR RETURN CODE. @V4085A8 03694000
  3716. SPACE 03695000
  3717. TRUNCLEN EQU 71 LAST DATA COLUMN OF RECORDS IN CONTROL @V4085A8 03696000
  3718. * PARAMETER INPUT FILE. 03697000
  3719. PARMBUFL EQU 102 LENGTH OF THE OS PARM BUFFER, ALLOCATED @V4085A8 03698000
  3720. * FROM FREE STORAGE. INCLUDES DATA AREA PLUS 2 BYTES 03699000
  3721. * FOR LENGTH FIELD IN FRONT OF DATA AREA. 03700000
  3722. FENLEN EQU 8 LENGTH OF A FENCE OF FF'S (8X'FF'). @V4085A8 03701000
  3723. PROGOPSW EQU 40 ADDRESS OF PROG CHECK OLD PSW IN LOW CORE. @V4085A8 03702000
  3724. PROGNPSW EQU 104 ADDRESS OF PROG CHECK NEW PSW IN LOW CORE. @V4085A8 03703000
  3725. POSTNORM EQU X'7F' NORMAL COMPLETION CODE FOR 'POST'ING @V4085A8 03704000
  3726. * ECB OF EXCP. 03705000
  3727. POSTERR EQU X'70' ERROR COMPLETION CODE FOR 'POST'ING @V4085A8 03706000
  3728. * ECB OF EXCP. 03707000
  3729. CCWRDHDR EQU X'06' THIS OPCODE IN CCW SIGNALS US THAT EREP @V4085A8 03708000
  3730. * WANTS TO READ THE SYS1.LOGREC HEADER RECORD. 03709000
  3731. CCWWRHDR EQU X'05' THIS OPCODE IN CCW SIGNALS US THAT EREP @V4085A8 03710000
  3732. * WANTS TO WRITE THE SYS1.LOGREC HEADER RECORD. 03711000
  3733. CCWRDREC EQU X'9E' THIS OPCODE IN CCW SIGNALS US THAT EREP @V4085A8 03712000
  3734. * WANTS TO READ A NON-HEADER RECORD FROM SYS1.LOGR. 03713000
  3735. ERRECST EQU X'02' SUBCODE FOR DIAGNOSE '2C'. @V5088AA 03714000
  3736. * WANT HDRSTART VALUE 03715000
  3737. FRAMEIND EQU X'04' SUBCODE FOR DIAGNOSE '2C' @V5088AA 03716000
  3738. * WANT HDRWFLG VALUE 03717000
  3739. LOGSTART EQU X'01' SUBCODE FOR DIAGNOSE '2C' @V5088AA 03718000
  3740. * WANT 'CCPD' OF RECORDING AREA 03719000
  3741. LENCCHHR EQU 5 SYMBOLIC LENGTH OF CCHHR DATA. @V4085A8 03720000
  3742. LENCCHH EQU 4 SYMBOLIC LENGTH OF CCHH DATA @VA07900 03721000
  3743. LENCCB0R EQU 5 SYMBOLIC LENGTH OF CCB0R DATA. @V4085A8 03722000
  3744. PARMHDRL EQU 2 LENGTH OF HALFWD HEADER OF OS PARM LIST. @V4085A8 03723000
  3745. RECORD2 EQU 2 RECORD NUMBER OF TIMESTAMP REC. @VA07900 03724000
  3746. HDRFRAME EQU X'20' FRAME INDICATOR IN HDRWFLG - ON @VA07900 03725000
  3747. * INDICATES FRAME RECS. ON CYLINDERS. 03726000
  3748. REGEQU @V4085A8 03727000
  3749. EJECT 03728000
  3750. INPLIST DSECT DESCRIBES CMS PARM LIST OF THE CPEREP COMMAND.@V4085A8 03729000
  3751. INPCOM DC CL8'CPEREP' @V4085A8 03730000
  3752. INPFN DC CL8'FILENAME' @V4085A8 03731000
  3753. INPFT DC CL8'FILETYPE' @V4085A8 03732000
  3754. INPFM DC CL8'FILEMODE' @V4085A8 03733000
  3755. INPFENCE DC 8X'FF' @V4085A8 03734000
  3756. SPACE 3 03735000
  3757. CTLCRD DSECT FORMAT OF CTLCRD INPUTTED TO OS/VS EREP. @V4085A8 03736000
  3758. CTLCRDID DS CL6 CONTAINS THE WORD 'CTLCRD'. @V4085A8 03737000
  3759. DS CL4 BLANK AREA. @V4085A8 03738000
  3760. CTLCRDD1 DS CL5 DATE1 AS YYDDD. @V4085A8 03739000
  3761. DS CL1 BLANK. @V4085A8 03740000
  3762. CTLCRDD2 DS CL5 DATE2 AS YYDDD. @V4085A8 03741000
  3763. DS CL1 BLANK. @V4085A8 03742000
  3764. CTLCRDCI DS CL2 IPL CLUSTERING INTERVAL. @V4085A8 03743000
  3765. DS CL1 BLANK. @V4085A8 03744000
  3766. CTLCRDTI DS CL55 TITLE (OR COMPANY NAME). @V4085A8 03745000
  3767. SPACE 3 03746000
  3768. BLDLIST DSECT FORMAT OF INITIAL ENTRY OF A BLDL LIST. @V4085A8 03747000
  3769. DS (2)CL2 N/A @V4085A8 03748000
  3770. BLDLNAM DS CL8 NAME OF MEMBER. @V4085A8 03749000
  3771. BLDLTTR DS CL3 TTR DISK ADDRESS (RELATIVE TRACK & RECORD).@V4085A8 03750000
  3772. DS (3)CL1 N/A @V4085A8 03751000
  3773. SPACE 3 03752000
  3774. CNTFLD DSECT DESCRIBES THE COUNT FIELD OF A DISK RECORD. @V4085A8 03753000
  3775. CNTFLDAD DS XL5 CONTAINS CCHHR RECORD ADDRESS. @V4085A8 03754000
  3776. CNTFLDK DS XL1 CONTAINS KEY LENGTH. @V4085A8 03755000
  3777. CNTFLDLL DS XL2 CONTAINS DATA LENGTH. @V4085A8 03756000
  3778. CNTFLDL EQU *-CNTFLD LENGTH OF A DISK COUNT FIELD. @V4085A8 03757000
  3779. SPACE 3 03758000
  3780. IOBD DSECT SELECTED FIELDS OF AN OS IOB. @V4085A8 03759000
  3781. DS F N/A @V4085A8 03760000
  3782. IOBECB DS A ADDRESS OF ECB. @V4085A8 03761000
  3783. DS 2F N/A @V4085A8 03762000
  3784. IOBCCW DS A ADDRESS OF 1ST COMMAND OF CHANNEL PROG. @V4085A8 03763000
  3785. IOBDCB DS A ADDRESS OF DCB. @V4085A8 03764000
  3786. DS 4F N/A @V4085A8 03765000
  3787. SPACE 3 03766000
  3788. CHPD DSECT EXPECTED LAYOUT OF SYS1.LOGREC CHANNEL PROG.@V4085A8 03767000
  3789. CHPSRCH DS 0D COMMAND: SEARCH ID EQUAL. @V4085A8 03768000
  3790. CHPIDAD DS A LOW ORDER 3 BYTES ARE ADDR OF CCHHR. @V4085A8 03769000
  3791. DS XL2 COMMAND FLAGS. @V4085A8 03770000
  3792. CHPSRCNT DS H COUNT. @V4085A8 03771000
  3793. CHPTIC DS 0D COMMAND: TIC *-8 @V4085A8 03772000
  3794. CHPTICAD DS A LOW ORDER 3 BYTES ARE TARGET ADDRESS. @V4085A8 03773000
  3795. DS XL2 COMMAND FLAGS. @V4085A8 03774000
  3796. DS H COUNT. @V4085A8 03775000
  3797. CHPRW DS 0D COMMAND: READ, WRITE; OPCODE VARIES. @V4085A8 03776000
  3798. CHPBUFF DS A LOW ORDER 3 BYTES ARE READ OR WRITE BUFFER. @V4085A8 03777000
  3799. DS XL2 COMMAND FLAGS. @V4085A8 03778000
  3800. CHPRWCNT DS H DATA COUNT. @V4085A8 03779000
  3801. SPACE 3 03780000
  3802. TXTDSECT DSECT TXTLIB STRUCTURE @V4085A8 03781000
  3803. LIBNAME DS CL8 TXTLIB NAME @V4085A8 03782000
  3804. DS F N/A @V4085A8 03783000
  3805. NXTLIB DS F POINTER TO NEXT TXTLIB @V4085A8 03784000
  3806. DS F N/A @V4085A8 03785000
  3807. ENTRY1 DS F ADDRESS OF 1ST ENTRY @V4085A8 03786000
  3808. LENTRY DS F LENGTH OF EACH ENTRY @V4085A8 03787000
  3809. NXTAVAIL DS F NEXT AVAILABLE ENTRY ADDRESS @V4085A8 03788000
  3810. SPACE 3 03789000
  3811. MODNAME DSECT ENTRY STRUCTURE @V4085A8 03790000
  3812. NME1ST4 DS CL4 FIRST 4 CHARS OF MODULE NAME @V4085A8 03791000
  3813. NMELST4 DS CL4 LAST 4 CHARS OF MODULE NAME @V4085A8 03792000
  3814. DS CL4 N/A @V4085A8 03793000
  3815. SPACE 3 03794000
  3816. HDRLOGRC DSECT @V4085A8 03795000
  3817. HDRCLASS DC XL2'FFFF' HEADER RECORD IDENTIFIER. @V4085A8 03796000
  3818. * FFFF INDICATES A VALID HEADER. EREP MAY 03797000
  3819. * CHECK IT FOR VALIDITY. 03798000
  3820. HDRLOEXT DC XL4'0' ADDRESS OF LOW EXTENT. TRACK ADDRESS @V4085A8 03799000
  3821. * (IN CCHH FORMAT) OF FIRST EXTENT OF 03800000
  3822. * SYS1.LOGREC. VALUE SHOULD NOT AFFECT EREP. 03801000
  3823. HDRHIEXT DC XL4'FFFFFFFF' ADDRESS OF HIGH EXTENT. TRACK @V4085A8 03802000
  3824. * ADDRESS (IN CCHH FORMAT) OF LAST EXTENT OF 03803000
  3825. * SYS1.LOGREC. VALUE SHOULD NOT AFFECT EREP. 03804000
  3826. HDRFULL DC XL1'0' COUNT OF FULL MESSAGE. EREP RESETS @V4085A8 03805000
  3827. * THIS TO 0, BUT NEVER READS IT. 03806000
  3828. HDRSTART DC XL7'00000000000000' ADDR. TO BE USED FOR FIRST @V5088AA 03807000
  3829. * ERROR RECORD PUT INTO SYS1.LOGREC 03808000
  3830. * (IN BBCCHHR FORMAT). FOR PURPOSES 03809000
  3831. * OF SIMULATION, THE 'HDRLAST' 03810000
  3832. * FIELD MUST USE THE SAME 03811000
  3833. * CONVENTION; WHEN 'HDRLAST' AND 03812000
  3834. * 'HDRSTART' MATCH, SYS1.LOGREC IS 03813000
  3835. * EMPTY OF ERROR RECORDS. 03814000
  3836. ORG *-4 BACK UP TO CB0R PART OF ADDRESS @V5088AA 03815000
  3837. HDRCB0R DS XL4 CB0R PORTION OF HDRSTART ADDRESS @V5088AA 03816000
  3838. * VALUE IS FILLED IN FROM ADDRESS 03817000
  3839. * SAVED IN DMKIOEHS DURING INIT. 03818000
  3840. * OF THE ERROR RECORDING CYLINDERS. 03819000
  3841. HDRREM DC HL2'12960' NUMBER OF BYTES REMAINING ON TRACK @V4085A8 03820000
  3842. * UPON WHICH LAST RECORD ENTRY WAS WRITTEN. 03821000
  3843. * VALUE USED HERE IS ARBITRARY, BUT 03822000
  3844. * REASONABLE. EREP RESETS THIS WITHOUT 03823000
  3845. * LOOKING AT IT. 03824000
  3846. HDRTRKCP DC HL2'12960' TRACK CAPACITY OF VOLUME CONTAINING @V4085A8 03825000
  3847. * SYS1.LOGREC. SIMULATE IT AS A 3330. 03826000
  3848. * EREP CURRENTLY NEVER LOOKS AT THIS, BUT 03827000
  3849. * PERHAPS IT SHOULD RATHER THAN USING ITS OWN 03828000
  3850. * TRACK CAPACITY TABLE. 03829000
  3851. HDRLAST DC XL7'000000FFFFFFFF' ADDRESS (IN BBCCHHR FORMAT)@V4085A8 03830000
  3852. * OF LAST ERROR RECORD WRITTEN ON 03831000
  3853. * SYS1.LOGREC. FOR SIMULATION, VALUE 03832000
  3854. * OF BBCCHHR DOESN'T MATTER, BUT WHEN 03833000
  3855. * IT IS THE SAME AS THE VALUE IN THE 03834000
  3856. * 'HDRSTART' FIELD, IT MEANS 03835000
  3857. * SYS1.LOGREC IS EMPTY. 03836000
  3858. HDRTRKS DC XL2'0012' HIGHEST ADDRESSABLE TRACK FOR EACH @V4085A8 03837000
  3859. * CYLINDER ON VOLUME. EREP DOES NOT USE THIS, 03838000
  3860. * BUT SIMULATE IT AS A 3330 ANYWAY. 03839000
  3861. DC XL2'0' THIS FIELD IS NOT USED BY EREP. @V4085A8 03840000
  3862. HDRDEV DC X'09' CODE INDICATING DEVICE TYPE OF @V4085A8 03841000
  3863. * SYS1.LOGREC VOLUME. CODE X'09' IS 3330. 3330 IS 03842000
  3864. * PURELY ARBITRARY FOR PURPOSES OF SIMULATION. 03843000
  3865. * EREP WILL USE THIS, SO CODE MUST BE A VALID ONE. 03844000
  3866. HDRWTRK DC XL4'FFFFFFFF' EARLY WARNING MESSAGE TRACK. @V4085A8 03845000
  3867. * TRACK (IN CCHH FORMAT) ON WHICH 90 03846000
  3868. * PERCENT FULL POINT FOR DATA SET EXISTS. 03847000
  3869. * A PURELY ARBITRARY VALUE IS USED HERE FOR 03848000
  3870. * SIMULATION; EREP WILL NOT LOOK AT IT. 03849000
  3871. HDRWFLG DC X'00' FLAG VALUE X'80' INDICATES 90 PERCENT @V4085A8 03850000
  3872. * FULL MESSAGE HAS ALREADY BEEN 03851000
  3873. * ISSUED. X'20' INDICATES FRAME 03852000
  3874. * RECORDS ARE PRESENT ON THE ERROR 03853000
  3875. * RECORDING CYLINDERS. 03854000
  3876. HDRSAFE DC X'FF' CHECK BYTE. FF INDICATES VALID HEADER @V4085A8 03855000
  3877. * RECORD. EREP WILL CHECK THAT IT IS REALLY FF. 03856000
  3878. HDRLEN EQU *-HDRLOGRC LENGTH OF THE HEADER RECORD. @V4085A8 03857000
  3879. SPACE 3 03858000
  3880. SVCSAVE @V4085A8 03859000
  3881. SPACE 3 03860000
  3882. ADT @V4085A8 03861000
  3883. SPACE 3 03862000
  3884. FSCBD @V4085A8 03863000
  3885. SPACE 3 03864000
  3886. FSTB @V4085A8 03865000
  3887. SPACE 3 03866000
  3888. NUCON @V4085A8 03867000
  3889. END DMSIFC 03868000