Google
 

Trailing-Edge - PDP-10 Archives - BB-H580C-SB_1981 - dbsdcl.mac
There are 22 other files named dbsdcl.mac in the archive. Click here to see a list.
UNIVERSAL DBSDCL	FOR COBOL
SUBTTL	PARAMETERS FOR DBMS-10 VERSION 2 AND LATER	RAY HARRISON /NJK



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

	SEARCH GENDCL
	SEGSYM
;EDIT HISTORY

;EDIT	WHO	DESCRIPTION
;----	---	-----------
;
;
;375	HRB	DEFINE CODES FOR DELETED TRANS/COMMAND HEADERS
	;;;	ALL DBMS COMPONENTS ARE MAINTAINED AT SAME VERSION
	MAJVER==5
	MINVER==1
	CUSVER==0
	EDITNO==410
	DEFINE VERSION(AAA)<
	  LOC	137
	  BYTE	(3)CUSVER(9)MAJVER(6)MINVER(18)EDITNO
	  RELOC
	>

	;;;	I AM NOT SURE IF THERE IS A "CORRECT" WAY TO DO THIS OR IF THIS IS THE CORRECT WAY
	;;;	BUT THE VARIOUS DBCS-USING UTILITIES DO NEED CERTAIN TAILORED MODULES
	;;;	IN PARTICULAR, GATE, PORT, & LEAVE
	;;;	SO, IN THE INTEREST OF MINIMIZING REDUNDANCY
	;;;	EACH OF THESE (AND EVENTUALLY OTHERS?) WILL BE PREFIXED BY THIS MACRO
	DEFINE INIUTIL<
	  IFNDEF DBINFO,<DBINFO==0>
	  IFNDEF DBMEND,<DBMEND==0>
	  IFNDEF V3DBMS,<V3DBMS==0>
	  IFNDEF DBCONV,<DBCONV==0>
	  DBCS==1
	  IFN DBINFO!DBMEND!V3DBMS!DBCONV,<DBCS==0>
	  IFN DBINFO,<SEARCH INFDCL>
	  IFN DBMEND,<SEARCH MNDSYM>
	  IFN V3DBMS,<SEARCH VTVDCL>
	  IFN DBCONV,<SEARCH CNVDCL>
	>
	SUBTTL	MISCELLANEOUS SYMBOLS

	;;;	REC TYP ID'S--MACRO DEFINED IN SCHIO
	EXTERN TID.AL,TID.CL,TID.DL,TID.FL,TID.IL,TID.ML,TID.VL
	EXTERN TID.OL,TID.RL,TID.SL,TID.UL,TID.WL,TID.TL

	;;;	SIMILARLY, THE SET TYPES ARE DEFINED= $ OWNER . MEM
	EXTERN $S.A,$S.R,$S.U
	EXTERN $R.D,$R.W,$R.O,$R.M
	EXTERN $A.W,$D.C,$D.T,$O.M,$M.V,$V.C

	; KEY VALUES ASSOCIATED WITH KEYWORDS PASSED AS ARGUMENTS TO DBCS
	; THIS IS MASTER DEFINITION -- REFFED EVERYWHERE ELSE

	DEFINE KEY(KEYARG),<[$$'KEYARG]>		;MECH OF GETTING AT THEM

	HALF==777777			;NEED HALF WORDS OF THESE GUYS OCCAS
	$$ONLY==-^D10
	$$SELECT==-^D11
	$$FIRST==-^D12
	$$LAST==-^D13
	$$PRIOR==-^D14
	$$NEXT==-^D15
	$$DUPLIC==-^D16
	$$ALL==-^D17
	$$AREA==-^D18
	$$RECORD==-^D19
	$$SET==-^D20
	$$UPDATE==-^D21
	$$RETRIEV==-^D22
	$$RUNUNIT==-^D23
	$$PROT==-^D24
	$$EXCLUSIVE==-^D25
	$$CURR==-^D26
	$$SHARED==-^D27
	$$JOURNAL==-^D28

	;;;	MISC SYMBOLS PART OF DATA BASE PROCESSING

	GREG	(BAS,15)		;SCHIO HAS NO STATIC LOW SEG

	SKECHN==0

	PAGWID==^D26
	LINWID==^D35-PAGWID
	SYSNMID==1
	SYSTID==40			;RESERVE THESE FOR SYSTEM USE
	TID.ASR==1			;TID OF AREA-STATUS REC
	TIDMAX==777			;REC TYP ID IS 9 BIT FIELD
	DOFFMAX==MAX.XB			;RESTRICT TO THIS VAL PURELY FOR CONVEN...SHOULD BE AMPLE IS 120
	USEMAX==20			;FOR DYN ALLOC OF USE CONDITIONS
	TEXMAX==^D100			;ALLOCATE 20 WORDS A SHOT
	LOKMAX==5			;PRIVACY KEYS/LOCKS, SCAN 5 CHARS ONLY
	SHORT==6			;FORTRAN NAMES MAX LEN
	NAMLEN==^D30			;USUAL MAX NAME LEN
	MAXFS20=^D120/CPW
	MAXTS20==^D45/CPW		;ALWAYS OF FORM DSK:NAME-ONLY.TMP
	MAX.SS==10			;AT RUN-TIME FOR SETDB/UNSET (RIGHT PLACE?)
	FOPSIZ==7			;FILOP ARG BLK SIZE
	TIOSIZ==5			;L/E BLK SIZE FOR TMP AREAS
	SUBTTL CERTAIN SCHEMA FIELDS CAN TAKE ON A RANGE OF VALUES

	;;;	USAGE MODES -- EVEN VALS=RETR /ODD=UPDATE
	UM.COR==0		;CONCUR RETR
	UM.COU==1		;CONC UPDATE
	UM.PRR==2		;PROT RETR
	UM.PRU==3		;PROT UPD
	UM.EXR==4		;EXCL RETR
	UM.EXU==5		;EXCL UPDATE
	UM.UDED==6		;EXCLUDED...FOR DBMEND
	; ***	THE INDIV CASES
	UM%OIP==1B0		;SIGN BIT INDICS OPEN IN PROCESS
	UM%TEMP==1B1		;AREA OPEN FOR TEMP USAGE
	UM%ASR=1B2		;INDIC (DURING OPEN) THAT ASR ACTU UPDATED
	UM%CON==1B3
	UM%PRO==1B4
	UM%EXCL==1B5
	UM%RETR==1B6
	UM%UPD==1B7
	UM%OTH==1B8		;DBMOC DETERM THAT OTHER R-U CURR HAVE THE AREA OPEN
	UM%DIODE=1B9		;ONE-DIRECTIONAL UM, IE. ONLY CHECK IF SOME ONE ELSE IS UM%CON

	;;;	LOCATION MODES
	LM.NONE==0			;NOT POSSIBLE
	LM.DIR==1
	LM.VIA==2
	LM.CAD==3			;CALC, DUPS ALLOWED
	LM.CAND==4			;CALC, DUPS NOT ALLOWED

	;;;	SET MEMBERSHIP
	SH.AUT==0			;MEMBERSHIP AUTOMATIC
	SH.MAN==1B35
	SH.MND==0			;MANDATORY
	SH.OPT==1B34
	SH.AM==0
	SH.MM==1
	SH.AO==2
	SH.MO==3

	;;;	SET ORDERING
	OR.NONE==0
	OR.1ST==1
	OR.LAST==2
	OR.NEXT==3
	OR.PRIOR==4
	OR.SORT==5			;MEANS NO PHRASE FOLLOWS "ORDER SORTED"
	OR.WIN==6			;"WITHIN" PHRASE FOLLOWS
	OR.DBK==7			;DBKEY PHRASE FOLLOWS
	OR.DUP==10			;DUPS PHRASE FOLLOWS
	SRTORD==4			;NUM OF SORT ORDERINGS

	;;;	KEY-COMPARISON CONTROL
	KC.USER==0			;DATA FIELDS
	KC.KED==1			;DBKEY OF ACTUAL RECORD
	KC.KEX==2			;DBKEY OF RECORD AS ENCODED IN INDEX BLK
	KC.TID==3			;TID/RECNAME OF RECORD (FROM LINHDR IN EFFECT)
	KC.TIX==4			;TID/RECNAME AS ENCODED IN INDEX BLK
	KC.MAX=4

	;;;	CONTROL OF ORDERING OF DUP RECS
	DU.ARB==0			;ORDER THEM ANY OLD WAY
	DU.1ST==1			;PUT EM FIRST
	DU.LAST==2
	DU.NOT==3			;DONT ALLOW

	;;;	DATA-NAME KEY TYPES
	KEY.ASC==1B35	
	KEY.DESC==1B34
	KEY.RANG==1B33			;IS RANGE KEY
	KEY.CALC==1B32
	KEY.NORD==1B31			;ON IF DATUM CTLS MEMBER NOT IN CURR SS
	KEY.SOR=1B30			;IN EFFECT, IMAGE OF VIA.SOR

	;;;	MEMBER USAGE CTL IS VIA/FOR:
	VIA.DIR==1			;DITTO FOR LM = DIR
	VIA.CALC==2		;DITTO FOR LM = CALC
	VIA.MEM==3			;VIA BLK FROM SOS THRU MEMBER (IE. LM OF OWNER VIA)
	VIA.SOR==4			;THIS VIA BLK ENCODES SORT KEYS

	;;;	WHAT IS SET OCC SELECT
	SOS.CUR==0			;0 SINCE THE DEFAULT ALSO
	SOS.LMO==1

	;;;	DATA TYPE CONSTANTS
	;;;	PRECISION/ SCALE CONSTANTS
	;;;	X=FIXED L=FLOAT  B=BIN D=DEC  R=REAL C=COMPLEX
	; ***	BIT COMPONENTS
	TY.FLO==1B35
	TY.BASE==1B34
	TY.PLEX==1B33
	; ***	ACTUAL POSSIBLE TYPES
	DT.STRUC==0				;NO DATA TYPE MEANS SIZE PHRASE
	DT.DBK==^D9
	DT.D6==^D10
	DT.D7==^D11
	DT.D9==^D12
	DT.MAX=^D12

	ABSXBR==^D35
	ABSXDR==^D10
	ABSLBR==^D27
	XBR.1M==^D35
	XBR.1D==^D10				;SAME THING IN DECIMAL PREC
	XBR.2M==^D71
	XBR.2D==^D18				;DITTO BEFORE
	XDR.MAX==^D18
	;;;	THE COMPLEX PREC CHARAS CAN BE DET FROM THE FLOAT COMPON
	LBR.1M==^D27
	LBR.2M==^D62
	SUBTTL	EXECUTION-RELATED CONSTANTS

	;;;	CENTRALLY DEFINE THE SET OF USER ENTRY CLASSES, & CONCOMITANT WITH THAT
	;;;	EACH VERB (CODASYL STAND) AND EXPLIC ENTRY PT IS GIVEN A CODE
	DEFINE VERBS.<
	;;;	KLUDGE TO GET EXACTLY 2 WORDS PER ENTRY
	VERB.	(HOST)				;LET THESE HAVE STATUS CODE OF ZERO
	VERB.	(CLOSE)
	VERB.	(DELETE)
	VERB.	(FIND)
	VERB.	(FREE)
	VERB.	(GET)
	VERB.	(RETAIN)			;ALIAS KEEP
	VERB.	(INSERT)
	VERB.	(MODIFY)
	VERB.	(OPEN)
	VERB.	(UNUSED)
	VERB.	(REMOVE)
	VERB.	(STORE)
	VERB.	(UNUSED)
	VERB.	(UNUSED)
	VERB.	(BIND)
	VERB.	(CALL)
	>
	DEFINE VERB.(TEXT.)<
	  IFDEF XSTAT.,<
	    GETLEN <TEXT.>
	    IFE LEN.-3,<ASCIZ/TEXT.      />
	    IFE LEN.-4,<ASCIZ/TEXT.     />
	    IFE LEN.-5,<ASCIZ/TEXT.    />
	    IFE LEN.-6,<ASCIZ/TEXT.   />
	    IFE LEN.-7,<ASCIZ/TEXT.  />
	    IFE LEN.-8,<ASCIZ/TEXT. />
	  >
	  IFNDEF XSTAT.,<FIELD(C.'TEXT.)>
	>

	VERBS.
	BLKSIZ	(CODE.V)			;NOT A TRUE SIZE BUT...

	;;;	SUPPRESS CLAUSE CODES AND BITS
	SUP.ALL=$$ALL&HALF
	SUP.REC==$$RECORD&HALF
	SUP.AREA==$$AREA&HALF
	SUP.SET==$$SET&HALF
	R.SUP==1B35
	A.SUP==1B34
	S.SUP==1B33

	;;;	FIND3 (POSITIONAL) CODES
	F3.OFF==1
	F3.1ST==$$FIRST&HALF
	F3.LAST==$$LAST&HALF
	F3.PRIOR==$$PRIOR&HALF
	F3.NEXT==$$NEXT&HALF

	;;;	CLOSE CODES
	CL.JRN==$$JOURNAL&HALF
	CL.RUN==$$RUNUNIT&HALF
	CL.AREA==$$AREA&HALF
	CL.ALL==$$ALL&HALF

	;;;	DELETION CODES
	DL.ALL==$$ALL&HALF
	DL.ONL==$$ONLY&HALF
	DL.SEL==$$SELECTIVE&HALF
	DL.SLF==0				;DELETE JUST SELF, THE IMPLICIT OPTION

	;;;	OPEN-AREA CODES
	OP.PROT==$$PROT&HALF
	OP.EXCL==$$EXCL&HALF
	OP.RETR==$$RETR&HALF
	OP.UPD== $$UPDA&HALF
	OP.CON== 0				;THE IMPLIC OPTION
	OP.JRN==$$JOUR&HALF
	OP.ALL==$$ALL&HALF
	SUBTTL	EXECUTION-CONTROLLING FLAGS (SOME DEFINED BY SCHEMA)

	;;;	FLAG VALUES FOR LEFT HALF OF PORT VECTOR (IE. VFLAGS(X))
	; ***	IMPORTANT: THESE 3 ACT. FLAGS RESIDE WITH THE VAC. FLAGS IN ACT.XC(SS) AS DETERMINED BY THE USER'S DMCL ENTRIES
	; ***	BUT THESE HAVE NO IMAGE IN EV.FLAG BUT THE VAC. ONES DO
	; ***	IN PT OF ACT, EV.FLAG PLACES TOT DIF MEANINGS ON B30-B32
	ACT.UAN==1B32			;UNANTICIPATED EXCEP, EVERYTHING BUT 307=ESA & 326=NRS
	ACT.ALL=1B31			;ANY EXCEPTION
	ACT.SYS==1B30			;THE SYSTEM ERROR (APPROX. 40+)
	; ***	END IMPORTANT
	; ***	THE DMCL CAN DEFINE ACTIONS FOR EXCEPTIONS ON A VERB BASIS
	VAC.UPD==1B35			;ERROR DURING AN UPDATE VERB
	VAC.CALL==1B34			;ERROR DURING AN EXPLIC CALL (EG. JSTRAN)
	VAC.BIND==1B33			;ERROR DURING BINDING
	VACBITS==VAC.UPD!VAC.CALL!VAC.BIND
	; ***	OTHER VERB-BASED SWITCHES
	SCH.IO==1B32			;TURNED ON TO INDIC X/BAS KLUDGE INVOLVED
	OK.NOSS==1B31			;AT MOMENT SBIND ONLY
	OK.SUS==1B30			;OK TO ENTER AT THIS EP EVEN THO SYS UNDEF STATE
	CRU.MUST==1B29			;CERTAIN VERBS REQUIRE THAT CUR.RU HAVE A VALUE
	JR.OVU==1B28			;ENTRY IS OTHER THAN A VERB UNIT & TOUCHES JOURNAL
					;IE. JRDATA/JRTEXT/JSTRAN/JETRAN
					;ADDIT, IN DBPORT IT IS TAKEN TO MEAN ANY ENTRY THAT CONTEX ENTERS THIS STATE
					;EG. ANY VERB IF NOT JOURNALING
	JR.UPD==1B27			;DOES THE VERB UPD J (& DATA BASE)
	ENQ.X==1B26			;NEED TO ENQ EXCL IS EQUIV TO JR.UPD EXCEPT 
					;WHEN (OP/CL) PROCESSING J LAB ONLY
	ENQ.SH==1B25			;ENTRY DOES NO UPDATES BUT DOES ACCESS DB
	ENQ.ALT==1B24			;(EG. OPEN) ENTRY CAN ALTER SIMULT OF R-U, SO PLAY SAFE
					;IE. STRONGER THAN ENQ.X
;	ENQ.NO==NOT(ENQ.X&ENQ.SH)	;IE. A SERVICE ROUTINE SUCH AS STATS$
; ***	NO MORE ROOM IN THIS FLAG VECTOR !!!

	;;;	INTRA-VERB SWITCHES...
	;;;	DEFINE LEFT-SIDE SS AS THE FLAG REGISTER WITH THESE FLAGS (18 MAX):
	; ***	ALSO... LET B0-2 BE COMMAND SPECIFIC (REFFED ONLY IN XXXX$ ENTRY PTS)
	; ***	USER-RECORD-COMMANDS
	LINK.BIT==1B0				;AT LEAST ONE ACTUAL LINKING OPER (IE.INS/REM) IN THIS VERB
	INS.BIT==1B1				;IS CALL TO CURN.U NECES
	CA.BIT==1B2				;NECESSARY TO (RE)CALC THIS REC BECAUSE ITS KEY HAS CHANGED
	; ***	BIND CLASS
	NAB.BIT==1B0				;NOOP ACTUBIND (IE. FOR DBINFO VIA SSBIND)
	OSS.BIT==1B1			;GUARAN DON'T PUNISH WRONG SUB-SCH IF BIND FAILURE
;	UNUSED==1B2
	; ***	OPEN CLASS
	XCLU.BIT==1B0
	FOPN.BIT==1B1				;ALLOW FH.STAT IN ASR TO BE -1
;	UNUSED==1B2
	; ***	THOSE NOT COMMAND-SPECIFIC
	RB.BIT==1B3				;FORCE TMP.RB TO BE UPDATED
	CNEX.BIT==1B4				;HAVE USED A CANON-NEXT PTR IN GDETTB
	NORD.BIT==1B5				;SET IN DBKITM TO INDIC A CTLER OF INVIS SORTED-SET MODDED
	JRV.BIT==1B6				;JOURNALING BY VERB
	BMO.BIT==1B7				;BUFFER HAS BEEN MODDED
	DMO.BIT==1B8				;DSK HAS BEEN MODDED
	XWX.BIT==1B9				;IF ON AT DBSABO, MEANS HAVE GOTTEN EXCEPTION WHILE PROC EXCEP
	UKY.BIT==1B10				;USER-INTRODUCED DATA BASE KEYS MUST BE SPECIAL CASED
	UCR.BIT==1B11				;UNABLE TO COMPL RESTOR IF ON WHEN EXCEP OCCURS
	KSU.BIT==1B12				;NECES IN CRU.CHK TIL CORRECT ENQC FUNCT EXISTS
	V3.BIT==1B13				;FOR V3TOV5
	DEQ.BIT==1B14				;THIS VERB MUST CALL IU.DEQ IF ON IN DBLEAV
	EOF.BIT==1B15				;SET WHEN A PAGE ACCESS (IN GET.OS) IS BEYOND EOF

	;;;	SUB-SCHEMA STATUS WORD (IE. INTER-VERB SWITCHES)
	; ***	PERM LOC IS PSW(SS) (IE. PROGRAM-STATUS-WORD PER SS)
	; ***	RIGHT SIDE ONLY, IE. JUST 18 SWITS AT MOST
	; ***	INTRA-VERB LOC IS THE LEFT-SIDE OF REG X
	PSW.TR==1B35				;CHKPTING FOR TRANS ONLY
	PSW.VER==1B34				;CHKPTING PER VERB
	PSW.CBUU==1B33				;CANT BACKUP UPDATES
	PSW.SUS==1B32				;SYS IN UNDEF STATE (EG. AFTER ERROR AND CBUU SET)
	PSW.MTA==1B31				;MTA JOURNAL
	PSW.JOSH==1B30				;JOURNAL RETAINED SHARED
	PSW.LIM==1B29				;ACTIVE TRANSAC LIM
	PSW.TAC==1B28				;ON IF "BETWEEN" JSTRAN&JETRAN
	PSW.RESH==1B27				;ONE OR MORE AREAS OP IN RETR OR UPD U-M
						;IE. ANY "VULNERABLE" SHARED AREAS (INCL J)
	PSW.UPSH==1B26				;1 OR MORE AREAS OPENED PRU OR COU
						;IE. YOUR UPDATES CAN AFFECT OTHER R-U
	PSW.ENQ==1B25				;TURNED ON/OFF ONLY BY IU.ENQ AND IU.DEQ
	PSW.CNV==1B24				;INDIC DEALING WITH CONVERSION DB...NAME.??N
	PSW.QRU==1B23				;INDIC THAT CRU IS CURRENTLY ENQ-ED
	PSW.JRET==1B22				;J OPENED ONLY FOR RETR

	SUBTTL	GENERAL STRUCTURES OF THE DATA BASE SYSTEM

	;;;	FORMAT OF AN AREA STATUS REC (ALWAYS 1STP/1 OF AREA)
	;;;	STATUS REC IS IN EFFECT FILE(AREA) HEADER
	FIELD	(FH.STAT)		;0 IF OK, "UNDEF" IF EDITS IN PROGRESS
	FIELD	(FH.UNU)		;FOR FUTURE
	BLKSIZ	(SIZ.FH)

	;;;	FORMAT OF A PAGE'S PAGHDR
	FIELD	(PH.NUM)			;PAG NUM OF THIS PAGE
	BYTES	(PH,<<HUSE,^D18>,<1STF,^D18>>)
				;HUSE IS HIGHEST LIN NUM USED SO FAR
				;THE (1STF)TH WORD OF THE PAGE IS THE 1ST TO CONTAIN NO DATA
	BLKSIZ	(PH.CALC)		;(FIXED) SIZED IS ALSO OBV OFFS OF THAT WHICH FOLLOWS: 0-N CALC BUCK WORDS

	;;;	FORMAT OF A LINE HDR
	WORD	(LH,<<RSIZ,^D12>,<TID,^D9>,<OFFS,^D15>>)


	;;;	FORMAT OF A DATABASE KEY
	WORD	(DBK,<<SIGN,1>,<PAG,PAGWID>,<LIN,LINWID>>)

	SUBTTL	SORTED-SETS

	;;;	CONSTANTS
	TID.XB==2			;UPPER LEVEL INDEX BLK
	TID.XL==3			;LEAF INDEX BLK (PTS AT DATA RECORDS)
	MAX.XB==^D120			;INDEX BLKS ARE MIN(120,16*XNSIZ) BIG
	FAU.XN==^D16			;WILL TRY TO PUT 16 NODES IN INDEX BLK
	MAX.XL==10			;MAX SIZ OF INTERVAL BETWEEN "BUOYS"
	; ***	FOR MOMEMT INDEX BLK HAS NULL HDR
	HDR.XB==0

	;;;	FORMAT OF A KEY-NODE IN AN INDEX BLK
	FIELD	(XN.SON)		;PTS AT INDEX-BLK/DATA-REC AT NEXT LOWER LEVEL
	BLKSIZ	(XN.KEY)		;ALSO 1ST WORD OF VAR LEN FIELD

	;;;	FORMAT OF A KEY-LEAF (OR "BUOY")
	FIELD	(XL.NEXT)
	FIELD	(XL.PRIOR)
	FIELD	(XL.CNT)		;NUM OF DATA-RECS IN THIS INTERVAL
	BLKSIZ	(SIZ.XL)
	SUBTTL	DAEMDB RELATED SYMBOLS

	DEFINE DABNAME<ASCIZ/SYSTEM-DAEMDB/>	;GIVE STANDARD NAME TO DAEMDB PID

	;;;	DAEMDB ACTION DRIVING CODES
	OFFS.==10				;MAKE COINCIDENCE SOMEWHAT LESS LIKELY
	FIELD	(DADOPEN)
	FIELD	(DADCLJ)			;CLOSE-J FLUSHES ALL FROM JT
	FIELD	(DADCLRU)			;CLOSE-RU JUST COPS THRU JP.BIX-1
	BLKSIZ	(CODAD)

	;;;	ERROR CODES FROM DAEMDB
	FIELD	(DAXOK)				;SUCCESSFUL RETURN
	FIELD	(DAXNAV)				;NOT-AVAILABLE (SHUTDOWN ALREADY GIVEN)
	FIELD	(DAXNOM)				;MAGTAPE COULD NOT BE GOTTEN
	FIELD	(DAXOJT)				;UNABLE TO OPEN JT FILE
	FIELD	(DAXIDC)				;IMPROPER DEVICE CHARAC AFTER ASSIG/DEFIN
	FIELD	(DAXMIX)				;DBCS SOFTWARE ERROR DURING MAGTAPE INIT
	FIELD	(DAXAJD)				;ALREADY JMDISK DONE
	FIELD	(DAXJQA)				;J QUOTA ALREADY REACHED
	FIELD	(DAXOTH)				;SOME OTHER ERROR--DAEMDB FAILURE
	BLKSIZ	(CODAX)

	;;;	INFO PACKETS FOR DAEMDB COMMUN
	FIELD	(DABCODE)			;DAD VALUE
	FIELD	(DABSKE,2)			;SCH NAME IN ASCIZ
	BLKSIZ	(DABOTH)
	; ***	THE "CLOSE" STUFF
	CLODSZ==DABOTH
	; ***	THE "OPEN" STUFF FOR THE -10
	OFFS.==DABOTH
	FIELD	(DABMTA)			;PHYS NAME OF MAGTAPE IN 6BIT
	FIELD	(DABDSK)			;DITTO FOR JT DEVICE
	FIELD	(DABPPN)			;WRITE RBCNT OF DABDSK AT APPROP TIME

	FIELD	(DABFIL)
	FIELD	(DABEXT)
	FIELD	(DABPRIV)
	BLKSIZ	(OPNDS1)
	IFG <OPNDS1-^D10>,<PRINTX ?DAB TO LONG FOR SHORT PACKET>
	; ***	THE "OPEN" STUFF FOR THE -20
	OFFS.==DABOTH
	FIELD	(DABMTA,2)			;ASCIZ HERE
	FIELD	(DABSPEC,^D24)
	BLKSIZ	(OPNDS2)
	IFG <OPNDS2-^D30>,<PRINTX ?DAB TO LONG FOR SHORT PACKET>
	; ***	THE "FROM" STUFF
	FIELD	(DABCODE)		;A DAX VALUE
	FIELD	(DABTHRESH)		;THE INIT THRESHOLD TO PUT IN A J
	BLKSIZ	(FROMDAB)

	SUBTTL	JOURNAL RELATED SYMBOLS

	;;;	THE POSSIBLE JOURNAL-BLK CODES
	AI.COD==1
	BI.COD==2
	CS.COD==3		;COMMAND START
	CE.COD==4		;COMMAND END
	LB.COD==5		;LABEL (MULTI-REEL)
	TS.COD==6
	TE.COD==7		;TRANSACTION START/END CODES
	TX.COD==10		;TEXT COMMENT BLOCK
	CU.COD==11		;CURRENCY-BACKUP BLOCK, USED AT RUN-TIME ONLY
	DT.COD==12		;[A375] DELETED TRANSACTION HEADER
	DC.COD==13		;[A375] DELETED COMMAND HEADER
	HI.COD==13		;[M375] HIGHEST CURRENT CODE
	; ***	POWER-OF-2 BIT CORRES FOR J CODES
	DEFINE C2B(STRING)<STRING'.BIT==1_<STRING'.COD-1>>
	C2B(BI)
	C2B(AI)
	C2B(CS)
	C2B(CE)
	C2B(LB)
	C2B(TS)
	C2B(TE)
	C2B(TX)
	C2B(CU)
	C2B(DT)			;[A375]
	C2B(DC)			;[A375]

	;;;	THE POSSIBLE JOURNAL-PAGE IDS
	EM.PID==0		;EMPTY PHYSICAL BLK
	DT.PID==1		;1ST LOG BLK IS DATA BLK
	LB.PID==2		;1ST LOG BLK IS LABEL BLK
	ER.PID==3		;PSEUDO-VALUE, USED IN DBMEND FOR ERROR CONTROL
	SK.PID==4		;PSEUDO-VAL, USED IN DBMEND TO SKIP THE (BAD) BLK

	;;;	MISCELLANEOUS JOURNAL SYMBOLS
	JR.PSIZ==1000			;SIZE OF A JOURNAL PAGE/BUFFER
	JR.PRALC==20			;# OF JPAGES TO PRE-ALLOC, EACH TIME RUNOUT, DURING APPLIC
	JR.CHUNK==40			;# OF JPAGES TO COPY FROM A MAGTAPE JOURN TO DSK .TMP WHEN MERG BEF
	EMP.JP==JR.PSIZ-HDR.JP		;AMT OF FREE SPACE ON AN EMPTY (IE. DATALESS) J PAGE
	BKU.AI==1B35			;AL-AB.BKU VALUE, BACKUP AFT IMS
	BKU.BI==1B34			;DITTO, BEF IMS
	JI.WMAX==^D16			;CARD IMAGE
	LAB.JP=-HDR.JP-SIZ.JL		;THE LOC OF LABEL PAGE WITH RESPECT TO MAIN BUF

	;;;	JOURNAL PAGE HEADER
	FIELD	(JP.BIX)		;BLOCK/JP INDEX, IDENTIFIES JOURNAL PAGE
	JP.KEY==OFFS.			;FOR COMPARING AGAINST JLANCPID
	BYTES	(JP,<<ANC,^D18>,<PID,^D18>>)
				;LH, PHYSICAL ANCHOR: TELLS ABOUT  BUF END
				;LSS 0: AMOUNT OF POTENTIALLY WASTED (IE. INCOMPLETE) DATA AT END OF PAGE
				;ELSE THE NUM OF UNUSED WORDS ON PAGE
				;PAGE TYPE ID (SEE BELOW)
	JP.NEED=OFFS.
	BYTES	(JP,<<LSIZ,^D18>,<LCOD,^D18>>)
				;SIZE OF LAST LOG BLK STARTING ON THIS JP
				;ITS LOGICAL CODE
	BYTES	(JP,<<UNU,^D18>,<1STH,^D18>>)
				;OFFSET OF 1ST LOGBLK HDR ON J PAGE, OR 0
	FIELD	(JP.SEQ)	;IF PAGE+1 HAS A LOWER SEQUENCE NUMBER, WILL KNOW THIS IS LAST PAGE OF J
	FIELD	(JP.UNU)	;FOR FUTURE EXPANSION
	BLKSIZ	(HDR.JP)
	JLANCPID=<EMP.JP-SIZ.JL>B17+LB.PID	;ACTS AS KEY TO J FORMAT VALIDITY
						;IF FORMAT OF JP.KEY CHANGES, THIS MUST ALSO

	;;;	BUFFER HDR, IN-CORE INFO ASSOC WITH PAGE/IMAGE AT RUN-TIME
	PREFIX	(SIZ,BH,LRU)			;INDEX TO SHOW WHETHER BUFFER IS LEAST-RECENTLY-USED
	PREFIX	(SIZ,BH,WRIT)			;SWITCH--IF ON MUST WRITE THIS PAGE BACK TO DB
	PREFIX	(SIZ,BH,JPAG)			;HIGHEST JOUR PAGE THIS DB PAGE HAS A BEFIM IN
	  BH.DPAG==BH.JPAG			;SYNONYM, USED FOR DIR OF TEMP AREA
	BLKSIZ	(CONL.BH)			;AMT ONLY IN CORE
	; ***	THIS PART, FORMAT OF LOGICAL-BLK/RECORD HDR ALSO
	JB.CURR==OFFS.
	BYTPFX	(JB,BH,<<CSIZ,^D18>,<CCOD,^D18>>)
				;CUR SIZE (IN WORDS) AND CODE OF THIS JOURNAL BLK
	JB.PREV==OFFS.
	BYTPFX	(JB,BH,<<PSIZ,^D18>,<PCOD,^D18>>)
				;DITTO, BUT FOR PREV JB
	PREFIX	(JB,BH,RNID)	;FOR SIMUL UPDATE, WHICH RUN-UNIT IS CREATOR OF BLK
	BLKSIZ	(HDR.JB)
	SIZ.BH==HDR.JB+CONL.BH	;SET PREFIXING DONE RIGHT
	JB.BH==HDR.JB		;...FOR EACH PART

	;;;	QUEUE-AREA HDR
	FIELD	(QH.AREA)
	BLKSIZ	(SIZ.QH)

	;;;	TEMPLATES FOR EACH TYPE OF JB
	; ***	IMAGES ARE OF VARIABLE SIZE & ARE FULLY DESCRIBED IN USER SCHEMA
	IM.NUM==HDR.JB		;JUST PINPOINT FIRST WORD

	; ***	LABEL BLK
	FIELD	(JB.HDR,HDR.JB)
	PREFIX	(JL,JP,SCH,SHORT/CPW)		;SCHEMA NAME (IN SIXBIT)
	PREFIX	(JL,JP,RUN)		;RUN SEQUENCE NUM, IS INTEGER
	PREFIX	(JL,JP,REEL)		;REEL # (INTEG)
	PREFIX	(JL,JP,DATE,4)		;DATE/TIME IN ASCII
	; ***	INTERNAL CONTROL INFORMATION
	PREFIX	(JL,JP,RNID)			;ADD 1 AND GIVE NEXT J OPENER VAL AS ITS RNID
	PREFIX	(JL,JP,RACT)			;R-U ACTIVE (IE. LE RNID)
						;USED TO SET JP.SEQ
	PREFIX	(JL,JP,TRAC)			;# OF TRANSAC WHICH ARE
						;IN (IE. HAVE IMAGES IN) THE J
	PREFIX	(JL,JP,HALC)			;H PAGE # ALLOC IN JRT/JRN FILE
						;IE. BOUND FOR WHERE UPFGS/FILOPS BEGIN
	PREFIX	(JL,JP,MTP)			;P# OF LAST JP MERGED INTO MTA J
	PREFIX	(JL,JP,LIX)			;LAST ACTUAL JP (WITH CURR SEQ#) IN (DISK PART OF) JOURNAL
						; !!! NOTE, IT IS NOT SETUP BY ANYONE AS YET
	PREFIX	(JL,JP,THRESH)			;IF JP.BIX IS LSS THIS, DONT ENQ SINGLE MTA J-ER
	PREFIX	(JL,JP,R3)
	PREFIX	(JL,JP,R4)
	PREFIX	(JL,JP,R5)
	PREFIX	(JL,JP,R6)
	BLKSIZ	(SIZ.JL)
	JL.JP==SIZ.JL

	; ***	INFO BLK
	FIELD	(JB.HDR,HDR.JB)
	FIELD	(JI.LEN)		;IN ITS OWN UNITS
	  INF.NOP==1B0			;NON PRINTING INFO
	  INF.1ST==1B1			;1ST OF MULTI-BLK INFO
	  INF.MOR==1B2			;MIDDLE OF MULTI
	  INF.LAS==1B3			;LAST OF MULTI
	  INF.1P==0			;NO BITS ON, MEANS SINGLE  PRINTING BLK
	FIELD	(JI.INFO,JI.WMAX)
	BLKSIZ	(SIZ.JI)

	; ***	CURRENCY BACKUP BLK
	FIELD	(JB.HDR,HDR.JB)
	FIELD	(JU.ADDR)			;LESS THAN 0 IS SET BLK
	FIELD	(JU.CURR)
	FIELD	(JU.CNEX)			;MEANINGFUL ONLY FOR SET BLK
	BLKSIZ	(SIZ.JU)
	; ***	COMMAND/VERB BLK
	FIELD	(JB.HDR,HDR.JB)
	FIELD	(JC.IDX)		;DENOTES THIS IS (I)TH CMD EXEC IN RUN-UNIT SINCE STARTED
	FIELD	(JC.TYP)		;AS IN STANDARD ERROR CODES
	BLKSIZ	(SIZ.JC)

	; ***	TRANSACTION BLK
	FIELD	(JB.HDR,HDR.JB)
	FIELD	(JT.IDX)		;DITTO FOR TRANSACTION OF THIS TYPE
	FIELD	(JT.LEN)		;NUM OF CHARS IN TRANS NAME/TYPE
	FIELD	(JT.NAM,NAMLEN/CPW)
	BLKSIZ	(SIZ.JT)

	; ***	DETERM WHICH JB TYPE IS LARGEST SINCE TEMPLATES WILL BE CO-INCIDENT DURING JOURNAL BUILDING
	DEFINE	MAXCHK(TYP.)<IRP TYP.,<IFG SIZ.J'TYP.-MAX.JB,<MAX.JB==SIZ.J'TYP.>>>
	MAX.JB==0
	MAXCHK	<I,T,C,U>


	SUBTTL IN-CORE SYMBOL DEFINITIONS

	;;;	COMMON TO AB.,RB., AND OB.
	FIELD	(SN.IDADR)			;NMID+IDVEC(SS) FOR THIS SYMBOL
	BYTES	(SN,<<NEXT,^D18>,<LEN,^D18>>)
	BLKSIZ	(SN.NAM)		;DOUBLES AS OFFSET OF VARIABLE LEN FIELD

	;;;	AREA IN-CORE BLOCK
	FIELD	(AB.CUR)		;DBKEY OF CURR REC OF AREA
	FIELD	(AB.CHAN)		;CHANNEL/JFN OF THE FILE THAT COMPRISES THE AREA
	FIELD	(AB.MODE)		;USAGE MODES -- SEE UM.XXX
					;THE LEFT SIDE MAY CONTAIN VARIOUS UM% BITS
	FIELD	(AB.BUFPT)		;AOBJ LIST OF BUFFER PTRS FOR THIS AREA
;	FIELD	(AB.FIFO)		;BUF NUM OF NEXT BUF TO OVERWRITE
	FIELD	(AB.FIL)		;PTR TO FILE SPEC AREA ASSIGNED TO
	FIELD	(AB.TBUF)		;A "SPECIAL" EXTRA BUFFER IS ALLOC-ED FOR A TMP AREA
	FIELD	(AB.TCHAN)		;IF TEMP AREA, NEED A 2ND CHANNEL
	FIELD	(AB.TLAP)		;THIS 2ND FILE GROWS...NEED LAST ALLOC PAGE (1ST PAGE==0)
	FIELD	(AB.ILAP)		;IN TEMP AREA, HAVE NEVER-NEVER LAND WHERE PAGES LT AB.LAP
					;HAVEN'T BEEN WRITTEN BECAUSE TEMP FILE IS PACKED
					;SO IF KNOW HOW BIG .DBS FILE IS, CAN DETECT THEM
					;IOW, AB.ILAP=AB.LAP AS OF OPEN
	FIELD	(AB.PINV)		;THE VALUE=AL.PSIZ-AP.PUNR, FOR USE IN ALC.REC
	; ***	START OF BLTTABLE STUFF
	AB.BLT==OFFS.
	FIELD	(AB.1STP)		;P# OF 1ST PAGE OF AREA
	FIELD	(AB.LASP)		;P# OF LAST DEFINED PAGE
	FIELD	(AB.PSIZ)		;PAGE SIZE
	FIELD	(AB.NBUF)		;NUM OF BUFS TO ALLOC
	FIELD	(AB.RPP)		;MAX RECS/PAGE TO ALLOW
	FIELD	(AB.CALC)		;MAX CALC BUCKETS PER PAGE--INIT VAL OF PH.1STF=PH.CALC+VAL(AB.CALC)
	FIELD	(AB.BKU)		;TYPE OF IMAGES TO PUT IN JOURNAL
	FIELD	(AB.LOK,LOKMAX/CPW * 6)	;TEXT OF LOCKS...S/P/E*R/U=6
	; ***	END OF BLTABLE STUFF
	AB.BE==OFFS.
	FIELD	(AB.ID)			;START STRLIB SYMBOL NODE
	FIELD	(AB.NLEN)		;LENGTH OF AREA NAME
	FIELD	(AB.NAM,NAMLEN/CPW)
	BLKSIZ	(SIZ.AB)		;MAX SIZE...SHORT AREA NAMES MEANS LESS SIZE
	; ***	ANCILLARY STUFF
	WORD	(ADR,<<UNU,^D18>,<BUF,^D18>>)	;BUFPT
					;ACTUAL ADDR OF A BUFFER/PAGE

	;;;	WITHIN IN-CORE BLOCK
	FIELD	(WB.1STP)
	FIELD	(WB.LASP)
	BLKSIZ	(SIZ.WB)

	;;;	RECORD IN-CORE BLOCK
	BYTES	(RB,<<LM,^D18>,<FLAG,^D18>>)
					;LOC MOD CODE
	  RF.NALC==1B35				;FLAG SAYS ALLOC OPERS ILLEG (IE. STORE/DELETE)
						;...CAUSED BY SET OWNED BY REC NOT BEING IN SS
	  RF.NAO==1B34				;FLAG=NOT-ALL-OWNERS IN SS, MEANS CANNOT DELETE THIS REC
						;...SINCE WILL BE UNABLE TO REMOVE IT FROM THE "INVIS" SETS IT IS IN
	BYTES	(RB,<<DOFF,^D18>,<TSIZ,^D18>>)
					;TOTAL SIZE OF REC...FROM DSIZ+DOFF
	FIELD	(RB.CUR)		;DBKEY OF CURR REC OF THIS TYPE
	FIELD	(RB.TID)		;REC TYPE ID
	FIELD	(RB.MYA)		;AOBJ PTR FOR AREAS CAN BE WITHIN
	FIELD	(RB.MYD)		;THE DATA-NAMES IN THE REC
	FIELD	(RB.ION)		;THE SETS I OWN
	FIELD	(RB.OBY)		;THE SETS I AM OWNED BY
	FIELD	(RB.LOC)		;PTR TO IN-CORE BLK OF VIA SET, ADDR OF DIRKEY, OR NUM OF CALC FIELDS
	FIELD	(RB.WID,2)		;STRING PTR TO UWA LOC FOR AREAID OR 0
	FIELD	(RB.ID)			;SYM NODE
	FIELD	(RB.NLEN)
	FIELD	(RB.NAM,NAMLEN/CPW)
	BLKSIZ	(SIZ.RB)		;MAX SIZE (WILL BE SMALLER IF RB.NLEN IS LESS THAN 26)
					;AREA, OWNER BLKS ALSO THIS WAY
	; ***	ANCILLARY DEFS FOR AOBJ PTS
	WORD	(RB,<<RMB,^D18>,<MOB,^D18>>)	;FOR OBY
					;REC'S MEM BLK(SELF)
					;MEM'S OWNER BLK (SELF'S OWNER)
	WORD	(RB,<<UNU,^D18>,<ROB,^D18>>)	;FOR ION
					;RECORD'S OWN BLK (SELF IS OWNER)
	WORD	(RB,<<UNU,^D18>,<RDB,^D18>>)	;MYD
					;RECORD'S DATA BLKS
	WORD	(RB,<<RWB,^D18>,<RAB,^D18>>)	;MYA
					;PTR TO THE WITHIN BLK ITSELF (RWB)
					;AREA REC CAN BE WITHIN
	WORD	(RB,<<NTB,^D18>,<RTB,^D18>>)	;FOR OBY/ION IN V3TOV5
						;NEW TENANT BLK/CURR TB

	;;;	DATA-NAME IN-CORE BLOCK
	BYTES	(DB,<<TID,^D18>,<OCC,^D9>,<TYP,^D9>>)
					;ITS REC'S TID (FOR CONSIS OF GET/MOD LIST)
					;DB.OCC FROM DL.OCC
					;DATA TYPE--SEE DT.XXX
	BYTES	(DB,<<CASE,^D18>,<KTYP,^D18>>)
					;CASE--PSEUDO? TID/DBKEY? ETC (SEE KC.XXX)
					;KTYP--DATA DIRECTED KEY-TYPE ASPECTS (CURR .CALC/.NORD)
					;...OTHER PROPS CONTEXT (IE. CTL-LINE) DPEND
	; ***	NOTE: THESE TWO WORDS CONSTITUTE A STRING PTR IE. THEY MUST BE TOGETHER
	FIELD	(DB.UWA)		;BYTE PTR TO BOUND ADDR OF D-N
	FIELD	(DB.SIZ)		;SIZE IN ITS OWN UNITS=DL.SIZ*DL.OCC(DEF 1)
	FIELD	(DB.OFF)		;BYTE PTR TO SAME, BUT OFFSET FROM BEGIN OF REC
	BLKSIZ	(SIZ.DB)

	;;;	OWNER IN-CORE BLOCK
	OB.COWN==OFFS.			;...ACTUALLY, OWNER OF CURR SET OCC, IF KNOWN
	FIELD	(OB.OOFF)		;DEFINED TO HANDLE O/M INDETERMINANCY SIMPLY. SEE TB.XXX BELOW
	FIELD	(OB.POFF)		;OFFSET OF PRIOR PTR IN AN OWN REC, OR 0
	FIELD	(OB.NOFF)		;OFFSET OF NEXT PTR
	FIELD	(OB.XOFF)		;PTR TO HEAD OF INDEX STRUCTURE IF SORTED SET
	FIELD	(OB.XSIZ)		;NUM OF WORDS IN AN INDEX BLK FOR THIS SET TYPE
	FIELD	(OB.XNSIZ)		;DITTO FOR AN INDIV NODE
					;IF 0, SORTED SET OCC WILL HAVE NO INDEX STRUCT
	FIELD	(OB.CVIX)		;IF MATCHES VERBIX, PERFORM APPLICABLE CURRENCY OPERATION
					;(1) OB.CUR UPDATE IN INSERT, MODIFY
					;(2) OB.CUR SUPDATE-SUPPRES IN FIND/STORE
					;IF MATCHES -VERBIX, SUPPRESS OB.COWN
	FIELD	(OB.REC)		;ADDR OF REC BLK OF REC THAT OWNS SET
	FIELD	(OB.CPRI)		;WILL BE VALID ONLY WHEN CURR OF SET LAST DET BY
					;FIND IMMED NEXT RECORD.
	FIELD	(OB.CUR)		;DBKEY OF CURR OF SET
	FIELD	(OB.CNEX)		;RELEVANT IF CURR OF SET DELETED/REMOVED
	FIELD	(OB.ION)		;ANAL TO RB.ION
	FIELD	(OB.ID)			;SYMBOL NODE
	FIELD	(OB.NLEN)
	FIELD	(OB.NAM,NAMLEN/CPW)
	BLKSIZ	(SIZ.OB)		;MAX ALLOCATABLE SIZE
	; *** ANCILLARY STUFF
	WORD	(OB,<<MRB,^D18>,<MMB,^D18>>)	;ION
					;PTR TO MEM'S RECORD BLK
					;PTR TO MEM'S MEMBER BLK

	;;;	MEMBER IN-CORE BLOCK
	FIELD	(MB.OOFF)		;OFFS OF OWNER PTR IN A MEM REC, OR 0
	FIELD	(MB.POFF)		;DITTO BUT FOR PRIOR PTR
	FIELD	(MB.NOFF)		;OFFS TO NEXT PTR ALWAYS
	BYTES	(MB,<<FLAG,^D18>,<SHIP,3>,<SOS,3>,<ORD,6>,<DUP,6>>)
					;FLAG--FUTURE
					;FOR OTHERS, SEE SCHEMA FILE ML. DESC
;???	  MF.REORD==1B35		;MEMBER MUST BE RE-INSERTED SINCE KEY FIELD MODDED
	BYTES	(MB,<<MYS,^D18>,<MYK,^D18>>)
					;MYS=MY SOS CTL BLKS
					;MYK=MY (SORT) KEY CTL BLKS
	BLKSIZ	(SIZ.MB)
	WORD	(MB,<<IRREV,^D18>,<REST,^D18>>)	;KLUDGE A BIT FOR EFFIC
	MB.REST==MB.SHIP

	;;;	TENANT (PSEUDO!!!) IN-CORE BLOCK
	DEFINE FAK.TB(OFF.)<
	  IRP OFF.,<
	    TB.'OFF.==MB.'OFF.
	    IFN TB.'OFF.-OB.'OFF.,<PRINTX ?MEMBER-OWNER PTR OFFSETS MUST AGREE>
	  >
	>
	FAK.TB	<OOFF,POFF,NOFF>

	;;;	VIA IN-CORE BLOCK
	FIELD	(VB.MYC)		;AOBJ PTR TO SORT FIELDS AS THEY APPEAR IN DATA-RECORD
	FIELD	(VB.MYX)		;DITTO--BUT AS IN INDEX-NODE
	BLKSIZ	(SIZ.VB)
	WORD	(VB,<<KTYP,^D18>,<CDB,^D18>>)
					;THE MEM DEPEND CHARAC OF A DATA-NAME
					;PTR TO ASSOC (PSEUDO-)DATA-BLK

	;;;	FILE BLOCK
	FIELD	(FB.DEV)
	FIELD	(FB.CNT)
	FIELD	(FB.DIR)
	FIELD	(FB.FIL)
	FIELD	(FB.EXT)
	FIELD	(FB.PRIV)
	FIELD	(FB.SIZ)
	BLKSIZ	(SIZ1FB)
	OFFS.==-1
	FIELD	(FB.FLEN)			;IN -1 WORD SO THAT JSYS USAGE NATURAL
	FIELD	(FB.SPEC,MAXFS20)			;VARIABLE LENGTH ASCIZ
	FIELD	(FB.TEMP,MAXTS20)	;...ACTU START PT DETERM BY FB.FLEN
	BLKSIZ	(SIZ2FB)
	SUBTTL	SCHEMA DIRECTORY BLOCKS AND OFFSETS

	; SCHEMA BLOCK

	FIELD	(SL.ASR,SIZ.FH)		;MAKE THIS RECORD DOUBLE AS ASR
					;SO THAT .SCH FILE IS .DBS FILE ALSO
	FIELD	(SL.SYS)		;NMID OF AREA THAT WILL HOLD SYS RECORD
	FIELD	(SL.HINMID)		;FOR BUILDING RUN-TIME VECTOR
	FIELD	(SL.HITID)		;FOR BUILDING RECTYP ID VEC
	FIELD	(SL.NAREA)		;NUM OF AREAS
	FIELD	(SL.EDIT)		;CHARAC OF ENTIRE SCHEMA OVER TIME
	FIELD	(SL.RUN)		;DITTO BUT NUMBER OF TIMES SBIND-ED
	FIELD	(SL.MLAS)		;LAST USED SS (MAX IS 36)
	FIELD	(SL.JOUR)			;DBKEY OF JOURNAL'S FILE BLK, IF ONE
	FIELD	(SL.CHKPT)			;SEE CHK.*
	FIELD	(SL.XACT)		;EXCEPTION ACTION FLAG WORD (SEE VAC.*/ACT.*)
					;LEFT=NOTES // R=INTERCEPT
	FIELD	(SL.JSIZ)		;TELLS DBCS TO LIMIT JRN SIZE TO (N) TRANSAC
					;...AND THEN TO BEGIN OVERWRITING AND REPEAT THE CYCLE
	FIELD	(SL.UNU)		;RESERVED FOR FUTURE
	BLKSIZ	(SIZ.SL)

	;SUB-SCHEMA BLOCK

	FIELD	(UL.MASK)		;ANY BLOCK THAT "OR"S NON-0 WITH THIS IS IN SS
	FIELD	(UL.LOK,LOKMAX/CPW)		;LOCK FOR PVC KEY
	FIELD	(UL.NLEN)		;UNPADDED NAME LEN
	FIELD	(UL.NAM,NAMLEN/CPW)		;ALLOCATION OF SPACE FOR SS NAME
	BLKSIZ	(SIZ.UL)

	;RECORD BLOCK

	BYTES	(RL,<<IDSET,^D18>,<NMID,^D18>>)
				;NMID IS COMMON TO MOST SCHEMA DEFINED BLOCKS
				;IDSET IS LAST SET TO WHICH THIS REC WAS ASSOC--FOR TENANT CONSIS
	BYTES	(RL,<<NDAT,^D9>,<NAREA,^D9>,<NOWN,^D9>,<NMEM,^D9>>)
					;EACH IS NUM OF (X) ASSOC WITH THE RECORD
	BYTES	(RL,<<LM,6>,<DSIZ,^D12>,<DOFF,^D9>,<TID,^D9>>)
				;LM IS FOR LOC MODE: 0=UNDEF  1=DIRECT  2=VIA  3=CALCDUP  4=CALCNODUP
				;DSIZ IS SIZE OF DATA IN WORDS
				;THE (DOFF)TH WORD OF THE LINE CONTAINS 1ST WORD OF DATA
				;TID IS THE RECORD TYPE ID (APPEARS IN LINE HDR)
	FIELD	(RL.SS)		;TELLS WHICH SS THIS REC IN
	FIELD	(RL.LOC)		;IF VIA, DBKEY OF THAT SET BLK
				;IF DIRECT, DBKEY OF ITS ITEM BLK
				;IF CALC, NUM OF CALC FIELDS
	FIELD	(RL.WID)		;DBKEY OF ITEM BLK OF AREA ID, IF ONE
	FIELD	(RL.NLEN)		;LEN OF REC NAME
	FIELD	(RL.NAM,NAMLEN/CPW)		;THE REC NAME IN ASCII
	BLKSIZ	(SIZ.RL)

	;AREA BLOCK -- USE MOSTLY FULL WORDS, ASSUME NUM OF AREA BLKS SMALL %

	BYTES	(AL,<<SYM,^D18>,<NMID,^D18>>)
				;AL.SYM USED BY SCHEMA PROCESSOR, PTS TO AREA'S SYMBOL BLK
				;AS BEFORE
	FIELD	(AL.SS)		;SS THIS AREA IS IN
	; ***	BEGIN BLTTABLE STUFF
	AL.BLT==OFFS.
	FIELD	(AL.1STP)	  	;1STP IS PAGE NUM OF 1ST PAGE OF AREA
	FIELD	(AL.LASP)		;LAST PAGE NUM OF THIS AREA
	BYTES	(AL,<<PUNR,^D18>,<PSIZ,^D18>>)
						;UNROUNDED PAGE SIZE--ALLOWS MAKING PART OF PAGE INVIS
						;PSIZ=PHYSICAL PAGE SIZE (ACCOR PAGE BUF SIZE)
	FIELD	(AL.NBUF)		;NUM OF BUFFERS FOR AREA (DEFAULT=3)
	FIELD	(AL.RPP)			;MAX RECS PER PAGE
	FIELD	(AL.CALC)		;MAX CALC RECS PER PAGE
	FIELD	(AL.BKU)		;BACKUP SPEC: 0=NO  1=AFTER  2=BEFORE  3=BOTH
	FIELD	(AL.LOK,LOKMAX/CPW * 6)		;ALL OF THE LOCKS: PERMUTE CONC/PROT/EXCL UPDATE/RETR
	; ***	END BLTTABLE STUFF
	FIELD	(AL.FIL)			;DBKEY OF FILBLK FOR AREA
	FIELD	(AL.TMP)		;SS FOR WHICH THIS AREA A TEMP AREA
	FIELD	(AL.NLEN)		;LEN OF AREA NAME
	FIELD	(AL.NAM,NAMLEN/CPW)		;THE AREA'S NAME
	BLKSIZ	(SIZ.AL)

	;DATA BLOCK

	BYTES	(DL,<<IDREC,^D18>,<NMID,^D18>>)
				;NMID AS BEFORE
				;IDREC--NEED TO VERIFY THAT DN PART OF RIGHT REC OCCAS
	BYTES	(DL,<<UNU,^D18>,<OCC,^D9>,<PREC,^D9>>)
				;UNUSED
				;OCC IS # OF OCCURS IF GTR 0
				;PREC IS PRECISION, IN COBOL S9(10) FOR EX
	BYTES	(DL,<<NLEN,6>,<SLEN,6>,<PLEN,6>,<TYP,6>,<CALC,6>,<SCAL,6>>)
				;SINCE DATA BLKS ARE PRESUMABLY MOST FREQUENT
				;TRY TO SAVE SPACE (HOPEFULLY NOT AN ERROR IN JUDGMENT)
				;ALL STRINGS ARE ENCODED AS ONE, WITH SUBSTRING OPERATORS USED TO PULL APART
				;NLEN DATA NAME'S LENGTH
				;PLEN PICTURE'S LENGTH
				;SLEN PSEUDONYM'S LENGTH
				;THE DATA TYPE
				;CALC FIELD ORDINALITY
				;SCALE FACTOR (IMPLIED DECIMAL PT)
	FIELD	(DL.SS)		;AS BEFORE
	FIELD	(DL.OFF)		;A BYTE PTR TO ITEM WITHIN ITS RECORD
	FIELD	(DL.SIZ)	;IN TERMS OF ITS LOGICAL USE--CHARS,WORDS,ETC
	DLSLEN==NAMLEN+NAMLEN+SHORT
	FIELD	(DL.STRING,DLSLEN/CPW)		;ALL THE STRINGS
	BLKSIZ	(SIZ.DL)

	;OWNER BLOCK

	BYTES	(OL,<<POFF,^D9>,<NOFF,^D9>,<NMID,^D18>>)
				;THE (POFF)TH WORD OF EACH OWNER REC IS THE PRIOR PTR FOR THIS SET, IF ONE
				;THE (NOFF)TH WORD IS THE NEXT PTR--ALWAYS NON-0
				;NMID--AS BEFORE
	BYTES	(OL,<<XNSIZ,^D18>,<XOFF,^D18>>)
					;LARGEST KEY-NODE SIZE FOR MEMS OF THIS SET (0 IMPLIES: USE NO INDEX STRUCT)
					;THE (XOFF)TH WORD IS TOP-LEVEL IDXBLK, IF ONE
	FIELD	(OL.NMEM)		;# OF MEMS IN SET
	FIELD	(OL.SS)			;SS MASK FOR THIS SET
	FIELD	(OL.NLEN)		;SET NAME'S LEN
	FIELD	(OL.NAM,NAMLEN/CPW)			;SET NAME
	BLKSIZ	(SIZ.OL)

	;MEMBER BLOCK

	BYTES	(ML,<<IDREC,^D18>,<SHIP,3>,<SOS,3>,<ORD,6>,<DUP,6>>)
					;NMID OF REC THAT IS MEM (USED DURING BINDING)
				;SHIP: AUTO/MAN AND MAND/OPT
				;SOS IS TYPE OF SOS THIS REC HAS 1=CURR 2=LMO
				;ORD IS 1 OF 12 POSSIB (2 PATHOL): 1ST/LAST/NEXT/PRIOR ARE POSIT
				;SORTED ARE: PLAIN/DBKEY/WITHIN/UNIFIED PLUS EACH WITH USER KEYS
				;BUT DBKEY+USER KEY IMPOS & UNIFIED+NO-USER IMPOS
				;IF SORTED, DUP = 0 MEANS ANY 1=FIRST 2=LAST 3=NOT
	BYTES	(ML,<<OOFF,^D9>,<POFF,^D9>,<NOFF,^D9>>)
				;OFFSETS ARE AS BEFORE--OOFF IS NON-0 IF LINKED TO OWNER
	BLKSIZ	(SIZ.ML)
	WORD	(ML,<<IRREV,^D18>,<REST,^D18>>)
	ML.REST==ML.SHIP

	;WITHIN BLOCK

	BYTES	(WL,<<REC,^D18>,<IDAREA,^D18>>)
					;SYM OF UNBOUND REC. IOW, NON-0 IF EXPLIC PAGE RANGE
					;NMID OF AREA CONNECTED TO
	FIELD	(WL.1STP)		;IF NOT EXPLIC SPECIFIED, =AL.1STP
	FIELD	(WL.LASP)		;DITTO AL.LASP
	BLKSIZ	(SIZ.WL)

	;VIA BLOCK

	BYTES	(VL,<<NKEY,^D18>,<TYP,^D18>>)
					;TYP IS VIA LINE FOR SOS OR SORT CTL
					;NKEY = NUMBER OF ELEMS IN LIST
	BLKSIZE	(SIZ.VL)

	;CONTROL BLOCK

	BYTES	(CL,<<CASE,^D18>,<KTYP,^D18>>)
				;CASE--FOR COMPARISON CTL
				;KTYP--ASC/DESC FOR INSTANCE
	BYTES	(CL,<<IDDAT,^D18>,<IDSET,^D18>>)
				;IDSET HERE AS WITH DL.IDREC RL.IDSET
				;DITTO IDDAT
	FIELD	(CL.ALIAS)			;DBKEY OF ITEM LINE IF THERE IS AN ALIAS NAME
	FIELD	(CL.IDX)			;ORDINALITY OF THIS SUBKEY (START 1)
	FIELD	(CL.XOFF)			;FOR SORTED SETS (IN VIA.SOR LISTS), WHERE IN INDEX NODE THE KEY IS
	FIELD	(CL.KSET)			;DBKEY OF SET IT CTLS, USED TO SET KEY.NORD
	BLKSIZ	(SIZ.CL)

	;TEXT BLK

	FIELD	(TL.SS)			;NOW TEXT CAN BE SPECIFIED ON A SS BASIS
	FIELD	(TL.TLEN)			;CHARS OF TEXT
	FIELD	(TL.TEXT,TEXMAX/CPW)		;PERHAPS TOO MUCH, WHO KNOWS
	BLKSIZ	(SIZ.TL)

	;ITEM BLOCK -- ALL RECORD INDEP SYMBOLS ARE DESCRIBED HERE

	FIELD	(IL.SLEN)
	FIELD	(IL.PSU,SHORT/CPW)		;ITS PSUEDONYM IF NON-0
	FIELD	(IL.NLEN)		;AS BEFORE
	FIELD	(IL.NAM,NAMLEN/CPW)			;AS BEFORE
	BLKSIZ	(SIZ.IL)

	;FILE BLOCK -- SEPARATE IN HOPE OF BETTER OS INDEP

	FIELD	(FL.DEV)
	FIELD	(FL.CNT)		;SET ONLY BY CODE
	FIELD	(FL.DIR)
	FIELD	(FL.FIL)
	FIELD	(FL.EXT)		;SET ONLY BY CODE
	FIELD	(FL.PRIV)
	BLKSIZ	(SIZ1FL)
	BYTES	(FL,<<FLEN,^D18>,<BLEN,^D18>>)
						;FLEN IS # OF WORDS IN FILE SPEC
						;BLEN # WORDS IN FILE SPEC+TMP SPEC
	FIELD	(FL.SPEC,MAXFS20)		;JUST A LONG ASCIZ STRING FOR TOPS20
	FIELD	(FL.TEMP,MAXTS20)
						;THE ACTUAL SIZES OF THE FIL/TMP SPEC IS DRIVEN BY 1ST WORD
	BLKSIZ	(SIZ2FL)

	END