Table of Contents

DMSMVE Source

References

Source Listing

DMSMVE.ASSEMBLE.txt
  1. MVE TITLE 'DMSMVE (CMS) VM/370 - RELEASE 6' 00001000
  2. SPACE 2 00002000
  3. * 00003000
  4. * 00004000
  5. * 00005000
  6. * 00006000
  7. * 00007000
  8. * 00008000
  9. * 00009000
  10. * MODULE NAME: 00010000
  11. * 00011000
  12. * DMSMVE (MOVEFILE COMMAND) 00012000
  13. * 00013000
  14. * FUNCTION: 00014000
  15. * 00015000
  16. * TO TRANSFER DATA BETWEEN TWO SPECIFIED DDNAMES. THE 00016000
  17. * DDNAMES MAY SPECIFY ANY DEVICES OR DISK FILES 00017000
  18. * SUPPORTED BY THE CMS SYTEM. 00018000
  19. * 00019000
  20. * ATTRIBUTES: 00020000
  21. * 00021000
  22. * REENTRANT, DISK RESIDENT 00022000
  23. * 00023000
  24. * ENTRY POINTS: 00024000
  25. * 00025000
  26. * DMSMVE 00026000
  27. * 00027000
  28. * EXIT CONDITIONS: 00028000
  29. * 00029000
  30. * RC = 0 NORMAL RETURN - MOVE COMPLETED 00030000
  31. * 00031000
  32. * ERROR RETURNS AND MESSAGES: 00032000
  33. * 00033000
  34. * 024 002E INPUT FILE NOT FOUND 00034000
  35. * 024 003E INVALID OPTION 'OPTION' 00035000
  36. * 024 070E INVALID PARAMETER 'PARAM' 00036000
  37. * 028 073E UNABLE TO OPEN FILE 00037000
  38. * 036 037E OUTPUT DISK IS READ/ONLY 00038000
  39. * 036 069E OUTPUT DISK IS NOT ACCESSED 00039000
  40. * 040 075E DEVICE ILLEGAL FOR MOVE INPUT OR OUTPUT 00040000
  41. * 040 041E INPUT AND OUTPUT FILES ARE THE SAME 00041000
  42. * 088 130S BLOCKSIZE < 9 FOR V FORMAT FILE 00042000
  43. * 100 127S UNSUPPORTED DEVICE 00043000
  44. * 100 128S INPUT I/O ERROR 00044000
  45. * 100 129S OUTPUT I/O ERROR 00045000
  46. * 225I PDS MEMBER 'MEMBER' MOVED 00046000
  47. * 226I END OF PDS MOVE 00047000
  48. * 088 232E INVALID RECFM -- SPANNED RECORDS NOT SUPPORT@VA13188 00047500
  49. * 00048000
  50. * EXTERNAL REFERENCES: 00049000
  51. * 00050000
  52. * OSFST 00051000
  53. * 00052000
  54. * CALLS TO OTHER ROUTINES 00053000
  55. * 00054000
  56. * OS MACROS EXECUTED: 00055000
  57. * 00056000
  58. * FIND SVC 18 POINT TO NEXT MEMBER 00057000
  59. * OPEN INPUT SVC 19 OPEN INPUT DDNAME 00058000
  60. * OPEN OUTPUT SVC 19 OPEN OUTPUT DDNAME 00059000
  61. * GET BALR READ DATA FROM INPUT DCB 00060000
  62. * PUT BALR WRITE DATA TO OUTPUT DCB 00061000
  63. * CLOSE LEAVE SVC 20 CLOSE DCB'S (NO REWIND ON TAPE) 00062000
  64. * GETMAIN SVC 10 ALLOCATE STORAGE AREA 00063000
  65. * FREEMAIN SVC 10 FREE STORAGE AREA 00064000
  66. * SYNADEF SVC 68 GET SYNAD ERROR MESSAGE TEXT 00065000
  67. * SYNADRLS SVC 68 RELEASE SYNADEF MESSAGE BUFFER 00066000
  68. * 00067000
  69. * CMS FUNCTIONS USED: 00068000
  70. * 00069000
  71. * OS SIMULATION (SVC 10, 19, 20, 68, GET AND PUT) 00070000
  72. * 00071000
  73. * STATE SVC 202 TO DETERMINE WHETHER INPUT FILE 00072000
  74. * EXISTS 00073000
  75. * 00074000
  76. * STATEW SVC 202 TO DETERMINE WHETHER OUTPUT FILE 00075000
  77. * EXISTS 00076000
  78. * 00077000
  79. * DMSERR SVC 203 TO TYPE OUT ERROR MESSAGES 00078000
  80. * 00079000
  81. * STRINIT SVC 203 TO INITIALIZE STORAGE FOR 00080000
  82. * GETMAIN 00081000
  83. * 00082000
  84. * ADTLKP BALR TO DETERMINE WHETHER OUTPUT DISK 00083000
  85. * IS READ/WRITE 00084000
  86. * 00085000
  87. * TABLES / WORKAREAS: 00086000
  88. * 00087000
  89. * A WORK AREA OF 50 DOUBLEWORDS IS ALLOCATED, USING 00088000
  90. * GETMAIN, TO HOLD THE DCB'S AND OTHER STORAGE. 00089000
  91. * 00090000
  92. * THE OS SIMULATION ROUTINES ALLOCATE I/O BUFFERS AS 00091000
  93. * NEEDED. 00092000
  94. * 00093000
  95. * REGISTER USAGE: 00094000
  96. * 00095000
  97. * R0 - R1, R13 - R15 LINKAGE REGISTERS 00096000
  98. * 00097000
  99. * R2 - R9 WORK REGISTERS 00098000
  100. * 00099000
  101. * OPERATION: 00100000
  102. * 00101000
  103. * THE INPUT DDNAME IS OPENED WITH PARAMETERS SPECIFIED SO THAT 00102000
  104. * A STANDARD OS DCB EXIT ROUTINE IS TAKEN. (THAT IS, THE OS 00103000
  105. * SIMULATION ROUTINES FILL IN THE DCB WITH WHATEVER INFORMATION 00104000
  106. * IS AVAILABLE FROM THE FILEDEF, AND THEN PASS CONTROL TO 00105000
  107. * AN EXIT ROUTINE IN THE 'MOVE' CODE, TO GIVE IT AN OPPORTUNITY 00106000
  108. * TO MAKE ANY ADDITIONS OR CHNGES BEFORE THE OPEN IS COMPLETE.) 00107000
  109. * THE EXIT ROUTNE FILLS IN THE RECFM, LRECL AND BLKSIZE FIELDS, 00108000
  110. * IF THEY WERE NOT ALREADY FILLED IN BY THE FILEDEF. 00109000
  111. * THE LOGIC DEPENDS UPON THE INPUT DEVICE TYPE. IF A DISK 00110000
  112. * FILE, IT IS CHECKED FOR EXISTENCE, AND THE RECFM AND LRECL 00111000
  113. * FIELDS OF THE DCB ARE FILLED IN FROM THE FST. FOR OTHER 00112000
  114. * DEVICES, SUITABLE DFAULTS ARE USED IF NOT SPECIFIED IN THE 00113000
  115. * FILEDEF FOR THE DDNAME. 00114000
  116. * 00115000
  117. * THE OUTPUT DDNAME IS OPENED, AND SIMILAR ACTION IS TAKEN IN 00116000
  118. * THE EXIT ROUTINE. 00117000
  119. * 00118000
  120. * THE DATA IS TRANSFERRED IN A GET-PUT LOOP, WITH TRUNCATION 00119000
  121. * OR PADDING DONE AS NECESSARY. 00120000
  122. * 00121000
  123. * IF THE PDS OPTION IS SPECIFIED AND THE INPUT IS FROM 00122000
  124. * DISK, THE FCBMVPDS BIT IS SET AND AN OS FIND MACRO IS 00123000
  125. * ISSUED BEFORE AN OUTPUT DCB IS OPENED TO POSITION 00124000
  126. * THE INPUT FILE AT THE NEXT MEMBER. THE INPUT MEMBER NAME 00125000
  127. * IS THEN STORED IN THE OUPUT CMSCB FOR USE AS THE OUTPUT 00126000
  128. * FILENAME. AFTER END OF FILE IS REACHED ON A MEMBER, THE 00127000
  129. * MESSAGE DMSMVE225I IS TYPED AND THE 00128000
  130. * OUTPUT DCB IS CLOSED AND CONTROL IS PASSED TO DO A FIND 00129000
  131. * ON THE NEXT MEMBER. WHEN ALL THE MEMBERS HAVE BEEN 00130000
  132. * MOVED TO SEPERATE CMS FILES, MOVEFILE TYPES OUT 00131000
  133. * MESSAGE DMSMVE226I, CLOSES THE INPUT AND OUTPUT DCBS 00132000
  134. * AND RETURNS CONTROL TO THE CALLER. 00133000
  135. * 00134000
  136. * AFTER EOF IS REACHED ON THE INPUT DCB, THE DCB'S ARE CLOSED 00135000
  137. * WITH THE 'LEAVE' OPTION (IN CASE THEY ARE TAPES, TO 00136000
  138. * PREVENT REWINDING). 00137000
  139. * 00138000
  140. *. 00139000
  141. EJECT 00140000
  142. * DMSMVE ROUTINE WRITTEN SEPTEMBER, 1971, BY JOHN XENAKIS TO IMPLEMENT 00141000
  143. * THE CMS 'MOVE' COMMAND. 00142000
  144. * MACRO DEFINITIONS 00143000
  145. SPACE 3 00144000
  146. MACRO 00145000
  147. &NM XENTER &DCB,&FLAG 00146000
  148. * FOR AN EXPLANATION OF WHAT THIS MACRO DOES, SEE THE COMMENTS 00147000
  149. * PRECEDING THE SYMBOL 'SAVETR' IN THE 'MOVESECT' WORK AREA DEFINITION. 00148000
  150. DROP TR 00149000
  151. USING &DCB.DCB,R1 00150000
  152. &NM STM R14,R12,EXSAVE SAVE REGISTERS 00151000
  153. L TR,SAVETR RESTORE TEMP AREA POINTER 00152000
  154. L BR,SAVEBR RESTORE BASE REGISTER 00153000
  155. MVI PBYTE,&FLAG INDICATE EXIT ROUTINE 00154000
  156. USING MOVESECT,TR RESTORE USING'S 00155000
  157. USING IHADCB,R1 00156000
  158. * POINT TO FCB FOR FILE 00157000
  159. L FCBR,DCBDEBAD POINT TO DEB 00158000
  160. SH FCBR,=AL2(IHADEB-FCBINIT) DISPLACE BACK TO FCB 00159000
  161. MEND 00160000
  162. SPACE 3 00161000
  163. MACRO 00162000
  164. &NM DEFAULT &RECFM,&BLOCK 00163000
  165. &NM MVC DEFAREA,=AL2(256*REC&RECFM,&BLOCK) SET DEFAULTS 00164000
  166. MEND 00165000
  167. SPACE 3 00166000
  168. MACRO 00167000
  169. FCBTAB &IO 00168000
  170. &IO.TAB B &IO.DUM 00 DUMMY DEVICE 00169000
  171. B &IO.PTR 04 PRINTER 00170000
  172. B &IO.RDR 08 CARD READER 00171000
  173. B &IO.CON 0C CONSOLE 00172000
  174. B &IO.TAP 10 TAPE 00173000
  175. B &IO.DSK 14 DISK 00174000
  176. B &IO.PCH 18 CARD PUNCH 00175000
  177. B &IO.CRT 1C CRT 00176000
  178. &IO.TABL EQU *-&IO.TAB TABLE LENGTH 00177000
  179. MEND 00178000
  180. EJECT 00179000
  181. MACRO 00180000
  182. DEFINE &LIST 00181000
  183. LCLA &I 00182000
  184. &I SETA 0 00183000
  185. .LOOP ANOP 00184000
  186. &I SETA &I+1 00185000
  187. AIF (&I GT N'&SYSLIST).MEND 00186000
  188. IN&SYSLIST(&I) EQU DCB&SYSLIST(&I)-IHADCB+INDCB 00187000
  189. OUT&SYSLIST(&I) EQU DCB&SYSLIST(&I)-IHADCB+OUTDCB 00188000
  190. AGO .LOOP 00189000
  191. .MEND MEND 00190000
  192. * REGEQU MACRO GIVES STANDARD CMS REGISTER EQUATES. 00191000
  193. REGEQU 00192000
  194. SPACE 5 00193000
  195. XR EQU R3 SCRATCH REGISTER 00194000
  196. PR EQU XR PLIST POINTER 00195000
  197. FCBR EQU R4 POINTER TO CURRENT FCB 00196000
  198. TR EQU R5 TEMP AREA POINTER 00197000
  199. INP EQU R6 INPUT BUFFER POINTER 00198000
  200. INL EQU R7 INPUT BUFFER LENGTH 00199000
  201. OUTP EQU R8 OUTPUT BUFFER POINTER 00200000
  202. OUTL EQU R9 OUTPUT BUFFER LENGTH 00201000
  203. RR EQU R10 INTERNAL RETURN REGISTER 00202000
  204. BR EQU R12 00203000
  205. SPACE 5 00204000
  206. USING IHADCB,R1 POINTER TO DCB IN EXIT ROUTINES 00205000
  207. USING FCBSECT,FCBR POINTER TO FCB 00206000
  208. USING DMSMVE,BR BASE REGISTER 00207000
  209. USING MOVESECT,TR TEMP AREA POINTER 00208000
  210. MOVESECT DSECT 00209000
  211. SPACE 3 00210000
  212. * INPUT DATA CONTROL BLOCK 00211000
  213. INDCB DCB DDNAME=INMOVE,EODAD=ENDREAD,SYNAD=INSYNAD, P0503*00212000
  214. MACRF=GL,DSORG=PS 00213000
  215. EJECT 00214000
  216. * OUTPUT DATA CONTROL BLOCK 00215000
  217. OUTDCB DCB DDNAME=OUTMOVE,SYNAD=OUTSYNAD, P0503*00216000
  218. MACRF=PL,DSORG=PS 00217000
  219. EJECT 00218000
  220. * EQUATES FOR DCB'S 00219000
  221. SPACE 00220000
  222. DCBLEN EQU *-INDCB LENGTH OF BOTH DCB'S COMBINED 00221000
  223. SPACE 00222000
  224. * THE FOLLOWING ARE THE FLAG VALUES CONTAINED IN THE DCBRECFM FIELD 00223000
  225. * OF THE DCB'S. 00224000
  226. RECF EQU X'80' FIXED RECORD FORMAT 00225000
  227. RECV EQU X'40' VARYING RECORD FORMAT 00226000
  228. RECU EQU X'C0' UNDEFINED RECORD FORMAT 00227000
  229. RECUV EQU X'40' U OR V RECORD FORMAT 00228000
  230. RECUF EQU X'80' U OR F RECORD FORMAT 00229000
  231. SPNND EQU X'48' VARIABLE SPANNED FORMAT @VA13188 00229500
  232. SPACE 2 00230000
  233. * POINTERS TO FCB'S FOR INPUT AND OUTPUT FCB'S 00231000
  234. INFCB DS A POINTER TO INPUT FCB P0503 00232000
  235. OUTFCB DS A POINTER TO OUTPUT FCB P0503 00233000
  236. SPACE 5 00234000
  237. * OPEN/CLOSE PARAMETER LIST 00235000
  238. OPLIST OPEN (*-*,INPUT,*-*,OUTPUT),MF=L P0503 00236000
  239. LISTLEN EQU *-OPLIST 00237000
  240. SPACE 5 00238000
  241. DS 0D 00239000
  242. PLIST DS CL64 PLIST FOR STATE, ADTLKP,ETCP0503 00240000
  243. SPACE 00241000
  244. RC DC X'00' RETURN CODE FROM DMSMVE 00242000
  245. SPACE 00243000
  246. CONFLAG DC X'00' NON-ZERO MEANS CONSOLE INPUT 00244000
  247. SPACE 1 00245000
  248. DEFLRECL DC H'0' DEFAULT LRECL @V201122 00246000
  249. SPACE 1 00247000
  250. PDSOPT DC X'00' PDS OPTION FLAG - INDICATES PDS O@V201122 00248000
  251. SPACE 1 00249000
  252. DOSF DS X SAVE OF NUCON'S DOSFLAGS @V305001 00250000
  253. SPACE 1 00251000
  254. SAVEFN DS 8X FILE NAME SAVE AREA FOR PDS MOVES@V201122 00252000
  255. SPACE 1 00253000
  256. MVEMEMBR DS 2F AREA FOR CURRENT MEMBER NAME @V201122 00254000
  257. DS H NECESSARY FOR ITEM NUMBER @VA03059 00255000
  258. EJECT 00256000
  259. * THE FOLLOWING IS A WORK AREA USED BY THE EXIT ROUTINES 00257000
  260. DEFAREA DS 0F DEFAULT ATTRIBUTE AREA 00258000
  261. DEFRECFM DS X DEFAULT RECORD FORMAT 00259000
  262. DS X 00260000
  263. DEFBLKSI DS H DEFAULT BLOCKSIZE 00261000
  264. SPACE 2 00262000
  265. * THE FOLLOWING BYTE CONTAINS A CODE INDICATING WHERE WE ARE IN THE 00263000
  266. * DMSMVE ROUTINE. THE LOGIC OF THE ROUTINE REQUIRES ONLY THAT IT 00264000
  267. * KNOW WHETHER IT IS IN AN EXIT ROUTINE OR NOT, BUT WE KEEP DIFFERENT 00265000
  268. * INDICATORS FOR THE DIFFERENT EXIT ROUTINES FOR DEBUGGING PURPOSES. 00266000
  269. SPACE 00267000
  270. PBYTE DS X 00268000
  271. SPACE 00269000
  272. MAIN EQU 0 NOT IN ANY EXIT ROUTINE 00270000
  273. INEX EQU 4 INDCB DCB EXIT ROUTINE 00271000
  274. OUTEX EQU 8 OUTDCB DCB EXIT ROUTINE 00272000
  275. INSYEX EQU 12 INDCB SYNAD EXIT ROUTINE 00273000
  276. OUTSYEX EQU 16 OUTDCB SYNAD EXIT ROUTINE 00274000
  277. SPACE 5 00275000
  278. * THE FOLLOWING FIELDS ARE USED BY EXIT ROUTINES. WHEN ENTERING AN 00276000
  279. * EXIT ROUTINE, REGISTER 1 WILL POINT TO THE DCB FOR THE EXIT ROUTINE. 00277000
  280. * THEREFORE, BY USING REGISTER 1, WE CAN MAKE THE FOLLOWING FIELDS 00278000
  281. * ADDRESSABLE IN AN EXIT ROUTINE. 00279000
  282. * WE USE 'SAVETR' TO RE-ESTABLISH ADDRESSABILITY TO THE MOVESECT 00280000
  283. * WORK AREA. 00281000
  284. * WE USE 'SAVEBR' TO RE-ESTABLISH THE BASE REGISTER FOR THE DMSMVE 00282000
  285. * ROUTINE. 00283000
  286. * WE USE 'EXSAVE' TO SAVE OUR REGISTERS UPON ENTRY TO THE EXIT ROUTINE. 00284000
  287. SPACE 00285000
  288. SAVETR DS A POINTER TO MOVESECT WORK AREA 00286000
  289. SAVEBR DS A POINTER TO DMSMVE (SAVE BASE REG 00287000
  290. EXSAVE DS 15F REGISTER SAVE AREA 00288000
  291. SPACE 5 00289000
  292. * THE FOLLOWING FIELD IS INCREMENTED EACH TIME A RECORD IS READ FROM 00290000
  293. * THE INPUT DCB. 00291000
  294. RECNUM DS F RECORD NUMBER 00292000
  295. SPACE 2 00293000
  296. * THE FOLLOWING IS THE REGISTER 13 SAVE AREA TO BE USED BY THE PUT 00294000
  297. * AND GET ROUTINES. 00295000
  298. SAVE13 DS F SAVE REG 13 AT ENTRY TO DMSMVE 00296000
  299. GPSAVE DS 18F GET/PUT SAVE AREA 00297000
  300. SPACE 2 00298000
  301. MOVELEN EQU (*-MOVESECT+7)/8 LENGTH OF WORK AREA IN *00299000
  302. DOUBLE WORDS 00300000
  303. DMSMVE CSECT 00301000
  304. SAVE (14,12),,* SAVE REGISTERS 00302000
  305. LR BR,R15 SET BASE REGISTER 00303000
  306. LR PR,R1 POINTER TO PLIST 00304000
  307. SPACE 00305000
  308. * THE FOLLOWING CALL TO STRINIT (STORAGE INITIALIZATION) IS NECESSARY 00306000
  309. * IF 'GETMAIN' IS TO BE CALLED. IT INITIALIZES THE GETMAIN POINTERS 00307000
  310. * SO THAT SUBSEQUENT GETMAINS WILL NOT ATTEMPT TO ALLOCATE THE SPACE 00308000
  311. * OCCUPIED BY THIS ROUTINE. 00309000
  312. SPACE 00310000
  313. STRINIT P0503 00311000
  314. USING NUCON,R0 @V305001 00312000
  315. DMSKEY NUCLEUS @V305001 00313000
  316. IC R2,DOSFLAGS GET NUCON'S DOSFLAGS @V305001 00314000
  317. NI DOSFLAGS,255-DOSSVC TURN OFF DOS SVC HANDLE @V305001 00315000
  318. DMSKEY RESET @V305001 00316000
  319. SPACE 00317000
  320. * WE NOW ALLOCATE OUR WORK AREA FOR THE MOVESECT AREA DEFINED ABOVE. 00318000
  321. GETMAIN R,LV=8*MOVELEN UNCONDITIONAL GETMAIN 00319000
  322. LR TR,R1 POINT TO WORK AREA 00320000
  323. STC R2,DOSF SAVE DOSFLAGS FOR NOW @V305001 00321000
  324. MVI PBYTE,MAIN WE ARE NOT IN AN EXIT ROUTINE 00322000
  325. MVI RC,0 RC FROM DMSMVE IS 0 SO FAR 00323000
  326. MVI CONFLAG,0 NOT CONSOLE INPUT 00324000
  327. MVC INDCB(DCBLEN),DCBS MOVE DUMMY DCB'S INTO WORK AREA 00325000
  328. MVC OPLIST(LISTLEN),LISTS COPY DUMMY OPEN/CLOSE LIST 00326000
  329. ST TR,SAVETR 00327000
  330. ST BR,SAVEBR 00328000
  331. ST R13,SAVE13 SAVE OLD REG 13 00329000
  332. LA R13,GPSAVE POINT TO NEW SAVE AREA 00330000
  333. XC INFCB(8),INFCB CLEAR OUT INPUT FCB ADDR@V201122 00331000
  334. XC DEFLRECL(3),DEFLRECL ZERO PDSOPT AND LRECL @V201122 00332000
  335. LA R15,8 SETUP INCREMENT @V201122 00333000
  336. AR PR,R15 UP PTR @V201122 00334000
  337. CLI 0(PR),X'FF' INPUT DDNAME SPECIFIED @V201122 00335000
  338. BE DDSET NO, 'INMOVE' DEFAULT @V201122 00336000
  339. CLI 0(PR),C'(' OPTION SPECIFIED @V201122 00337000
  340. BE CKOPT YES, CHECK OPTIONS @V201122 00338000
  341. MVC INDDNAM(8),0(PR) SET INPUT DDNAME @V201122 00339000
  342. AR PR,R15 UP PTR @V201122 00340000
  343. CLI 0(PR),X'FF' OUTPUT DDNAME SPECIFIED @V201122 00341000
  344. BE DDSET NO, 'OUTMOVE' DEFAULT @V201122 00342000
  345. CLI 0(PR),C'(' OPTION SPECIFIED @V201122 00343000
  346. BE CKOPT YES, CHECK OPTION @V201122 00344000
  347. MVC OUTDDNAM(8),0(PR) SET OUTPUT DDNAME @V201122 00345000
  348. AR PR,R15 UP PTR @V201122 00346000
  349. CLI 0(PR),X'FF' END OF INPUT LINE @V201122 00347000
  350. BE DDSET YES, CONTINUE @V201122 00348000
  351. CLI 0(PR),C'(' OPTION SPECIFIED? @V201122 00349000
  352. BNE PARMERR NO, THEN INVALID PARM @V201122 00350000
  353. CKOPT AR PR,R15 UP PTR @V201122 00351000
  354. CLC 0(3,PR),=CL3'PDS' PDS OPTION SPECIFIED @V201122 00352000
  355. BNE OPTERR NO, THEN OPTION ERROR @V201122 00353000
  356. AR PR,R15 UP PTR @V201122 00354000
  357. CLI 0(PR),C')' DELIMITER SPECIFIED @V201122 00355000
  358. BE SETPDSSW YES, SET PDS MOVE SW @V201122 00356000
  359. CLI 0(PR),X'FF' DELIMITER? @V201122 00357000
  360. BNE OPTERR NO, THEN INVALID OPTION @V201122 00358000
  361. SETPDSSW OI PDSOPT,FCBMVPDS SET PDS SWITCH @V201122 00359000
  362. DDSET EQU * P0503 00360000
  363. LA PR,INDDNAM CHK FOR INDD EQUAL '*' @VM08900 00361000
  364. CLI INDDNAM,C'*' ASTERISK INVALID DDNAME @VM08900 00362000
  365. BE INVALID ABORT WITH RC=24 @VM08900 00363000
  366. LA PR,OUTDDNAM CHK FOR OUTDD EQUAL '*' @VM08900 00364000
  367. CLI OUTDDNAM,C'*' ASTERISK INVALID DDNAME @VM08900 00365000
  368. BE INVALID ABORT WITH RC=24 @VM08900 00366000
  369. CLC INDDNAM,OUTDDNAM ARE DDNAMES THE SAME? P0503 00367000
  370. BE SAMEERR ERROR IS THEY ARE P0503 00368000
  371. * PROCESS INPUT DDNAME 00369000
  372. IN EQU * P0503 00370000
  373. MVC PLIST(FILEDEFL),FILEDEFP COPY OVER 'FILEDEF' PLIST P0503 00371000
  374. MVC PLIST+8(8),INDDNAM INSERT INPUT DDNAME P0503 00372000
  375. LA R1,PLIST POINT TO PLIST P0503 00373000
  376. SVC 202 CALL FILEDEF P0503 00374000
  377. DC AL4(BADFDEF) TO BADFDEF ON FILEDEF ERRORP0503 00375000
  378. LA R1,INDCB POINT TO INPUT DCB P0503 00376000
  379. LPR FCBR,R0 POINT TO FCB FOR INPUT DD P0503 00377000
  380. LTR R0,R0 DID THE FCB ALREADY EXIST? P0503 00378000
  381. BP *+8 SKIP IF IT DID P0503 00379000
  382. BAL RR,NOFCB TYPE INFORMATION MESSAGE P0503 00380000
  383. ST FCBR,INFCB SAVE POINTER TO INPUT FCB P0503 00381000
  384. SPACE 00382000
  385. * THE FIELD FCBDEV IN THE FCB CONTAINS A CODE INDICATING THE TYPE OF 00383000
  386. * DEVICE WHICH WAS GIVEN IN THE FILEDEF. 00384000
  387. SR R15,R15 00385000
  388. IC R15,FCBDEV GET DEVICE CODE 00386000
  389. CH R15,=AL2(INTABL) GREATER THAN TABLE LENGTH? 00387000
  390. BNL UNSUP YES -- UNSUPPORTED DEVICE 00388000
  391. B *+4(R15) GO HANDLE SPECIFIC DEVICE 00389000
  392. SPACE 00390000
  393. FCBTAB IN 00391000
  394. EJECT 00392000
  395. * HANDLE SPECIFIC DEVICES FOR INPUT. 00393000
  396. SPACE 00394000
  397. * DUMMY DEVICE USED AS INPUT. ERROR. 00395000
  398. INDUM EQU * 00396000
  399. LA XR,=CL8'DUMMY' SYMBOL FOR ERROR MESSAGE 00397000
  400. B ILLIN ILLEGAL INPUT DEVICE 00398000
  401. SPACE 00399000
  402. * PRINTER DEVICE USED AS INPUT 00400000
  403. INPTR EQU * 00401000
  404. LA XR,=CL8'PRINTER' SYMBOL FOR ERROR MESSAGE 00402000
  405. B ILLIN ILLEGAL INPUT DEVICE 00403000
  406. SPACE 00404000
  407. * CARD READER USED AS INPUT. 00405000
  408. * FOR THIS DEVICE, THE DEFAULT RECORD FORMAT IS FIXED, AND THE 00406000
  409. * DEFAULT BLOCK SIZE IS 80. 00407000
  410. INRDR EQU * 00408000
  411. DEFAULT F,80 SET DEFAULTS 00409000
  412. B INSET GO SET DEFAULTS P0503 00410000
  413. SPACE 00411000
  414. * CONSOLE DEVICE INPUT. 00412000
  415. * FOR THIS DEVICE, THE DEFAULT RECORD FORMAT IS UNDEFINED, AND THE 00413000
  416. * DEFAULT BLOCKSIZE IS 130. 00414000
  417. * FOR THIS INPUT DEVICE, WE TYPE OUT AN INFORMATIONAL MESSAGE, 00415000
  418. * CONSOLE INPUT -- TYPE NULL LINE FOR END OF DATA. 00416000
  419. INCON EQU * 00417000
  420. MVI CONFLAG,X'FF' SET CONSOLE INPUT FLAG 00418000
  421. USING NUCON,0 V0742 00419000
  422. DMSEXS OI,BATFLAGS,BATMOVE FOR BATCH 'MOVES' V0742 00420000
  423. DEFAULT U,130 SET DEFAULTS 00421000
  424. B CONIN GO TYPE MESSAGE 00422000
  425. * NOTE THAT CONIN WILL TYPE OUT ERROR MESSAGE AND BRANCH TO DEFSET. 00423000
  426. SPACE 00424000
  427. * TAPE SPECIFIED AS INPUT DEVICE. 00425000
  428. * UNLESS THE GUY TOLD US IN THE FILEDEF, WE HAVE NO IDEA WHAT TO 00426000
  429. * EXPECT ON THE TAPE. FOR THAT REASON, WE USE 'UNDEFINED' AS 00427000
  430. * THE RECORD FORMAT, AND A VERY LARGE VALUE, 3600, AS THE BLOCK 00428000
  431. * SIZE. (WE WOULD REALLY LIKE TO USE 65K AS THE BLOCKSIZE, JUST 00429000
  432. * TO BE SURE, BUT THAT WOULD MEAN ALLOCATING A 65K BUFFER, AND 00430000
  433. * THAT'S REALLY TOO MUCH.) 00431000
  434. * IF THE TAPE TURNS OUT TO HAVE FIXED RECORDS, IT SHOULDN'T MATTER 00432000
  435. * TO THIS ROUTINE, AS LONG AS THE OS SIMULATION ROUTINES TELL 00433000
  436. * ME WHAT THE LENGTH OF EACH RECORD IS. 00434000
  437. INTAP EQU * 00435000
  438. DEFAULT U,3600 SET DEFAULTS 00436000
  439. B INSET GO SET DEFAULTS P0503 00437000
  440. SPACE 00438000
  441. * DISK FILE INPUT DEVICE. 00439000
  442. * IN THIS CASE, THERE CAN'T BE ANY DEFAULTS, SINCE THE INPUT FILE 00440000
  443. * MUST ALREADY EXIST. WE FILL 00441000
  444. * IN THE DCB FROM THE FST (FILE STATUS BLOCK) FOR THE FILE. 00442000
  445. INDSK EQU * 00443000
  446. MVC PLIST(8),=CL8'STATE' FORM A 'STATE' PLIST 00444000
  447. MVC PLIST+8(18),FCBDSNAM COPY FNAME, FTYPE, AND FMODE 00445000
  448. LA R1,PLIST POINT TO PLIST 00446000
  449. SVC X'CA' EXECUTE THE 'STATE' 00447000
  450. DC AL4(*+4) ERROR RETURN ADDRESS 00448000
  451. LA R1,INDCB RESTORE R1 00449000
  452. LTR R15,R15 DID THE FILE EXIST? 00450000
  453. BZ INDSK1 GO SET DCB FIELDS IF SO 00451000
  454. LA XR,FCBDSNAM POINT TO FNAME, FTYPE FMODE 00452000
  455. B NOINPUT TYPE OUT ERROR MESSAGE 00453000
  456. SPACE 00454000
  457. * WE SET THE FIELDS IN THE DCB DEPENDING ON THE VALUES IN THE FST 00455000
  458. * (FILE STATUS BLOCK) FOR THE FILE. 00456000
  459. INDSK1 EQU * 00457000
  460. L XR,PLIST+28 XR -> FST FOR FILE 00458000
  461. USING FSTSECT,XR 00459000
  462. MVI DEFRECFM,RECF SET FIXED DEFAULT RECFM 00460000
  463. CLI FSTFV,C'F' BUT IS FILE REALLY FIXED? 00461000
  464. BE *+8 DON'T OVERRIDE IF SO 00462000
  465. MVI DEFRECFM,RECU SET U FORMAT IF VARYING 00463000
  466. MVC DEFBLKSI,FSTIL+2 COPY BLOCKSIZE FROM FST 00464000
  467. NI FCBIOSW2,255-FCBMMV TRN BIT OFF @VA03059 00465000
  468. NI FCBIOSW2,255-FCBMVPDS TURN OFF PDS OPTION SWIT@V201122 00466000
  469. OI FCBIOSW2,FCBMVFIL THIS IS A MOVEFILE @VA05054 00467000
  470. TM PDSOPT,FCBMVPDS IS PDS OPTION SPECIFIED @V201122 00468000
  471. BNO GETOSFST NO, GET OS FST ADDR @V201122 00469000
  472. OI FCBIOSW2,FCBMVPDS SET MOVE PDS SWITCH @V201122 00470000
  473. XC MVEMEMBR(10),MVEMEMBR CLEAR FIELD @VA03059 00471000
  474. GETOSFST L XR,FCBOSFST GET OS FST ADDRESS @V201122 00472000
  475. LTR XR,XR IS IT FILLED IN @V201122 00473000
  476. BZ INSET NO, USE CMS FST @V201122 00474000
  477. USING OSFST,XR OSFST BASE @V201122 00475000
  478. MVC DEFRECFM(1),OSFSTRFM FILL IN RECFM FROM DSCB@V201122 00476000
  479. MVC DEFBLKSI(2),OSFSTBLK FILL DSCB BLOCKSIZE @V201122 00477000
  480. MVC DEFLRECL(2),OSFSTLRL+2 FILL IN LRECL FROM DSCB@V201122 00478000
  481. B INSET GO SET DEFAULTS P0503 00479000
  482. DROP XR 00480000
  483. SPACE 2 00481000
  484. * INPUT DEVICE IS CARD PUNCH. ERROR. 00482000
  485. INPCH EQU * 00483000
  486. LA XR,=CL8'PUNCH' POINT TO SYMBOL FOR ERROR MESS 00484000
  487. B ILLIN ILLEGAL INPUT DEVICE 00485000
  488. SPACE 00486000
  489. * INPUT DEVICE IS CRT. I DIDN'T EVEN KNOW THAT CMS SUPPORTED CRT'S. 00487000
  490. INCRT EQU * 00488000
  491. LA XR,=CL8'CRT' POINT TO SYMBOL FOR ERROR MESS 00489000
  492. B ILLIN ILLEGAL INPUT DEVICE 00490000
  493. SPACE 3 00491000
  494. INSET EQU * P0503 00492000
  495. BAL RR,DEFSET SET DEFAULTS IN DCB P0503 00493000
  496. OUT EQU * P0503 00494000
  497. MVC PLIST(FILEDEFL),FILEDEFP COPY OVER 'FILEDEF' PLIST P0503 00495000
  498. MVC PLIST+8(8),OUTDDNAM INSERT OUTPUT DDNAME P0503 00496000
  499. LA R1,PLIST POINT TO FILEDEF PLIST P0503 00497000
  500. SVC 202 CALL FILEDEF P0503 00498000
  501. DC AL4(BADFDEF) TO BADFDEF ON FILEDEF ERRORP0503 00499000
  502. LA R1,OUTDCB POINT TO OUTPUT DCB P0503 00500000
  503. LPR FCBR,R0 POINT TO FCB FOR FILE P0503 00501000
  504. LTR R0,R0 DID THE FCB ALREADY EXIST? P0503 00502000
  505. BP *+8 SKIP IF IT DID P0503 00503000
  506. BAL RR,NOFCB TYPE INFORMATION MESSAGE P0503 00504000
  507. MVC SAVEFN(8),FCBDSNAM SAVE OUTPUT FILE NAME @V201122 00505000
  508. ST FCBR,OUTFCB SAVE POINTER TO OUTPUT FCB P0503 00506000
  509. SR R15,R15 00507000
  510. IC R15,FCBDEV GET DEVICE CODE FROM FCB 00508000
  511. CH R15,=AL2(OUTTABL) LONGER THAN DEVICE TABLE? 00509000
  512. BNL UNSUP YES -- UNSUPPORTED DEVICE 00510000
  513. B *+4(R15) 00511000
  514. FCBTAB OUT 00512000
  515. EJECT 00513000
  516. * HANDLE VARIOUS OUTPUT DEVICES. 00514000
  517. SPACE 00515000
  518. * THE FOLLOWING CODE PERFORMS THE CHORE OF SETTING DEFAULTS FOR 00516000
  519. * THE OUTPUT DCB FIELDS FOR RECORD FORMAT, BLOCKSIZE AND 00517000
  520. * LOGICAL RECORD LENGTH. IT SIMPLY COPIES THESE FIELDS FROM 00518000
  521. * THE INPUT DCB, WHICH HAS ALREADY BEEN OPENED. 00519000
  522. OUTCOPY EQU * 00520000
  523. MVC DEFRECFM,INRECFM COPY DEFAULT RECFM 00521000
  524. MVC DEFBLKSI,INBLKSI COPY DEFAULT BLOCKSIZE 00522000
  525. B OUTSET GO SET DEFAULTS P0503 00523000
  526. SPACE 2 00524000
  527. * DUMMY OUTPUT DEVICE. AS DEFAULTS, COPY FIELDS FROM INPUT DCB. 00525000
  528. OUTDUM EQU OUTCOPY 00526000
  529. SPACE 00527000
  530. * OUTPUT DEVICE IS PRINTER. THE DEFAULT RECORD FORMAT IS UNDEFINED, 00528000
  531. * AND THE DEFAULT BLOCKSIZE IS 133. 00529000
  532. OUTPTR EQU * 00530000
  533. DEFAULT U,132 SET DEFAULTS P3002 00531000
  534. B OUTSET GO SET DEFAULTS P0503 00532000
  535. SPACE 00533000
  536. * OUTPUT DEVICE IS CARD READER. ERROR. 00534000
  537. OUTRDR EQU * 00535000
  538. LA XR,=CL8'READER' SYMBOL FOR ERROR MESSAGE 00536000
  539. B ILLOUT ILLEGAL OUTPUT DEVICE 00537000
  540. SPACE 00538000
  541. * OUTPUT DEVICE IS CONSOLE. 00539000
  542. * THE DEFAULT RECORD FORMAT IS UNDEFINED, AND THE DEFAULT BLOCKSIZE 00540000
  543. * IS 130. 00541000
  544. OUTCON EQU * 00542000
  545. DEFAULT U,130 00543000
  546. B OUTSET GO SET DEFAULTS P0503 00544000
  547. SPACE 00545000
  548. * OUTPUT DEVICE IS TAPE. 00546000
  549. OUTTAP EQU * 00547000
  550. L R1,INFCB POINT TO INPUT FCB P0503 00548000
  551. CLI FCBDEV-FCBSECT(R1),FCBTAP INPUT DDNAME FOR TAPE? 00549000
  552. BNE OUTCOPY OK IF NOT 00550000
  553. CLC FCBTAPID(8),FCBTAPID-FCBSECT(R1) SAME AS OUTPUT TAPEID? 00551000
  554. BE SAMEERR ERROR IF SO 00552000
  555. B OUTCOPY OTHERWISE, GO COPY DEFAULTS 00553000
  556. SPACE 00554000
  557. * THE OUTPUT DEVICE IS DISK. 00555000
  558. * BUT BEFORE WE FILL IN THE FIELDS, WE DO A QUICK CHECK TO SEE 00556000
  559. * WHETHER THE GUY IS ALLOWED TO WRITE ON THE DISK THAT HE'S 00557000
  560. * SPECIFIED. 00558000
  561. OUTDSK EQU * 00559000
  562. L R1,INFCB POINT TO INPUT FCB P0503 00560000
  563. CLI FCBDEV-FCBSECT(R1),FCBDSK WAS INPUT DD FOR A DISK FILE? 00561000
  564. BNE OUTDSK0 NOTHING TO CHECK IF NOT 00562000
  565. CLC FCBDSNAM(18),FCBDSNAM-FCBSECT(R1) SAME DSNAME AS OUTPUT? 00563000
  566. BE SAMEERR ERROR IF SO 00564000
  567. SPACE 00565000
  568. OUTDSK0 EQU * 00566000
  569. GETADT FCBOP CALL ADTLKP 00567000
  570. USING ADTSECT,R1 ACTIVE DISK TABLE PTR IN R1 00568000
  571. LA XR,=CL8'DOS DISK' INSERT FOR MESSAGE @VA14621 00568100
  572. TM ADTFLG2,ADTFDOS DOS DISK ? @VA14621 00568200
  573. BO ILLOUT YES, ERROR 075E @VA14621 00568300
  574. LA XR,=CL8'OS DISK' INSET FOR MESSAGE @VA14621 00568400
  575. TM ADTFLG2,ADTFROS OS DISK ? @VA14621 00568500
  576. BO ILLOUT YES, ERROR 075E @VA14621 00568600
  577. TM ADTFLG1,ADTFRO+ADTFRW IS DISK ACCESSED? @VA05240 00569000
  578. BZ ACERR NO -- ERROR @VA05240 00570000
  579. TM ADTFLG1,ADTFRW IS IT READ/WRITE DISK? 00571000
  580. LA R1,OUTDCB RESTORE R1 00572000
  581. USING IHADCB,R1 00573000
  582. BNO ROERR NO -- ERROR -- IT'S READONLY 00574000
  583. LTR R15,R15 WAS THERE AN ERROR IN ADTLKP? 00575000
  584. BNZ ROERR GO IF YES 00576000
  585. B OUTCOPY GO COPY 00577000
  586. SPACE 2 00578000
  587. * OUTPUT DEVICE IS CARD PUNCH. THE DEFAULT RECORD FORMAT IS FIXED, 00579000
  588. * AND THE DEFAULT BLOCKSIZE IS 80. 00580000
  589. OUTPCH EQU * 00581000
  590. DEFAULT F,80 SET DEFAULTS 00582000
  591. B OUTSET GO SET DEFAULTS P0503 00583000
  592. SPACE 00584000
  593. * THE OUTPUT DEVICE IS CRT. 00585000
  594. OUTCRT EQU * 00586000
  595. LA XR,=CL8'CRT' SYMBOL FOR ERROR MESSAGE 00587000
  596. B ILLOUT ILLEGAL OUTPUT DEVICE 00588000
  597. OUTSET EQU * P0503 00589000
  598. LA R1,OUTDCB RESTORE DCB POINTER P0503 00590000
  599. BAL RR,DEFSET GO SET DEFAULTS P0503 00591000
  600. B OPEN GO OPEN THE DCB'S P0503 00592000
  601. * THIS ROUTINE CHECKS TO SEE IF THE USER SPECIFIED RECFM, BLKSI, 00593000
  602. * AND LRECL IN HIS FILEDEF. IF HE DIDN'T, THEN THIS ROUTINE FILLS 00594000
  603. * IN THE DEFAULT VALUES. (THE DEFAULT LRECL IS BLKSI.) 00595000
  604. * THIS CODE ALSO CHECKS FOR AN ERRONEOUS BLOCKSIZE WITH V-TYPE FILES -- 00596000
  605. * THE BLOCKSIZE MUST BE AT LEAST 8 TO ALLOW SPACE FOR THE BLOCK 00597000
  606. * DESCRIPTOR WORK AND THE RECORD DESCRIPTOR WORD. 00598000
  607. DEFSET EQU * 00599000
  608. * COPY FIELDS FROM FCB TO DCB 00600000
  609. MVC DCBRECFM,FCBRECFM COPY RECORD FORMAT P0503 00601000
  610. MVC DCBBLKSI,FCBBLKSZ COPY BLOCKSIZE P0503 00602000
  611. MVC DCBLRECL,FCBLRECL COPY LOGICAL REC LENGTH P0503 00603000
  612. CLI DCBRECFM,0 WAS RECFM SPECIFIED? 00604000
  613. BNE *+10 SKIP IF IT WAS 00605000
  614. MVC DCBRECFM,DEFRECFM COPY DEFAULT RECORD FORMAT 00606000
  615. CLC DCBBLKSI,=H'0' WAS BLOCKSIZE SPECIFIED? 00607000
  616. BNE *+10 SKIP IF IT WAS 00608000
  617. MVC DCBBLKSI,DEFBLKSI COPY DEFAULT VALUE IF NOT 00609000
  618. CLC DCBLRECL,=H'0' WAS LRECL SPECIFIED? 00610000
  619. BNE *+10 SKIP IF IT WAS 00611000
  620. MVC DCBLRECL,DEFLRECL SET DEFAULT LRECL @V201122 00612000
  621. TM DCBRECFM,RECUF RECFM= VARIABLE @V201122 00613000
  622. BCR 1,RR NO, RETURN TO CALLER @V201122 00614000
  623. SPACE 1 00615000
  624. * COME HERE FOR RECFM=V SPECIFIED IN FILEDEF 00616000
  625. DEFSETV EQU * P0503 00617000
  626. SR R0,R0 P0503 00618000
  627. ICM R0,B'0011',DCBBLKSI GET DCB BLOCKSIZE P0503 00619000
  628. CH R0,H8 IS IT SMALLER THAN 9 ? @VA07210 00620000
  629. BNH ERVB YES...,ERROR @VA07210 00621000
  630. SH R0,=H'4' COMPUTE DEFAULT LRECL P0503 00622000
  631. * NOTE, FOR FOLLOWING INSTRUCTION, THAT FIRST TWO BYTES OF 00623000
  632. * REG 0 ARE ZERO. 00624000
  633. CLM R0,B'1100',DCBLRECL WAS LRECL SPECIFIED? P0503 00625000
  634. BCR 7,RR (BNE 0(RR)) RETURN IF IT WAS P0503 00626000
  635. STH R0,DCBLRECL STORE DEFAULT LRECL IF NOT P0503 00627000
  636. BR RR RETURN TO CALLER P0503 00628000
  637. * OPEN THE INPUT AND OUTPUT DCB'S 00629000
  638. OPEN EQU * P0503 00630000
  639. OPEN (INDCB,INPUT),MF=(E,OPLIST+4) OPEN INPUT DCB @V201122 00631000
  640. LA R1,INDCB POINT TO INPUT DCB P0503 00632000
  641. TM DCBOFLGS,X'10' WAS OPEN SUCCESSFUL? P0503 00633000
  642. BZ NOOPEN ERROR IF NOT P0503 00634000
  643. FNDMEMBR L FCBR,INFCB GET FCB ADDRESS @V201122 00635000
  644. TM FCBIOSW2,FCBMVPDS IS PDS MOVE OPTION ON @V201122 00636000
  645. BNO OPENOUT NO, OPEN OUTPUT DCB @V201122 00637000
  646. OI FCBIOSW2,FCBMMV ST SWITCH FOR FIND @VM03203 00638000
  647. FIND INDCB,MVEMEMBR,D GET NEXT MEMBER NAME @V201122 00639000
  648. SR R0,R0 R0= 0 FOR POSSIBLE SYNAD@V201122 00640000
  649. LA R1,INDCB R1= A(DCB) POSSIBLE SYNA@V201122 00641000
  650. LA R14,CLOSE R14= RETURN POSSIBLE SYN@V201122 00642000
  651. CH R15,=H'4' NOT FOUND ERROR @V201122 00643000
  652. BE ENDMVPDS YES, TYPE END PDS MOVE M@V201122 00644000
  653. LTR R15,R15 FIND SUCCESSFUL ? @V201122 00645000
  654. BNZ INSYNAD NO, PRINT ERROR MSG @V201122 00646000
  655. MVC MVEMEMBR+8(2),FCBITEM GET ITEM NUMBER @VA03059 00647000
  656. LM R14,R15,MVEMEMBR GET NEW MEMBER NAME @V201122 00648000
  657. L FCBR,OUTFCB GET ADDRESS OF OUTPUT FC@V201122 00649000
  658. STM R14,R15,FCBDSNAM USE MEMBER NAME AS FILEN@V201122 00650000
  659. LA R15,8 SET LOOP LIMIT @V201122 00651000
  660. C0LOOP LA R14,FCBDSNAM-1 GET MEMBER NAME ADDRESS @V201122 00652000
  661. AR R14,R15 GET ADDR OF BYTE FOR CHE@V201122 00653000
  662. CLI 0(R14),X'C0' IS THIS A X'C0' BYTE @V201122 00654000
  663. BNE CKNXT NO, CHECK NEXT BYTE @V201122 00655000
  664. MVI 0(R14),C' ' YES, REPLACE IT WITH BLA@V201122 00656000
  665. CKNXT BCT R15,C0LOOP CHECK NEXT BYTE FOR X'C0@V201122 00657000
  666. OPENOUT OPEN (OUTDCB,OUTPUT),MF=(E,OPLIST+4) OPEN OUTPUT DCB @V201122 00658000
  667. LA R1,OUTDCB POINT TO OUTPUT DCB P0503 00659000
  668. TM DCBOFLGS,X'10' WAS OPEN SUCCESSFUL? P0503 00660000
  669. BZ NOOPEN ERROR IF NOT P0503 00661000
  670. * CONTROL COMES TO THIS POINT AFTER BOTH DCB'S HAVE BEEN OPENED, AND 00662000
  671. * IT IS TIME TO ENTER THE MAIN COPYING LOOP. 00663000
  672. START EQU * 00664000
  673. XC RECNUM,RECNUM ZERO RECORDS READ SO FAR 00665000
  674. SPACE 00666000
  675. * BOTH DCB'S HAVE BEEN OPENED FOR 'LOCATE' MODE. 00667000
  676. * FOR INDCB, THIS WAS SPECIFIED BY 'MACRF=GL', OR, MACRO FORM = 00668000
  677. * GET LOCATE. THIS MEANS THAT A GET MACRO WILL RETURN IN REGISTER 00669000
  678. * R1 THE ADDRESS OF AN INPUT BUFFER ALLOCATED BY THE OS SIMULATION 00670000
  679. * ROUTINES, WHICH CONTAINS THE NEXT RECORD OF INPUT. 00671000
  680. * FOR OUTDCB, LOCATE MODE IS INDICATED BY 'MACRF=PL', OR MACRO 00672000
  681. * FORMAT = PUT LOCATE. THIS MEANS THAT EACH PUT MACRO ALLOCATES THE 00673000
  682. * THE NEXT (OR FIRST) OUTPUT BUFFER. THE FIRST PUT MACRO ALLOCATES 00674000
  683. * THE FIRST OUTPUT BUFFER. THIS ROUTINE THEN FILLS IN THAT BUFFER. 00675000
  684. * THE NEXT PUT MACRO WRITES OUT THE CONTENTS OF THE LAST BUFFER 00676000
  685. * AND ALLOCATES A NEW BUFFER (PROBABLY IN THE SAME LOCATION AS THE 00677000
  686. * LAST ONE) WHICH THIS ROUTINE CAN THEN FILL IN. THE CLOSE MACRO 00678000
  687. * WILL CAUSE THE LAST BUFFER TO BE WRITTEN OUT ON THE FILE. 00679000
  688. SPACE 00680000
  689. * BY USING 'LOCATE' MODE, DATA MOVEMENT SHOULD BE REDUCED TO A 00681000
  690. * MINIMUM. FURTHERMORE, ALL PADDING AND TRUNCATION CAN BE TAKEND CARE 00682000
  691. * OF AS DESIRED BY THIS ROUTINE. 00683000
  692. LOOP EQU * 00684000
  693. GET INDCB GET ADDRESS OF INPUT BUFFER 00685000
  694. LR INP,R1 INP -> INPUT BUFFER 00686000
  695. CLI RC,0 WAS THERE AN I/O ERROR? 00687000
  696. BNE CLOSE ALL THROUGH IF SO 00688000
  697. SPACE 00689000
  698. * THE LENGTH OF THE INPUT RECORD IS STORED IN THE LRECL FIELD 00690000
  699. * OF INDCB. WE MUST NOW COMPUTE THE LENGTH OF THE OUTPUT RECORD. 00691000
  700. * IF THE OUTPUT DCB IS FIXED RECORD FORMAT, THEN THAT LRECL IS 00692000
  701. * THE SIZE OF THE OUTPUT RECORD. IF NOT, THEN IT'S THE SIZE OF 00693000
  702. * THE INPUT RECORD, UP TO A MAXIMUM OF THE BLOCKSIZE OF THE 00694000
  703. * OUTPUT DCB. 00695000
  704. SPACE 00696000
  705. * THERE IS SOME ADDITIONAL COMPLICATIONS FOR V-TYPE FILES. WHEN A GET 00697000
  706. * IS EXECUTED FOR THESE FILES, THE FIRST TWO BYTES OF THE DATA CONTAIN 00698000
  707. * THE DATA LENGTH, AND THE NEXT TWO BYTES ARE RESERVED. 00699000
  708. * THESE FOUR BYTES SHOULD NOT BE CONSIDERED PART 00700000
  709. * OF THE DATA WHEN COPYING. 00701000
  710. * SIMILARLY, WHEN CREATING A V-TYPE OUTPUT RECORD, THE TWO BYTE RECORD 00702000
  711. * LENGTH MUST BE PLACED IN THE FIRST FOUR BYTES OF THE DATA AREA, 00703000
  712. * AND THE NEXT TWO ZEROED. 00704000
  713. SPACE 00705000
  714. * FINALLY NOTE ALSO THAT WHENEVER A DCBBLKSI OR DCBRECFM FIELD IS 00706000
  715. * LOADED (VIA AN LH) INTO A REGISTER, THE HIGH ORDER BYTES MUST 00707000
  716. * BE ZEROED, SINCE THESE FIELDS ARE REALLY LOGICAL HALFWORDS. 00708000
  717. SPACE 00709000
  718. LH INL,INLRECL GET INDCB LRECL 00710000
  719. N INL,=A(X'FFFF') ZERO HIGH BYTES 00711000
  720. TM INRECFM,RECUF IS IT U OR F? 00712000
  721. BO *+12 SKIP IF YES 00713000
  722. LA INP,4(,INP) V -> DATA AREA 4 BYTES BEYOND 00714000
  723. SH INL,=H'4' V -> DATA AREA 4 BYTES SHORTER 00715000
  724. TM INRECFM,SPNND SPANNED RECORDS @VA13188 00715300
  725. BO RCFMERR NOT SUPPORTED @VA13188 00715600
  726. SPACE 00716000
  727. TM OUTRECFM,RECUV U OR V FILE? 00717000
  728. BO OUTUV GO HANDLE IF SO 00718000
  729. SPACE 00719000
  730. * OTHERWISE, THE LENGTH OF THE OUTPUT RECORD IS OUTLRECL. 00720000
  731. LH OUTL,OUTLRECL GET LRECL 00721000
  732. N OUTL,=A(X'FFFF') ZERO HIGH BYTES 00722000
  733. B OUTE GO FINISH UP 00723000
  734. SPACE 00724000
  735. * FOR U FILES, THE LENGTH OF THE OUTPUT BUFFER MUST NOT 00725000
  736. * EXCEED THE FILE BLOCKSIZE. 00726000
  737. * FOR V FILES THE MAX IS BLOCKSIZE-4. 00727000
  738. OUTUV EQU * 00728000
  739. LR OUTL,INL START WITH THE INPUT DATA LEN 00729000
  740. TM OUTRECFM,RECU U TYPE OUTPUT? 00730000
  741. BO NOTVAR SKIP IF SO @VA13188 00731000
  742. LA OUTL,4(,OUTL) V -> BUFFER LENGTH IS 4 LONGER 00732000
  743. NOTVAR EQU * @VA13188 00732200
  744. TM OUTRECFM,SPNND SPANNED RECORDS @VA13188 00732400
  745. BO RCFMERR NOT SUPPORTED @VA13188 00732600
  746. LH XR,OUTBLKSI GET OUTPUT DCB BLOCKSIZE 00733000
  747. N XR,=A(X'FFFF') CLEAR HIGH BYTES 00734000
  748. TM OUTRECFM,RECU U TYPE OUTPUT? 00735000
  749. BO *+8 SKIP IF SO 00736000
  750. SH XR,=H'4' V -> USE BLOCKSIZE-4 00737000
  751. CR XR,OUTL DOES BUFFER LENGTH EXCEED BLKSIZ 00738000
  752. BH *+6 SKIP IF NO 00739000
  753. LR OUTL,XR OTHERWISE, USE BLOCKSIZE 00740000
  754. SPACE 00741000
  755. OUTE EQU * 00742000
  756. STH OUTL,OUTLRECL STORE BUFFER LENGTH IN OUTDCB 00743000
  757. SPACE 00744000
  758. * ALLOCATE AN OUTPUT BUFFER, WRITING OUT THE PREVIOUS ONE, IF ANY. 00745000
  759. PUT OUTDCB 00746000
  760. LR OUTP,R1 POINT TO BUFFER 00747000
  761. CLI RC,0 WAS THERE AN I/O ERROR? 00748000
  762. BNE CLOSE ALL THROUGH IF SO 00749000
  763. SPACE 00750000
  764. * INCREASE RECORD BY 1. 00751000
  765. L R1,RECNUM 00752000
  766. LA R1,1(,R1) 00753000
  767. ST R1,RECNUM 00754000
  768. SPACE 00755000
  769. * FOR V-TYPE FILES, WE MUST STORE THE TWO BYTE BUFFER LENGTH 00756000
  770. * FIELD IN THE FIRST TWO BYTES OF THE BUFFER. ALSO, WE MUST 00757000
  771. * UPDATE THE BUFFER ADDRESS AND LENGTH REGISTERS IN PREPARATION FOR 00758000
  772. * THE DATA MOVE. 00759000
  773. TM OUTRECFM,RECUF U OR F RECORD FORMAT? 00760000
  774. BO NOTV GO IF SO -- NOT V 00761000
  775. MVC 0(2,OUTP),OUTLRECL COPY BUFFER LEN INTO BUFFER 00762000
  776. MVC 2(2,OUTP),=H'0' SET NEXT TWO BYTES TO ZERO 00763000
  777. SH OUTL,=H'4' DATA LENGTH IS 4 LESS 00764000
  778. LA OUTP,4(,OUTP) DATA TARGET IS 4 BEYOND 00765000
  779. NOTV EQU * 00766000
  780. SPACE 00767000
  781. ICM INL,B'1000',=C' ' USE BLANK AS PAD CHARACTER 00768000
  782. MVCL OUTP,INP PERFORM THE MOVE 00769000
  783. B LOOP GO FOR NEXT RECORD 00770000
  784. * INDCB SYNAD EXIT ROUTINE. 00771000
  785. INSYNAD EQU * 00772000
  786. XENTER IN,INSYEX 00773000
  787. NI FCBIOSW2,255-FCBMVPDS TURN OFF PDS MOVE OPTIO@V201122 00774000
  788. BAL RR,SYNADAF CALL SYNADAF 00775000
  789. B INSYNER TYPE ERROR MESSAGE 00776000
  790. SPACE 3 00777000
  791. * OUTDCB SYNAD EXIT ROUTINE 00778000
  792. OUTSYNAD EQU * 00779000
  793. XENTER OUT,OUTSYEX 00780000
  794. BAL RR,SYNADAF CALL SYNADAF 00781000
  795. B OUTSYNER TYPE ERROR MESSAGE 00782000
  796. SPACE 2 00783000
  797. * THE SYNADAF MACRO CALL IS USED TO OBTAIN AN ERROR MESSAGE WHICH 00784000
  798. * WILL INDICATE THE REASON FOR THE I/O ERROR. 00785000
  799. SYNADAF EQU * 00786000
  800. SYNADAF ACSMETH=QSAM 00787000
  801. SPACE 00788000
  802. * FOR CMS, THE ERROR MESSAGE IS 29 BYTES LONG, STARTING AT THE 00789000
  803. * 54'TH BYTE OFF OF REGISTER R1. 00790000
  804. LR XR,R1 COPY POINTER INTO XR 00791000
  805. BR RR RETURN TO CALLER 00792000
  806. SPACE 5 00793000
  807. * RELEASE SPACE ALLOCATED BY SYNADEF MACRO. 00794000
  808. SYNADRLS EQU * 00795000
  809. SYNADRLS 00796000
  810. B CLOSE 00797000
  811. * CONTROL COMES HERE WHEN AN END-OF-FILE CONDITION IS DETECTED ON 00798000
  812. * THE INPUT FILE. 00799000
  813. ENDREAD EQU * 00800000
  814. L FCBR,INFCB GET INPUT FCB ADDR @V201122 00801000
  815. TM FCBIOSW2,FCBMVPDS IS MOVE PDS SW ON @V201122 00802000
  816. BNO CLOSE NO, CLOSE FILE @V201122 00803000
  817. LA R1,INDCB GET ADDR OF INPUT DCB @V201122 00804000
  818. MVC DCBRECAD+1(3),DCBEOBAD+1 SET NEXT BUFFER ADDR EO@V201122 00805000
  819. LA PR,MVEMEMBR GET MEMBER NAME ADDRESS @V201122 00806000
  820. BAL RR,MEMMOVOK TYPE MEMBER MOVED OK MSG. @V201122 00807000
  821. L FCBR,OUTFCB GET OUTPUT FCB ADDRESS @V201122 00808000
  822. L XR,FCBINIT GET FCBOPCB SWITCH @V201122 00809000
  823. NI FCBINIT,255-FCBOPCB DON'T LET CLOSE FREE FCB @V201122 00810000
  824. CLOSE (OUTDCB,LEAVE),MF=(E,OPLIST+4) CLOSE OUTPUT DCB @V201122 00811000
  825. ST XR,FCBINIT RESTORE FCBOPCB SWITCH @V201122 00812000
  826. B FNDMEMBR OPEN NEW OUTPUT FILE @V201122 00813000
  827. * CONTROL COMES HERE EITHER NORMALLY, AS A RESULT OF AN END-OF-FILE, 00814000
  828. * OR ABNORMALLY, AFTER AN ERROR MESSAGE. 00815000
  829. * WE MUST FIRST CHECK TO SEE IF WE ARE IN AN EXIT ROUTINE, SINCE 00816000
  830. * WE WILL HAVE TO RETURN FROM THAT BEFORE WE CAN CLEAN UP AND RETURN. 00817000
  831. CLOSE EQU * 00818000
  832. CLI PBYTE,MAIN ARE WE IN AN EXIT ROUTINE? 00819000
  833. BNE EXEX YES -- EXIT FROM EXIT ROUTINE 00820000
  834. L FCBR,INFCB GET ADDRESS OF INPUT FCB@V201122 00821000
  835. LTR FCBR,FCBR IS IT ZERO? @VA07463 00822200
  836. BZ CLOSE1 BRANCH IF YES @VA07463 00822300
  837. SR RR,RR CLEAR A REGISTER @VA07463 00822400
  838. CLI RC,INPTERR I/O ERROR ON CLOSE? @VA07463 00822500
  839. BNL CLOSEO BRANCH IF YES @VA07463 00822600
  840. LA R1,INDCB POINT TO INPUT DCB @VA07463 00822700
  841. TM DCBOFLGS,DCBOPEN IS DCB OPEN? @VA07463 00822800
  842. BZ CLOSEO BRANCH IF NOT @VA07463 00822900
  843. CLOSE (INDCB,LEAVE),MF=(E,OPLIST+4) CLOSE INPUT @VA07463 00823000
  844. ST RR,INFCB CLEAR FCB ADDRESS @VA07463 00823100
  845. CLOSEO EQU * @VA07463 00823200
  846. NI FCBIOSW2,255-FCBMVPDS TURN OFF MOVE PDS SWITCH@V201122 00824000
  847. L FCBR,OUTFCB GET ADDRESS OF OUTPUT FC@V201122 00825000
  848. LTR FCBR,FCBR IS FCB ADDR ZERO @V201122 00826000
  849. BZ CLOSEO1 BRANCH IF YES, BYPASS CLOSE @VA07463 00827100
  850. MVC FCBDSNAM(8),SAVEFN RESTORE FOR PDS MOVE @V201122 00828000
  851. CLI RC,OUTPTERR I/O ERROR ON OUTPUT? @VA07463 00829200
  852. BE CLOSEO1 BRANCH IF YES @VA07463 00829250
  853. LA R1,OUTDCB POINT TO OUTPUT DCB @VA07463 00829300
  854. TM DCBOFLGS,DCBOPEN IS IT OPEN? @VA07463 00829350
  855. BZ CLOSEO1 BRANCH IF NOT @VA07463 00829400
  856. CLOSE (OUTDCB,LEAVE),MF=(E,OPLIST+4) CLOSE OUTPUT FILE@VA07463 00829450
  857. ST RR,OUTFCB CLEAR FCB ADDRESS @VA07463 00829500
  858. CLOSEO1 EQU * @VA07463 00829550
  859. L FCBR,INFCB POINT TO INPUT FCB @VA07463 00829600
  860. LTR FCBR,FCBR IS THERE ONE? @VA07463 00829650
  861. BZ CLOSEO2 BRANCH IF NOT @VA07463 00829700
  862. TM FCBINIT,FCBOPCB 'TEMPORARY' BIT ON? @VA07463 00829750
  863. BZ CLOSEO2 BRANCH IF NOT @VA07463 00829800
  864. MVC PLIST(FILEDFCL),FILEDEFC COPY 'CLEAR' PLIST @VA07463 00829850
  865. MVC PLIST+8(8),INDDNAM INSERT INPUT DDNAME @VA07463 00829900
  866. LA R1,PLIST POINT TO PLIST @VA07463 00829950
  867. SVC 202 CALL FILEDEF @VA07463 00830000
  868. DC AL4(*+4) @VA07463 00830050
  869. CLOSEO2 EQU * @VA07463 00830100
  870. L FCBR,OUTFCB GET POINTER TO OUTPUT FCB @VA07463 00830150
  871. LTR FCBR,FCBR IS THERE ONE? @VA07463 00830200
  872. BZ CLOSE1 BRANCH IF NOT @VA07463 00830250
  873. TM FCBINIT,FCBOPCB 'TEMPORARY' FCB? @VA07463 00830300
  874. BZ CLOSE1 BRANCH IF NOT @VA07463 00830350
  875. MVC PLIST(FILEDFCL),FILEDEFC MOVE 'CLEAR' FILEDEF @VA07463 00830400
  876. MVC PLIST+8(8),OUTDDNAM INSET OUTPUT DDNAME @VA07463 00830450
  877. LA R1,PLIST POINT TO PLIST @VA07463 00830500
  878. SVC 202 CALL FILEDEF @VA07463 00830550
  879. DC AL4(*+4) @VA07463 00830600
  880. SPACE 1 00832000
  881. CLOSE1 EQU * P0503 00833000
  882. CLI RC,IOERR WAS RETURN CODE I/O ERROR? @VA07463 00833200
  883. BNH CLOSE2 BRANCH IF NOT @VA07463 00833400
  884. MVI RC,IOERR SET TO I/O ERROR @VA07463 00833600
  885. CLOSE2 EQU * @VA07463 00833800
  886. L R13,SAVE13 RESTORE OLD R13 00834000
  887. LA R0,8*MOVELEN LENGTH OF WORKSPACE 00835000
  888. IC R2,DOSF GET SAVED DOSFLAGS @V305001 00836000
  889. LR R1,TR ADDRESS OF WORKSPACE 00837000
  890. FREEMAIN R,LV=(0),A=(1) FREE WORKSPACE 00838000
  891. DMSKEY NUCLEUS @V305001 00839000
  892. NI BATFLAGS,255-BATMOVE FOR BATCH 'MOVES' @V305001 00840000
  893. STC R2,DOSFLAGS RESET NUCON'S DOSFLAGS @V305001 00841000
  894. DMSKEY RESET @V305001 00842000
  895. SR R15,R15 00843000
  896. IC R15,RC GET RETURN CODE FOR ROUTINE 00844000
  897. RETURN (14,12),RC=(15) 00845000
  898. * EXIT FROM AN EXIT ROUTINE (DCB EXIT ROUTINE, OR SYNAD EXIT ROUTINE) 00846000
  899. EXEX EQU * 00847000
  900. MVI PBYTE,MAIN INDICATE 'OUT OF EXIT ROUTINE' 00848000
  901. LM R14,R12,EXSAVE RESTORE REGISTERS 00849000
  902. BR R14 RETURN FROM EXIT ROUTINE 00850000
  903. SPACE 2 00851000
  904. * ERROR IN OPEN MACRO (X'10' IN DCBOFLGS WAS NOT TURNED ON 00852000
  905. * BY OPEN) 00853000
  906. NOOPEN EQU * 00854000
  907. MVI RC,28 SET RETURN CODE = 28 00855000
  908. B CLOSE GO FINISH UP 00856000
  909. * CONSOLE INPUT INFORMATIONAL MESSAGE 00857000
  910. CONIN EQU * 00858000
  911. DMSERR NUM=706,LET=I, *00859000
  912. TEXT='TERM INPUT -- TYPE NULL LINE FOR END OF DATA' 00860000
  913. LA R1,INDCB RESTORE R1 00861000
  914. B INSET P0503 00862000
  915. SPACE 2 00863000
  916. BADFDEF EQU * @VA00824 00864000
  917. LA XR,8(,R1) GET DDNAME ADDR. @VA00824 00865000
  918. INVALID DMSERR NUM=86,LET=E,TEXT='INVALID DDNAME ''........''', X00866000
  919. SUB=(CHARA,(XR)) @VA00824 00867000
  920. MVI RC,24 SET RETURN CODE @VA00824 00868000
  921. B CLOSE @VA00824 00869000
  922. SPACE 3 00870000
  923. * FILEDEF HAD NOT PREVIOUSLY BEEN MADE. 00871000
  924. NOFCB EQU * P0503 00872000
  925. LR XR,R1 SAVE DCB POINTER P0503 00873000
  926. LA R0,DCBDDNAM POINT TO DDNAME P0503 00874000
  927. DMSERR NUM=708,LET=I,MF=I,RENT=NO, P0503*00875000
  928. SUB=(CHARA,(R0),CHARA,(R0)), P0503*00876000
  929. TEXT=('DISK FILE ''FILE ........ A1'' ', P0503*00877000
  930. 'ASSUMED FOR DDNAME ''........''') P0503 00878000
  931. LR R1,XR RESTORE DCB POINTER P0503 00879000
  932. SPACE 1 00880000
  933. * BY SETTING THE FCBOPCB BIT, WE WILL FORCE 'CLOSE' TO CLEAR THE 00881000
  934. * THE FILEDEF. WE WANT THIS TO HAPPEN, SINCE WE CREATED THE FCB 00882000
  935. * IN THE FIRST PLACE. 00883000
  936. OI FCBINIT,FCBOPCB SET 'MADE BY OPEN' BIT P0503 00884000
  937. BR RR RETURN TO CALLER P0503 00885000
  938. SPACE 3 00886000
  939. * UNSUPPORTED DEVICE 00887000
  940. * DEVICE CODE IN FCB IS GREATER THAN THIS ROUTINE EXPECTS. 00888000
  941. UNSUP EQU * 00889000
  942. LA XR,FCBDD 00890000
  943. DMSERR NUM=127,LET=S,SUB=(CHARA,(XR)), *00891000
  944. TEXT='UNSUPPORTED DEVICE FOR FILE ''........''' 00892000
  945. MVI RC,100 00893000
  946. B CLOSEO1 GO FINISH UP @VA07463 00894100
  947. SPACE 3 00895000
  948. * A DISK FILE WAS SPECIFIED AS INPUT, BUT THE FILE DOES NOT EXIST. 00896000
  949. NOINPUT EQU * 00897000
  950. DMSERR NUM=2,LET=E,SUB=(CHAR8A,(XR)), *00898000
  951. TEXT='FILE ''....................'' NOT FOUND' 00899000
  952. MVI RC,24 00900000
  953. B CLOSE 00901000
  954. SPACE 3 00902000
  955. * AN INVALID OPTION WAS SPECIFIED 00903000
  956. OPTERR DMSERR NUM=3,LET=E,SUB=(CHARA,(PR)), X00904000
  957. TEXT='INVALID OPTION ''........''' @V201122 00905000
  958. MVI RC,24 SET RETURN CODE @V201122 00906000
  959. B CLOSE CLOSE FILES @V201122 00907000
  960. SPACE 3 00908000
  961. PARMERR DMSERR NUM=70,LET=E,SUB=(CHARA,(PR)), X00909000
  962. TEXT='INVALID PARAMETER ''........''' @V201122 00910000
  963. MVI RC,24 SET RETURN CODE @V201122 00911000
  964. B CLOSE CLOSE FILES @V201122 00912000
  965. SPACE 3 00913000
  966. * MEMBER MOVED SUCCESSFULLY 00914000
  967. MEMMOVOK DMSERR NUM=225,LET=I,SUB=(CHARA,(PR)), X00915000
  968. TEXT='PDS MEMBER ''........'' MOVED' @V201122 00916000
  969. BR RR RETURN TO CALLER @V201122 00917000
  970. SPACE 3 00918000
  971. * END OF PDS MOVE 00919000
  972. ENDMVPDS DMSERR NUM=226,LET=I,TEXT='END OF PDS MOVE' @V201122 00920000
  973. B CLOSE RETURN TO CALLER @V201122 00921000
  974. SPACE 3 00922000
  975. * ILLEGAL INPUT DEVICE (DUMMY, PRINTER, PUNCH, CRT) 00923000
  976. ILLIN EQU * 00924000
  977. LA R14,=CL6'INPUT' 00925000
  978. B ILL 00926000
  979. SPACE 00927000
  980. * ILLEGAL OUTPUT DEVICE (READER, CRT) 00928000
  981. ILLOUT EQU * 00929000
  982. LA R14,=CL6'OUTPUT' 00930000
  983. SPACE 00931000
  984. ILL EQU * 00932000
  985. DMSERR NUM=75,LET=E,MF=I,RENT=NO, *00933000
  986. SUB=(CHARA,(XR),CHARA,(R14)), *00934000
  987. TEXT=' ........ ILLEGAL FOR ......' @VA14621 00935000
  988. MVI RC,40 00936000
  989. B CLOSE 00937000
  990. SPACE 3 00938000
  991. * OUTPUT DISK FILE IS ON A READ-ONLY DISK. 00939000
  992. ROERR EQU * 00940000
  993. LA XR,FCBDSMD 00941000
  994. DMSERR NUM=37,LET=E,SUB=(CHARA,((XR),1)), @VA05240*00942000
  995. TEXT='OUTPUT DISK ''..'' IS READ/ONLY' 00943000
  996. MVI RC,36 00944000
  997. B CLOSE 00945000
  998. SPACE 3 00946000
  999. * OUTPUT DISK IS NOT ACCESSED 00947000
  1000. ACERR LA XR,FCBDSMD @VA05240 00948000
  1001. DMSERR NUM=69,LET=E,SUB=(CHARA,((XR),1)), @VA05240*00949000
  1002. TEXT='OUTPUT DISK ''..'' IS NOT ACCESSED' @VA05240 00950000
  1003. MVI RC,36 @VA05240 00951000
  1004. B CLOSE @VA05240 00952000
  1005. SPACE 3 00953000
  1006. * SYNAD EXIT WAS TAKEN ON INDCB. 00954000
  1007. INSYNER EQU * 00955000
  1008. * NOTE XR -> SYNADAF ERROR MESSAGE BUFFER 00956000
  1009. DMSERR NUM=128,LET=S, P0503*00957000
  1010. MF=I,RENT=NO, *00958000
  1011. SUB=(DECA,RECNUM,CHARA,54(XR)), *00959000
  1012. TEXT='I/O ERROR ON INPUT AFTER READING ......... RECORDS*00960000
  1013. : .............................' 00961000
  1014. MVI RC,INPTERR SET INPUT I/O ERROR @VA07463 00962100
  1015. B SYNADRLS COMPLETE SYNAD PROCESSING 00963000
  1016. SPACE 3 00964000
  1017. * SYNAD EXIT WAS TAKEN ON OUTPUT DCB 00965000
  1018. OUTSYNER EQU * 00966000
  1019. * NOTE XR -> SYNADAF ERROR MESSAGE BUFFER 00967000
  1020. DMSERR NUM=129,LET=S, *00968000
  1021. MF=I,RENT=NO, *00969000
  1022. SUB=(DECA,RECNUM,CHARA,54(XR)), *00970000
  1023. TEXT='I/O ERROR ON OUTPUT WRITING RECORD NUMBER ........*00971000
  1024. .: .............................' 00972000
  1025. MVI RC,OUTPTERR SET OUTPUT I/O ERROR @VA07463 00973100
  1026. B SYNADRLS COMPLETE SYNAD PROCESSING 00974000
  1027. SPACE 3 00975000
  1028. * THE INPUT DDNAME IS THE SAME AS THE OUTPUT DDNAME. 00976000
  1029. SAMEERR EQU * 00977000
  1030. DMSERR NUM=41,LET=E, *00978000
  1031. TEXT='INPUT AND OUTPUT FILES ARE THE SAME' 00979000
  1032. MVI RC,40 00980000
  1033. B CLOSE 00981000
  1034. SPACE 3 00982000
  1035. * V RECORD FORMAT, BUT BLOCKSIZE IS LESS THAN 9. 00983000
  1036. ERVB EQU * 00984000
  1037. LA XR,FCBDD POINT TO DDNAME 00985000
  1038. DMSERR NUM=130,LET=S,SUB=(CHARA,(XR)), *00986000
  1039. TEXT='BLOCKSIZE ON V FORMAT FILE ........ IS LESS THAN 9*00987000
  1040. ' 00988000
  1041. MVI RC,88 00989000
  1042. B CLOSE 00990000
  1043. SPACE 3 @VA13188 00990100
  1044. RCFMERR DS 0H @VA13188 00990200
  1045. DMSERR NUM=232,LET=E,TEXT='INVALID RECFM -- SPANNED RECORDS NO*00990300
  1046. T SUPPORTED' @VA13188 00990400
  1047. MVI RC,88 FUNCTIONAL ERROR @VA13188 00990500
  1048. B CLOSE CLOSE FILES AND EXIT @VA13188 00990600
  1049. SPACE 3 @VA13188 00990700
  1050. * DUMMY INPUT DCB 00991000
  1051. DCBS DCB DDNAME=INMOVE,EODAD=ENDREAD,SYNAD=INSYNAD, P0503*00992000
  1052. MACRF=GL,DSORG=PS 00993000
  1053. SPACE 3 00994000
  1054. DCB DDNAME=OUTMOVE,SYNAD=OUTSYNAD, P0503*00995000
  1055. MACRF=PL,DSORG=PS 00996000
  1056. * OPEN/CLOSE I/O LIST 00997000
  1057. LISTS OPEN (*-*,INPUT,*-*,OUTPUT),MF=L P0503 00998000
  1058. SPACE 3 00999000
  1059. * PLIST FOR 'FILEDEF DDNAME DISK ( NOCHANGE' 01000000
  1060. FILEDEFP DC CL16'FILEDEF',CL8'DISK',CL8'(',CL8'NOCHANGE' P0503 01001000
  1061. DC 8X'FF' P0503 01002000
  1062. FILEDEFL EQU *-FILEDEFP LENGTH OF PLIST P0503 01004000
  1063. FILEDEFC DC CL16'FILEDEF',CL8'CLEAR' @VA07463 01004100
  1064. DC 8X'FF' @VA07463 01004200
  1065. FILEDFCL EQU *-FILEDEFC @VA07463 01004300
  1066. SPACE 2 01004400
  1067. H8 DC H'8' @VA07463 01004500
  1068. INPTERR EQU 101 @VA07463 01004600
  1069. OUTPTERR EQU 102 @VA07463 01004700
  1070. IOERR EQU 100 @VA07463 01004800
  1071. DCBOPEN EQU X'10' @VA07463 01004900
  1072. LTORG 01005000
  1073. ADT P0503 01006000
  1074. FSTB P0503 01007000
  1075. NUCON P0503 01008000
  1076. CMSCB P0503 01009000
  1077. OSFST @V201122 01010000
  1078. DCBD DSORG=PS,DEVD=DA P0503 01011000
  1079. * DEFINE VARIOUS FIELDS INSIDE EACH OF THE DCB'S. 01012000
  1080. DEFINE LRECL,BLKSI,RECFM,DDNAM P0503 01013000
  1081. END , 01014000