Google
 

Trailing-Edge - PDP-10 Archives - BB-H506D-SM_1983 - cobol/source/metunv.mac
There are 5 other files named metunv.mac in the archive. Click here to see a list.
; UPD ID= 1964 on 6/26/79 at 10:57 AM by W:<WRIGHT>
UNIVERSAL	METUNV
SUBTTL		LSTATS -- METER PARAMETERS



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


SEARCH	FTDEFS		;GET FILE TABLE DEFINITIONS
SEARCH	INTERM		;GET ASSEMBLY SWITCHES
LSTATS==LSTATS		;MAKE VISIBLE FOR SORT


MB.BAS==1	;NUMBER OF WORDS USED TO IDENTIFY THE DIFFERENT
		; BLOCK TYPES

;BLOCK TYPES IN THE OUTPUT FILE
; THE FIRST WORD OF EACH TYPE OF BLOCK HAS A BLOCK CODE IN THE LH
; AND NUMBER OF WORDS IN THE RH.

MBBT.H==1	;HEADER BLOCK
MBBT.T==2	;TRAILER BLOCK
MBBT.F==3	;FILE BLOCK
MBBT.D==4	;DBMS BLOCK
MBBT.S==5	;SORT BLOCK

MBBT.U==77	;USER BLOCK

	DEFINE	TBLOFF(N,L) <
		IF1,<	IFDEF N,< PRINTX % 'N IS MULTIPLY DEFINED>>
		N==ADR
		ADR==ADR+L
	> 
;METER HEADER BLOCK OFFSETS
; THE FOLLOWING INFORMATION IS KEPT AT THE FRONT OF EACH .MTO FILE
; IN THE FIRST 128-WORD BLOCK

	ADR==MB.BAS	;INITIALIZE

TBLOFF	MB.VNO,1	;VERSION NUMBER OF THE LSTATS STUFF
TBLOFF	MB.HLN,1	;SIZE OF HEADER BLOCK IN WORDS
TBLOFF	MB.FLN,1	;SIZE OF PER FILE BLOCK IN WORDS
TBLOFF	MB.PNM,1	;PROGRAM NAME
TBLOFF	MB.LBV,1	;LIBOL VERSION NUMBER
TBLOFF	MB.LSW,1	;LIBOL ASSEMBLY SWITCH WORD
TBLOFF	MB.DTM,1	;DATE / TIME WHEN PROGRAM STARTED
TBLOFF	MB.SER,1	; CPU SERIAL NUMBER
TBLOFF	MB.MON,1	;MONITOR TYPE (-10 OR -20)
			;7B17= PROCESSOR TYPE: 1=KA, 2=KI, 3=KL
TBLOFF	MB.SYN,32	;SYSTEM NAME IN ASCIZ
			; (MAX 5 WORDS ON TOPS10, 32 WORDS ON TOPS20)
TBLOFF	MB.MVR,1	;MONITOR VERSION NUMBER
TBLOFF	MB.OVH,2	; WORD 1 = AVERAGE OVERHEAD TIME (TICKS)
			; WORD 2 = TOTAL TIME WE SPENT CALCULATING THIS
TBLOFF	MB.BAT,1	;-1 IF PROGRAM IS A BATCH JOB
TBLOFF	MB.STS,1	;TOPS10 - %CNSTS WORD
TBLOFF	MB.ST2,1	;TOPS10 - %CNST2 WORD
	.MBHLN==ADR-MB.BAS	;LENGTH OF HEADER BLOCK IN WORDS
	.MBHSZ==200		;TOTAL LENGTH OF HEADER BLOCK NOW
	IFG <ADR-.MBHSZ>,<
	PRINTX	?LSTATS HEADER BLOCK TOO BIG -- FIX METUNV
	>
SUBTTL	METER 'FILE BLOCK' OFFSETS
	

	MB.HDL==^D24	;LENGTH OF BLOCK BLT FROM FILTAB
	IO.NBR==^D22	;NUMBER OF BUCKETS FOR RD,RD-NXT,RWRT,WRT,DEL
			;BUCKETS BY REC LENGTH (CHARS)
			;LS 72,72,LS 80,80,LS 132,132,LS 128 WDS,128 WDS,
			;LS 512 WDS,512 WDS,GT 512 WDS

	KYDNBR==6	;ALLOW SIX BUCKETS FOR RANDOM KEY DISTANCE

	RR.NBR==^D10	;NUMBER OF BUCKETS FOR RERUN
	RR.NUM==4	;RR.NBR/2 - 1, RELATIVE POS OF HIGHEST RR BUCKET PAIR
	RRBITS==^D32	;36- # BITS TO RIGHT OF LEAST SIGNIFICANT
			;BIT POSITION OF THE FIRST RR BUCKET LENGTH
			;UPPER BOUND (EX. BUCKET 1 IS FOR RECS UP TO 
			;16, 4 BITS TO RIGHT OF BIT POS OF 16, RRBITS=32)
	MB.OTM==F.WBSK+1+MB.BAS	;OPEN TIMING (SAVED WITHIN FILTAB BLOCK)
	MB.CTM==F.WVDW+1+MB.BAS	;CLOSE TIMING  (	"	)
	MB.OCF==F.WBRK+1+MB.BAS	;AC16 OPEN (LH) AND CLOSE (RH) FLAG BITS
				;(ALSO SAVED WITHIN FILTAB BLOCK)
	ADR==MB.HDL		;INITIAL SYM LAST WORD IN BLT BLOCK



	TBLOFF	MB.FTB,1	;ADR OF LAST WORD IN FTB BLT BLOCK
	TBLOFF	MB.NIN,1	;NO. OF INPUTS EXECUTED
	TBLOFF	MB.NOU,1	;NO. OF OUTPUTS EXECUTED
	TBLOFF	MB.FSZ,1	;LENGTH OF FILE AT LOOKUP TIME 
				;(NEG WRDS, POS BLKS)
	TBLOFF	MB.VID,3	;"VALUE OF ID" FROM FD
	TBLOFF	MB.FG1,1	;FLG1,,CHAN NUMBER
	TBLOFF	MB.KYD,KYDNBR	;RANDOM KEY DISTANCE BUCKETS
	TBLOFF	MB.KY2,5	;[V2] MORE RANDOM KEY DISTANCE BUCKETS

	MB.1SZ==ADR		;SIZE OF FIRST FILE BLOCK (HEADER PORTION)

	IFG <MB.1SZ-200>,<
	PRINTX	?MB.1SZ .GT. 200 - FIX METUNV
	>


	ADR==200	;I-O BUCKETS GO IN SECOND FILE BLOCK

	TBLOFF	MB.RDD,IO.NBR	;READ BUCKETS
	TBLOFF	MB.RNX,IO.NBR	;READ NEXT BUCKETS
	TBLOFF	MB.RWT,IO.NBR	;REWRITE BUCKETS
	TBLOFF	MB.WRT,IO.NBR	;WRITE BUCKETS
	TBLOFF	MB.DEL,IO.NBR	;DELETE BUCKETS
	TBLOFF	MB.STE,2	;START = TEST
	TBLOFF	MB.STG,2	;START GT TEST
	TBLOFF	MB.STN,2	;START NOT LS TEST
	TBLOFF	MB.RRN,RR.NBR	;RERUN BUCKETS,BY # RECS(PWRS OF 2 STRT AT 16)
	
	.MBFLN==ADR		;LENGTH OF A METER BLOCK
	.MBFSZ==400		;SIZE OF FILE BLOCK IN N*200
	IFG <.MBFLN-.MBFSZ>,<
	PRINTX	?LSTATS FILE BLOCK TOO LARGE - FIX METUNV
	>
SUBTTL	METER 'TRAILER BLOCK' OFFSETS

	MBHISL==^D70		;LENGTH OF HISTOGRAM TABLES
	QT.NBR==^D8	;NUMBER OF BUCKETS FOR LSU QUEUE TECH.

	ADR==MB.BAS		;INITIALIZE
TBLOFF	MB.ACP,2	;ACCEPT BUCKETS
TBLOFF	MB.DSP,2	;DISPLAY BUCKETS
TBLOFF	MB.SUT,1		;TIMING BUCKET FOR ALL RETAINS
TBLOFF	MB.FRT,1	;TIMING BUCKET FOR ALL FREES
TBLOFF	MB.RTN,QT.NBR	;RETAIN BUCKETS, ONE FOR EACH LSU QUEUE TECH.
TBLOFF	MB.RTU,1	;RETAIN UNAVAILABLE
TBLOFF	MB.RTF,1	;RETAIN UNTIL FREED
TBLOFF	MB.FFE,1	;FREE FILE EVERY RECORD
TBLOFF	MB.FEV,1	;FREE EVERY RECORD (ALL FILES)
TBLOFF	MB.FRC,1	;FREE RECORD
TBLOFF	MB.FNR,1	;FREE NOT RETAINED
TBLOFF	MB.HSL,1	;STORED LENGTH OF HISTOGRAM BLOCK
TBLOFF	MB.HTO,MBHISL	;THE HISTOGRAM BLOCK
TBLOFF	MB.HTC,1	;NUMBER OF TIMES THE HISTOGRAM
			;ROUTINE WAS CALLED
TBLOFF	MB.DTF,1	;DATE/TIME WHEN PROGRAM FINISHED
TBLOFF	MB.TRT,2	;TOTAL RUN TIME FOR PROGRAM (TICKS)
TBLOFF	MB.KIL,1	;KILL FLAG (-1 IF PROGRAM WAS ABORTED)
TBLOFF	MB.NFB,1	;TOTAL NUMBER OF FILE BLOCKS
			;IF .GT. 100, ONLY THE FIRST 100 HAVE BEEN WRITTEN.
TBLOFF	MB.NSB,1	;TOTAL NUMBER OF SORT BLOCKS
TBLOFF	MB.NDB,1	;TOTAL NUMBER OF DBMS BLOCKS

	.MBTSZ==200		;LENGTH OF TRAILER BLOCK NOW
	IFG <ADR-.MBTSZ>,<
	PRINTX	?LSTATS TRAILER BLOCK TOO LARGE - FIX METUNV
	>
SUBTTL	METER 'DBMS BLOCK' OFFSETS

	ADR==MB.BAS
;TBLOFF	MB.SOMETHING,N
	.MBDSZ==200		;CURRENT LENGTH OF DBMS BLOCK
	IFG <ADR-.MBDSZ>,<
	PRINTX	?LSTATS DBMS BLOCK TOO LARGE - FIX METUNV
	>

SUBTTL	METER 'SORT' BLOCK

	ADR==MB.BAS		;INITIALIZE
TBLOFF	MB.SLN,1		;NUMBER OF REAL, DEFINED, DATA WORDS
				;TO FOLLOW IN THIS SORT BLOCK.
TBLOFF	MB.FTD,MB.HDL		;DATA FROM FILE TABLE BLOCK
TBLOFF	MB.SM,1			;SORT OR MERGE
TBLOFF	MB.TM0,2		;TIME AT START OF SORT
TBLOFF	MB.TM1,2		;TIME AT END OF SORT
TBLOFF	MB.TPS,1		;TIME IN PSORT.
TBLOFF	MB.TRL,1		;TIME IN RELES.
TBLOFF	MB.TMG,1		;TIME IN MERG.
TBLOFF	MB.TRN,1		;TIME IN RETRN.
TBLOFF	MB.TND,1		;TIME IN ENDS.
TBLOFF	MB.KSZ,1		;KEY SIZE IN WORDS
TBLOFF	MB.NIF,1		;NO. OF INPUT FILES
TBLOFF	MB.NIO,1		;NO. OF I/O CHANNELS
TBLOFF	MB.NSF,1		;NO. OF SCRATCH FILES
TBLOFF	MB.NMP,1		;NO. OF MERGE PHASES
TBLOFF	MB.NRT,1		;NO. OF RECORDS IN TREE
TBLOFF	MB.NRI,1		;NO. OF RECORDS INPUT
TBLOFF	MB.NRO,1		;NO. OF RECORDS OUTPUT

	.MBSLN==ADR		;LENGTH OF SORT METER BLOCK
	.MBSSZ==200		;TOTAL LENGTH OF SORT BLOCK NOW
	IFG <ADR-.MBSSZ>,<
	PRINTX	?LSTATS SORT BLOCK TOO BIG -- FIX METUNV
	>

	END