User Tools

Site Tools


cdc:nos2.source:nam5871:nmi_rte

NMI=RTE

Table Of Contents

  • [00003] FILE ROUTING PROCESSOR

Source Code

NMI=RTE.txt
  1. *DECK NMI=RTE
  2. IDENT ROUTEM
  3. TITLE FILE ROUTING PROCESSOR
  4. *IF -DEF,EXCST
  5. COMMENT ROUTEM - FILE ROUTING/ENCSF FUNCTION
  6. *ENDIF
  7. *IF DEF,EXCST
  8. COMMENT ROUTEM - FILE ROUTING/EXCST FUNCTION
  9. *ENDIF
  10. ENTRY ROUTEM
  11.  
  12.  
  13. USE /ROUTCOM/
  14. LFN BSS 1
  15. CODE BSS 1
  16. TYPERT BSS 1
  17. RTEOT BSS 1 ORIGIN TYPE (BINARY)
  18. RTESC BSS 1 SVC CLASS (CHAR IF PRESENT)
  19. USE *
  20.  
  21.  
  22. USE /TERMCOM/
  23. TCCNT BSS 1
  24. LCLBFR BSS 65 BFR SPACE FOR BEGINIP / SAVE SPACE
  25. USE *
  26.  
  27. ** ROUTEM
  28. *
  29. * PARAMETERS PASSED THRU COMMON:
  30. * LFN (WORD 1) = NAME OF THE FILE TO BE ROUTED
  31. * CODE (WORD 2)= ROUTE CODE (0=INPUT, 1=OUTPUT)
  32. *
  33. * RETURNED PARAMS:
  34. * FETADDR = SYSTEM ASSIGNED JOB NAME
  35. * CODE = 0, SUCCESSFULL ROUTE OPERATION
  36. * = 27, FNT FULL
  37. * = 30, LOCAL FILE LIMIT
  38. * = 33 DEFFERRED BATCH JOB LIMIT
  39. * GENERAL COMMENTS:
  40. * THE FILE TO BE ROUTED HAS TO RESIDE
  41. * ON A Q-DEVICE AND HAS TO CONTAIN A JOB.
  42. * THE USER NUMBER MUST HAVE BEEN VALIDATED
  43. * PRIOR TO THE CALL TO THIS ROUTINE.
  44. * AN INVALID USER NUMBER IN A ROUTED JOB, WILL FORCE AN
  45. * UNCONDITIONAL ABORT BY THE SYSTEM.
  46. *
  47. * ROUTEM IS USED TO ROUTE THE NETWORK START-UP
  48. * JOBS TO THE INPUT QUEUE AND START NIP
  49. EJECT
  50. PARAMS BSSZ 7 ROUTE PARAMETER LIST
  51. BSSZ 8 EXTENDED PARAM LIST
  52.  
  53. W1 VFD 14/0,3/5 FORMS CODE
  54. VFD 7/0,12/2CIN DISPOSITION CODE
  55. VFD 6/0,1/1 RTRN SYS ASSIGNED JOBNAME
  56. VFD 4/0,1/1 RETURN ERROR CODE
  57. VFD 2/1 FORMS CODE FLAG
  58. VFD 5/0,1/1 DISP CODE FLAG
  59. VFD 2/0,2/2 ROUTE TO CENTRAL SITE
  60.  
  61. W2 VFD 24/0
  62. VFD 12/2HLP LINE PRINTER
  63. VFD 6/0
  64. VFD 18/22B PRINT ANYWHERE
  65.  
  66. OUN VFD 42/0LSYSTEMX,18/0
  67. SPACE 4
  68. ROUTEM EQ *+1
  69. MX6 0 CLEAR PARAMS AREA
  70. SB1 1
  71. SA6 PARAMS+1
  72. DUP 13,1
  73. SA6 A6+B1
  74.  
  75. SA2 LFN
  76. RJ STRIP55
  77. SA6 A2
  78.  
  79. ZR X2,GETJNAM FILE NAME MISSING
  80.  
  81. SA2 CODE
  82. SX3 1000B
  83. BX4 X2*X3
  84. NZ X4,RSUB IF NIP
  85.  
  86. MX0 42
  87. SA1 LFN
  88. BX7 X1*X0 ISOLATE LFN
  89. SX4 4000B SET
  90. BX7 X7+X4 FORCED ORIGIN FLAG
  91. SA7 PARAMS IN WD-0 OF DSP BLOCK
  92.  
  93. SA2 CODE GET INPUT/OUTPUT QUEUE FLAG
  94. SX5 7B
  95. BX2 X2*X5
  96. SB2 X2
  97. SA3 W1+B2 PICK UP ROUTE PARAMETERS
  98. BX6 X3
  99. SA2 A2 GET CODE FOR SUBSYS FLAG
  100. LX2 3 CODE = XXXX XXXX XXXX XXXX XSXX
  101. BX7 X4*X2 ADD SUBSYSTEM FLAG
  102. BX6 X6+X7 (IF PRESENT IN PARAM)
  103. SA6 A7+B1 TO DSP CALL BLOCK / FET+1
  104. BX0 X7 SAVE SUBSYSTEM FLAG IN X0
  105. NZ X0,RT0 IF SUBSYSTEM
  106. SA1 RTEOT PICK UP OT
  107. NZ X1,RT1 IF NOT SYOT
  108. RT0 BSS 0
  109.  
  110. SX5 100B SET EXT PARAM BIT
  111. BX6 X5+X6
  112. SA6 A6
  113. SA3 OUN SET OWNER USERNAME
  114. BX7 X3
  115. SA7 PARAMS+10B
  116. SX7 2
  117. SA7 A7-B1 / FET+7
  118. ZR X0,RT1 IF NOT SUBSYSTEM
  119.  
  120. SA2 LFN PUT LFN IN SUBSYSNAME
  121. MX0 18
  122. BX7 X0*X2
  123. LX7 18
  124. SA7 A7-B1 / FET+6
  125. EQ RT2
  126. *
  127. RT1 BSS 0
  128. SA1 RTEOT PICK UP OT
  129. LX1 1 PLACE
  130. SA2 A7 IN
  131. BX7 X1+X2 DSP
  132. SA7 A7 CALL BLOCK / FET+0
  133. NZ X1,RT2 IF NOT SYOT
  134. SA3 RTESC WAS SC SPFD
  135. ZR X3,RT2 NO
  136. LX3 36 SVC CLASS
  137. SA5 PARAMS+4 PARAMETER
  138. BX7 X3+X5 TO DSP
  139. SA7 A5 CALL BLOCK / FET+4
  140. LX4 9 SET
  141. BX6 X6+X4 FORCED SC FLAG
  142. SA6 A6 IN DSP CALL BLOCK / FET+1
  143. RT2 BSS 0
  144. *
  145. SA1 PARAMS SET STATUS MESSAGES
  146. RJ SMS1
  147. SA5 TYPERT IN TESTING MODE IF NON-ZERO
  148. NZ X5,RT3
  149. ROUTE PARAMS,R
  150. *
  151. RT3 BSS 0
  152. SA1 PARAMS
  153. SX7 77B
  154. MX0 42
  155. BX6 X0*X1
  156. SA6 LFN RETURN SYSTEM ASSINGED JOB NAME
  157. AX1 12 POSITION ERROR CODE
  158. BX7 X7*X1
  159. SA7 CODE ROUTE ERROR HAS BEEN ENCOUNTERED
  160. SA1 PARAMS
  161. RJ SMS2 SEND ROUTE MESSAGE
  162. EQ ROUTEM
  163.  
  164. GETJNAM BSS 0
  165. SX6 88 TEMPORARY ERROR CODE FOR PASSING A 0
  166. * LFN
  167. SA6 CODE
  168. EQ ROUTEM
  169.  
  170. EJECT
  171.  
  172.  
  173. STRIP55 EQ *+1S17 ENTRY/EXIT
  174. MX0 60-6 VALUE IN X2
  175. SX6 55B
  176. SB1 1
  177. SB4 10
  178. S55A LX2 6
  179. BX3 -X0*X2
  180. IX3 X3-X6 SEE IF BLANK
  181. NZ X3,S55B
  182. BX2 X0*X2 SET TO 0 IF BLANK
  183. S55B SB4 B4-B1
  184. NE B4,B0,S55A
  185. BX6 X2 MOVE TO X6 WHEN DONE
  186. EQ STRIP55
  187. SPACE 4,8
  188. FILL55 EQ *+1S17 ENTRY/EXIT
  189. MX0 60-6 VALUE IN X1
  190. SX6 55B
  191. SB1 1
  192. SB4 10
  193. F55A LX1 6
  194. BX3 -X0*X1
  195. NZ X3,F55B
  196. BX1 X1+X6 ADD IN A BLANK
  197. F55B SB4 B4-B1
  198. NE B4,B0,F55A
  199. BX6 X1 MOVE TO X6 WHEN DONE
  200. EQ FILL55
  201.  
  202.  
  203. MVED MACRO VAL,EDFLD,BITS
  204. SA1 VAL
  205. RJ =XCOD=
  206. SA2 EDFLD
  207. MX0 60-BITS
  208. BX2 X0*X2
  209. BX6 -X0*X6
  210. BX6 X6+X2
  211. SA6 A2
  212. ENDM
  213.  
  214.  
  215. SMS1 EQ *+1S17
  216. MX0 60-18
  217. SA2 A1 FET+0
  218. BX1 X0*X1
  219. MX0 6
  220. + LX1 6
  221. BX3 X0*X1 RIGHT JUSTIFY NAME
  222. NZ X3,*
  223. RJ FILL55
  224. SA6 RTMSG STARTING FILE NAME
  225. MX0 60-18
  226. BX6 -X0*X2
  227. SA6 F0A
  228. SA2 A1+B1 FET+1
  229. MX0 60-21
  230. BX6 -X0*X2
  231. SA6 F1A
  232. SA2 A2+3 FET+4
  233. MX0 60-12
  234. LX2 24
  235. BX6 -X0*X2
  236. SA6 F4A
  237. SA2 A2+2 FET+6
  238. MX0 60-18
  239. BX6 -X0*X2
  240. SA6 F6A
  241. SA2 A2+B1 FET+7
  242. BX6 -X0*X2
  243. SA6 F7A
  244. EQ SMS1
  245. SPACE 4,8
  246. SMS2 EQ *+1S17
  247. MX0 60-18
  248. SA2 A1 FET+0
  249. BX1 X0*X1 RETURNED SYSTEM NAME
  250. RJ FILL55
  251. SA6 RTMSG+3
  252. SX6 77B 12 BIT ERROR CODE
  253. LX2 60-12
  254. BX6 X6*X2
  255. SA6 F0B
  256.  
  257. MVED F0B,RTMS3+2,36
  258.  
  259. MESSAGE RTMSG,0,RECALL
  260. SA5 TYPERT
  261. ZR X5,SMS2B TESTING IF NON-ZERO
  262. SMS2A BSS 0
  263. MVED F0A,RTMS2+0,36
  264. MVED F1A,RTMS2+1,42
  265. MVED F4A,RTMS2+2,24
  266. MVED F6A,RTMS2+3,36
  267. MVED F7A,RTMS2+4,36
  268. MESSAGE RTMS2,0,RECALL
  269. SMS2B BSS 0
  270. SA5 F0B CHECK ERROR CODE
  271. ZR X5,SMS2C
  272. MESSAGE RTMS3,0,RECALL
  273. SMS2C BSS 0
  274. EQ SMS2
  275.  
  276.  
  277. ** COPYNRF
  278. *
  279.  
  280. COPYNRF EQ *+1S17
  281. SB1 1
  282. OPEN NRF1,WRITE,R CREATE FILE NRF1
  283. REWIND BEGINIP REWIND FILE NIP
  284. SKIPF BEGINIP,1 SKIP 1 RECORD
  285. READ BEGINIP,1 READ 1 LOGICAL RECORD
  286. CPYNRF1 BSS 0
  287. READW BEGINIP,WBUF,WBUFL
  288. NG X1,COPF IF EOF OR EOI ENCOUNTERED
  289. ZR X1,CPYNRF2 IF FULL BUFFER
  290. WRITEW NRF1,WBUF,X1-WBUF COPY RECORD IN WBUF TO NRF1
  291. WRITER NRF1,R WRITE END-OF-RECORD
  292. REWIND NRF1
  293. OPEN NRF2,WRITE,R CREATE FILE NRF2
  294. READ BEGINIP,1 READ 1 LOGICAL RECORD
  295. CPYNRF3 BSS 0
  296. READW BEGINIP,WBUF,WBUFL
  297. NG X1,COPF IF EOF OR EOI ENCOUNTERED
  298. ZR X1,CPYNRF4 IF FULL BUFFER
  299. WRITEW NRF2,WBUF,X1-WBUF COPY RECORD IN WBUF TO NRF2
  300. WRITER NRF2,R WRITE END-OF-RECORD
  301. REWIND NRF2
  302. COPF REWIND BEGINIP
  303. EQ COPYNRF
  304. *
  305. CPYNRF2 BSS 0
  306. WRITEW NRF1,WBUF,WBUFL
  307. EQ CPYNRF1
  308. *
  309. CPYNRF4 BSS 0
  310. WRITEW NRF2,WBUF,WBUFL
  311. EQ CPYNRF3
  312.  
  313. RTMSG DIS ,* FILNAME ROUTED, JOB NAME - XXXXXXXXXX*
  314. RTMS2 DIS ,* 0=AAAAAA 1=BBBBBBB 4=CCCC 6=DDDDDD 7=EEEEEE*
  315. RTMS3 DIS ,* ERROR IN ROUTE FCN. EC=XXXXXXB*
  316. F0A VFD 60/0
  317. F1A VFD 60/0
  318. F7A VFD 60/0
  319. F0B VFD 60/0
  320. F4A BSS 1
  321. F6A BSS 1
  322.  
  323.  
  324. NBUFL EQU 65
  325. PBUFL EQU 65
  326. WBUFL EQU 65
  327. BSS 0
  328. NRF1 FILEB NBUF,NBUFL,(FET=6)
  329. BSS 0
  330. NRF2 FILEB PBUF,PBUFL,(FET=6)
  331. NBUF BSS NBUFL
  332. PBUF BSS PBUFL
  333. WBUF BSSZ WBUFL
  334. EJECT
  335. *IF -DEF,EXCST
  336. ** RSUB
  337. * WE GET HERE WHEN NIP IS TO BE EXECUTED. IN THIS
  338. * CASE, WE HAVE WRAPPED UP ALL PROCESSING AND WILL
  339. * TRANSFER CONTROL TO NIPS JOB CONTROL, NEVER TO
  340. * RETURN.
  341. *
  342.  
  343. RSUB BSS 0 ENTRY
  344. SA1 BEGINIP
  345. MX0 42
  346. BX1 -X0*X1
  347. SA2 LFN
  348. BX6 X1+X2
  349. SA6 A1
  350.  
  351. SA1 BEGINIP
  352. RJ SMS1
  353.  
  354. RJ COPYNRF COPY NRF1/NRF2
  355. SA5 TYPERT IN TESTING MODE IF NON-ZERO
  356. NZ X5,RS2 JUST RETURN IF TESTING
  357.  
  358. ENCSF BEGINIP
  359. PSCSF BEGINIP
  360.  
  361. ENDRUN
  362.  
  363. RS2 BSS 0
  364. SA1 BEGINIP
  365. RJ SMS2
  366. EQ ROUTEM
  367.  
  368. BEGINIP FILEB LCLBFR,65,(FET=8)
  369. RESTORE VFD 60/0
  370. SPACE 4
  371. *ENDIF
  372. *IF DEF,EXCST
  373. ** RSUB
  374. * WE GET HERE WHEN NIP IS TO BE EXECUTED. IN THIS
  375. * CASE, WE HAVE WRAPPED UP ALL PROCESSING AND WILL
  376. * TRANSFER CONTROL TO NIPS JOB CONTROL, NEVER TO
  377. * RETURN.
  378. *
  379.  
  380. RSUB BSS 0 ENTRY/NO EXIT
  381. SA1 BEGINIP+1
  382. MX0 6 SET CTL CARD BUFFER
  383. BX5 X0*X1 SAVE PERIOD (.)
  384. SA1 BEGINIP ISOLATE (BEGIN,,)
  385. MX0 42
  386. BX4 X0*X1
  387. SA1 LFN GET FIRST 3 CHAR OF LFN
  388. MX0 18
  389. BX3 X0*X1
  390. LX3 18 MUST BE AT LEAST 3 CHAR (NIP+++)
  391. BX6 X3+X4
  392. SA6 BEGINIP SAVE (BEGIN,,NIP)
  393. BX1 -X0*X1 CLEAR OUT (NIP)
  394. LX1 18 READJUST AND ADD IN PERIOD
  395. SB1 1
  396. SB4 10
  397. MX0 6
  398. RS1 BX2 X0*X1
  399. ZR X2,RS3
  400. LX1 6
  401. SB4 B4-B1
  402. NE B0,B4,RS1
  403. RS3 BX6 X1+X5 PUT IN THE PERIOD (.)
  404. RS5 LX6 6
  405. SB4 B4-B1
  406. NE B0,B4,RS5
  407. SA6 A6+B1
  408.  
  409. EXCST BEGINIP
  410.  
  411. EQ ROUTEM
  412.  
  413. BEGINIP DIS ,*BEGIN,,NIP.*
  414. SPACE 4
  415. *ENDIF
  416. END
cdc/nos2.source/nam5871/nmi_rte.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator