User Tools

Site Tools


ibm:vm370-lib:cms:dmsglb.assemble_src

DMSGLB Source

References

Source Listing

DMSGLB.ASSEMBLE.txt
  1. GLB TITLE 'DMSGLB (CMS) VM/370 - RELEASE 6' 00001000
  2. SPACE 2 00002000
  3. *. 00003000
  4. * 00004000
  5. * 00005000
  6. * 00006000
  7. * MODULE NAME 00007000
  8. * 00008000
  9. * DMSGLB 00009000
  10. * 00010000
  11. * FUNCTION 00011000
  12. * 00012000
  13. * TO DEFINE THE MACRO LIBRARIES THAT ARE TO BE 00013000
  14. * SEARCHED DURING ASSEMBLER PROCESSING. 00014000
  15. * TO DEFINE TEXT LIBRARIES TO BE SEARCHED 00015000
  16. * BY THE LOADER FOR ANY UNRESOLVED EXTERNAL 00016000
  17. * REFERENCES 00017000
  18. * TO DEFINE THE DOS LIBRARIES THAT ARE TO BE 00017100
  19. * SEARCHED BY THE DOS FETCH FOR A REQUESTED 00017200
  20. * PHASE LOAD. 00017300
  21. * 00018000
  22. * ATTRIBUTES 00019000
  23. * 00020000
  24. * DISK-RESIDENT AND EXECUTES IN THE TRANSIENT AREA 00021000
  25. * NOTE: GLOBAL MUST BE GENMOD'D WITH THE SYSTEM OPTION 00021100
  26. * 00022000
  27. * ENTRY POINTS 00023000
  28. * 00024000
  29. * DMSGLB - COMMON ENTRY POINT FOR MACLIB, 00025100
  30. * DOSLIB AND TXTLIB DEFINITION 00025200
  31. * 00027000
  32. * ENTRY CONDITIONS 00028000
  33. * 00029000
  34. * R1- ADDRESS OF LIBRARY PARAMETER LIST 00030100
  35. * 00031000
  36. * PLIST- 00032000
  37. * 00033000
  38. * CL8'LIBRARY' 00034100
  39. * CL8'MACLIB, TXTLIB OR DOSLIB' 00034200
  40. * CL8'LIBNAME1' 00036000
  41. * ... 00037000
  42. * CL8'LIBNAMEN' 00038000
  43. * 00039000
  44. * R13- ADDRESS OF SVC SAVE AREA 00040000
  45. * R14- RETURN ADDRESS 00041000
  46. * R15-ADDRESSIBILITY 00042000
  47. * 00043000
  48. * EXIT CONDITIONS 00044000
  49. * 00045000
  50. * NORMAL- RETURN TO DMSITS, R15=0 00046000
  51. * 00047000
  52. * ERROR- RETURN TO DMSITS, R15=ERROR CODE 00048000
  53. * 00049000
  54. * ERROR CODES 00050000
  55. * | 28 FILE NOT FOUND 00051000
  56. * | 24 INVALID FUNCTION 00052000
  57. * | 24 NO FUNCTION SPECIFIED 00053000
  58. * | 88 MORE THAN 8 LIBRARIES SPECIFIED 00054000
  59. * 00055000
  60. * EXTERNAL REFERENCES 00056000
  61. * 00057000
  62. * NUCON 00058000
  63. * 00059000
  64. * CALLS TO OTHER ROUTINES 00060000
  65. * 00061000
  66. * DMSFRE,DMSERR,DMSSTT,DMSBRD 00062000
  67. * 00063000
  68. * TABLES/WORKAREAS 00064000
  69. * 00065000
  70. * SVC SAVE AREA USED FOR STATE PARAMETER LIST 00066000
  71. * WORK AREA FOR TYPING CURRENT LISTS (TYPE OR PRINT OPTION) 00067000
  72. * 00068000
  73. * REGISTER USAGE 00069000
  74. * 00070000
  75. * R1,3,4,5- WORK 00071000
  76. * R12- BASE 00072000
  77. * R13- WORK AREA 00073000
  78. * R14- RETURN 00074000
  79. * R15- RETURN CODE 00075000
  80. * 00076000
  81. * 00077000
  82. * OPERATION 00078000
  83. * 00079000
  84. * SET UP STATE PARAMETER LIST CONSTANTS. CHECK FOR 00080100
  85. * MACLIB, TXTLIB OR DOSLIB LIBRARY. SET RESPECTIVE 00080200
  86. * FILETYPES (MACLIB, TXTLIB OR DOSLIB) INTO STATE 00080300
  87. * PARAMETER LIST. SET THE ADDR. OF THE RESPECTIVE 00080400
  88. * NUCON LIBRARY AREA INTO REG. 3 (MACLIBL, TXTLIBS 00080500
  89. * OR DOSLIBL). IF TXTLIB FUNCTION, FREE POSSIBLE 00080600
  90. * IN-CORE TXTLIB DIRECTORY BLOCKS. 00080700
  91. * CLEAR CURRENT NAMES FROM APPROPRIATE NUCON LIST. 00080800
  92. * CHECK NO. OF LIBNAMES SPECIFIED; IF ZERO, EXIT; 00080900
  93. * IF MORE THAN EIGHT GIVE ERROR NO 108S. CHECK FOR 00081000
  94. * EXISTENCE OF EACH LIBRARY SPECIFIED (VIA STATE). 00081100
  95. * FOR EACH LIBRARY FOUND, MOVE ITS FILENAME TO THE 00081200
  96. * TO THE NUCON LIBRARY LIST. FOR EACH LIBRARY THAT 00081300
  97. * DOES NOT EXIST, GIVE ERROR NO 002E. 00081400
  98. * WHEN ALL PROCESSING COMPLETED, RETURN TO DMSITS. 00081500
  99. * 00082000
  100. * ALSO, GLOBAL WILL ADD THE NUMBER OF BYTES IN 00083000
  101. * EACH LIBRARY GLOBALED AND STORE IN NUCON FOR 00084000
  102. * LATER USE BY THE FILE MANAGEMENT ROUTINES. 00085000
  103. EJECT 00095000
  104. DMSGLB START 00096000
  105. USING NUCON,R0 00097000
  106. USING DMSGLB,R12 00098000
  107. LR R12,R15 00099000
  108. ST R14,SAVE14 SAVE R14 FOR EVERYBODY @V305066 00099100
  109. LA R1,0(0,R1) IN CASE CALLED FROM EXEC 00100000
  110. CLI 8(R1),X'FF' WAS A FUNCTION SPECIFIED 00101000
  111. BE ERR047E NO, ERROR 00102000
  112. SR R8,R8 GET A ZERO @VA04102 00102100
  113. MVI SWT,X'00' RESET SWT @VA05523 00102200
  114. MVC 0(32,R13),SHELL MOVE IN STATE PLIST 00103000
  115. CLC 8(8,R1),=CL8'TXTLIB' GLOBAL TXTLIBS ? 00104000
  116. BE GTXT YES, SET R3 00105000
  117. CLC 8(8,R1),=CL8'MACLIB' GLOBAL MACLIBS ? 00106000
  118. BE GMAC YES, SET R3 00107000
  119. CLC 8(8,R1),=CL8'DOSLIB' GLOBAL DOSLIBS ? @V305001 00107100
  120. BE GDOS YES, SET R3 @V305001 00107200
  121. B ERR014E ILLEGAL FUNCTION 00108000
  122. GTXT LR R3,R1 PROTECT PLIST ADR 00109000
  123. OI SWT,TXTLIB INDICATE TEXTLIB ENTRY @VA04102 00109700
  124. L R1,TXTDIRC TXTLIB FREE STOR CHAIN 00111000
  125. ST R8,TXTDIRC CLEAR ANCHOR WORD 00112000
  126. ST R8,TXLIBSV ZERO TXTLIB BYTE COUNT AREA @VA04102 00112100
  127. LOOP LTR R1,R1 END OF CHAIN 00113000
  128. BC 8,GTXT1 YES 00114000
  129. L R0,8(R1) NO. DBL WDS TO FREE 00115000
  130. L R7,12(R1) NEXT BLOCK 00116000
  131. DMSFRET DWORDS=(0),LOC=(1) FREE THIS BLK 00117000
  132. LR R1,R7 DO NEXT 00118000
  133. B LOOP 00119000
  134. GTXT1 LR R1,R3 RESTORE R1 00120000
  135. LA R3,TXTLIBS TXTLIB LIST IN NUCON 00121000
  136. MVC 16(8,R13),=CL8'TXTLIB' SET STATE PLIST 00122000
  137. B COMMON GO TO COMMON CODE 00123000
  138. GDOS LA R3,DOSLIBL DOSLIB LIST IN NUCON @V305001 00123100
  139. MVC 16(8,R13),=CL8'DOSLIB' SET STATE PLIST @V305001 00123200
  140. ST R8,DOSLBSV ZERO DOSLIB BYTE COUNT AREA @VA04102 00123230
  141. OI SWT,DOSLIB INDICATE DOSLIB ENTRY @VA04102 00123260
  142. B COMMON GO TO COMMON CODE @V305001 00123300
  143. GMAC LA R3,MACLIBL MACLIB LIST IN NUCON 00124000
  144. OI SWT,MACLIB INDICATE MACLIB ENTRY @VA04102 00124300
  145. ST R8,MACLBSV ZERO MACLIB BYTE COUNT AREA @VA04102 00124600
  146. MVC 16(8,R13),=CL8'MACLIB' SET STATE PLIST 00125000
  147. COMMON LR R0,R1 SAVE REG 1 TEMPORARILY 00126000
  148. MVI 0(R3),X'FF' FENCE THE LIST AREA @V305066 00127000
  149. MVC 1(71,R3),0(R3) PROPAGATE THE FENCE @V305066 00128000
  150. LR R1,R0 RESTORE R1 00129000
  151. LA R4,16(0,R1) POINT TO LIBNAMES 00130000
  152. SR R15,R15 CLEAR R15 00131000
  153. TRT 0(65,R4),TABLE FIND END OF LIBNAMES 00132000
  154. BZ ERR108S MORE THAN EIGHT LIBNAMES 00133000
  155. SR R1,R4 LENGTH OF LIBNAMES 00134000
  156. BZ RETURN RETURN IF NO LIBNAMES SPECIFIED @VA04102 00135000
  157. LR R5,R1 SAVE LENGTH 00136000
  158. LR R1,R13 PLIST ADDRESS TO R1 00137000
  159. SR R7,R7 ZERO ERROR REG 00138000
  160. MMVC MVC 8(8,R13),0(R4) MOVE FIRST (NEXT) NAME TO STATE PLIST 00139000
  161. LR R1,R13 RESTORE PLIST ADDR. @V1D1905 00139100
  162. L R15,ASTATE CHECK FOR FILE @V305066 00140000
  163. BALR R14,R15 ... @V305066 00140100
  164. BNZ GLBSTER ... @V305066 00140200
  165. L R1,28(R1) GET FST ADDRESS @VA04102 00140300
  166. MVC RDLIST+8(16),0(R1) SET PLIST FOR RDBUF @VA04102 00140400
  167. MVC RDLIST+24(2),24(R1) GET MODE @VA04102 00140500
  168. MVC FLIST+24(2),RDLIST+24 SAVE MODE FOR FINIS @VA04102 00140600
  169. LA R1,RDLIST GET PLIST @VA04102 00140700
  170. L R15,ARDBUF GET RDBUF ADDRESS @VA04102 00140800
  171. BALR R14,15 AND GO THERE @VA04102 00140900
  172. BZ RECORDOK NO ERROR, SKIP TESTING RC. @VA13906 00140910
  173. CH R15,=H'01' IS IT FILE NOT FOUND? @VA13906 00140920
  174. BNE CHKRC08 NO, SEE IF IT RC=08. @VA13906 00140930
  175. OI SWT,DOSOS YES, THEN IT MUST BE DOS/OS DISK.@VA13906 00140940
  176. B RECORDOK SKIP TEST FOR RC=08. @VA13906 00140950
  177. CHKRC08 EQU * @VA13906 00140960
  178. CH R15,=H'08' IS THE RECORD TOO BIG FOR BUFFER?@VA13906 00140970
  179. BNE ERR104S NO, MUST BE A VALID ERROR. @VA13906 00140980
  180. RECORDOK EQU * @VA13906 00140990
  181. MVC FLIST+8(16),8(R13) SAVE FILE INFO FOR FINI @VA04102 00141000
  182. L R15,AFINIS GET ADDRESS OF FINIS @VA04102 00141100
  183. LA R1,FLIST @VA04102 00141200
  184. BALR R14,R15 GO FINIS @VA04102 00141300
  185. TM SWT,DOSOS IS THIS A DOS/OS DISK? @VA13906 00141310
  186. BO CHKCALL YES, DON'T CHECK FOR 'LIB'. @VA13906 00141320
  187. CLC BUFFER(3),=CL3'LIB' CHECK FOR VALID CMS LIBRARY.@VA13906 00141330
  188. BE CHKCALL OK, SEE WHO IS CALLING. @VA13906 00141340
  189. CLC BUFFER+3(3),=CL3'LIB' CHECK FOR VALID CMS LIB. @VA13906 00141350
  190. BNE ERR056E GIVE INVALID FORMAT MESSAGE. @VA13906 00141360
  191. CHKCALL EQU * @VA13906 00141370
  192. TM SWT,MACLIB MACLIB CALLING? @VA04102 00141400
  193. BO MLIB YES, GO THERE @VA04102 00141500
  194. TM SWT,DOSLIB DOSLIB CALLING? @VA04102 00141600
  195. BO DLIB BRANCH IF YES @VA04102 00141700
  196. L R11,TXLIBSV GET TXTLIB TOTAL BYTE COUNT @VA04102 00141800
  197. AH R11,BUFFER+10 ADD BYTES THIS LIBE @VA04102 00141900
  198. ST R11,TXLIBSV AND SAVE @VA04102 00142000
  199. B STAWAY @VA04102 00142100
  200. MLIB L R11,MACLBSV GET MACLIB TOTAL BYTE COUNT @VA04102 00142200
  201. AH R11,BUFFER+10 ADD BYTES THIS LIBE @VA04102 00142300
  202. ST R11,MACLBSV AND SAVE @VA04102 00142400
  203. B STAWAY @VA04102 00142500
  204. DLIB EQU * @VA04102 00142600
  205. L R11,DOSLBSV GET DOSLIB TOTAL BYTE COUNT @VA04102 00142700
  206. AH R11,BUFFER+10 ADD BYTES THIS LIB @VA04102 00142800
  207. ST R11,DOSLBSV AND SAVE @VA04102 00142900
  208. STAWAY EQU * @VA04102 00143000
  209. MVC 0(8,R3),0(R4) FILE EXISTS, MOVE IN NAME @VA04102 00143100
  210. LA R3,8(0,R3) NEXT NAME POSITION 00144000
  211. MMVC1 LA R4,8(0,R4) NEXT NAME IN USER LIST 00145000
  212. SH R5,=H'8' DECREMENT LENGTH 00146000
  213. BNZ MMVC LOOP UNTIL LENGTH GOES TO ZERO 00147000
  214. LR R15,R7 SET ERROR IF ANY 00148000
  215. B RETURN RETURN @VA04102 00149000
  216. GLBSTER CH R15,=H'28' FILE NOT FOUND 00150000
  217. BE ERR002E YES 00151000
  218. RETURN L R11,MACLBSV GET MACLIB TOTAL @VA04102 00152000
  219. A R11,TXLIBSV ADD TXTLIB TOTAL @VA04102 00152100
  220. A R11,DOSLBSV ADD DOSLIB TOTAL @VA04102 00152200
  221. ST R11,TOTLIBS AND SAVE IT @VA04102 00152300
  222. L R14,SAVE14 GET RETURN ADDRESS @VA04102 00152400
  223. BR R14 @VA04102 00152500
  224. EJECT 00153000
  225. *********************************************************************** 00154000
  226. * 00155000
  227. * ERROR MESSAGES 00156000
  228. * 00157000
  229. *********************************************************************** 00158000
  230. SPACE 00159000
  231. ERR002E LA R2,8(,R13) POINT TO FILENAME @V1D1905 00160100
  232. DMSERR TEXT='FILE ''................'' NOT FOUND', X00161000
  233. NUM=2,LET=W,SUB=(CHAR8A,(R2)) @V1D1905 00162100
  234. LA R7,28 REMEMBER ERROR @V1D1905 00162200
  235. B MMVC1 NEXT NAME @V1D1905 00162300
  236. SPACE 00165000
  237. ERR014E LA R2,8(0,R1) POINT TO INVALID FUNCTION 00166000
  238. DMSERR TEXT='INVALID FUNCTION ''........''',NUM=014, X00167000
  239. LET=E,SUB=(CHARA,(R2)) 00168000
  240. LA R15,24 ERROR CODE 00169000
  241. B RETURN @VA04102 00170000
  242. ERR056E EQU * @VA13906 00170100
  243. LA R2,8(,R13) POINT TO FILENAME. @VA13906 00170200
  244. DMSERR TEXT=('FILE ''....................'' ', @VA13906X00170300
  245. 'CONTAINS INVALID RECORD FORMATS'),NUM=56, @VA13906X00170400
  246. LET=E,SUB=(CHAR8A,(R2)) @VA13906 00170500
  247. LA R7,32 SET ERROR CODE FOR CMS. @VA13906 00170600
  248. B MMVC1 PROCESS NEXT NAME. @VA13906 00170700
  249. SPACE 00171000
  250. ERR047E DMSERR TEXT='NO FUNCTION SPECIFIED',NUM=47,LET=E 00172000
  251. LA R15,24 ERROR CODE 00173000
  252. B RETURN @VA04102 00174000
  253. ERR104S EQU * @VA13906 00174100
  254. LA R2,8(,R13) POINT TO FILENAME. @VA13906 00174200
  255. LR R7,R15 GET ERROR CODE FOR MESSAGE. @VA13906 00174300
  256. DMSERR TEXT=('ERROR ''..'' READING FILE ', @VA13906X00174400
  257. '''................'' FROM DISK'),MF=(E,MSG), @VA13906X00174500
  258. NUM=104,LET=S,SUB=(DEC,(R7),CHAR8A,(R2)) @VA13906 00174600
  259. LA R7,100 SET ERROR CODE FOR CMS. @VA13906 00174700
  260. B MMVC1 PROCESS NEXT NAME. @VA13906 00174800
  261. SPACE 00175000
  262. ERR108S DMSERR TEXT='MORE THAN 8 LIBRARIES SPECIFIED',NUM=108,LET=S 00176000
  263. LA R15,88 00177000
  264. B RETURN @VA04102 00178000
  265. SPACE 00179000
  266. MSG EQU * @VA13906 00179300
  267. DMSERR MF=L,MAXSUBS=2 MSG AREA FOR RDBUF ERRORS. @VA13906 00179600
  268. SHELL DC CL8'STATE' COMMAND NAME 00180000
  269. DC CL8'LIBNAM' LIBRARY NAME 00181000
  270. DC CL8'LIBTYPE' LIBRARY TYPE 00182000
  271. DC CL2' ' ANY MODE 00183000
  272. DC 2X'00' 00184000
  273. DC F'0' 00185000
  274. TABLE DC 255X'00' TRANSLATE TABLE 00186000
  275. DC X'FF' 00187000
  276. SAVE14 DS F R14 SAVEAREA @V305066 00187100
  277. RDLIST DS 0D @VA04102 00187200
  278. DC CL8'RDBUF' @VA04102 00187275
  279. RDNAME DC CL8' ' @VA04102 00187350
  280. RDTYPE DC CL8' ' TYPE FOR RDBUF @VA04102 00187425
  281. RDMODE DC CL2' ' MODE @VA04102 00187500
  282. RDITEM DC H'1' ITEM NO. @VA04102 00187575
  283. RDADD DC A(BUFFER) BUFFER ADDRESS @VA04102 00187650
  284. RDBUFSZ DC F'80' @VA04102 00187725
  285. RDFLAG DC CL1'F' FIXED FORMAT @VA04102 00187800
  286. DC CL1' ' NULL BLOCK FIELD @VA04102 00187875
  287. RDNUM DC H'1' ITEMS TO BE READ @VA04102 00187950
  288. DC A(*-*) BYTES READ @VA04102 00188025
  289. BUFFER DS 0D @VA04102 00188100
  290. DC CL80' ' @VA04102 00188175
  291. FLIST DS 0D @VA04102 00188250
  292. DC CL8'FINIS' @VA04102 00188325
  293. DC CL8' ' PLIST FOR FINIS @VA04102 00188400
  294. DC CL8' ' @VA04102 00188475
  295. DC CL2' ' @VA04102 00188550
  296. SWT DC X'00' SWITHC INDICATOR @VA04102 00188625
  297. TXTLIB EQU X'80' TXTLIB INDICATOR @VA04102 00188700
  298. MACLIB EQU X'40' MACLIB INDICATOR @VA04102 00188775
  299. DOSLIB EQU X'20' DOSLIB INDICATOR @VA04102 00188850
  300. DOSOS EQU X'01' DOS/OS DISK INDICATOR. @VA13906 00188885
  301. NUCON 00189000
  302. REGEQU 00190000
  303. END 00191000
ibm/vm370-lib/cms/dmsglb.assemble_src.txt ยท Last modified: 2023/08/06 13:35 by Site Administrator