Google
 

Trailing-Edge - PDP-10 Archives - AP-4172F-BM - 3a-sources/acctpr.mac
There are 3 other files named acctpr.mac in the archive. Click here to see a list.
;<3-UTILITIES>ACCTPR.MAC.7,  8-Nov-77 10:43:16, EDIT BY KIRSCHEN
;<3-UTILITIES>ACCTPR.MAC.6,  8-Nov-77 10:37:34, EDIT BY KIRSCHEN
;MORE COPYRIGHT UPDATING...
;<3-UTILITIES>ACCTPR.MAC.5, 26-Oct-77 10:56:10, EDIT BY KIRSCHEN
;UPDATE COPYRIGHT FOR RELEASE 3
;<3-UTILITIES>ACCTPR.MAC.4, 29-Sep-77 20:59:25, EDIT BY OSMAN
;USE CLZFF INSTEAD OF RLJFN SO THAT OTHER PROCESS'S JFNS DON'T GET FLUSHED
;<3-UTILITIES>ACCTPR.MAC.3, 25-Aug-77 11:24:01, EDIT BY KIRSCHEN
;FIX VERSION NUMBERS FOR RELEASE 3
;<3-UTILITIES>ACCTPR.MAC.2, 12-Aug-77 15:29:50, Edit by HESS
;TCO 1850 - FIX DISK RECORD CLOBBERAGE FOR ALPHANUMERIC ACCOUNTS
;<2-UTILITIES>ACCTPR.MAC.8,  3-Feb-77 11:52:54, EDIT BY KIRSCHEN
;TCO 1730 - MAKE ACCTPR HANDLE PRE-RELEASE-2 FACT ENTRIES PROPERLY
;<2-UTILITIES>ACCTPR.MAC.7, 27-Dec-76 17:05:03, EDIT BY HURLEY
;<2-UTILITIES>ACCTPR.MAC.6, 23-Sep-76 14:26:45, Edit by HESS
;TCO 1537 - HANDLE NEW DISK TYPE FACT ENTRIES & CHANGE OUTPUT FORMAT
;<2-UTILITIES>ACCTPR.MAC.2, 10-Sep-76 16:01:35, EDIT BY CROSSLAND
;TCO # 1525  PAD ALPANUMERIC ACCOUNTS TO 39 CHARACTER, REMOVE EXTRA PADDING
;FROM DISK STATISTICS
;TCO # 1524 EDUCATED PROGRAM ABOUT NUMERIC ACCOUNT DESIGNATORS.
;<1A-UTILITIES>ACCTPR.MAC.21,  6-MAY-76 10:49:49, EDIT BY HURLEY
;<1A-UTILITIES>ACCTPR.MAC.15,  8-APR-76 11:05:29, EDIT BY HURLEY
;TCO 1244 - ADD .DIRECT .XTABM FOR MACRO 50 ASSEMBLIES
;<V-SOURCES>ACCTPR.MAC.14, 23-DEC-75 12:11:37, EDIT BY LEWINE

TITLE ACCTPR - PROGRAM TO TRANSLATE BINARY ACCOUNTING FILES TO ASCII
SUBTTL		D. KIRSCHEN		11-20-75



;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
;  OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.
;
;COPYRIGHT (C) 1976, 1977, 1978 BY DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.

	SEARCH MONSYM, MACSYM
	.REQUIRE SYS:MACREL
	SALL
	IFNDEF .PSECT,<
	.DIRECT .XTABM>

; ACCUMULATOR DEFINITIONS

	T1=1		;GENERAL PURPOSE
	T2=2		;GENERAL PURPOSE
	T3=3		;GENERAL PURPOSE
	T4=4		;GENERAL PURPOSE
	P1=5		;PRESERVED
	P2=6		;PRESERVED
	P3=7		;PRESERVED
	P4=10		;PRESERVED
	CX=16		;RESERVED FOR SUPPORT CODE
	P=17		;PUSH-DOWN STACK

; VERSION NUMBERS

	VMAJOR==3		;MAJOR VERSION
	VMINOR==0		;MINOR VERSION
	VWHO==0			;WHO LAST EDITED (0= DEC DEVELOPMENT)
	VEDIT==31		;EDIT NUMBER

VACCTP== <VWHO>B2+<VMAJOR>B11+<VMINOR>B17+VEDIT

; SYMBOL DEFINITIONS

PDLEN==50		;LENGTH OF PUSH-DOWN STACK
NCHPW==5		;NUMBER OF ASCII CHARACTERS PER WORD
CMDMAX==100		;MAX SIZE OF COMMAND TABLE
NAMSIZ==21		;SIZE OF NAME BUFFER
ENTMSZ==40		;MAX SIZE OF FACT ENTRY BLOCK
BUFSIZ==200		;SIZE OF INPUT TEXT BUFFER
ATMSIZ==BUFSIZ		;SIZE OF ATOM BUFFER FOR COMND JSYS
GJFSIZ==.GJRTY+2	;SIZE OF GTJFN BLOCK USED BY COMND JSYS
NUMFLG==<FLD(^D12,NO%COL)+FLD(^D10,NO%RDX)+NO%LFL+NO%ZRO>
SUBTTL	OUTPUT RECORD FIELD SIZE DEFINITIONS

.FSCOD==3		;ENTRY CODE TYPE
.FSJOB==3		;JOB NUMBER
.FSLIN==4		;LINE NUMBER
.FSNAM==^D81		;NAME
.FSMON==2		;MONTH
.FSDAY==2		;DAY
.FSYR==2		;YEAR
.FSTIM==4		;TIME
.FSRUN==^D12		;RUNTIME
.FSATP==1		;ACCOUNT TYPE (A=ALPHANUMERIC, N=NUMERIC)
.FSACT==^D39		;ACCOUNT
.FSCON==^D12		;CONSOLE TIME
.FSFIL==^D12		;NUMBER OF FILE PAGES
.FSLPT==^D12		;NUMBER OF PRINTER PAGES
.FSCDR==^D12		;NUMBER OF CARDS READ
.FSDEV==6		;SPOOLED DEVICE
SUBTTL	FACT FILE ENTRY DEFINITIONS

; OFFSETS INTO FACT ENTRIES

.EFRUN==3		;RUN TIME
.EFFIL==3		;NUMBER OF FILE PAGES
.EFCON==4		;CONSOLE TIME
.EFDEV==4		;DEVICE DESIGNATOR IN SPOOLER ENTRIES
.EFQUA==5		;QUANTITY OF OUTPUT IN SPOOLER ENTRIES

; FIELD DEFINITIONS FOR STANDARD FIELDS IN THE ENTRIES

MSKSTR (ENTCOD,FCTENT+.EFHDR,EF%COD)	;ENTRY TYPE CODE
MSKSTR (ENTJOB,FCTENT+.EFHDR,EF%JOB)	;JOB NUMBER
MSKSTR (ENTLIN,FCTENT+.EFHDR,EF%LIN)	;LINE NUMBER
MSKSTR (ENTSIZ,FCTENT+.EFHDR,EF%SIZ)	;SIZE OF ENTRY
DEFSTR (ENTUSR,FCTENT+.EFUSR,35,36)	;USER NAME
DEFSTR (ENTTAD,FCTENT+.EFTAD,35,36)	;TIME AND DATE
DEFSTR (ENTRUN,FCTENT+.EFRUN,35,36)	;RUN TIME
DEFSTR (ENTFIL,FCTENT+.EFFIL,35,36)	;NUMBER OF FILE PAGES USED
DEFSTR (ENTCTM,FCTENT+.EFCON,35,36)	;CONSOLE TIME
DEFSTR (ENTDEV,FCTENT+.EFDEV,35,36)	;DEVICE IN SPOOLER ENTRIES
DEFSTR (ENTQUA,FCTENT+.EFQUA,35,36)	;QUANTITY OF OUTPUT IN SPOOLER ENTRIES

; INDEX IN FACT ENTRIES TO ACCOUNT TYPE WORD

.AWLGI==4		;LOGIN
.AWCAC==4		;CHANGE ACCOUNT
.AWDSK==4		;DISK UTILIZATION
.AWLPT==7		;LINE PRINTER
.AWCDR==7		;CARD READER
SUBTTL	MACRO DEFINITIONS

; FUNCTION DESCRIPTOR BLOCK FOR COMND JSYS

DEFINE CMFDB (TYPE,FLAGS,DATA,HELP,DEFLT,LST)
<	..XX== < FLD(TYPE,CM%FNC) + FLAGS + LST >
  IFNB <HELP>,< ..XX== ..XX+CM%HPP >
  IFNB <DEFLT>,< ..XX== ..XX+CM%DPP >
	..XX
  IFNB <DATA>,<DATA>
  IFB <DATA>,<0>
  IFNB <HELP>, <POINT 7,[ASCIZ\HELP\] >
  IFB <HELP>,  <0>
  IFNB <DEFLT>, <POINT 7,DEFLT >
  IFB <DEFLT>, <0>
>

DEFINE TXT(TEXT) <POINT 7,[ASCIZ\TEXT\]>
SUBTTL	MAIN ENTRY POINT AND INITIALIZATION

START:	RESET			;RESET THE UNIVERSE
	MOVE P,[IOWD PDLEN,PDL]	;SET UP THE PUSH-DOWN STACK
	MOVX T1,.FHSLF		;GET OUR FORK HANDLE
	MOVE T2,[LEVTAB,,CHNTAB] ;GET INTERRUPT TABLE ADDRESSES
	SIR			;SET INTERRUPT TABLE ADDRESSES
	MOVX T1,.FHSLF		;GET OUR FORK HANDLE
	MOVX T2,1B<.ICEOF>	;GET END-OF-FILE-CHANNEL BIT
	AIC			;ACTIVATE INTERRUPT CHANNEL FOR EOF
	MOVX T1,.FHSLF		;GET OUR FORK HANDLE
	EIR			;ENABLE INTERUUPTS FOR THIS PROCESS

; SET UP COMMAND STATE BLOCK FOR COMND JSYS

	HRROI T1,PROMPT		;GET POINTER TO PROMPT STRING
	MOVEM T1,CMDBLK+.CMRTY	;PUT RE-TYPE PROMPT POINTER IN STATE BLOCK
	HRROI T1,BUFFER		;GET POINTER TO INPUT TEXT BUFFER
	MOVEM T1,CMDBLK+.CMPTR	;SAVE POINTER TO COMMAND STRING
	MOVEM T1,CMDBLK+.CMBFP	;SAVE POINTER TO START-OF-BUFFER
	MOVE T1,[.PRIIN,,.PRIOU] ;GET PRIMARY INPUT,, OUTPUT JFN'S
	MOVEM T1,CMDBLK+.CMIOJ	;SAVE PRIMARY JFN'S
	MOVEI T1,PARSE1		;GET RE-PARSE ADDRESS
	MOVEM T1,CMDBLK+.CMFLG	;SAVE RE-PARSE ADDRESS
	SETZM CMDBLK+.CMINC	;INITIALIZE # OF CHARACTERS AFTER POINTER
	MOVEI T1,BUFSIZ*NCHPW	;GET # OF CHARACTERS IN BUFFER AREA
	MOVEM T1,CMDBLK+.CMCNT	;SAVE INITIAL # OF FREE CHARACTER POSITIONS
	HRROI T1,ATMBFR		;GET POINTER TO ATOM BUFFER
	MOVEM T1,CMDBLK+.CMABP	;SAVE POINTER TO LAST ATOM INPUT
	MOVEI T1,ATMSIZ*NCHPW	;GET # OF CHARACTERS IN ATOM BUFFER
	MOVEM T1,CMDBLK+.CMABC	;SAVE COUNT OF SPACE LEFT IN ATOM BUFFER
SUBTTL	COMMAND PARSER AND DISPATCH

PARSE:	CALL TSTCOL		;GO OUTPUT CRLF IF NEEDED
	MOVEI T1,CMDBLK		;GET ADDRESS OF COMMAND STATE BLOCK
	MOVEI T2,[CMFDB (.CMINI)] ;GET FUNCTION DESCRIPTOR BLOCK
	COMND			;INITIALIZE COMMAND SCANNER JSYS

PARSE1:	MOVE T1,[CZ%NCL+.FHSLF]	;RELEASE ALL NON-OPEN JFNS IN OURSELF AND BELOW
	CLZFF
	MOVE T1,[GJFBLK,,GJFBLK+1] ;SET UP TO CLEAR GTJFN BLOCK
	SETZM GJFBLK		;CLEAR FIRST WORD OF BLOCK
	BLT T1,GJFBLK+GJFSIZ-1	;CLEAR GTJFN BLOCK

	MOVEI T1,GJFBLK		;GET ADDRESS OF GTJFN BLOCK
	MOVEM T1,CMDBLK+.CMGJB	;STORE POINTER TO GTJFN BLOCK
	MOVEI T1,CMDBLK		;GET POINTER TO COMMAND STATE BLOCK
	MOVEI T2,[CMFDB (.CMKEY,,CMDTAB)] ;GET FUNCTION BLOCK
	COMND			;DO INITIAL PARSE
	TXNN T1,CM%NOP		;VALID COMMAND ENTERED ?
	JRST PARSE5		;YES, GO DISPATCH TO PROCESSING ROUTINE
	CALL TSTCOL		;TEST COLUMN POSITION, NEW LINE IF NEEDED
	TMSG <? ACCTPR: No such ACCTPR command as ">
	MOVE T1,CMDBLK+.CMABP	;GET POINTER TO ATOM BUFFER
	PSOUT			;OUTPUT STRING ENTERED BY USER
	TMSG <"
>				;OUTPUT END-OF-MESSAGE
	JRST PARSE		;GO TRY TO GET A COMMAND AGAIN

PARSE5:	HRRZ T1,(T2)		;GET DISPATCH ADDRESS
	CALL (T1)		;PERFORM REQUESTED FUNCTION
	JRST PARSE		;GO PARSE NEXT COMMAND
SUBTTL	TRANSLATE COMMAND

.TRANS:	MOVEI T1,CMDBLK		;GET ADDRESS OF COMMAND STATE BLOCK
	MOVEI T2,[CMFDB (.CMNOI,,<TXT(FACT FILE)>)] ;GET NOISE PHRASE
	COMND			;PARSE NOISE PHRASE
	MOVE T1,[GJFBLK,,GJFBLK+1] ;SET UP TO CLEAR GTJFN BLOCK
	SETZM GJFBLK		;CLEAR FIRST WORD OF GTJFN BLOCK
	BLT T1,GJFBLK+GJFSIZ-1	;CLEAR GTJFN BLOCK
	HRROI T1,[ASCIZ/FACT/]	;GET DEFAULT NAME FOR INPUT FILE
	MOVEM T1,GJFBLK+.GJNAM	;SAVE DEFAULT FILE NAME FOR GTJFN
	HRROI T1,[ASCIZ/BIN/]	;GET DEFAULT EXTENSION
	MOVEM T1,GJFBLK+.GJEXT	;SAVE DEFAULT EXTENSION
	MOVX T1,GJ%OLD		;GET "OLD FILE ONLY" FLAG
	MOVM T1,GJFBLK+.GJGEN	;SAVE GTJFN FLAGS
	MOVEI T2,[CMFDB (.CMFIL)] ;GET OUTPUT FILE FUNCTION
	MOVEI T1,CMDBLK		;GET ADDRESS OF COMMAND STATE BLOCK
	COMND			;PARSE OUTPUT FILE
	TXNN T1,CM%NOP		;PARSED FILENAME OK ?
	JRST TRAN10		;YES, GO ON AND SAVE JFN
	CALL TSTCOL		;NO, ISSUE CRLF IF NEEDED
	TMSG <? ACCTPR: Invalid file specification,
	>			;OUTPUT INITIAL PART OF MESSAGE
	callret typerr		;go type out error string

; HERE ON A VALID FILE SPEC

TRAN10:	MOVEM T2,INJFN		;SAVE INPUT FILE JFN
	MOVEI T1,CMDBLK		;GET ADDRESS OF COMMAND STATE BLOCK
	MOVEI T2,[CMFDB (.CMNOI,,<TXT(TO)>)] ;GET NOISE PHRASE
	COMND			;PARSE NOISE PHRASE
	MOVE T1,[GJFBLK,,GJFBLK+1] ;SET UP TO CLEAR GTJFN BLOCK
	SETZM GJFBLK		;CLEAR FIRST WORD OF GTJFN BLOCK
	BLT T1,GJFBLK+GJFSIZ-1	;CLEAR GTJFN BLOCK
	HRROI T1,[ASCIZ/FACT/]	;GET DEFAULT NAME FOR INPUT FILE
	MOVEM T1,GJFBLK+.GJNAM	;SAVE DEFAULT FILE NAME FOR GTJFN
	HRROI T1,[ASCIZ/TXT/]	;GET DEFAULT EXTENSION
	MOVEM T1,GJFBLK+.GJEXT	;SAVE DEFAULT EXTENSION
	MOVX T1,GJ%FOU		;GET FOR OUTPUT USE FLAG
	MOVM T1,GJFBLK+.GJGEN	;SAVE GTJFN FLAGS
	MOVEI T2,[CMFDB (.CMFIL)] ;GET OUTPUT FILE FUNCTION
	MOVEI T1,CMDBLK		;GET ADDRESS OF COMMAND STATE BLOCK
	COMND			;PARSE OUTPUT FILE
	TXNN T1,CM%NOP		;PARSED FILENAME OK ?
	JRST TRAN20		;YES, GO GET CONFIRMATION
	CALL TSTCOL		;ISSUE CRLF IF NEEDED
	TMSG <? ACCTPR: Invalid file specification,
	>			;ISSUE INITIAL PART OF MESSAGE
	call typerr		;go type out error string
	MOVE T1,INJFN		;GET INPUT JFN
	RLJFN			;RELEASE INPUT JFN
	 JFCL			;IGNORE ERROR
	RET			;RETURN TO PARSER

; HERE TO GET CONFIRMATION OF COMMAND AND OPEN FILES

TRAN20:	MOVEM T2,OUTJFN		;SAVE OUTPUT FILE JFN
	MOVEI T1,CMDBLK		;GET ADDRESS OF COMMAND STATE BLOCK
	MOVEI T2,[CMFDB (.CMCFM)] ;GET CONFIRMATION
	COMND			;PARSE END-OF-COMMAND
	TXNE T1,CM%NOP		;END-OF-COMMAND PARSED OK ?
	CALLRET COMER1		;NO, GO ISSUE MESSAGE
	MOVE T1,INJFN		;GET INPUT FILE JFN
	MOVX T2,<FLD(^D36,OF%BSZ)+OF%RD> ;READ ACCESS
	OPENF			;OPEN BINARY INPUT FILE
	 JRST TRAN40		;ERROR ON OPEN
	MOVE T1,OUTJFN		;GET OUTPUT JFN
	MOVX T2,<FLD(7,OF%BSZ)+OF%WR> ;GET WRITE ACCESS
	OPENF			;OPEN OUTPUT FILE
	 JRST OUTP50		;ERROR, GO ISSUE MESSAGE
	SETZM HITAD		;INITIALIZE HIGHEST TIME AND DATE

; LOOP TO PROCESS ALL ENTRIES IN FACT FILE

TRAN30:	CALL GETENT		;GO READ AN ENTRY FROM INPUT FACT FILE
	MOVEM T1,P1		;SAVE INDEX INTO DISPATCH TABLE
	LOAD T1,ENTTAD		;GET TIME AND DATE FROM FACT ENTRY
	CAMLE T1,HITAD		;FOUND A NEW HIGHEST TIME AND DATE ?
	MOVEM T1,HITAD		;YES, STORE NEW HIGHEST TIME AND DATE
	CALL DOHDR1		;OUTPUT INITIAL HEADER INFORMATION
	MOVE T2,HITAD		;GET HIGHEST TIME AND DATE SEEN SO FAR
	LOAD T1,ENTSIZ		;GET SIZE OF FACT FILE ENTRY
	CAIGE T1,.EFTAD		;TIME AND DATE PRESENT ?
	STOR T2,ENTTAD		;NO, USE HIGHEST TIME AND DATE THUS FAR
	CALL DOHDR2		;OUTPUT DIRECTORY AND TIME AND DATE
	HRRZ T1,TYPTAB(P1)	;GET ROUTINE TO PROCESS THIS ENTRY
	CALL (T1)		;GO CALL PROCESSING ROUTINE
	JRST TRAN30		;GO DO NEXT ENTRY

; HERE ON ERROR ON INPUT FILE OPEN

TRAN40:	CALL TSTCOL		;ISSUE CRLF IF NEEDED
	TMSG <? ACCTPR: Could not open input file because:
>				;ISSUE ERROR MESSAGE
	call typerr		;go type out error string
	MOVE T1,INJFN		;GET INPUT FILE JFN
	RLJFN			;RELEASE THE JFN
	 JSERR			;UNEXPECTED ERROR
	JRST TRAN60		;GO RELEASE THE OUTPUT FILE JFN

; HERE ON ERROR ON OUTPUT FILE OPEN

OUTP50:	CALL TSTCOL		;ERROR, ISSUE CRLF IF NEEDED
	TMSG <? ACCTPR: Could not open output file because:
>				;ISSUE ERROR MESSAGE
	call typerr		;go type out error string
TRAN60:	MOVE T1,OUTJFN		;GET OUTPUT JFN
	RLJFN			;RELEASE THE JFN
	 JSERR			;UNEXPECTED ERROR
	RET			;RETURN
SUBTTL	HELP AND EXIT COMMANDS

.EXIT:	MOVEI T1,CMDBLK		;GET ADDRESS OF COMMAND BLOCK
	MOVEI T2,[CMFDB (.CMNOI,,<TXT(TO MONITOR)>)]
	COMND			;PARSE NOISE PHRASE
	MOVEI T2,[CMFDB (.CMCFM)] ;GET FUNCTION BLOCK FOR CONFIM
	COMND			;PARSE CONFIRMATION
	TXNE T1,CM%NOP		;VALID END-OF-COMMAND SEEN ?
	CALLRET COMER1		;NO, ISSUE ERROR MESSAGE AND RETURN
	SETOM T1		;INDICATE ALL FILES SHOULD BE CLOSED
	CLOSF			;CLOSE ALL OPEN FILES
	 JSERR			;UNEXPECTED ERROR
	HALTF			;RETURN TO MONITOR
	JRST START		;IF CONTINUE'D, START OVER


; HELP COMMAND

.HELP:	MOVEI T1,CMDBLK		;GET ADDRESS OF COMMAND STATE BLOCK
	MOVEI T2,[CMFDB (.CMCFM)] ;GET CONFIRM FUNCTION
	COMND			;PARSE END-OF-COMMAND
	TXNE T1,CM%NOP		;END-OF-COMMAND PARSED OK ?
	CALLRET COMER1		;NO, ISSUE ERROR MESSAGE
	HRROI T1,HLPMSG		;GET POINTER TO HELP TEXT
	PSOUT			;OUTPUT HELP TEXT
	RET			;RETURN TO COMMAND PARSER
SUBTTL	END-OF-FILE INTERRUPT HANDLER

EOFINT:	MOVE T1,INJFN		;GET INPUT FILE JFN
	CLOSF			;CLOSE THE INPUT FILE
	 JSERR			;UNEXPECTED ERROR
	MOVE T1,OUTJFN		;GET OUTPUT FILE JFN
	CLOSF			;CLOSE THE OUTPUT FILE
	 JSERR			;UNEXPECTED ERROR
	MOVEI T1,START		;GET RETURN ADDRESS
	MOVEM T1,RETPC1		;STORE RETURN ADDRESS
	DEBRK			;DISMISS INTERRUPT
	0
SUBTTL	PROCESS LOGOUT ENTRIES

TRLGO:	MOVE T1,OUTJFN		;GET OUTPUT JFN
	LOAD T2,ENTRUN		;GET RUNTIME FROM ENTRY
	MOVX T3,NUMFLG		;GET FLAGS FOR NUMERIC FIELDS
	NOUT			;OUTPUT RUNTIME FROM ENTRY
	 JSERR			;UNEXPECTED ERROR
	HRROI T2,SPCBUF		;GET POINTER TO SPACES
	MOVNI T3,.FSATP+.FSACT	;GET NUMBER OF SPACES TO USE FOR PADDING
	SOUT			;OUTPUT FILLER
	LOAD T2,ENTCTM		;GET CONSOLE TIME FROM ENTRY
	MOVX T3,NUMFLG		;GET NUMERIC FIELD FLAGS
	NOUT			;OUTPUT CONSOLE TIME
	 JSERR			;UNEXPECTED ERROR
	HRROI T2,SPCBUF		;GET POINTER TO SPACES
	MOVNI T3,.FSFIL+.FSLPT+.FSCDR+.FSDEV
	SOUT			;OUTPUT FILLER TO END OF RECORD
	HRROI T2,EOR		;GET POINTER TO END-OF-RECORD
	SETZM T3		;TERMINATE ON NULL
	SOUT			;OUTPUT END-OF-RECORD
	RET			;RETURN
SUBTTL	PROCESS LOGIN ENTRIES

