User Tools

Site Tools


cdc:nos2.source:nam5871:nmi_io1

NMI=IO1

Table Of Contents

  • [00003] DISFIO - NAMI FILE I/O
  • [00020] CODED INPUT/OUTPUT ROUTINES
  • [00255] GETLINE - GET ONE DATA LINE
  • [00302] FILE FUNCTIONS
  • [00464] SURVEY USER CATALOG
  • [00507] COPY FILES
  • [00685] UPDATE NETWORK INVOCATION NUMBER
  • [00936] SET NEW MASTER FILE POINTERS
  • [00992] REMOTE TERMINAL I/O

Source Code

NMI=IO1.txt
  1. *DECK NMI=IO1
  2. IDENT DISFIO
  3. TITLE DISFIO - NAMI FILE I/O
  4. COMMENT DISFIO - FILE I/O FUNCTIONS
  5.  
  6. *CALL NMI=VER
  7.  
  8.  
  9. ENTRY RFL=
  10.  
  11. COLECT IF -DEF,COLECT ENTRY SDM= FOR NAMI
  12. ENTRY SDM=
  13. SDM= EQU 0
  14. COLECT ENDIF
  15. ENTRY SSJ=
  16. SSJ= EQU 0
  17. SPACE 4
  18. *IF,DEF,COLECT,1
  19. COLECT SET 1 BUILD NAMIFIO FOR COLLECTOR JOB
  20. TITLE CODED INPUT/OUTPUT ROUTINES
  21. LIST G,F
  22.  
  23. ENTRY GETLINE
  24. ENTRY PUTLINE,OFLUSH
  25. ENTRY PUTTERM
  26. ENTRY STARTIO,FINSHIO
  27. ENTRY PUTTRMX,REWDIF
  28. ENTRY PUTRTO,PUTRTC
  29. ENTRY PUTRTR,PUTRTL
  30. COLECT IF DEF,COLECT
  31. ENTRY TIGRLST
  32. ENTRY CPYATT,CPYGET,CPYRET,CPYFLS,CPYOPN,CPYSAV
  33. ENTRY CPYPUR
  34. COLECT ENDIF
  35. ENTRY RAZERO
  36. COLECT IF -DEF,COLECT
  37. ENTRY UPD8MFN,UPD8NIN,PRLDNIN,NEWMAST,GNETCCL
  38. COLECT ENDIF
  39.  
  40.  
  41. ** DISFIO
  42. * THIS ROUTINE READS / WRITES CODED LINES
  43. * PASSING PARAMETERS:
  44. * W1 OF COMMON PASSIT = FWA OF AREA TO BE READ/WRITTEN
  45. * W2 OF COMMON PASSIT = NUMBER OF WORDS TO READ/WRITE
  46. *
  47. * RETURNED PARAMETERS (READ ONLY):
  48. * W1 = UNCHANGED
  49. * W2 = NUMBER OF WORDS READ
  50. * W3 = 0, IF READ TERMINATED NORMALLY
  51. * -1, EOR ENCOUNTERED ON READ
  52. * -2, EOI ENCOUNTERED ON READ
  53. *
  54. * A NUMBER OF ROUTINES WITH THEIR OWN ENTRY POINTS
  55. * ARE USED FOR THE FILE I/O PROCESSING. SEE THE
  56. * ENTRY POINT LIST, ABOVE.
  57. *
  58. EJECT
  59.  
  60. USE /PASSIT/
  61. FWABUF BSS 1
  62. COUNT BSS 1
  63. COMPLT BSS 1
  64. LEVEL BSS 1
  65. IAFLAG BSS 1
  66. USE *
  67.  
  68.  
  69. COLECT IF DEF,COLECT
  70. USE /IOBUFS/
  71. IBUF BSS 1025
  72. OBUFX BSS 65
  73. TBUFX BSS 65
  74. RBUF BSS 65
  75. SBUF BSS 65
  76. XBUF BSS 188
  77. BSS 1000B
  78. ZBUF EQU *-1
  79. .ZBUF EQU ZBUF-IBUF
  80. USE *
  81. USE *
  82. COLECT ENDIF
  83.  
  84.  
  85. COLECT IF -DEF,COLECT
  86.  
  87. USE /IOBUFS/
  88. IBUF BSS 1025
  89. RBUF BSS 65
  90. USE *
  91.  
  92. COLECT ENDIF
  93.  
  94. USE /THEFET/
  95. INFIL RFILEB IBUF,1025,(FET=15D),EPR
  96. USE *
  97. EJECT
  98.  
  99. NAMIVER DIS 1,VER "VERSN"
  100.  
  101.  
  102. COLECT IF -DEF,COLECT
  103.  
  104.  
  105. CC01 MICRO 1,,$PARAM$
  106. CC02 MICRO 1,,$CIN=VIN$
  107. CC03 MICRO 1,,$UNM=UNM$
  108. CC04 MICRO 1,,$PWM=PWM$
  109. CC05 MICRO 1,,$LIN=000$
  110. CC06 MICRO 1,,$UIN=999$
  111. CC07 MICRO 1,,$OIN=000$
  112. CC08 MICRO 1,,$ZZD0FIL=ZZD0VIN$
  113. CC09 MICRO 1,,$ZZD1FIL=ZZD1VIN$
  114. CC10 MICRO 1,,$ZZD2FIL=ZZD2VIN$
  115. CC11 MICRO 1,,$ZZL0FIL=ZZL0VIN$
  116. CC12 MICRO 1,,$ZZD3FIL=ZZD3VIN$
  117. CC13 MICRO 1,,$ZZS0FIL=ZZS0VIN$
  118. CC15 MICRO 1,,$ZZT0FIL=ZZT0VIN$
  119.  
  120. USE /NETCOM/
  121. NETINVN VFD 60/10CVIN=999,
  122. NETINCR VFD 60/0
  123. DFLR EQU * ORDER DEPENDENT VALUES ....
  124. DIS 17,*"CC01","CC02","CC03","CC04","CC07","CC08","CC09","C
  125. ,C10","CC11","CC12","CC13","CC15".
  126. VFD 60/0
  127. DFLR2 EQU *
  128. DIS 4,DEFAULT
  129. DIS 4,
  130. USE *
  131.  
  132. COLECT ENDIF
  133. EJECT
  134. COLECT IF -DEF,COLECT
  135.  
  136. USE /NETCTRL/
  137. NETCTL EQU *
  138. DIS ,*NETCTRL.*
  139. NETVIN DIS ,*VIN=001,*
  140. DIS 17,*"CC01","CC02","CC03","CC04","CC07","CC08","CC09","C
  141. ,C10","CC11","CC12","CC13","CC15".
  142. VFD 60/0
  143. DIS 1,MFN MASTER (PROC) FILE NAME
  144. MFN VFD 60/0LNAMSTRT
  145. DIS 1,UN MASTER FILE AND ROUTED JOB USERNAME
  146. UN VFD 60/0LNETOPS DEFAULTS TO NETOPS UN
  147. DIS 1,PW MASTER FILE AND ROUTED JOB PASSWORD
  148. PW VFD 60/0LNETOPSX DEFAULTS TO NO CHANGE
  149. DIS 1,FM MASTER (PROC) FILE FAMILY NAME
  150. FM VFD 60/0LSYS76
  151. DIS 1,RN LAST USED PARAMETER RECORD NAME
  152. RN VFD 60/0LRESTRT
  153. DIS 1,LIN LOWER NIN BOUNDS FOR COLLECT
  154. LIN VFD 60/0L000 DEFAULTS TO 000
  155. DIS 1,UIN UPPER NIN BOUNDS FOR COLLECT
  156. UIN VFD 60/0L999 DEFAULTS TO 999
  157. DIS 1,MEMFUN MEMORY FILE USERNAME
  158. MEMFUN VFD 60/0 DEFAULTS TO CURRENT USERNAME
  159. DIS 1,OIN OLD INVOCATION NMBR FROM CC CALL
  160. OIN DIS 1,000
  161. DIS 1, MACHID MACHINE ID
  162. MACHID VFD 60/0
  163. DIS 1,RS RESTART
  164. RS VFD 60/0 APPLICATION NAME
  165. MEMFVER DIS 1,VER "VERSN"
  166. .NETCTL EQU *
  167. NETCTL. EQU .NETCTL-NETCTL
  168. BSSZ 77B-NETCTL.
  169. DIS 1,ENDNETCTRL
  170. USE *
  171.  
  172. COLECT ENDIF
  173. EJECT
  174. SPACE 4,8
  175. USE /ROUTCOM/
  176. RLFN BSS 1
  177. RCODE BSS 1
  178. USE *
  179. SPACE 4,8
  180. USE /COPYCOM/
  181. PFN1 BSS 1
  182. UN1 BSS 1
  183. PFN2 BSS 1
  184. UN2 BSS 1
  185. PFN3 BSS 1
  186. UN3 BSS 1
  187. USE *
  188.  
  189.  
  190.  
  191. USE /PFEMSG/
  192. PFERMSG BSS 4
  193. USE *
  194.  
  195.  
  196. USE //
  197. LASTW BSS 0
  198. USE *
  199.  
  200. RFL= EQU LASTW
  201. EJECT
  202. SPACE 4,8
  203. COLECT IF DEF,COLECT
  204. TBL77 EQU *
  205. VFD 12/7700B,12/0014D,36/0
  206. VFD 42/0LNAME,18/0
  207. VFD 60/0LMM.DD.YYBB
  208. VFD 60/0LHH.MM.SSBB
  209. VFD 60/10LNAMI R7
  210. VFD 42/7LCOLLECT,18/3R 1.
  211. VFD 30/5L00 ,30/5L
  212. VFD 60/10L
  213. DIS 4,NAMI DUMP COLLECTION
  214. VFD 60/0,60/0
  215. TBL34 EQU *
  216. VFD 12/3400B,12/1B,36/0
  217. VFD 36/6LBENRAD,24/5
  218. .TBLS EQU *
  219. L.TBLS EQU .TBLS-TBL77
  220. COLECT ENDIF
  221.  
  222. LIST *
  223. LIST F
  224. SPACE 4,8
  225.  
  226. ** COMMON DECKS REQUIRED FROM OPL (CATLIST)
  227. OPL XTEXT COMSPFM
  228. OPL XTEXT COMCMAC
  229. OPL XTEXT COMCRDH
  230.  
  231.  
  232. ** COMMON DECKS REQUIRED FROM OPL (SETLOF)
  233. *OPL XTEXT COMCCMD
  234. *OPL XTEXT COMCCPM
  235.  
  236.  
  237. PFN001 VFD 36/0LNETCCL,24/0
  238. PFN002 VFD 42/0LNETCCL2,18/0
  239. PFN003 VFD 42/0LNETCTRL,18/0
  240.  
  241.  
  242. LOFADDR VFD 12/0,18/LOFLIST,30/1
  243. LOFLIST VFD 42/0,18/3 LENGTH OF LIST
  244. VFD 42/7COUTFIL ,18/OUTFIL
  245. VFD 42/7CINFIL ,18/INFIL
  246. VFD 60/
  247.  
  248. NXTLINE BSSZ 1 BATCH MODE POINTER TO NEXT LINE START
  249. SAVEFWA BSSZ 1
  250. IA$FLAG BSSZ 1
  251.  
  252.  
  253. RAZERO EQU 0 FOR RA+0/RA+77 ACCESS
  254. EJECT
  255. TITLE GETLINE - GET ONE DATA LINE
  256. ** GETLINE
  257. *
  258.  
  259. GETLINE EQ *+1S17 ENTRY/EXIT
  260.  
  261. * SETLOF LOFADDR
  262.  
  263. SA1 FWABUF SAVE INCOMING FWA
  264. BX6 X1
  265. SA6 SAVEFWA
  266. SB3 12 SET WORD COUNT (RETURN TO USER)
  267. SX6 B3
  268. SA6 COUNT
  269.  
  270. RJ READAGN SEE IF NEED TO ISSUE READ
  271.  
  272. * READH INFIL,BUFFER,14
  273. SA4 FWABUF FWA BUFR IN X4
  274. SB6 X4 FWA BUFFER TO B6
  275. SB7 14 MAX WORDS TO READ
  276. SX2 INFIL FWA OF FET OF READ FILE
  277. RJ =XRDH=
  278.  
  279. BX6 X1 STATUS 0=OK, -1=EOF, -2=EOI
  280. SA6 RDTAG LWA+1 IN BUFR = EOR
  281. SX7 0 RETURN 0 FOR GOOD READ
  282. ZR X6,STA5 GOOD READ - NORMAL TERMINATION
  283. SX7 1 RETURN 1 FOR END OF RECORD
  284. PL X6,STA5 END OF RECORD
  285. SX7 3 EOF/EOI - RETURN +3
  286. STA5 SA7 COMPLT
  287.  
  288. EQ GETLINE EXIT...
  289. SPACE 4,8
  290. READAGN EQ *+1S17 ENTRY/EXIT...
  291. SA1 RDTAG
  292. ZR X1,READAGN
  293. SA2 INFIL
  294. MX0 43
  295. LX0 1
  296. BX6 X0*X2
  297. SA6 A2 CLEAR CODE AND STATUS
  298. READ INFIL,R
  299. EQ READAGN
  300.  
  301. RDTAG VFD 60/1B
  302. TITLE FILE FUNCTIONS
  303.  
  304. ** OFLUSH
  305. *
  306.  
  307. OFLUSH EQ *+1S17 ENTRY/EXIT
  308. WRITER OUTFIL,R
  309. EQ OFLUSH
  310. SPACE 4,8
  311. ** REWDIF
  312. *
  313.  
  314. REWDIF EQ *+1S17 ENTRY/EXIT
  315. REWIND INFIL,R
  316. SX7 B0
  317. SA7 NXTLINE
  318. EQ REWDIF
  319. SPACE 4,8
  320. ** PUTLINE
  321. *
  322.  
  323. PUTLINE EQ *+1S17 ENTRY/EXIT
  324. SA2 FWABUF STARTING ADDRESS OF PRINTLINE
  325. SA3 COUNT NUMBER OF WORDS TO BE WRITTEN
  326. WRITEH OUTFIL,X2,X3
  327. EQ PUTLINE
  328. SPACE 4,8
  329. ** PUTTERM
  330. *
  331.  
  332. PUTTERM EQ *+1S17 ENTRY/EXIT
  333. SA2 FWABUF
  334. SA3 COUNT
  335. WRITEH OUTPUT,X2,X3
  336. RJ PUTLINE
  337. EQ PUTTERM
  338. SPACE 4,8
  339. ** PUTTRMX
  340. *
  341.  
  342. PUTTRMX EQ *+1S17 ENTRY/EXIT
  343. WRITER OUTPUT,R
  344. EQ PUTTRMX
  345. SPACE 4,8
  346. ** PUTRTO
  347. *
  348.  
  349. PUTRTO EQ *+1S17 ENTRY/EXIT
  350. SA2 RLFN
  351. RJ STRIP55 CHNG TRAIL 55B TO 00B
  352. BX1 X6
  353. SX2 3
  354. BX6 X1+X2
  355. SA6 ROUTFIL
  356. OPEN ROUTFIL,WRITE,R
  357. EQ PUTRTO
  358. SPACE 4,8
  359. ** PUTRTC
  360. *
  361.  
  362. PUTRTC EQ *+1S17 ENTRY/EXIT
  363. RECALL ROUTFIL
  364. WRITER ROUTFIL,R
  365. WRITEF ROUTFIL,R
  366. REWIND ROUTFIL,R
  367. CLOSE ROUTFIL,REWIND,R
  368. EQ PUTRTC
  369. SPACE 4,8
  370. ** PUTRTL
  371. *
  372.  
  373. PUTRTL EQ *+1S17 ENTRY/EXIT
  374. RECALL ROUTFIL
  375. SA2 FWABUF
  376. SA3 COUNT
  377. WRITEH ROUTFIL,X2,X3
  378. EQ PUTRTL
  379. SPACE 4,8
  380. ** PUTRTR
  381. *
  382.  
  383. PUTRTR EQ *+1S17 ENTRY/EXIT
  384. RECALL ROUTFIL
  385. WRITER ROUTFIL,R
  386. EQ PUTRTR
  387. SPACE 4,8
  388. OUTFIL FILEB OBUF,65
  389. OUTPUT FILEB TBUF,65
  390. ROUTFIL FILEB RBUF,65
  391. IF DEF,COLECT,1
  392. CATFILE FILEB TIGRBUF,65,(FET=15D),EPR
  393. IF -DEF,COLECT,1
  394. SAVFILE FILEB NETCTL,65,(FET=15D),EPR
  395.  
  396. IF DEF,COLECT,2
  397. CPYFL1 FILEB IBUF,(.ZBUF+1),(FET=15D),EPR
  398. CPYFL2 FILEB IBUF,(.ZBUF+1),(FET=15D),EPR
  399.  
  400. OBUF BSS 65
  401. TBUF BSS 65
  402.  
  403. EJECT
  404. COLECT IF -DEF,COLECT
  405.  
  406. ** GNETCCL
  407. *
  408.  
  409. GNETCCL EQ *+1S17 ENTRY/EXIT
  410. SX7 B0
  411. SA7 PFERMSG
  412. RETURN INFIL,R RETURN PREVIOUS MASTER FILE
  413. GET INFIL,MFN,UN
  414. SA1 INFIL CHECK FOR ERRORS
  415. LX1 60-10
  416. MX0 60-8
  417. BX6 -X0*X1 ISOLATE ERROR BITS
  418. ZR X6,GNE1 NO ERRORS
  419. MESSAGE PFERMSG,0,RECALL
  420. MESSAGE GNERMSG,0,RECALL
  421. EQ GNETCCL EXIT IN SHAME
  422.  
  423. GNE1 OPEN INFIL,READ,R
  424. EQ GNETCCL
  425.  
  426. GNERMSG DIS ,*CANNOT GET/FIND MASTER FILE*
  427. COLECT ENDIF
  428. SPACE 4,8
  429. ** STARTIO
  430. *
  431.  
  432. STARTIO EQ *+1S17 ENTRY/EXIT
  433. SX6 B0
  434. SA6 PFERMSG
  435. SX7 A6
  436. SB1 1
  437. SA6 A6+B1
  438. SA6 A6+B1
  439. SA6 A6+B1
  440. SA7 INFIL+10D
  441. IF -DEF,COLECT,1
  442. SA7 SAVFILE+10D
  443.  
  444. SA1 IAFLAG
  445. BX7 X1
  446. SA7 IA$FLAG
  447. * 0 = INTERACTIVE USER, 2 = BATCH USER
  448.  
  449. IF -DEF,COLECT,1
  450. OPEN OUTFIL,WRITENR,R
  451. OPEN OUTPUT,WRITENR,R
  452. EQ STARTIO
  453.  
  454.  
  455. ** FINSHIO
  456. *
  457.  
  458. FINSHIO EQ *+1S17 ENTRY/EXIT
  459. CLOSE INFIL,REWIND,R
  460. RETURN INFIL,R
  461. CLOSE OUTFIL,REWIND,R
  462. CLOSE OUTPUT,,R
  463. EQ FINSHIO
  464. TITLE SURVEY USER CATALOG
  465. COLECT IF DEF,COLECT
  466.  
  467. USE /TIGRCOM/
  468. TCSTAT BSS 1 CATLIST STATUS
  469. TCLEN BSS 1 COUNT OF WORDS READ
  470. TIGRBUF BSS 65
  471. USE
  472. ** TIGRLST
  473. * WHEREIN WE READ THE USER CATALOG AND RETURN
  474. * PF INFORMATION TO THE CALLER.
  475. *
  476.  
  477. TIGRLST EQ *+1S17 ENTRY/EXIT
  478. SB1 1
  479. SA1 CATFILE
  480. MX0 43 CLEAR LAST CODE/STATUS
  481. LX0 1
  482. BX7 X1*X0
  483. SA7 A1
  484.  
  485. SA1 A1+B1
  486. MX0 42 SET UP IN AND OUT POINTERS
  487. BX7 -X0*X1
  488. SA7 A1+B1
  489. SA7 A7+B1
  490.  
  491. CATLIST CATFILE,,UN2
  492.  
  493. SB1 1
  494. SA1 CATFILE
  495. BX7 X1
  496. SA7 TCSTAT
  497.  
  498. SA1 A1+B1
  499. SA2 A1+B1
  500. SA3 A2+B1 X2, X3 = IN AND OUT
  501. IX6 X2-X3
  502. SA6 TCLEN
  503.  
  504. EQ TIGRLST
  505.  
  506. COLECT ENDIF
  507. TITLE COPY FILES
  508. COLECT IF DEF,COLECT
  509.  
  510. CPYATT EQ *+1S17 ENTRY/EXIT
  511. ATTACH CPYFL1,PFN1,UN1
  512. RJ CPYST1
  513. OPEN CPYFL1,READ,RECALL
  514. EQ CPYATT
  515. SPACE 3,6
  516. CPYGET EQ *+1S17 ENTRY/EXIT
  517. GET CPYFL1,PFN1,UN1
  518. RJ CPYST1
  519. OPEN CPYFL1,READ,RECALL
  520. EQ CPYGET
  521. SPACE 3,6
  522. CPYST1 EQ *+1S17 ENTRY/EXIT
  523. MX0 42
  524. SA1 PFN1
  525. SA2 CPYFL1
  526. BX6 -X0*X2 FILE NAME
  527. BX3 X0*X1 STATUS
  528. BX6 X6+X3
  529. SA6 A1
  530. EQ CPYST1
  531. SPACE 3,6
  532. CPYST2 EQ *+1S17 ENTRY/EXIT
  533. MX0 42
  534. SA1 PFN2
  535. SA2 CPYFL2
  536. BX6 -X0*X2 FILE NAME
  537. BX3 X0*X1 STATUS
  538. BX6 X6+X3
  539. SA6 A1
  540. EQ CPYST2
  541.  
  542. COLECT ENDIF
  543. EJECT
  544. COLECT IF DEF,COLECT
  545.  
  546. CPYOPN EQ *+1S17 ENTRY/EXIT
  547. SX6 B0
  548. SA6 PFERMSG
  549. SX7 A6
  550. SB1 1
  551. SA6 A6+B1
  552. SA6 A6+B1
  553. SA6 A6+B1
  554. SA7 CPYFL1+10D
  555. SA7 CPYFL2+10D
  556.  
  557. RJ CPYSN2
  558. ATTACH CPYFL2
  559. PURGE CPYFL2
  560. RETURN CPYFL2,RECALL
  561. DEFINE CPYFL2
  562. OPEN CPYFL2,WRITE,RECALL
  563. RJ CPYST2
  564. EQ CPYOPN
  565. SPACE 3,6
  566. CPYRET EQ *+1S17 ENTRY/EXIT
  567. CLOSE CPYFL1,REWIND,RECALL
  568. RETURN CPYFL1,RECALL
  569. EQ CPYRET
  570.  
  571. CPYMSG DIS ,* COPIED FILNAME*
  572. SPACE 3,6
  573. CPYSAV EQ *+1S17 ENTRY/EXIT
  574. RJ CPYSN2
  575. CLOSE CPYFL2,REWIND,RECALL
  576. RJ CPYST2
  577. * RETURN CPYFL2,RECALL
  578. EQ CPYSAV
  579. SPACE 3
  580. CPYPUR EQ *+1S17 ENTRY/EXIT
  581. PURGE CPYFL1,UN1
  582. RJ CPYST1
  583. EQ CPYPUR
  584.  
  585. COLECT ENDIF
  586. EJECT
  587. COLECT IF DEF,COLECT
  588.  
  589. CPYFLS EQ *+1S17 ENTRY/EXIT
  590. * CLEAR BUFFER
  591. RJ CPYSN2
  592. RJ CPYTAG
  593. CPY1 BSS 0
  594. SA1 CPYFL1+1
  595. MX0 42
  596. BX6 -X0*X1
  597. SA6 CPYFL1+2
  598. SA6 CPYFL1+3
  599. SA6 CPYFL2+3
  600. READ CPYFL1,RECALL
  601. RJ CPYST1
  602. SA4 CPYFL1+2
  603. BX6 X4
  604. SA6 CPYFL2+2
  605. SA5 CPYFL1+3 CHK FOR DATA
  606. IX3 X4-X5
  607. SA1 CPYFL1
  608. LX1 60-9 GET EOI BIT
  609. MX0 59
  610. BX2 -X0*X1
  611. ZR X2,CPY2 NOT EOI
  612. ZR X3,CPY1A NO DATA
  613. WRITER CPYFL2,RECALL
  614. RJ CPYST2
  615. CPY1A EQU *
  616. * WRITEF CPYFL2,RECALL
  617. * RJ CPYST2
  618. MESSAGE CPYMSG,0,RECALL
  619. EQ CPYFLS
  620. CPY2 SX2 .ZBUF
  621. IX7 X3-X2
  622. NZ X7,CPY3
  623. WRITE CPYFL2,RECALL
  624. EQ CPY5
  625. CPY3 WRITER CPYFL2,RECALL
  626. CPY5 RJ CPYST2
  627. EQ CPY1
  628. SPACE 4,8
  629. CPYSN2 EQ *+1S17 ENTRY/EXIT
  630. SA1 PFN2
  631. MX0 42
  632. SA2 CPYFL2
  633. BX6 X0*X1
  634. BX2 -X0*X2
  635. BX6 X6+X2
  636. SA6 A2
  637. EQ CPYSN2 FILE NAME SET
  638.  
  639. COLECT ENDIF
  640. EJECT
  641. COLECT IF DEF,COLECT
  642.  
  643. CPYTAG EQ *+1S17 ENTRY/EXIT
  644. MX0 42
  645. SA1 PFN1 GET NAME AND SET UP 77 TABLE
  646. BX6 X0*X1
  647. SA6 CPYMSG+1
  648. SA6 TBL77+1
  649. SA6 TBL34
  650. DATE TBL77+2
  651. CLOCK TBL77+3
  652. SA2 TBL77+2
  653. SA3 TBL77+3
  654. LX2 6
  655. LX3 6
  656. BX6 X2
  657. BX7 X3
  658. SA6 A2
  659. SA7 A3
  660.  
  661. SB1 1
  662. SB2 TBL77
  663. SB3 IBUF
  664. SB4 L.TBLS
  665. CT1 SA1 B2
  666. BX6 X1
  667. SA6 B3
  668. SB2 B2+B1
  669. SB3 B3+B1
  670. SB4 B4-B1
  671. NE B0,B4,CT1
  672.  
  673. SA1 CPYFL2+1 SET FOR WRITE
  674. MX0 42
  675. BX6 -X0*X1
  676. SA6 CPYFL2+3
  677. SX5 L.TBLS
  678. IX6 X6+X5
  679. SA6 CPYFL2+2
  680. WRITER CPYFL2,RECALL
  681. RJ CPYST2
  682. EQ CPYTAG
  683.  
  684. COLECT ENDIF
  685. TITLE UPDATE NETWORK INVOCATION NUMBER
  686.  
  687. COLECT IF -DEF,COLECT
  688.  
  689. ** ADDONE
  690. * WHEREIN WE ADD ONE TO THE CONTENTS OF X1. X1
  691. * CONTAINS A DISPLAY CODE NUMBER. THEREFORE, WE
  692. * CHECK TO SEE IF THE RESULTING VALUE IS GREATER
  693. * THAN A DISPLAY CODE 7. IF SO, CHANGE IT TO A
  694. * ZERO AND SET CARRY TO A ONE- WE WORK IN BASE 8.
  695. *
  696.  
  697. ADDONE EQ *+1S17 ENTRY/EXIT
  698. SX2 77B
  699. SX3 1R9+1
  700. SA4 CARRY GET ADD VALUE (0 OR 1)
  701. IX1 X1+X4
  702. BX6 X2*X1
  703. IX6 X6-X3 SEE IF DISPLAY CODE 9
  704. ZR X6,AD1MORE
  705.  
  706. SX6 B0
  707. SA6 A4
  708. EQ ADDONE ALL DONE
  709.  
  710.  
  711. AD1MORE BSS 0
  712. SX6 1
  713. SA6 A4
  714. BX1 -X2*X1 REPLACE WITH DISPLAY CODE 0
  715. SX3 1R0
  716. BX1 X1+X3
  717. EQ ADDONE
  718.  
  719. CARRY BSS 1
  720. SPACE 4,8
  721. ** PRLDNIN
  722. * PRELOAD NET INV NUMBER IN FILE NAMES
  723. *
  724.  
  725. PRLDNIN EQ *+1S17 ENTRY/EXIT
  726. SB1 1
  727. SB2 NETVIN+1 RESET DEFAULT VALUES
  728. SB3 DFLR
  729. SB4 DFLR2-DFLR
  730. MOVNIN SA1 B2
  731. BX6 X1
  732. SA6 B3
  733. SB2 B2+B1
  734. SB3 B3+B1
  735. SB4 B4-B1
  736. NE B0,B4,MOVNIN
  737.  
  738. EQ PRLDNIN
  739. SPACE 4,8
  740. ** UPD8MFN
  741. * REWRITE THE MASTER FILE (EG., MFN UPDATE)
  742.  
  743. UPD8MFN EQ *+1S17 ENTRY/EXIT
  744. GET SAVFILE,PFN003,MEMFUN
  745. RJ CRE8MF
  746. EQ UPD8MFN
  747.  
  748.  
  749.  
  750. CRE8MF EQ *+1S17 ENTRY/EXIT
  751.  
  752. OPEN SAVFILE,ALTER,R
  753. REWIND SAVFILE,R
  754. SA2 SAVFILE+2 RESET IN PTR FOR WRITE
  755. SX3 64
  756. IX6 X2+X3
  757. SA6 A2
  758. WRITER SAVFILE,R
  759. CLOSE SAVFILE,REWIND,R
  760. SA2 SAVREP CHECK SAVE/REPLACE FLAG
  761. ZR X2,C8A
  762. SAVE SAVFILE,PFN003,MEMFUN,,P,W
  763. EQ C8B
  764. C8A REPLACE SAVFILE,PFN003,MEMFUN
  765. C8B RETURN SAVFILE,R
  766. SX6 B0
  767. SA6 SAVREP CLEAR SAVE/REPLACE FLAG
  768. EQ CRE8MF
  769.  
  770. SAVREP DATA 0
  771. FRSTRY DATA 1
  772.  
  773. COLECT ENDIF
  774. EJECT
  775. COLECT IF -DEF,COLECT
  776.  
  777. ** UPD8NIN
  778. * UPDATE THE FIRST RECORD ON THE SAVFILE CONTROL
  779. * RECORD FILE. WE ARE ADDING ONE TO THE NETWORK
  780. * INVOCATION NUMBER.
  781. *
  782.  
  783. UPD8NIN EQ *+1S17 ENTRY/EXIT
  784.  
  785. MACHID MACHID
  786. SA1 PFN003
  787. MX0 30
  788. BX1 X0*X1
  789. SA2 MACHID ENTER MACHID AS PART OF NAME
  790. SX3 7777B
  791. BX2 X3*X2
  792. LX2 18
  793. BX6 X1+X2
  794. SA6 A1
  795.  
  796. D8N1 GET SAVFILE,PFN003,MEMFUN
  797. SA1 SAVFILE CHECK FOR ERRORS
  798. LX1 60-10
  799. MX0 60-8
  800. BX6 -X0*X1
  801. NZ X6,D8N3 FILE NOT THERE OR ERROR
  802. EQ D8N5
  803. D8N3 SA6 SAVREP SET SAVE (VS REPLACE) FLAG
  804. MESSAGE PFERMSG,0,RECALL
  805. RJ CRE8MF
  806. EQ D8N1 TRY AGAIN AFTER CREATING SAVFILE
  807.  
  808. D8N5 OPEN SAVFILE,ALTER,R
  809. REWIND SAVFILE,R
  810.  
  811. SA1 FRSTRY SEE IF FIRST TIME
  812. ZR X1,D8N21 NOT FIRST
  813. SX6 B0 YES FIRST - SPECIAL READ/CHECK
  814. SA6 A1 FOR NAMI MEMORY FILE VERSION NUMBER
  815. SX2 RBUF READ INTO TEMP BUFFER
  816. SA3 SAVFILE+1 RESET FIRST, IN, OUT, LIMIT
  817. MX0 60-18
  818. BX3 X0*X3
  819. BX7 X3+X2
  820. SA7 A3 SET NEW FIRST
  821. BX7 -X0*X7
  822. SA7 SAVFILE+2
  823. SA7 SAVFILE+3 SET NEW IN, OUT
  824. SX5 65
  825. IX7 X7+X5
  826. SA4 SAVFILE+4
  827. BX4 X0*X4
  828. BX7 X4+X7
  829. SA7 A4 SET SET LIMIT
  830. READ SAVFILE,R
  831. REWIND SAVFILE,R
  832. SX2 NETCTL RESET FET TO SAVFILE BUFFER
  833. SA3 SAVFILE+1 RESET FIRST, IN, OUT, LIMIT
  834. MX0 60-18
  835. BX3 X0*X3
  836. BX7 X3+X2
  837. SA7 A3 SET NEW FIRST
  838. BX7 -X0*X7
  839. SA7 SAVFILE+2
  840. SA7 SAVFILE+3 SET NEW IN, OUT
  841. SX5 65
  842. IX7 X7+X5
  843. SA4 SAVFILE+4
  844. BX4 X0*X4
  845. BX7 X4+X7
  846. SA7 A4 RESET NEW LIMIT
  847. SA1 RBUF+MEMFVER-NETCTL
  848. SA2 NAMIVER VALIDATE NAMI VERSION
  849. BX6 X1-X2 REPLACE MEM FILE IF NOT EQUAL
  850. MX0 60-12 LOOK AT 1ST 8 CHAR ONLY
  851. BX6 X0*X6 TO ALLOW FOR SUB-VERSIONS
  852. ZR X6,D8N21
  853. SX7 B0 SET REPLACE FLAG
  854. SA7 SAVREP
  855. MESSAGE REPLMF1,0,RECALL
  856. MESSAGE REPLMF2,0,RECALL
  857. CLOSE SAVFILE,REWIND,R
  858. PURGE SAVFILE,MEMFUN
  859. RETURN SAVFILE,R
  860. SA1 RBUF+NETVIN-NETCTL SAVE NET INVOCATION NUMBER
  861. BX6 X1
  862. SA6 NETVIN
  863. SA1 NAMIVER SET VERSION NUMBER
  864. BX7 X1
  865. SA7 MEMFVER
  866. USERNUM UN
  867. USERNUM MEMFUN
  868. MACHID MACHID
  869. RJ CRE8MF
  870. EQ D8N1
  871.  
  872. D8N21 BSS 0
  873. SA1 SAVFILE+1
  874. MX0 42
  875. BX7 -X0*X1 FWA OF BUFFER
  876. SA7 SAVFILE+2 IN-POINTER
  877. SA7 SAVFILE+3 OUT-POINTER
  878. SA2 SAVFILE
  879. MX0 43
  880. LX0 1
  881. BX6 X2*X0
  882. SA6 SAVFILE CLEAR CODE AND STATUS
  883.  
  884. READ SAVFILE,R
  885.  
  886.  
  887.  
  888. SA2 SAVFILE+2
  889. SA3 SAVFILE+3
  890. IX7 X2-X3 GET COUNT OF WORDS READ
  891. SB5 X7
  892.  
  893. BKSP SAVFILE,R
  894.  
  895. SB1 1
  896. SA1 SAVFILE+B1
  897. SB2 A1+B1
  898. SX6 X1+B5
  899. SA6 B2 THIS IS SAVFILE+2
  900.  
  901. SB3 X1+B1 GET *** WORD OF BUFFER
  902. SA1 B3
  903. LX1 42
  904. MX0 60-18
  905. BX1 -X0*X1
  906. SA5 NETINCR
  907. SX6 X5
  908. SA6 CARRY
  909. RJ ADDONE
  910. LX1 60-6
  911. RJ ADDONE
  912. LX1 60-6
  913. RJ ADDONE
  914. LX1 12 3 DIGITS RIGHT JUSTIFIED
  915. MX0 60-18 3 CHARACTER MASK
  916. SA2 B3 START WITH NIN PARAMETER
  917. LX2 42
  918. BX2 X0*X2
  919. BX6 X1+X2
  920. LX6 60-42
  921. SA6 A2
  922. SA6 NETINVN
  923. RJ PRLDNIN
  924.  
  925. REWRITER SAVFILE,R
  926. CLOSE SAVFILE,REWIND,R
  927. REPLACE SAVFILE,PFN003,MEMFUN
  928. RETURN SAVFILE,R
  929. EQ UPD8NIN
  930.  
  931.  
  932.  
  933. REPLMF1 DIS ,*VERSION MISMATCH ON MEMORY FILE*
  934. REPLMF2 DIS ,*MEMORY FILE REPLACED*
  935. COLECT ENDIF
  936. TITLE SET NEW MASTER FILE POINTERS
  937. COLECT IF -DEF,COLECT
  938.  
  939. ** NEWMAST
  940. * SET UP NEW MASTER FILE DIRECTION
  941. *
  942.  
  943. NEWMAST EQ *+1S17 ENTRY/EXIT
  944. SA1 A1 KEYWORD TO X1
  945. SB1 1
  946. SA2 X1+B1
  947. SA1 X1
  948. RJ STRIP55 SET VALUE BLANKS TO ZEROS
  949. SB2 NETCTL
  950. SB3 NETCTL.-1
  951. NMS1 SA3 B2 GET CURRENT KEYWORD
  952. IX4 X3-X1
  953. ZR X4,NMS7 FOUND A MATCH
  954. SB2 B2+B1
  955. SB3 B3-B1
  956. NE B0,B3,NMS1
  957. EQ NEWMAST EXHAUSTED ALL POSSIBILITIES
  958.  
  959. NMS7 BSS 0
  960. SA6 B2+B1 STORE NEW VALUE
  961. EQ NEWMAST
  962.  
  963. COLECT ENDIF
  964. SPACE 4,8
  965. STRIP55 EQ *+1S17 ENTRY/EXIT
  966. MX0 60-6 VALUE IN X2
  967. SX6 55B
  968. SB1 1
  969. SB4 10
  970. S55A LX2 6
  971. BX3 -X0*X2
  972. IX3 X3-X6 SEE IF BLANK
  973. NZ X3,S55B
  974. BX2 X0*X2 SET TO 0 IF BLANK
  975. S55B SB4 B4-B1
  976. NE B4,B0,S55A
  977. BX6 X2 MOVE TO X6 WHEN DONE
  978. EQ STRIP55
  979.  
  980.  
  981. ENTRY STRIPSP
  982.  
  983. STRIPSP EQ *+1S17 ENTRY/EXIT
  984. SA2 X1
  985. RJ STRIP55
  986. SA6 X1
  987. EQ STRIPSP
  988.  
  989.  
  990. END
  991. IDENT REMIO
  992. TITLE REMOTE TERMINAL I/O
  993. COMMENT REMOTE TERMINAL I/O
  994. SPACE 4,8
  995. USE /TERMCOM/
  996. COUNT BSS 1
  997. IBUF BSS 65
  998. USE *
  999. EJECT
  1000. ** TERMRD
  1001. * READ INPUT LINES FROM THE USER TERMINAL.
  1002. * THIS ROUTINE IS USED IN NAMI TEST MODE.
  1003. * TEST MODE IS ENTERED BY SPECIFYING TEST AS
  1004. * A PARAMETER ON THE NAMI CALL STATEMENT ANDD
  1005. * MAY BE EXECUTED FROM AN INTERACTIVE TERMINAL.
  1006. *
  1007.  
  1008. ENTRY TERMRD
  1009. TERMRD EQ *+1S17 ENTRY/EXIT
  1010.  
  1011. OPEN INPUT,READ,R
  1012.  
  1013. SB1 1
  1014. SA2 INPUT
  1015. SA1 A2+B1 X1 = FWA BUFFER
  1016. MX0 42
  1017. BX6 -X0*X1
  1018. SA6 A1+B1 SET IN POINTER
  1019. SA6 A6+B1 SET OUT POINTER
  1020. SB4 X6 SAVE FWA OF BUFFER
  1021. MX0 43
  1022. LX0 1
  1023. BX6 X2*X0
  1024. SA6 A2
  1025.  
  1026. SB5 64 CLEAR OUT INPUT BUFFER
  1027. SA2 SPACES TO SPACES
  1028. BX7 X2
  1029. CLRB SB5 B5-B1
  1030. SA7 B4+B5
  1031. NE B5,B0,CLRB
  1032.  
  1033. READ INPUT,R
  1034.  
  1035. SA2 INPUT+2
  1036. SA3 INPUT+3
  1037. IX7 X2-X3
  1038. SA7 COUNT
  1039.  
  1040. CLOSE INPUT,,R
  1041.  
  1042. EQ TERMRD
  1043.  
  1044.  
  1045. INPUT FILEB IBUF,65
  1046.  
  1047. SPACES DATA 10H
  1048.  
  1049. END
  1050. *CWEOR,0
cdc/nos2.source/nam5871/nmi_io1.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator