User Tools

Site Tools


cdc:nos2.source:nam5871:clt_io2

CLT=IO2

Table Of Contents

  • [00003] DISFIO - NAMI FILE I/O
  • [00010] CODED INPUT/OUTPUT ROUTINES
  • [00221] GETLINE - GET ONE DATA LINE
  • [00268] FILE FUNCTIONS
  • [00430] SURVEY USER CATALOG
  • [00473] COPY FILES
  • [00674] UPDATE NETWORK INVOCATION NUMBER
  • [00925] SET NEW MASTER FILE POINTERS
  • [00981] REMOTE TERMINAL I/O

Source Code

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