TRLGI:	MOVE T1,OUTJFN		;GET OUTPUT FILE JFN
	HRROI T2,SPCBUF		;GET POINTER TO SPACES
	MOVNI T3,.FSRUN		;GET # OF COLUMNS TO PAD
	SOUT			;PAD RECORD
	MOVEI T1,.AWLGI		;GET INDEX TO ACCOUNT WORD IN LOGIN ENTRY
	CALL TSTACT		;GO TEST FOR A NUMERIC ACCOUNT
	MOVE T1,OUTJFN		;GET OUTPUT FILE JFN
	MOVEI T2,"A"		;GET "ALPHANUMERIC ACCOUNT" INDICATOR
	SKIPL FCTENT+.AWLGI	;NUMERIC ACCOUNT ?
	MOVEI T2,"N"		;YES, GET "NUMERIC ACCOUNT" INDICATOR
	BOUT			;OUTPUT ACCOUNT TYPE

; OUTPUT ACCOUNT

	SKIPL FCTENT+.AWLGI	;NUMERIC ACCOUNT ?
	JRST TRLGI2		;YES, GO OUTPUT NUMERIC ACCOUNT
	HRROI T2,FCTENT+.AWLGI+1 ;GET POINTER TO ACCOUNT STRING
	MOVE T3,FCTENT+.AWLGI	;GET -<NUMBER OF CHARS> IN ACCOUNT STRING
	SOUT			;OUTPUT ACCOUNT STRING
	MOVN T3,FCTENT+.AWLGI	;GET NUMBER OF CHARACTERS IN ACCOUNT STRING
	SOS T3			;DO NOT COUNT FIRST NULL
	JRST TRLGI4		;GO PAD REMAINDER OF RECORD

; HERE TO OUTPUT NUMERIC ACCOUNT

