cdc:nos2.source:nam5871:clt_io2
Table of Contents
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
- *DECK CLT=IO2
- IDENT DISFIO
- TITLE DISFIO - NAMI FILE I/O
- COMMENT DISFIO - FILE I/O FUNCTIONS
- *CALL NMI=VER
- SPACE 4
- * IF,DEF,COLECT,1
- COLECT SET 1 BUILD NAMIFIO FOR COLLECTOR JOB
- TITLE CODED INPUT/OUTPUT ROUTINES
- LIST G,F
- ENTRY GETLINE
- ENTRY PUTLINE,OFLUSH
- ENTRY PUTTERM
- ENTRY STARTIO,FINSHIO
- ENTRY PUTTRMX,REWDIF
- ENTRY PUTRTO,PUTRTC
- ENTRY PUTRTR,PUTRTL
- COLECT IF DEF,COLECT
- ENTRY TIGRLST
- ENTRY CPYATT,CPYGET,CPYRET,CPYFLS,CPYOPN,CPYSAV
- ENTRY CPYPUR
- COLECT ENDIF
- ENTRY RAZERO
- COLECT IF -DEF,COLECT
- ENTRY UPD8MFN,UPD8NIN,PRLDNIN,NEWMAST,GNETCCL
- COLECT ENDIF
- * THIS ROUTINE READS / WRITES CODED LINES
- * PASSING PARAMETERS:
- * W1 OF COMMON PASSIT = FWA OF AREA TO BE READ/WRITTEN
- * W2 OF COMMON PASSIT = NUMBER OF WORDS TO READ/WRITE
- *
- * RETURNED PARAMETERS (READ ONLY):
- * W1 = UNCHANGED
- * W2 = NUMBER OF WORDS READ
- * W3 = 0, IF READ TERMINATED NORMALLY
- * -1, EOR ENCOUNTERED ON READ
- * -2, EOI ENCOUNTERED ON READ
- *
- EJECT
- USE /PASSIT/
- FWABUF BSS 1
- COUNT BSS 1
- COMPLT BSS 1
- LEVEL BSS 1
- IAFLAG BSS 1
- USE *
- USE /IOBUFS/
- IBUF BSS 65
- OBUFX BSS 65
- TBUFX BSS 65
- RBUF BSS 65
- SBUF BSS 65
- XBUF BSS 188
- BSS 1000B
- ZBUF EQU *-1
- .ZBUF EQU ZBUF-IBUF
- USE *
- *IF DEF,CDCNET
- USE /NFMBLK/
- NFMLFN BSS 1
- NFMNFN BSS 20
- NFMREST BSS 10
- USE *
- *ENDIF
- NAMIVER DIS 1,VER "VERSN"
- EJECT
- COLECT IF -DEF,COLECT
- CC01 MICRO 1,,$PARAM$
- CC02 MICRO 1,,$CIN=VIN$
- CC03 MICRO 1,,$UNM=UNM$
- CC04 MICRO 1,,$PWM=PWM$
- CC05 MICRO 1,,$LIN=000$
- CC06 MICRO 1,,$UIN=999$
- CC07 MICRO 1,,$OIN=000$
- CC08 MICRO 1,,$ZZD0FIL=ZZD0VIN$
- CC09 MICRO 1,,$ZZD1FIL=ZZD1VIN$
- CC10 MICRO 1,,$ZZD2FIL=ZZD2VIN$
- CC11 MICRO 1,,$ZZL0FIL=ZZL0VIN$
- CC13 MICRO 1,,$ZZS0FIL=ZZS0VIN$
- CC15 MICRO 1,,$ZZT0FIL=ZZT0VIN$
- USE /NETCOM/
- NETINVN VFD 60/10CVIN=999,
- NETINCR VFD 60/0
- DFLR EQU * ORDER DEPENDENT VALUES ....
- DIS 15,*"CC01","CC02","CC03","CC04","CC07","CC08","CC09","C
- ,C10","CC11","CC13","CC15".
- VFD 60/0
- DIS 4,DEFAULT
- DIS 4,
- USE *
- COLECT ENDIF
- EJECT
- COLECT IF -DEF,COLECT
- USE /NETCTRL/
- NETCTL EQU *
- DIS ,*NETCTRL.*
- NETVIN DIS ,*VIN=001,*
- DIS 15,*"CC01","CC02","CC03","CC04","CC07","CC08","CC09","C
- ,C10","CC11","CC13","CC15".
- VFD 60/0
- DIS 1,MFN MASTER (PROC) FILE NAME
- MFN VFD 60/0LNAMSTRT
- DIS 1,UN MASTER FILE AND ROUTED JOB USERNAME
- UN VFD 60/0LNETOPS DEFAULTS TO NETOPS UN
- DIS 1,PW MASTER FILE AND ROUTED JOB PASSWORD
- PW VFD 60/0 DEFAULTS TO NO CHANGE
- DIS 1,FM MASTER (PROC) FILE FAMILY NAME
- FM VFD 60/0LSYS76
- DIS 1,RN LAST USED PARAMETER RECORD NAME
- RN VFD 60/0LRESTRT
- DIS 1,LIN LOWER NIN BOUNDS FOR COLLECT
- LIN VFD 60/0L000 DEFAULTS TO 000
- DIS 1,UIN UPPER NIN BOUNDS FOR COLLECT
- UIN VFD 60/0L999 DEFAULTS TO 999
- DIS 1,MEMFUN MEMORY FILE USERNAME
- MEMFUN VFD 60/0 DEFAULTS TO CURRENT USERNAME
- DIS 1,OIN OLD INVOCATION NMBR FROM CC CALL
- OIN DIS 1,777
- DIS 1, MACHID MACHINE ID
- MACHID VFD 60/0
- MEMFVER DIS 1,VER "VERSN"
- .NETCTL EQU *
- NETCTL. EQU .NETCTL-NETCTL
- BSSZ 77B-NETCTL.
- DIS 1,ENDNETCTRL
- USE *
- COLECT ENDIF
- EJECT
- SPACE 4,8
- USE /ROUTCOM/
- RLFN BSS 1
- RCODE BSS 1
- USE *
- SPACE 4,8
- USE /COPYCOM/
- PFN1 BSS 1
- UN1 BSS 1
- PFN2 BSS 1
- UN2 BSS 1
- PFN3 BSS 1
- UN3 BSS 1
- USE *
- USE /PFEMSG/
- PFERMSG BSS 4
- USE *
- EJECT
- SPACE 4,8
- TBL77 EQU *
- VFD 12/7700B,12/0014D,36/0
- VFD 42/0LNAME,18/0
- VFD 60/0LMM.DD.YYBB
- VFD 60/0LHH.MM.SSBB
- VFD 60/10LNAMI R7
- VFD 42/7LCOLLECT,18/3R 1.
- VFD 30/5L00 ,30/5L
- VFD 60/10L
- DIS 4,NAMI DUMP COLLECTION
- VFD 60/0,60/0
- TBL34 EQU *
- VFD 12/3400B,12/1B,36/0
- VFD 36/6LBENRAD,24/5
- .TBLS EQU *
- L.TBLS EQU .TBLS-TBL77
- LIST *
- LIST F
- SPACE 4,8
- ** COMMON DECKS REQUIRED FROM OPL (CATLIST)
- OPL XTEXT COMSPFM
- OPL XTEXT COMCMAC
- OPL XTEXT COMCRDH
- ** COMMON DECKS REQUIRED FROM OPL (SETLOF)
- *OPL XTEXT COMCCMD
- *OPL XTEXT COMCCPM
- PFN001 VFD 36/0LNETCCL,24/0
- PFN002 VFD 42/0LNETCCL2,18/0
- PFN003 VFD 42/0LNETCTRL,18/0
- LOFADDR VFD 12/0,18/LOFLIST,30/1
- LOFLIST VFD 42/0,18/3 LENGTH OF LIST
- VFD 42/7COUTFIL ,18/OUTFIL
- VFD 42/7CINFIL ,18/INFIL
- VFD 60/
- NXTLINE BSSZ 1 BATCH MODE POINTER TO NEXT LINE START
- SAVEFWA BSSZ 1
- IA$FLAG BSSZ 1
- RAZERO EQU 0 FOR RA+0/RA+77 ACCESS
- EJECT
- TITLE GETLINE - GET ONE DATA LINE
- ** GETLINE
- *
- GETLINE EQ *+1S17 ENTRY/EXIT
- * SETLOF LOFADDR
- SA1 FWABUF SAVE INCOMING FWA
- BX6 X1
- SA6 SAVEFWA
- SB3 12 SET WORD COUNT (RETURN TO USER)
- SX6 B3
- SA6 COUNT
- RJ READAGN SEE IF NEED TO ISSUE READ
- * READH INFIL,BUFFER,14
- SA4 FWABUF FWA BUFR IN X4
- SB6 X4 FWA BUFFER TO B6
- SB7 14 MAX WORDS TO READ
- SX2 INFIL FWA OF FET OF READ FILE
- RJ =XRDH=
- BX6 X1 STATUS 0=OK, -1=EOF, -2=EOI
- SA6 RDTAG LWA+1 IN BUFR = EOR
- SX7 0 RETURN 0 FOR GOOD READ
- ZR X6,STA5 GOOD READ - NORMAL TERMINATION
- SX7 1 RETURN 1 FOR END OF RECORD
- PL X6,STA5 END OF RECORD
- SX7 3 EOF/EOI - RETURN +3
- STA5 SA7 COMPLT
- EQ GETLINE EXIT...
- SPACE 4,8
- READAGN EQ *+1S17 ENTRY/EXIT...
- SA1 RDTAG
- ZR X1,READAGN
- SA2 INFIL
- MX0 43
- LX0 1
- BX6 X0*X2
- SA6 A2 CLEAR CODE AND STATUS
- READ INFIL,R
- EQ READAGN
- RDTAG VFD 60/1B
- TITLE FILE FUNCTIONS
- ** OFLUSH
- *
- OFLUSH EQ *+1S17 ENTRY/EXIT
- WRITER OUTFIL,R
- EQ OFLUSH
- SPACE 4,8
- ** REWDIF
- *
- REWDIF EQ *+1S17 ENTRY/EXIT
- REWIND INFIL,R
- SX7 B0
- SA7 NXTLINE
- EQ REWDIF
- SPACE 4,8
- ** PUTLINE
- *
- PUTLINE EQ *+1S17 ENTRY/EXIT
- SA2 FWABUF STARTING ADDRESS OF PRINTLINE
- SA3 COUNT NUMBER OF WORDS TO BE WRITTEN
- WRITEH OUTFIL,X2,X3
- EQ PUTLINE
- SPACE 4,8
- ** PUTTERM
- *
- PUTTERM EQ *+1S17 ENTRY/EXIT
- SA2 FWABUF
- SA3 COUNT
- WRITEH OUTPUT,X2,X3
- RJ PUTLINE
- EQ PUTTERM
- SPACE 4,8
- ** PUTTRMX
- *
- PUTTRMX EQ *+1S17 ENTRY/EXIT
- WRITER OUTPUT,R
- EQ PUTTRMX
- SPACE 4,8
- ** PUTRTO
- *
- PUTRTO EQ *+1S17 ENTRY/EXIT
- SA2 RLFN
- RJ STRIP55 CHNG TRAIL 55B TO 00B
- BX1 X6
- SX2 3
- BX6 X1+X2
- SA6 ROUTFIL
- OPEN ROUTFIL,WRITE,R
- EQ PUTRTO
- SPACE 4,8
- ** PUTRTC
- *
- PUTRTC EQ *+1S17 ENTRY/EXIT
- RECALL ROUTFIL
- WRITER ROUTFIL,R
- WRITEF ROUTFIL,R
- REWIND ROUTFIL,R
- CLOSE ROUTFIL,REWIND,R
- EQ PUTRTC
- SPACE 4,8
- ** PUTRTL
- *
- PUTRTL EQ *+1S17 ENTRY/EXIT
- RECALL ROUTFIL
- SA2 FWABUF
- SA3 COUNT
- WRITEH ROUTFIL,X2,X3
- EQ PUTRTL
- SPACE 4,8
- ** PUTRTR
- *
- PUTRTR EQ *+1S17 ENTRY/EXIT
- RECALL ROUTFIL
- WRITER ROUTFIL,R
- EQ PUTRTR
- SPACE 4,8
- INFIL FILEB IBUF,65,(FET=15D),EPR
- OUTFIL FILEB OBUF,65
- OUTPUT FILEB TBUF,65
- ROUTFIL FILEB RBUF,65
- IF DEF,COLECT,1
- CATFILE FILEB TIGRBUF,65,(FET=15D),EPR
- IF -DEF,COLECT,1
- SAVFILE FILEB NETCTL,65,(FET=15D),EPR
- CPYFL1 FILEB IBUF,(.ZBUF+1),(FET=15D),EPR
- CPYFL2 FILEB IBUF,(.ZBUF+1),(FET=15D),EPR
- OBUF BSS 65
- TBUF BSS 65
- EJECT
- COLECT IF -DEF,COLECT
- ** GNETCCL
- *
- GNETCCL EQ *+1S17 ENTRY/EXIT
- SX7 B0
- SA7 PFERMSG
- GET INFIL,MFN,UN
- SA1 INFIL CHECK FOR ERRORS
- LX1 60-10
- MX0 60-8
- BX6 -X0*X1 ISOLATE ERROR BITS
- ZR X6,GNE1 NO ERRORS
- MESSAGE PFERMSG,0,RECALL
- MESSAGE GNERMSG,0,RECALL
- EQ GNETCCL EXIT IN SHAME
- GNE1 OPEN INFIL,READ,R
- EQ GNETCCL
- GNERMSG DIS ,*CANNOT GET/FIND MASTER FILE*
- COLECT ENDIF
- SPACE 4,8
- ** STARTIO
- *
- STARTIO EQ *+1S17 ENTRY/EXIT
- SX6 B0
- SA6 PFERMSG
- SX7 A6
- SB1 1
- SA6 A6+B1
- SA6 A6+B1
- SA6 A6+B1
- SA7 INFIL+10D
- IF -DEF,COLECT,1
- SA7 SAVFILE+10D
- SA1 IAFLAG
- BX7 X1
- SA7 IA$FLAG
- * 0 = INTERACTIVE USER, 2 = BATCH USER
- IF -DEF,COLECT,1
- RJ GNETCCL
- OPEN OUTFIL,WRITENR,R
- OPEN OUTPUT,WRITENR,R
- EQ STARTIO
- ** FINSHIO
- *
- FINSHIO EQ *+1S17 ENTRY/EXIT
- CLOSE INFIL,REWIND,R
- RETURN INFIL,R
- CLOSE OUTFIL,REWIND,R
- CLOSE OUTPUT,,R
- EQ FINSHIO
- TITLE SURVEY USER CATALOG
- COLECT IF DEF,COLECT
- USE /TIGRCOM/
- TCSTAT BSS 1 CATLIST STATUS
- TCLEN BSS 1 COUNT OF WORDS READ
- TIGRBUF BSS 65
- USE
- ** TIGRLST
- * WHEREIN WE READ THE USER CATALOG AND RETURN
- * PF INFORMATION TO THE CALLER.
- *
- TIGRLST EQ *+1S17 ENTRY/EXIT
- SB1 1
- SA1 CATFILE
- MX0 43 CLEAR LAST CODE/STATUS
- LX0 1
- BX7 X1*X0
- SA7 A1
- SA1 A1+B1
- MX0 42 SET UP IN AND OUT POINTERS
- BX7 -X0*X1
- SA7 A1+B1
- SA7 A7+B1
- CATLIST CATFILE,,UN2
- SB1 1
- SA1 CATFILE
- BX7 X1
- SA7 TCSTAT
- SA1 A1+B1
- SA2 A1+B1
- SA3 A2+B1 X2, X3 = IN AND OUT
- IX6 X2-X3
- SA6 TCLEN
- EQ TIGRLST
- COLECT ENDIF
- TITLE COPY FILES
- COLECT IF DEF,COLECT
- CPYATT EQ *+1S17 ENTRY/EXIT
- ATTACH CPYFL1,PFN1,UN1
- RJ CPYST1
- OPEN CPYFL1,READ,RECALL
- EQ CPYATT
- SPACE 3,6
- CPYGET EQ *+1S17 ENTRY/EXIT
- GET CPYFL1,PFN1,UN1
- RJ CPYST1
- OPEN CPYFL1,READ,RECALL
- EQ CPYGET
- SPACE 3,6
- CPYST1 EQ *+1S17 ENTRY/EXIT
- MX0 42
- SA1 PFN1
- SA2 CPYFL1
- BX6 -X0*X2 FILE NAME
- BX3 X0*X1 STATUS
- BX6 X6+X3
- SA6 A1
- EQ CPYST1
- SPACE 3,6
- CPYST2 EQ *+1S17 ENTRY/EXIT
- MX0 42
- SA1 PFN2
- SA2 CPYFL2
- BX6 -X0*X2 FILE NAME
- BX3 X0*X1 STATUS
- BX6 X6+X3
- SA6 A1
- EQ CPYST2
- COLECT ENDIF
- EJECT
- COLECT IF DEF,COLECT
- CPYOPN EQ *+1S17 ENTRY/EXIT
- SX6 B0
- SA6 PFERMSG
- SX7 A6
- SB1 1
- SA6 A6+B1
- SA6 A6+B1
- SA6 A6+B1
- SA7 CPYFL1+10D
- SA7 CPYFL2+10D
- RJ CPYSN2
- * ATTACH CPYFL2
- * PURGE CPYFL2
- RETURN CPYFL2,RECALL
- * DEFINE CPYFL2
- OPEN CPYFL2,WRITE,RECALL
- RJ CPYST2
- EQ CPYOPN
- SPACE 3,6
- CPYRET EQ *+1S17 ENTRY/EXIT
- CLOSE CPYFL1,REWIND,RECALL
- RETURN CPYFL1,RECALL
- EQ CPYRET
- CPYMSG DIS ,* COPIED FILNAME*
- SPACE 3,6
- CPYSAV EQ *+1S17 ENTRY/EXIT
- RJ CPYSN2
- CLOSE CPYFL2,REWIND,RECALL
- RJ CPYST2
- * RETURN CPYFL2,RECALL
- EQ CPYSAV
- SPACE 3
- CPYPUR EQ *+1S17 ENTRY/EXIT
- PURGE CPYFL1,UN1
- RJ CPYST1
- EQ CPYPUR
- COLECT ENDIF
- EJECT
- COLECT IF DEF,COLECT
- CPYFLS EQ *+1S17 ENTRY/EXIT
- * CLEAR BUFFER
- RJ CPYSN2
- RJ CPYTAG
- *IF DEF,CDCNET
- RJ DUMPNFN
- *ENDIF
- CPY1 BSS 0
- SA1 CPYFL1+1
- MX0 42
- BX6 -X0*X1
- SA6 CPYFL1+2
- SA6 CPYFL1+3
- SA6 CPYFL2+3
- READ CPYFL1,RECALL
- RJ CPYST1
- SA4 CPYFL1+2
- BX6 X4
- SA6 CPYFL2+2
- SA5 CPYFL1+3 CHK FOR DATA
- IX3 X4-X5
- SA1 CPYFL1
- LX1 60-9 GET EOI BIT
- MX0 59
- BX2 -X0*X1
- ZR X2,CPY2 NOT EOI
- ZR X3,CPY1A NO DATA
- WRITER CPYFL2,RECALL
- RJ CPYST2
- CPY1A EQU *
- * WRITEF CPYFL2,RECALL
- * RJ CPYST2
- MESSAGE CPYMSG,0,RECALL
- EQ CPYFLS
- CPY2 SX2 .ZBUF
- IX7 X3-X2
- NZ X7,CPY3
- WRITE CPYFL2,RECALL
- EQ CPY5
- CPY3 WRITER CPYFL2,RECALL
- CPY5 RJ CPYST2
- EQ CPY1
- SPACE 4,8
- CPYSN2 EQ *+1S17 ENTRY/EXIT
- SA1 PFN2
- MX0 42
- SA2 CPYFL2
- BX6 X0*X1
- BX2 -X0*X2
- BX6 X6+X2
- SA6 A2
- EQ CPYSN2 FILE NAME SET
- COLECT ENDIF
- EJECT
- COLECT IF DEF,COLECT
- CPYTAG EQ *+1S17 ENTRY/EXIT
- MX0 42
- SA1 PFN1 GET NAME AND SET UP 77 TABLE
- BX6 X0*X1
- SA6 CPYMSG+1
- SA6 TBL77+1
- SA6 TBL34
- DATE TBL77+2
- CLOCK TBL77+3
- SA2 TBL77+2
- SA3 TBL77+3
- LX2 6
- LX3 6
- BX6 X2
- BX7 X3
- SA6 A2
- SA7 A3
- SB1 1
- SB2 TBL77
- SB3 IBUF
- SB4 L.TBLS
- CT1 SA1 B2
- BX6 X1
- SA6 B3
- SB2 B2+B1
- SB3 B3+B1
- SB4 B4-B1
- NE B0,B4,CT1
- SA1 CPYFL2+1 SET FOR WRITE
- MX0 42
- BX6 -X0*X1
- SA6 CPYFL2+3
- SX5 L.TBLS
- IX6 X6+X5
- SA6 CPYFL2+2
- WRITER CPYFL2,RECALL
- RJ CPYST2
- EQ CPYTAG
- COLECT ENDIF
- *IF DEF,CDCNET
- EJECT
- COLECT IF DEF,COLECT
- DUMPNFN EQ *+1S17
- SA1 CPYFL2
- MX0 24
- BX2 X1*X0
- LX2 24
- SA3 =R*DMDI*
- IX4 X2-X3
- NZ X4,DUMPNFN IF NOT MDI DUMP FILE
- WRITEW CPYFL2,NFMNFN,20
- RJ CPYST2
- WRITER CPYFL2,R
- RJ CPYST2
- EQ DUMPNFN
- COLECT ENDIF
- *ENDIF
- TITLE UPDATE NETWORK INVOCATION NUMBER
- COLECT IF -DEF,COLECT
- ** ADDONE
- * WHEREIN WE ADD ONE TO THE CONTENTS OF X1. X1
- * CONTAINS A DISPLAY CODE NUMBER. THEREFORE, WE
- * CHECK TO SEE IF THE RESULTING VALUE IS GREATER
- * THAN A DISPLAY CODE 7. IF SO, CHANGE IT TO A
- * ZERO AND SET CARRY TO A ONE- WE WORK IN BASE 8.
- *
- ADDONE EQ *+1S17 ENTRY/EXIT
- SX2 77B
- SX3 1R9+1
- SA4 CARRY GET ADD VALUE (0 OR 1)
- IX1 X1+X4
- BX6 X2*X1
- IX6 X6-X3 SEE IF DISPLAY CODE 9
- ZR X6,AD1MORE
- SX6 B0
- SA6 A4
- EQ ADDONE ALL DONE
- AD1MORE BSS 0
- SX6 1
- SA6 A4
- BX1 -X2*X1 REPLACE WITH DISPLAY CODE 0
- SX3 1R0
- BX1 X1+X3
- EQ ADDONE
- CARRY BSS 1
- SPACE 4,8
- ** PRLDNIN
- * PRELOAD NET INV NUMBER IN FILE NAMES
- *
- PRLDNIN EQ *+1S17 ENTRY/EXIT
- SB1 1
- SB2 NETVIN+1 RESET DEFAULT VALUES
- SB3 DFLR
- SB4 16 NUMBER OF WORDS TO MOVE
- MOVNIN SA1 B2
- BX6 X1
- SA6 B3
- SB2 B2+B1
- SB3 B3+B1
- SB4 B4-B1
- NE B0,B4,MOVNIN
- EQ PRLDNIN
- SPACE 4,8
- ** UPD8MFN
- * REWRITE THE MASTER FILE (EG., MFN UPDATE)
- UPD8MFN EQ *+1S17 ENTRY/EXIT
- GET SAVFILE,PFN003,MEMFUN
- RJ CRE8MF
- EQ UPD8MFN
- CRE8MF EQ *+1S17 ENTRY/EXIT
- OPEN SAVFILE,ALTER,R
- REWIND SAVFILE,R
- SA2 SAVFILE+2 RESET IN PTR FOR WRITE
- SX3 64
- IX6 X2+X3
- SA6 A2
- WRITER SAVFILE,R
- CLOSE SAVFILE,REWIND,R
- SA2 SAVREP CHECK SAVE/REPLACE FLAG
- ZR X2,C8A
- SAVE SAVFILE,PFN003,MEMFUN,,PU,W
- EQ C8B
- C8A REPLACE SAVFILE,PFN003,MEMFUN
- C8B RETURN SAVFILE,R
- SX6 B0
- SA6 SAVREP CLEAR SAVE/REPLACE FLAG
- EQ CRE8MF
- SAVREP DATA 0
- FRSTRY DATA 1
- COLECT ENDIF
- EJECT
- COLECT IF -DEF,COLECT
- ** UPD8NIN
- * UPDATE THE FIRST RECORD ON THE SAVFILE CONTROL
- * RECORD FILE. WE ARE ADDING ONE TO THE NETWORK
- * INVOCATION NUMBER.
- *
- UPD8NIN EQ *+1S17 ENTRY/EXIT
- MACHID MACHID
- SA1 PFN003
- MX0 30
- BX1 X0*X1
- SA2 MACHID ENTER MACHID AS PART OF NAME
- SX3 7777B
- BX2 X3*X2
- LX2 18
- BX6 X1+X2
- SA6 A1
- D8N1 GET SAVFILE,PFN003,MEMFUN
- SA1 SAVFILE CHECK FOR ERRORS
- LX1 60-10
- MX0 60-8
- BX6 -X0*X1
- NZ X6,D8N3 FILE NOT THERE OR ERROR
- EQ D8N5
- D8N3 SA6 SAVREP SET SAVE (VS REPLACE) FLAG
- MESSAGE PFERMSG,0,RECALL
- RJ CRE8MF
- EQ D8N1 TRY AGAIN AFTER CREATING SAVFILE
- D8N5 OPEN SAVFILE,ALTER,R
- REWIND SAVFILE,R
- SA1 FRSTRY SEE IF FIRST TIME
- ZR X1,D8N21 NOT FIRST
- SX6 B0 YES FIRST - SPECIAL READ/CHECK
- SA6 A1 FOR NAMI MEMORY FILE VERSION NUMBER
- SX2 RBUF READ INTO TEMP BUFFER
- SA3 SAVFILE+1 RESET FIRST, IN, OUT, LIMIT
- MX0 60-18
- BX3 X0*X3
- BX7 X3+X2
- SA7 A3 SET NEW FIRST
- BX7 -X0*X7
- SA7 SAVFILE+2
- SA7 SAVFILE+3 SET NEW IN, OUT
- SX5 65
- IX7 X7+X5
- SA4 SAVFILE+4
- BX4 X0*X4
- BX7 X4+X7
- SA7 A4 SET SET LIMIT
- READ SAVFILE,R
- REWIND SAVFILE,R
- SX2 NETCTL RESET FET TO SAVFILE BUFFER
- SA3 SAVFILE+1 RESET FIRST, IN, OUT, LIMIT
- MX0 60-18
- BX3 X0*X3
- BX7 X3+X2
- SA7 A3 SET NEW FIRST
- BX7 -X0*X7
- SA7 SAVFILE+2
- SA7 SAVFILE+3 SET NEW IN, OUT
- SX5 65
- IX7 X7+X5
- SA4 SAVFILE+4
- BX4 X0*X4
- BX7 X4+X7
- SA7 A4 RESET NEW LIMIT
- SA1 RBUF+MEMFVER-NETCTL
- SA2 NAMIVER VALIDATE NAMI VERSION
- BX6 X1-X2 REPLACE MEM FILE IF NOT EQUAL
- MX0 60-12 LOOK AT 1ST 8 CHAR ONLY
- BX6 X0*X6 TO ALLOW FOR SUB-VERSIONS
- ZR X6,D8N21
- SX7 B0 SET REPLACE FLAG
- SA7 SAVREP
- MESSAGE REPLMF1,0,RECALL
- MESSAGE REPLMF2,0,RECALL
- CLOSE SAVFILE,REWIND,R
- PURGE SAVFILE,MEMFUN
- RETURN SAVFILE,R
- SA1 RBUF+NETVIN-NETCTL SAVE NET INVOCATION NUMBER
- BX6 X1
- SA6 NETVIN
- SA1 NAMIVER SET VERSION NUMBER
- BX7 X1
- SA7 MEMFVER
- USERNUM UN
- USERNUM MEMFUN
- MACHID MACHID
- RJ CRE8MF
- EQ D8N1
- D8N21 BSS 0
- SA1 SAVFILE+1
- MX0 42
- BX7 -X0*X1 FWA OF BUFFER
- SA7 SAVFILE+2 IN-POINTER
- SA7 SAVFILE+3 OUT-POINTER
- SA2 SAVFILE
- MX0 43
- LX0 1
- BX6 X2*X0
- SA6 SAVFILE CLEAR CODE AND STATUS
- READ SAVFILE,R
- SA2 SAVFILE+2
- SA3 SAVFILE+3
- IX7 X2-X3 GET COUNT OF WORDS READ
- SB5 X7
- BKSP SAVFILE,R
- SB1 1
- SA1 SAVFILE+B1
- SB2 A1+B1
- SX6 X1+B5
- SA6 B2 THIS IS SAVFILE+2
- SB3 X1+B1 GET *** WORD OF BUFFER
- SA1 B3
- LX1 42
- MX0 60-18
- BX1 -X0*X1
- SA5 NETINCR
- SX6 X5
- SA6 CARRY
- RJ ADDONE
- LX1 60-6
- RJ ADDONE
- LX1 60-6
- RJ ADDONE
- LX1 12 3 DIGITS RIGHT JUSTIFIED
- MX0 60-18 3 CHARACTER MASK
- SA2 B3 START WITH NIN PARAMETER
- LX2 42
- BX2 X0*X2
- BX6 X1+X2
- LX6 60-42
- SA6 A2
- SA6 NETINVN
- RJ PRLDNIN
- REWRITER SAVFILE,R
- CLOSE SAVFILE,REWIND,R
- REPLACE SAVFILE,PFN003,MEMFUN
- RETURN SAVFILE,R
- EQ UPD8NIN
- REPLMF1 DIS ,*VERSION MISMATCH ON MEMORY FILE*
- REPLMF2 DIS ,*MEMORY FILE REPLACED*
- COLECT ENDIF
- TITLE SET NEW MASTER FILE POINTERS
- COLECT IF -DEF,COLECT
- ** NEWMAST
- * SET UP NEW MASTER FILE DIRECTION
- *
- NEWMAST EQ *+1S17 ENTRY/EXIT
- SA1 A1 KEYWORD TO X1
- SB1 1
- SA2 X1+B1
- SA1 X1
- RJ STRIP55 SET VALUE BLANKS TO ZEROS
- SB2 NETCTL
- SB3 NETCTL.-1
- NMS1 SA3 B2 GET CURRENT KEYWORD
- IX4 X3-X1
- ZR X4,NMS7 FOUND A MATCH
- SB2 B2+B1
- SB3 B3-B1
- NE B0,B3,NMS1
- EQ NEWMAST EXHAUSTED ALL POSSIBILITIES
- NMS7 BSS 0
- SA6 B2+B1 STORE NEW VALUE
- EQ NEWMAST
- COLECT ENDIF
- SPACE 4,8
- STRIP55 EQ *+1S17 ENTRY/EXIT
- MX0 60-6 VALUE IN X2
- SX6 55B
- SB1 1
- SB4 10
- S55A LX2 6
- BX3 -X0*X2
- IX3 X3-X6 SEE IF BLANK
- NZ X3,S55B
- BX2 X0*X2 SET TO 0 IF BLANK
- S55B SB4 B4-B1
- NE B4,B0,S55A
- BX6 X2 MOVE TO X6 WHEN DONE
- EQ STRIP55
- ENTRY STRIPSP
- STRIPSP EQ *+1S17 ENTRY/EXIT
- SA2 X1
- RJ STRIP55
- SA6 X1
- EQ STRIPSP
- END
- IDENT REMIO
- TITLE REMOTE TERMINAL I/O
- COMMENT REMOTE TERMINAL I/O
- SPACE 4,8
- USE /TERMCOM/
- COUNT BSS 1
- IBUF BSS 65
- USE *
- EJECT
- ENTRY TERMRD
- TERMRD EQ *+1S17 ENTRY/EXIT
- OPEN INPUT,READ,R
- SB1 1
- SA2 INPUT
- SA1 A2+B1 X1 = FWA BUFFER
- MX0 42
- BX6 -X0*X1
- SA6 A1+B1 SET IN POINTER
- SA6 A6+B1 SET OUT POINTER
- SB4 X6 SAVE FWA OF BUFFER
- MX0 43
- LX0 1
- BX6 X2*X0
- SA6 A2
- SB5 64 CLEAR OUT INPUT BUFFER
- SA2 SPACES TO SPACES
- BX7 X2
- CLRB SB5 B5-B1
- SA7 B4+B5
- NE B5,B0,CLRB
- READ INPUT,R
- SA2 INPUT+2
- SA3 INPUT+3
- IX7 X2-X3
- SA7 COUNT
- CLOSE INPUT,,R
- EQ TERMRD
- INPUT FILEB IBUF,65
- SPACES DATA 10H
- END
- *CWEOR,0
cdc/nos2.source/nam5871/clt_io2.txt ยท Last modified: 2023/08/05 17:21 by Site Administrator