TRLGI2:	HRROI T2,SPCBUF		;GET POINTER TO SPACE BUFFER
	MOVNI T3,^D27		;GET # OF SPACES TO OUTPUT
	SOUT			;OUTPUT FILLER
	MOVE T2,FCTENT+.AWLGI	;GET ACCOUNT TYPE WORD (NUMERIC ACCOUNT #)
	MOVX T3,<FLD(^D12,NO%COL)+FLD(^D10,NO%RDX)+NO%LFL>
	NOUT			;OUTPUT ACCOUNT NUMBER
	 JSERR			;UNEXPECTED ERROR
	MOVEI T3,.FSACT		;NUMBER OF CHARACTERS IN ACCOUNT STRING

; HERE TO OUTPUT FILLER FOR ACCOUNT STRING, FILLER TO END OF RECORD, AND
; END-OF-RECORD

TRLGI4:	MOVE T1,OUTJFN		;GET OUTPUT JFN
	HRROI T2,SPCBUF		;GET POINTER TO SPACES
	SUBI T3,.FSACT+.FSCON+.FSFIL+.FSLPT+.FSCDR+.FSDEV
	SOUT			;OUTPUT PADDING
	HRROI T2,EOR		;GET POINTER TO END OF RECORD
	SETZM T3		;TERMINATE ON NULL
	SOUT			;OUTPUT END-OF-RECORD
	RET			;RETURN
SUBTTL	PROCESS CHKPNT ENTRIES

TRCHK:	MOVE T1,OUTJFN		;GET OUTPUT FILE JFN
	LOAD T2,ENTRUN		;GET RUNTIME FROM ENTRY
	MOVX T3,NUMFLG		;GET NUMERIC FIELD FLAGS
	NOUT			;OUTPUT RUNTIME
	 JSERR			;UNEXPECTED ERROR
	HRROI T2,SPCBUF		;GET POINTER TO SPACES FOR FILLER
	MOVNI T3,.FSATP+.FSACT+.FSCON+.FSFIL+.FSLPT+.FSCDR+.FSDEV
	SOUT			;OUTPUT TRAILING SPACES AS PADDING
	HRROI T2,EOR		;GET POINTER TO END-OF-RECORD
	SETZM T3		;TERMINATE ON NULL
	SOUT			;OUTPUT END-OF-RECORD
	RET			;RETURN
SUBTTL	PROCESS TIME SET ENTRIES

TRTIM:	MOVE T1,OUTJFN		;GET OUTPUT FILE JFN
	HRROI T2,SPCBUF		;GET POINTER TO SPACES FOR FILLER
	MOVNI T3,.FSRUN+.FSATP+.FSACT+.FSCON+.FSFIL+.FSLPT+.FSCDR+.FSDEV
	SOUT			;OUTPUT PADDING
	HRROI T2,EOR		;GET POINTER TO END OF RECORD
	SOUT			;OUTPUT END OF RECORD
	RET			;RETURN
SUBTTL	PROCESS SYSTEM RESTART AND START-OF-DISK-STATISTICS ENTRIES

TRRES:
TRSDU:
	MOVE T1,OUTJFN		;GET OUTPUT FILE JFN
	HRROI T2,SPCBUF		;GET POINTER TO SPACES FOR FILLER
	MOVNI T3,.FSRUN+.FSATP+.FSACT+.FSCON+.FSFIL+.FSLPT+.FSCDR+.FSDEV
	SOUT			;OUTPUT PADDING
	HRROI T2,EOR		;GET POINTER TO END OF RECORD
	SOUT			;OUTPUT END OF RECORD
	RET			;RETURN
SUBTTL	PROCESS ATTACH AND DETACH ENTRIES

TRDET:
TRATT:
	MOVE T1,OUTJFN		;GET OUTPUT FILE JFN
	HRROI T2,SPCBUF		;GET POINTER TO SPACES FOR PADDING
	MOVNI T3,.FSRUN+.FSATP+.FSACT+.FSCON+.FSFIL+.FSLPT+.FSCDR+.FSDEV
	SOUT			;OUTPUT FILLER
	HRROI T2,EOR		;GET END-OF-RECORD TEXT
	SETZM T3		;TERMINATE ON NULL
	SOUT			;OUTPUT END-OF-RECORD
	RET			;RETURN
SUBTTL	PROCESS CHANGE ACCOUNT ENTRIES

TRCAC:	MOVE T1,OUTJFN		;GET OUTPUT JFN
	LOAD T2,ENTRUN		;GET RUNTIME FROM ENTRY
	MOVX T3,NUMFLG		;GET NUMERIC FIELD FLAGS
	NOUT			;OUTPUT RUNTIME
	 JSERR			;UNEXPECTED ERROR
	MOVEI T1,.AWCAC		;GET INDEX TO ACCOUNT WORD IN ENTRY
	CALL TSTACT		;GO TEST ACCOUNT TO SEE IF NUMERIC
	MOVE T1,OUTJFN		;GET OUTPUT FILE JFN
	MOVEI T2,"A"		;GET "ALPHANUMERIC ACCOUNT" INDICATOR
	SKIPL FCTENT+.AWCAC	;NUMERIC ACCOUNT ?
	MOVEI T2,"N"		;YES, GET "NUMERIC ACCOUNT" INDICATOR
	BOUT			;OUTPUT ACCOUNT TYPE

; OUTPUT ACCOUNT

	SKIPL FCTENT+.AWCAC	;NUMERIC ACCOUNT ?
	JRST TRCAC2		;YES, GO OUTPUT NUMERIC ACCOUNT
	HRROI T2,FCTENT+.AWCAC+1 ;GET POINTER TO ACCOUNT STRING
	MOVE T3,FCTENT+.AWCAC	;GET -<NUMBER OF CHARS> IN ACCOUNT STRING
	SOUT			;OUTPUT ACCOUNT STRING
	MOVN T3,FCTENT+.AWLGI	;GET NUMBER OF CHARACTERS IN ACCOUNT STRING
	SOS T3			;DO NOT COUNT FIRST NULL
	JRST TRCAC4		;GO PAD REMAINDER OF RECORD

; HERE TO OUTPUT NUMERIC ACCOUNT

TRCAC2:	HRROI T2,SPCBUF		;GET POINTER TO SPACE BUFFER
	MOVNI T3,^D27		;GET # OF SPACES TO OUTPUT
	SOUT			;OUTPUT FILLER
	MOVE T2,FCTENT+.AWCAC	;GET ACCOUNT TYPE WORD (NUMERIC ACCOUNT #)
	MOVX T3,<FLD(^D12,NO%COL)+FLD(^D10,NO%RDX)+NO%LFL>
	NOUT			;OUTPUT ACCOUNT NUMBER
	 JSERR			;UNEXPECTED ERROR
	MOVEI T3,.FSACT		;NUMBER OF CHARACTERS IN ACCOUNT STRING

; HERE TO OUTPUT FILLER TO END OF RECORD, AND END-OF-RECORD

TRCAC4:	MOVE T1,OUTJFN		;GET OUTPUT JFN
	HRROI T2,SPCBUF		;GET POINTER TO SPACES
	SUBI T3,.FSACT+.FSCON+.FSFIL+.FSLPT+.FSCDR+.FSDEV
	SOUT			;OUTPUT PADDING
	HRROI T2,EOR		;GET POINTER TO END OF RECORD
	SETZM T3		;TERMINATE ON NULL
	SOUT			;OUTPUT END-OF-RECORD
	RET			;RETURN
SUBTTL	PROCESS DISK UTILIZATION ENTRIES

TRDSK:	MOVE T1,OUTJFN		;GET OUTPUT FILE JFN
	MOVEI T2,0		;GET A ZERO
	MOVX T3,NUMFLG		;GET NUMERIC FIELD FLAGS
	NOUT			;OUTPUT 0'S FOR RUNTIME
	 JSERR			;UNEXPECTED ERROR
	MOVEI T1,.AWDSK		;GET INDEX TO ACCOUNT WORD IN ENTRY
	CALL TSTACT		;GO TEST ACCOUNT TO SEE IF NUMERIC
	MOVE T1,OUTJFN		;GET OUTPUT FILE JFN
	MOVEI T2,"A"		;GET "ALPHANUMERIC ACCOUNT" INDICATOR
	SKIPL FCTENT+.AWDSK	;NUMERIC ACCOUNT ?
	MOVEI T2,"N"		;YES, GET "NUMERIC ACCOUNT" INDICATOR
	BOUT			;OUTPUT ACCOUNT TYPE

; OUTPUT ACCOUNT

	SKIPL FCTENT+.AWDSK	;NUMERIC ACCOUNT ?
	JRST TRDSK2		;YES, GO OUTPUT NUMERIC ACCOUNT
	HRROI T2,FCTENT+.AWDSK+1 ;GET POINTER TO ACCOUNT STRING
	MOVE T3,FCTENT+.AWDSK	;GET -<NUMBER OF CHARS> IN ACCOUNT STRING
	SOUT			;OUTPUT ACCOUNT STRING
	MOVN T3,FCTENT+.AWLGI	;GET NUMBER OF CHARACTERS IN ACCOUNT STRING
	SOS T3			;DO NOT COUNT FIRST NULL
	JRST TRDSK4		;GO PAD REMAINDER OF RECORD

; HERE TO OUTPUT NUMERIC ACCOUNT

TRDSK2:	HRROI T2,SPCBUF		;GET POINTER TO SPACE BUFFER
	MOVNI T3,^D27		;GET # OF SPACES TO OUTPUT
	SOUT			;OUTPUT FILLER
	MOVE T2,FCTENT+.AWDSK	;GET ACCOUNT TYPE WORD (NUMERIC ACCOUNT #)
	MOVX T3,<FLD(^D12,NO%COL)+FLD(^D10,NO%RDX)+NO%LFL>
	NOUT			;OUTPUT ACCOUNT NUMBER
	 JSERR			;UNEXPECTED ERROR
	MOVEI T3,.FSACT		;NUMBER OF CHARACTERS IN ACCOUNT STRING

; HERE TO OUTPUT FILLER TO # OF FILE PAGES, # OF FILE PAGES, AND REST OF RECORD

TRDSK4:	MOVE T1,OUTJFN		;GET OUTPUT FILE JFN
	HRROI T2,SPCBUF		;GET POINTER TO SPACES
	SUBI T3,.FSACT+.FSCON
	SOUT			;OUTPUT FILLER
	LOAD T2,ENTFIL		;GET # OF FILE PAGES USED
	MOVX T3,NUMFLG		;GET NUMERIC FIELD FLAGS
	NOUT			;OUTPUT # OF FILE PAGES USED
	 JSERR			;UNEXPECTED ERROR
	HRROI T2,SPCBUF		;GET POINTER TO SPACES
	MOVNI T3,.FSLPT+.FSCDR+.FSDEV
	SOUT			;OUTPUT PADDING
	HRROI T2,EOR		;GET POINTER TO END OF RECORD
	SETZM T3		;TERMINATE ON NULL
	SOUT			;OUTPUT END-OF-RECORD
	RET			;RETURN
SUBTTL	PROCESS CDR ENTRIES

TRCDR:	MOVE T1,OUTJFN		;GET OUTPUT FILE JFN
	LOAD T2,ENTRUN		;GET RUNTIME FROM ENTRY
	MOVX T3,NUMFLG		;GET NUMERIC FIELD FLAGS
	NOUT			;OUTPUT RUNTIME
	 JSERR			;UNEXPECTED ERROR
	MOVEI T1,.AWCDR		;GET INDEX TO ACCOUNT WORD IN ENTRY
	CALL TSTACT		;GO TEST ACCOUNT TO SEE IF NUMERIC
	MOVE T1,OUTJFN		;GET OUTPUT FILE JFN
	MOVEI T2,"A"		;GET "ALPHANUMERIC ACCOUNT" INDICATOR
	SKIPL FCTENT+.AWCDR	;NUMERIC ACCOUNT ?
	MOVEI T2,"N"		;YES, GET "NUMERIC ACCOUNT" INDICATOR
	BOUT			;OUTPUT ACCOUNT TYPE

; OUTPUT ACCOUNT

	SKIPL FCTENT+.AWCDR	;NUMERIC ACCOUNT ?
	JRST TRCDR2		;YES, GO OUTPUT NUMERIC ACCOUNT
	HRROI T2,FCTENT+.AWCDR+1 ;GET POINTER TO ACCOUNT STRING
	MOVE T3,FCTENT+.AWCDR	;GET -<NUMBER OF CHARS> IN ACCOUNT STRING
	SOUT			;OUTPUT ACCOUNT STRING
	MOVN T3,FCTENT+.AWLGI	;GET NUMBER OF CHARACTERS IN ACCOUNT STRING
	SOS T3			;DO NOT COUNT FIRST NULL
	JRST TRCDR4		;GO PAD REMAINDER OF RECORD

; HERE TO OUTPUT NUMERIC ACCOUNT

TRCDR2:	HRROI T2,SPCBUF		;GET POINTER TO SPACE BUFFER
	MOVNI T3,^D27		;GET # OF SPACES TO OUTPUT
	SOUT			;OUTPUT FILLER
	MOVE T2,FCTENT+.AWCDR	;GET ACCOUNT TYPE WORD (NUMERIC ACCOUNT #)
	MOVX T3,<FLD(^D12,NO%COL)+FLD(^D10,NO%RDX)+NO%LFL>
	NOUT			;OUTPUT ACCOUNT NUMBER
	 JSERR			;UNEXPECTED ERROR
	MOVEI T3,.FSACT		;NUMBER OF CHARACTERS IN ACCOUNT STRING

; HERE TO OUTPUT FILLER FOR ACCOUNT NUMBER, FILLER TO # OF FILE PAGES,
; # OF FILE PAGES, AND REST OF RECORD

TRCDR4:	MOVE T1,OUTJFN		;GET OUTPUT FILE JFN
	HRROI T2,SPCBUF		;GET POINTER TO SPACES
	SUBI T3,.FSACT+.FSCON+.FSFIL+.FSLPT ;GET # OF COL IN FIELDS TO CDR FIELD
	SOUT			;OUTPUT FILLER
	LOAD T2,ENTQUA		;GET QUANTITY OF OUTPUT
	MOVX T3,NUMFLG		;GET NUMERIC OUTPUT FLAGS
	NOUT			;OUTPUT NUMBER OF CARDS READ
	 JSERR			;UNEXPECTED ERROR
	MOVE T1,[NAMBUF,,NAMBUF+1] ;SET UP TO CLEAR NAME BUFFER
	SETZM NAMBUF		;CLEAR FIRST WORD OF BUFFER
	BLT T1,NAMBUF+NAMSIZ-1	;CLEAR NAME BUFFER
	HRROI T1,NAMBUF		;GET POINTER TO NAME BUFFER
	LOAD T2,ENTDEV		;GET DEVICE DESIGNATOR FROM ENTRY
	DEVST			;CONVERT DEVICE DESIGNATOR TO STRING
	 JSERR			;UNEXPECTED ERROR
	MOVE T1,OUTJFN		;GET OUTPUT FILE JFN
	HRROI T2,NAMBUF		;GET POINTER TO NAME BUFFER
	MOVEI T3,.FSDEV		;GET MAXIMUM # OF CHARACTERS IN FIELD
	MOVEI T4,.CHNUL		;GET TERMINATING CHARACTER
	SOUT			;OUTPUT DEVICE NAME TO OUTPUT FILE
	MOVEI T2," "		;GET A SPACE FOR FILLER
	JUMPE T3,TRCDR6		;GO ON IF DONE
TRCDR5:	BOUT			;OUTPUT A SPACE
	SOJG T3,TRCDR5		;LOOP UNTIL ENTIRE FIELD IS FULL
TRCDR6:	HRROI T2,EOR		;GET END-OF-RECORD
	SETZM T3		;TERMINATE ON NULL
	SOUT			;OUTPUT END OF RECORD
	RET			;RETURN
SUBTTL	PROCESS LPT ENTRIES

TRLPT:	MOVE T1,OUTJFN		;GET OUTPUT FILE JFN
	LOAD T2,ENTRUN		;GET RUNTIME FROM ENTRY
	MOVX T3,NUMFLG		;GET NUMERIC FIELD FLAGS
	NOUT			;OUTPUT RUNTIME
	 JSERR			;UNEXPECTED ERROR
	MOVEI T1,.AWLPT		;GET INDEX TO ACCOUNT WORD IN ENTRY
	CALL TSTACT		;GO TEST ACCOUNT TO SEE IF NUMERIC
	MOVE T1,OUTJFN		;GET OUTPUT FILE JFN
	MOVEI T2,"A"		;GET "ALPHANUMERIC ACCOUNT" INDICATOR
	SKIPL FCTENT+.AWLPT	;NUMERIC ACCOUNT ?
	MOVEI T2,"N"		;YES, GET "NUMERIC ACCOUNT" INDICATOR
	BOUT			;OUTPUT ACCOUNT TYPE

; OUTPUT ACCOUNT

	SKIPL FCTENT+.AWLPT	;NUMERIC ACCOUNT ?
	JRST TRLPT2		;YES, GO OUTPUT NUMERIC ACCOUNT
	HRROI T2,FCTENT+.AWLPT+1 ;GET POINTER TO ACCOUNT STRING
	MOVE T3,FCTENT+.AWLPT	;GET -<NUMBER OF CHARS> IN ACCOUNT STRING
	SOUT			;OUTPUT ACCOUNT STRING
	MOVN T3,FCTENT+.AWLGI	;GET NUMBER OF CHARACTERS IN ACCOUNT STRING
	SOS T3			;DO NOT COUNT FIRST NULL
	JRST TRLPT4		;GO PAD REMAINDER OF RECORD

; HERE TO OUTPUT NUMERIC ACCOUNT

TRLPT2:	HRROI T2,SPCBUF		;GET POINTER TO SPACE BUFFER
	MOVNI T3,^D27		;GET # OF SPACES TO OUTPUT
	SOUT			;OUTPUT FILLER
	MOVE T2,FCTENT+.AWLPT	;GET ACCOUNT TYPE WORD (NUMERIC ACCOUNT #)
	MOVX T3,<FLD(^D12,NO%COL)+FLD(^D10,NO%RDX)+NO%LFL>
	NOUT			;OUTPUT ACCOUNT NUMBER
	 JSERR			;UNEXPECTED ERROR
	MOVEI T3,.FSACT		;NUMBER OF CHARACTERS IN ACCOUNT STRING

; HERE TO OUTPUT FILLER

TRLPT4:	MOVE T1,OUTJFN		;GET OUTPUT FILE JFN
	HRROI T2,SPCBUF		;GET POINTER TO SPACES
	SUBI T3,.FSACT+.FSCON+.FSFIL ;GET # OF COLUMNS IN FIELDS TO LPT FIELD
	SOUT			;OUTPUT FILLER
	LOAD T2,ENTQUA		;GET QUANTITY OF OUTPUT
	MOVX T3,NUMFLG		;GET NUMERIC OUTPUT FLAGS
	NOUT			;OUTPUT NUMBER OF PAGES PRINTED
	 JSERR			;UNEXPECTED ERROR
	MOVEI T2,0		;GET A ZERO
	MOVX T3,NUMFLG		;GET NUMERIC FIELD FLAGS
	NOUT			;OUTPUT # OF CARDS
	 JSERR			;UNEXPECTED ERROR
	MOVE T1,[NAMBUF,,NAMBUF+1] ;SET UP TO CLEAR NAME BUFFER
	SETZM NAMBUF		;CLEAR FIRST WORD OF BUFFER
	BLT T1,NAMBUF+NAMSIZ-1	;CLEAR NAME BUFFER
	HRROI T1,NAMBUF		;GET POINTER TO NAME BUFFER
	LOAD T2,ENTDEV		;GET DEVICE DESIGNATOR FROM ENTRY
	DEVST			;CONVERT DEVICE DESIGNATOR TO STRING
	 JSERR			;UNEXPECTED ERROR
	MOVE T1,OUTJFN		;GET OUTPUT FILE JFN
	HRROI T2,NAMBUF		;GET POINTER TO NAME BUFFER
	MOVEI T3,.FSDEV		;GET MAXIMUM # OF CHARACTERS IN FIELD
	MOVEI T4,.CHNUL		;GET TERMINATING CHARACTER
	SOUT			;OUTPUT DEVICE NAME TO OUTPUT FILE
	MOVEI T2," "		;GET A SPACE FOR FILLER
	JUMPE T3,TRLPT6		;GO ON IF DONE
TRLPT5:	BOUT			;OUTPUT A SPACE
	SOJG T3,TRLPT5		;LOOP UNTIL ENTIRE FIELD IS FULL
TRLPT6:	HRROI T2,EOR		;GET END-OF-RECORD
	SETZM T3		;TERMINATE ON NULL
	SOUT			;OUTPUT END OF RECORD
	RET			;RETURN
SUBTTL	SUBROUTINES

; GET NEXT ENTRY FROM FACT FILE
;
; CALL:		CALL GETENT
; RETURNS:	T1/INDEX INTO TYPTAB (TABLE OF KNOWN ENTRY TYPE CODES)

GETENT:	STKVAR <GTENTF,GTENTI>	;ALLOCATE "UNKNOWN ENTRY SEEN" FLAG
	SETOM GTENTF		;INDICATE NO UNKOWN ENTRIES SEEN
GETEN1:	MOVE T1,[FCTENT,,FCTENT+1] ;SET UP TO CLEAR FACT ENTRY
	SETZM FCTENT		;CLEAR FIRST WORD OF FACT ENTRY BLOCK
	BLT T1,FCTENT+ENTMSZ-1	;CLEAR FACT ENTRY BLOCK
	MOVE T1,INJFN		;GET JFN FOR INPUT FACT FILE
	BIN			;INPUT FIRST WORD OF AN ENTRY
	MOVEM T2,FCTENT		;STORE FIRST WORD OF FACT FILE ENTRY

	MOVEI T1,TYPSIZ-1	;GET INITIAL INDEX INTO TYPE TABLE
	LOAD T2,ENTCOD;		;GET ENTRY TYPE CODE FROM ENTRY
GETEN2:	HLRZ T3,TYPTAB(T1)	;GET ENTRY TYPE CODE FROM TABLE
	CAMN T3,T2		;FOUND A KNOWN TYPE CODE ?
	JRST GETEN5		;YES, GO INPUT REMAINDER OF ENTRY
	SOJGE T1,GETEN2		;NO, GO CHECK NEXT TABLE ENTRY

; HERE IF ENTRY TYPE CODE NOT IN TABLE OF KNOWN CODES

	SKIPL GTENTF		;ANY UNKNOWN ENTRIES PREVIOUSLY ENCOUNTERED ?
	JRST GETEN1		;YES, DO NOT ISSUE MESSAGE AGAIN
	SETZM GTENTF		;INDICATE AN UNKNOWN ENTRY HAS BEEN FOUND
	CALL TSTCOL		;OUTPUT CRLF IF NEEDED
	TMSG <% ACCTPR: Unknown entry type >
	MOVEI T1,.PRIOU		;GET PRIMARY OUTPUT JFN
	LOAD T2,ENTCOD;		;GET ENTRY TYPE CODE
	MOVX T3,^D8		;USE OCTAL RADIX
	NOUT			;OUTPUT ENTRY TYPE
	 JSERR			;UNEXPECTED ERROR
	TMSG < encountered
>				;OUTPUT END OF MESSAGE
	JRST GETEN1		;GO GET NEXT WORD FROM INPUT FILE

; HERE TO INPUT REMAINDER OF ENTRY

GETEN5:	MOVEM T1,GTENTI		;SAVE INDEX INTO TYPTAB
	LOAD T3,ENTSIZ		;GET SIZE OF ENTRY
	SUBI T3,1		;COMPENSATE FOR HEADER WORD, ALREADY INPUT
	JUMPE T3,GETEN8		;IF NO MORE TO INPUT, RETURN
	MOVN T3,T3		;GET NEGATIVE # OF WORDS TO I