Google
 

Trailing-Edge - PDP-10 Archives - bb-h138e-bm_tops20_v6_1_distr - galaxy-sources/qsrmac.mac
There are 45 other files named qsrmac.mac in the archive. Click here to see a list.
	UNIVER	QSRMAC  --  Parameter File for QUASAR
	SUBTTL	Preliminaries

;
;
;         COPYRIGHT (C) DIGITAL EQUIPMENT CORPORATION
;	  1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985
;
;     THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY  BE  USED
;     AND COPIED ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE
;     AND WITH THE INCLUSION OF THE ABOVE COPYRIGHT NOTICE.   THIS
;     SOFTWARE  OR ANY OTHER COPIES THEREOF MAY NOT BE PROVIDED OR
;     OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.  NO  TITLE  TO
;     AND OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
;
;     THE INFORMATION  IN  THIS  SOFTWARE  IS  SUBJECT  TO  CHANGE
;     WITHOUT  NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT
;     BY DIGITAL EQUIPMENT CORPORATION.
;
;     DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY
;     OF  ITS  SOFTWARE  ON  EQUIPMENT  WHICH  IS  NOT SUPPLIED BY
;     DIGITAL.

	SEARCH	GALCNF		;GET CONFIGURATION DATA
	SEARCH	GLXMAC		;GET GALAXY SYMBOLS
	SEARCH	ORNMAC		;GET OPERATOR SYMBOLS

;	.DIRECT	.NOBIN		;NO REL FILE...

IFN FTUUOS,<IF1,<PRINTX	Building a GALAXY-10 System>
		SEARCH UUOSYM	;GET TOPS10-UUO SYMBOLS
>  ;END OF IFN FTUUOS

IFN FTJSYS,<IF1,<PRINTX	Building a GALAXY-20 System>
		SEARCH MONSYM	;GET TOPS20-JSYS SYMBOLS
>  ;END OF IFN FTJSYS

	SALL			;SUPPRESS MACRO EXPANSIONS

	%%.QSR==36			;Major change number of QSRMAC

	QMCMAN==:1221			;Maintenance edit number
	QMCDEV==:1237			;Development edit number
	VERSIN (QMC)			;Generate edit number
	SUBTTL	Table of Contents


;		Table of Contents for QSRMAC
;
;
;			   Section			      Page
;   1. Preliminaries. . . . . . . . . . . . . . . . . . . . .    1
;   2. Table of Contents. . . . . . . . . . . . . . . . . . .    2
;   3. Revision history . . . . . . . . . . . . . . . . . . .    3
;   4. Accumulator Definitions. . . . . . . . . . . . . . . .    4
;   5. Symbols derived from GALCNF. . . . . . . . . . . . . .    5
;   6. Changable System Parameters. . . . . . . . . . . . . .    6
;   7. RDB
;        7.1.   Request Descriptor Block. . . . . . . . . . .    7
;   8. ROB
;        8.1.   Requested Object Block. . . . . . . . . . . .    8
;   9. DIB
;        9.1.   Dependency Information Block. . . . . . . . .    9
;  10. QH
;       10.1.   Queue Header Definitions. . . . . . . . . . .   10
;  11. EV - Timed event block definitions . . . . . . . . . .   11
;  12. QE
;       12.1.   Queue Entry Definitions . . . . . . . . . . .   12
;  13. JOB INFORMATION BLOCK (.QEJBB) DESCRIPTION . . . . . .   14
;  14. OBJ
;       14.1.   Object Queue. . . . . . . . . . . . . . . . .   15
;  15. PSB
;       15.1.   Processor Status Block. . . . . . . . . . . .   18
;  16. SPL
;       16.1.   Spool Queue Definition. . . . . . . . . . . .   19
;  17. STR
;       17.1.   Structure Queue Definition. . . . . . . . . .   20
;  18. NETWORK DATA BASE STRUCTURE. . . . . . . . . . . . . .   21
;  19. ROUTE TABLE ENTRY DESCRIPTION. . . . . . . . . . . . .   23
;  20. CSM
;       20.1.   Canonical SPOOL Message . . . . . . . . . . .   24
;  21. CLM
;       21.1.   Canonical LOGOUT Message. . . . . . . . . . .   25
;  22. The Messages and their respective codes. . . . . . . .   26
;  23. The HELLO Message
;       23.1.   Function 1. . . . . . . . . . . . . . . . . .   27
;  24. The RELEASE Message
;       24.1.   Function 2. . . . . . . . . . . . . . . . . .   28
;  25. The CHECKPOINT and REQUEUE messages
;       25.1.   Functions 3 and 4 . . . . . . . . . . . . . .   29
;  26. The NEXTJOB and CREATE Messages
;       26.1.   Functions 5 and 7 . . . . . . . . . . . . . .   32
;  27. EQ
;       27.1.   The External Queue Entry. . . . . . . . . . .   33
;  28. The ABORT Message
;       28.1.   Function 6. . . . . . . . . . . . . . . . . .   41
;  29. The LIST Message
;       29.1.   Function 10 . . . . . . . . . . . . . . . . .   42
;  30. The MODIFY Message
;       30.1.   Function 11 . . . . . . . . . . . . . . . . .   44
;  31. The KILL Message
;       31.1.   Function 12 . . . . . . . . . . . . . . . . .   46
;  32. THE LIST ANSWER MESSAGE. . . . . . . . . . . . . . . .   47
;  33. The REQUEST FOR CHECKPOINT Message
;       33.1.   Function 15 . . . . . . . . . . . . . . . . .   48
;  34. The DEFER Message
;       34.1.   Function 16 . . . . . . . . . . . . . . . . .   49
;  35. Event Counters . . . . . . . . . . . . . . . . . . . .   50
;  36. The COUNT Message
;       36.1.   Function 20 . . . . . . . . . . . . . . . . .   52
;  37. The COUNTANSWER Message
;       37.1.   Function 21 . . . . . . . . . . . . . . . . .   53
;  38. The SETUP/SHUTDOWN Message
;       38.1.   Function 22 . . . . . . . . . . . . . . . . .   54
;  39. The RESPONSE-TO-SETUP Message
;       39.1.   Function 23 . . . . . . . . . . . . . . . . .   55
;  40. The HOLD/RELEASE Message
;       40.1.   Function 25 . . . . . . . . . . . . . . . . .   56
;  41. The SPOOL Message - Function 26 (sent by IPCC) . . . .   57
;  42. The LOGOUT Message - Function 27 (sent by IPCC). . . .   59
;  43. MONITOR LOGIN MESSAGE PROCESSOR. . . . . . . . . . . .   60
;  44. TAPE ONLINE MESSAGE Function 31 (sent by IPCC) . . . .   61
;  45. THE DEVICE STATUS UPDATE MESSAGE - FUNCTION 31 . . . .   62
;  46. TAPE DEASSIGN/DISMOUNT MESSAGE (IPCC FUNCTION 34). . .   63
;  47. Job reset message (IPCC function 37) . . . . . . . . .   64
;  48. Disk unit ATTACH/DETACH Message (IPCC FCN 42/43) . . .   65
;  49. Disk unit XCHANGE Message (IPCC function 44) . . . . .   66
;  50. Structure removal message (IPCC function 45) . . . . .   67
;  51. Magtape unit accessible message (IPCC function 46) . .   68
;  52. NODE-WENT-AWAY NOTIFICATION MESSAGE (FUNCTION 36). . .   69
;  53. .QOCQE - CREATE QUEUE ENTRY MESSAGE (FUNCTION 37). . .   70
;  54. RECOGNIZE MESSAGE (FUNCTION .QOREC - 40) . . . . . . .   75
;  55. Tape status message (.QOTST functions 41). . . . . . .   76
;  56. TAPE DRIVE UNLOAD MESSAGE (FUNCTION .QOUNL - 42) . . .   78
;  57. Volume Mounted message to tape labeller (.QOVMN = 43).   79
;  58. Volume dismounted message to tape labeller (.QOVDM = 44)   80
;  59. Volume switch request from tape labeller (.QOVSR = 45)   81
;  60. Volume Switch Directive From MDA to Tape Labeler (.QOVSD - 46)   82
;  61. Request for System Catalog Information (.QORCT). . . .   83
;  62. Catalog information message (.QOCAT) . . . . . . . . .   84
;  63. INTERNAL CATALOG CACHE STRUCTURE . . . . . . . . . . .   86
;  64. BUILD A STRUCTURE MESSAGE (.QOBLD) . . . . . . . . . .   87
;  65. MDA ACK MESSAGE (.QOACK) . . . . . . . . . . . . . . .   88
;  66. ADD/REMOVE A STRUCTURE TO A USERS SEARCH LIST MESSAGE (.QOASL)   89
;  67. DISMOUNT/DEALLOCATE A VOLUME SET MESSAGE (.QODVS). . .   90
;  68. .QOLAC - List allocations for a job. . . . . . . . . .   91
;  69. .QOALC - Prescan a control file for allocations. . . .   92
;  70. .QOPRM - Response to .QOALC request. . . . . . . . . .   93
;  71. .QOIDN - Tape Initialization Done message. . . . . . .   94
;  72. LPTSPL forms change message (.QOFCH (63) ) . . . . . .   95
;  73. IBMCOM Statistice message (.QOIBM) . . . . . . . . . .   96
;  74. Common Parameters. . . . . . . . . . . . . . . . . . .   97
;  75. Random Macros. . . . . . . . . . . . . . . . . . . . .   98
;  76. Failsoft System Definitions. . . . . . . . . . . . . .   99
;  77. QUASAR Fatal Error Codes . . . . . . . . . . . . . . .  100
;  78. MDA ERROR MACROS AND CODES . . . . . . . . . . . . . .  101
;  79. Definition of the Known Queues . . . . . . . . . . . .  102
;  80. MTCON MOUNT STRUCTURES . . . . . . . . . . . . . . . .  103
;  81. MOUNT REQUESTS (WITHIN THE MESSAGE). . . . . . . . . .  104
;  82. TAPE MOUNT REQUEST BLOCKS. . . . . . . . . . . . . . .  105
;  83. .MEFLG BIT DEFINITIONS . . . . . . . . . . . . . . . .  108
;  84. MOUNT REQUEST. . . . . . . . . . . . . . . . . . . . .  109
;  85. Response to User Tape Mount Request. . . . . . . . . .  110
;  86. MOUNT RESPONSES. . . . . . . . . . . . . . . . . . . .  111
;  87. CANCELING TAPE MOUNT REQUESTS. . . . . . . . . . . . .  112
;  88. ABORT MSG FROM QUASAR TO MTCON . . . . . . . . . . . .  113
;  89. MOUNT RELEASE MESSAGE. . . . . . . . . . . . . . . . .  114
;  90. QUASAR TAPE MOUNT REQUEST QUEUE STRUCTURE. . . . . . .  115
;  91. VOLUME SET LIST (VSL) STRUCTURE. . . . . . . . . . . .  116
;  92. VOLUME LIST STRUCTURE (VOL). . . . . . . . . . . . . .  117
;  93. UNIT CONTROL BLOCK STRUCTURE . . . . . . . . . . . . .  118
;  94. ALLOCATION AND DEADLOCK AVOIDANCE MATRICES . . . . . .  119
;  95. REQUEST FOR MOUNT ATTRIBUTES . . . . . . . . . . . . .  120
;  96. RESPONSE TO REQUEST FOR MOUNT ATTRIBUTES . . . . . . .  121
;  97. The ARCHIVE Message - Function 41 (sent by IPCC) . . .  122
SUBTTL	Revision history

COMMENT \

*****  Release 4.2 -- begin maintenance edits  *****

1214	4.2.1451
	Put logging of counts under conditional.

1215	4.2.1546
	Print the complete file specification to the INFORMATION
RETRIEVAL-REQUEST /ALL command if the the caller has privileges or if the
request belongs to the caller. (TOPS-20 only)

1216	4.2.1582
	Define EQ.CHP in word .EQSEQ to indicate if the priority of a PRINT or
SUBMIT request has been changed.

1217	4.2.1605
	Define symbols %RBMIN and %RBMAX for use in checking for valid rebuild
codes.

1220	4.2.1607
	Define symbols .QIMOD for use in checking for a modify request.

1221	4.2.1613
	Define bit OBSIBM to indicate that an object is part of an IBM node.

*****  Release 5.0 -- begin development edits  *****

1230	5.1003		3-Jan-82
	Move to new development area.  Add version vector.  Clean up
edit organization.  Update TOC.

1231	5.1160		18-Sept-84
	Change INPMAX to be G.INBS (value to be determine by GALGEN).  This is
the highest number a batch stream can be on a system.

1232	5.1162		21-Sept-84
	Define bit OBSSNA for SNA printers and punches. Define flag NETSNA for
SNA Workstations. Define a Node Attribute Block for SNA Workstations Nodes.
Define a Node Object Block for SNA Workstations Objects.

1233	5.1174		22-Oct-84
	Redefine SUP.ST to its original value in the setup message to IBMSPL.

1234	5.1173		23-Oct-84
	Define a new block, .QCSNA, to be used by SNASUB in processing 
NOTRANSLATE, RECORD and TAB.

1235	5.1182		30-Nov-84
	Define MR.FLG as the flag field in word .MRFLG of an MDR

1236	5.1197		5-Feb-85
	Define QSR.JP, BAT.JP, ORN.JP and LPT.JP to be used by QUASAR, BATCON
ORION and LPTSPL to decide whether the respective process is to be a system
process or not.

1237	5.1210		25-Mar-85
	Define .VSVOL as two words in the VSL to accomodate the first name
of the volume set which will be used by INFORMATION MOUNT/ALL

\   ;End of Revision History
	SUBTTL	Accumulator Definitions


	AP==13			;ARGUMENTS FOR ALL M$xxxx ROUTINES

	E==14			;QUEUE ENTRY POINTER

	BM==14			;'B' MATRIX POINTER

	H==15			;QUEUE HEADER POINTER

	CM==15			;'C' MATRIX POINTER

	M==16			;MESSAGE POINTER
SUBTTL	Symbols derived from GALCNF

; DEFINE FEATURE TESTS SO THAT EACH MODULE NEED ONLY SEARCH QSRMAC

	XP	FTRQUE,FTRQUE		; ON = KEEP A REDUNDANT MASTER QUEUE
	XP	FTRJE,FTRJE		; ON = ADD RJE SUPPORT TO SPOOLERS
	XP	FTDN60,FTDN60		; ON = ADD DN60 SUPPORT TO SPOOLERS

; DEFINE BATCH JOB PARAMETERS

	XP	INPMAX,G.INBS		;highest # a batch stream can be
	XP	INPTIM,G.ITIM		;DEFAULT BATCH JOB TIME LIMIT
	XP	INPCOR,G.ICOR		;DEFAULT BATCH JOB CORE LIMIT
	XP	INPPGS,G.ILPT		;DEFAULT PAGE LIMIT
	XP	INPCDS,G.ICDP		;DEFAULT PUNCHED CARD LIMIT
	XP	INPPTP,G.IPTP		;DEFAULT PAPER TAPE LIMIT
	XP	INPPLT,G.IPLT		;DEFAULT PLOTTER TIME
	XP	INPOIP,1		;OPERATOR INTERVENTION PARAMETER
	XP	INPLOG,G.ILOG		;BATCH /OUTPUT: DEFAULT

; DEFINE SPOOLING SYSTEM PARAMETERS

	XP	SPLMAX,^D20		;MAXIMUM NUMBER OF OBJECTS ALLOWED
	XP	SPLPRI,G.DPRI		;PRIORITY FOR SPOOLED REQUESTS
	XP	MXUPRI,G.SPRI		;MAXIMUM USER PRIORITY

	XP	FRMNOR,G.DNOR		;NAME OF "NORMAL" FORMS
	XP	FRMUNI,G.DNUC		;NUMBER OF UNIQUE CHARACTERS IN THE NAME
	XP	FLEACT,G.FLEA		;FORMS LIMIT EXCEEDED ACTION

		FRMSK1==MASK.(6*FRMUNI,6*FRMUNI-1)	;ANDX, LOAD MASK
		FRMSK2==MASK.(^D36-6*FRMUNI,^D35)	;TXZ STYLE MASK

	XP	LPTBAN,G.LBAN		;DEFAULT NUMBER OF BANNER PAGES
	XP	LPTTRL,G.LTRL		;DEFAULT NUMBER OF TRAILER PAGES
	XP	LPTHDR,G.LHDR		;DEFAULT NUMBER OF HEADER PAGES
	XP	LPTDIV,G.LPTD		;DIVISOR FOR CNVRTNG DSK BLKS TO PAGES
	XP	LPTMUL,G.LPTM		;MULTIPR FOR CNVRTNG DSK BLKS TO PAGES
	ND	LPTARF,^D10		;10 PAGES PER MINUTE (600 LPM)
	ND	LPTKTL,^D15		;KSYS THRESHOLD LIMIT

	XP	CDPDIV,G.CDPD		;DIVISOR FOR CNVRTNG DSK BLKS TO CARDS
	XP	CDPMUL,G.CDPM		;MULTIPR FOR CNVRTNG DSK BLKS TO CARDS
	ND	CDPARF,^D300		;300 CARDS PER MINUTE (CP10)
	ND	CDPKTL,^D60		;KSYS THRESHOLD LIMIT

	XP	PTPDIV,G.PTPD		;DIVISOR FOR CNVRTNG DSK BLKS TO FEET
	XP	PTPMUL,G.PTPM		;MULTIPR FOR CNVRTNG DSK BLKS TO FEET
	ND	PTPARF,^D25		;25 FEET PER MINUTE (PC09)
	ND	PTPKTL,^D60		;KSYS THRESHOLD LIMIT

	XP	PLTDIV,G.PLTD		;DIVISOR FOR CNVRTNG DSK BLKS TO FEET
	XP	PLTMUL,G.PLTM		;MULTIPR FOR CNVRTNG DSK BLKS TO FEET
	ND	PLTARF,^D1		;1 MINUTE PER MINUTE (200 STP/MIN XY10)
	ND	PLTKTL,^D60		;KSYS THRESHOLD LIMIT

;Define system process options

	XP	QSR.JP,Q.SYS		;QUASAR
	XP	BAT.JP,B.SYS		;BATCON
	XP	ORN.JP,O.SYS		;ORION
	XP	LPT.JP,L.SYS		;LPTSPL (and D60JSY)

;FAILSOFT SYSTEM PARAMETERS

	XP	FSSSTR,G.QSTR		;FILE-STRUCTURE FOR MASTER QUEUES

;MDA SYSTEM PARAMETERS

TOPS10<
	XP	DEFLBT,DEFLBT		;DEFAULT LABEL TYPE
	XP	DEF7TK,DEF7TK		;DEFAULT DENSITY FOR 7 TRACK
	XP	DEF9TK,DEF9TK		;DEFAULT DENSITY FOR 9 TRACK
	XP	DEFTRK,DEFTRK		;DEFAULT TRACK TYPE
	XP	NPRTLB,NPRTLB		;BLP FOR 1=ALL USERS, 0=PRIV USERS
	XP	MDADAE,0		;DEADLOCK AVOIDANCE 1=ENABLE, 0=DISABLE
	XP	PRMSTR,0		;PERMANENT STRUCTURES 0=OFF, 1=ON
>

TOPS20<	ND	NPRTLB,0 >		;BLP FOR 1=ALL USERS, 0=PRIV USERS
					;Pick up symbol from GALCNF
SUBTTL	Changable System Parameters

	SYSPRM	EQLMSZ,^D10,^D10	;EQ LIMIT WORD BLOCK LENGTH
	SYSPRM	EQCKSZ,^D10,^D10	;EQ CHECKPOINT BLOCK LENGTH
	SYSPRM	EQNMSZ,2,10		;.EQOWN SIZE IN WORDS
	SYSPRM	VSNLEN,10,2		;VOLUME SET NAME LENGTH IN WORDS
	SYSPRM	STSSIZ,21,21		;SIZE OF STATUS AREA IN OBJ AND CHKPNT
	SYSPRM	TIMONA,3,3		;MINUTES TO WAIT FOR OBJECT NOT AVAIL
	SYSPRM	OBPRSZ,5,5		;OBJECT BLOCK PARAMETER LENGTH
	SUBTTL	RDB  --  Request Descriptor Block

;THE REQUEST DESCRIPTOR BLOCK IS THE DATA-STRUCTURE USED TO REPRESENT
;	A REQUEST OR SET OF REQUESTS.  IT CONSISTS OF A JOBNAME WITH
;	WILDCARDS AND A POSITIVE MASK, A SEQUENCE NUMBER (WHICH IF 0
;	IMPLIES ALL JOBS WHICH FIT THE REST OF THE CRITERIA), AND AN
;	OPERATING SYSTEM DEPENDENT OWNER SPECIFIER WITH WILDCARDS.

;	!-------------------------------------------------------!
;	!                  SPECIFIED JOB NAME                   !
;	!-------------------------------------------------------!
;	!                     JOB NAME MASK                     !
;	!-------------------------------------------------------!
;	!               EXTERNAL SEQUENCE NUMBER                !
;	!-------------------------------------------------------!
;	!                 REQUEST ID NUMBER                     !
;	!-------------------------------------------------------!
;
;	                 -----  TOPS10  -----
;	!                                                       !
;	!-------------------------------------------------------!
;	!              OWNER IDENTIFICATION (PPN)               !
;	!-------------------------------------------------------!
;	!                     OWNER ID MASK                     !
;	!-------------------------------------------------------!
;
;	                 -----  TOPS20  -----
;	!                                                       !
;	!-------------------------------------------------------!
;	!                                                       !
;	/            SPECIFICATION OF REQUEST OWNER             /
;	/                                                       /
;	/                                                       /
;	!                                                       !
;	!=======================================================!

	PHASE	0

.RDBJB:! BLOCK	1			;JOB NAME (SIXBIT)
.RDBJM:! BLOCK	1			;JOB NAME MASK
.RDBES:! BLOCK	1			;EXTERNAL SEQUENCE NUMBER
.RDBRQ:! BLOCK	1			;REQUEST ID NUMBER

TOPS10 <
.RDBOI:! BLOCK	1			;OWNER ID
.RDBOM:! BLOCK	1			;OWNER ID MASK
RDBSIZ:!
.RDBVS:! BLOCK	10			;ASCIZ VOL SET NAME FOR MOUNT REQUESTS
RDBMSZ:!
>  ;END TOPS10 CONDITIONAL

TOPS20 <
.RDBOW:! BLOCK	10			;REQUEST OWNER SPEC
.RDBVS:!
RDBSIZ:!
>  ;END TOPS20 CONDITIONAL

	DEPHASE
	SUBTTL	ROB  --  Requested Object Block

;The ROB is used in any context where an object and
;	some attributes (or a particular object) must be specified.

;	!=======================================================!
;	!                      OBJECT TYPE                      !
;	!-------------------------------------------------------!
;	!     DEVICE ATTRIBUTES     !   PHYSICAL UNIT NUMBER    !
;	!-------------------------------------------------------!
;	!                       NODE NAME                       !
;	!-------------------------------------------------------!
;	!              CUSTOMER DEFINED ATTRIBUTES              !
;	!=======================================================!

	PHASE	0

.ROBTY:! BLOCK	1			;OBJECT TYPE
.ROBAT:! BLOCK	1			;ATTRIBUTES (DEC)

	RO.ATR==-1,,0			;OBJECT ATTRIBUTES
	RO.UNI==0,,-1			;PHYSICAL UNIT NUMBER

	DEFINE ATTRIB,<			;;DECLARE THE VALID ATTRIBUTES
	LSTOF.
	X	<Invalid>,%INVLD,0	;;INVALID FOR ALL
	X	<LOWER>,%LOWER,.OTLPT	;;LOWERCASE
	X	<UPPER>,%UPPER,.OTLPT	;;UPPERCASE
	X	<PHYSICAL>,%PHYCL,<.OTLPT,.OTPTP,.OTCDP,.OTPLT>
	X	<>,%GENRC,-1		;;GENERIC (VALID FOR ALL)
	X	<SITGO>,%SITGO,.OTBAT	;;SITGO REQUEST
	LSTON.> ;End of ATTRIB definition

	DEFINE	X(TXT,SYM,OBJ) <
	SYM==ZZ
	%ATMAX==ZZ			;DECLARE THE MAXIMUM VALUE
	ZZ==ZZ+1>

	ZZ==0
	ATTRIB			;DECLARE THE SYMBOL VALUES

.ROBND:! BLOCK	1			;NODE NAME
.ROBUA:! BLOCK	1			;CUSTOMER DEFINED ATTRIBUTES

ROBSIZ:!

	DEPHASE
SUBTTL	DIB  --  Dependency Information Block

;Each job has a Dependency List associated with it.  Each entry in the
;	list is a DIB which describes one dependency which the job has.

	PHASE	0

.DIBDS:! BLOCK	1			;DEPENDENCY STATUS
	DI.SAT==1B0			;SATISFIED LAST PASS (FOR LIST MOSTLY)
	DI.TYP==0,,-1			;DEPENDENCY TYPE

.DIBDT:! BLOCK 1			;DEPENDENCY DATA

DIBSIZ:!

	DEPHASE


;Currently defined dependencies

;	Symbol		Value		Data
;	------		-----		-------------------------------

	.DTSTR==	1		;Adr of STR queue entry for structure
SUBTTL	QH   --  Queue Header Definitions

;	!=======================================================!
;	!        QUEUE NAME         !    FLAGS    ! QUEUE TYPE  !
;	!    3 SIXBIT CHARACTERS    !             !             !
;	!-------------------------------------------------------!
;	!      POINTER TO LAST      !     POINTER TO FIRST      !
;	!    ENTRY IN THIS QUEUE    !    ENTRY IN THIS QUEUE    !
;	!-------------------------------------------------------!
;	!    BASE OF SCHEDULING     ! SIZE OF AN  !# OF LIST PGS!
;	!   AND LINKING ALGORITHM   !    ENTRY    !  LAST TIME  !
;	!-------------------------------------------------------!
;	!   PTR TO FIRST ENTRY      !    PTR TO LAST ENTRY      !
;	!-------------------------------------------------------!
;	!                 SIZE OF EACH ENTRY                    !
;	!=======================================================!

	PHASE	0

.QHTYP:! BLOCK	1		;QUEUE TYPE WORD
	QH.NAM==-1,,0		;3 CHARACTER QUE NAME
	QH.FLG==777B26		;FLAGS
		QH.INV==1B19	;OBJECT IS INVISIBLE
	QH.TYP==777B35		;QUEUE TYPE
		.QHTQS==0	;INTERNAL TO QUASAR
		.QHTOU==1	;AN OUTPUT QUEUE
		.QHTIP==2	;AN INPUT QUEUE
		.QHTMD==3	;MOUNTABLE DEVICE QUEUE
		.QHFRR==4	;FREE RUNNING DEVICE QUEUE
		.QHTAR==5	;ARCHIVE SYSTEM QUEUE

.QHLNK:! BLOCK	1		;LINK WORD
	QH.PTL==-1,,0		;POINTER TO LAST ENTRY
	QH.PTF==0,,-1		;POINTER TO FIRST ENTRY

.QHPAG:! BLOCK	1		;STORAGE INFORMATION
	QH.SCH==-1,,0		;SCHEDULER ENTRY VECTOR
		SCHLNK==0	;   LINK IN
		SCHSCH==1	;   SCHEDULE
		SCHDEF==2	;   FILL IN DEFAULTS FOR CREATE
		SCHMOD==3	;   PREFORM QUEUE DEPENDENT MODIFY
		SCHRJI==4	;   RELEASE JOB-OBJECT INTERLOCK
		SCHFJB==5	;   FIND A JOB FOR AN OBJECT

	QH.SIZ==777B26		;SIZE OF EACH ENTRY

.QHLIS:! BLOCK	1	;LIST FLAG (LIQxxx)
.QHAFT:! BLOCK	1	;AFTER TIME OF BEST AFTER JOB

QHSIZE:!			;SIZE OF A QUEUE HEADER

	DEPHASE
SUBTTL	EV - Timed event block definitions


;All the event blocks are kept on a linked list, whose handle
; is stored in G$EVENT.  This list is maintained sorted by
; event time, and thus the first entry in the list contains the
; nearest wakeup time. Users may put any amount of data on the
; end of the event block.

;	!=======================================================!
;	!					!   ENTRY TYPE	!
;	!-------------------------------------------------------!
;	!	    UDT AT WHICH TO SIGNAL THE EVENT		!
;	!-------------------------------------------------------!
;	!	ROUTINE TO CALL WHEN THE TIMER GOES OFF		!
;	!-------------------------------------------------------!
;	!			OPTIONAL DATA			!
;	!=======================================================!

	PHASE	0

.EVTYP:! BLOCK	1			;ENTRY TYPE WORD
	EV.TYP==777B35			;FIELD CONTAINING THE TYPE CODE
		%EVCHK==1		;CHECKPOINT REQUEST
		%EVNOT==2		;FILE ARCHIVE RETRIEVAL NOTIFICATION
		%EVLCK==3		;FILE STRUCTURE UN/LOCK REQUEST
		%EVIGN==4		;IGNORE OBJECT REQUEST
		%EVAFT==5		;/AFTER REQUEST
		%EVNLC==6		;LOCKED STR COUNTDOWN EVENT

.EVUDT:! BLOCK	1			;UNIVERSAL DATE/TIME FOR WAKEUP

.EVRTN:! BLOCK	1			;ROUTINE TO CALL AT WAKEUP
					;ROUTINE GETS CALLED WITH ADRS OF
					;THIS EVENT BLOCK IN S1

.EVMSZ:!				;MINIMUM SIZE OF A BLOCK

	DEPHASE
SUBTTL	QE   --  Queue Entry Definitions

;	!=======================================================!
;	!     LINK TO PREVIOUS      !       LINK TO NEXT        !
;	!  0 IF THIS IS THE FIRST   !  0 IF THIS IS THE FIRST   !
;	!=======================================================!
;	!  CREATION TIME OF ENTRY (INTERNAL DATE/TIME FORMAT)   !
;	!-------------------------------------------------------!
;	!      POINTER TO OBJECT QUEUE ENTRY FOR THIS REQ       !
;	!-------------------------------------------------------!
;	!                  INTERNAL TASK NAME                   !
;	!-------------------------------------------------------!
;	/                                                       /
;	/                REQUESTED OBJECT BLOCK                 /
;	/                                                       /
;	!-------------------------------------------------------!
;	/                                                       /
;	/                 JOB INFORMATION BLOCK                 /
;	/                                                       /
;	!-------------------------------------------------------!
;	!                           !  DEPENDENCY LIST NUMBER   !
;	!-------------------------------------------------------!
;	!                   ENTRANCE PRIORITY                   !
;	!-------------------------------------------------------!
;	!   THE PROTECTION FIELD    !                           !
;	!-------------------------------------------------------!
;	!			SPARE				!
;	!-------------------------------------------------------!
;	!                                                       !
;	!               REQUEST LIMIT INFORMATION               !
;	!             CONTENTS ARE QUEUE DEPENDENT              !
;	!                        5 WORDS                        !
;	!                                                       !
;	!-------------------------------------------------------!
;	!                       NOTIFY ID                       !
;	!-------------------------------------------------------!
;	!     BATCH JOB NUMBER      !     USER'S JOB NUMBER     !
;	!-------------------------------------------------------!
;	!     DISK PAGE ADDRESS     !                           !
;	!-------------------------------------------------------!
;
;	!                 -----  TOPS 20  -----                 !
;	!                                                       !
;	!-------------------------------------------------------!
;	!                OWNER (LOGGED IN USER)                 !
;	!                      (10 WORDS)                       !
;	!-------------------------------------------------------!
;	!             CREATOR'S CONNECTED DIRECTORY             !
;	!                      (12 WORDS)                       !
;	!=======================================================!
	PHASE	0

.QELNK:! BLOCK	1		;LINK WORD
	QE.PTP==-1,,0		;POINTER TO PREVIOUS ENTRY
	QE.PTN==0,,-1		;POINTER TO NEXT ENTRY

QEHSIZ:!			;SIZE OF QUEUE-ENTRY-HEADER

.QECRE:! BLOCK	1		;INTERNAL CREATION TIME OF THIS ENTRY
.QEOBJ:! BLOCK	1		;POINTER TO OBJECT SERVICING THIS REQUEST
.QEITN:! BLOCK	1		;INTERNAL TASK NAME
	QE.AVO==770000,,00	;ACCT VALIDATION OBJECT TYPE (-10 ONLY)
	QE.AVI==007777,,-1	;ACCT VALIDATION ITN (-10 ONLY)
.QEROB:! BLOCK	ROBSIZ		;REQUESTED OBJECT BLOCK
.QEJBB:! BLOCK	JIBSIZ		;JOB INFORMATION BLOCK
.QEDIN:! BLOCK	1		;DEPENDENCY INFORMATION
	QE.DLN==0,,-1		;DEPENDENCY LIST NUMBER
.QEIPR:! BLOCK	1		;ENTRANCE PRIORITY FOR THIS ENTRY
.QEPRT:! BLOCK	1		;REQUEST PROTECTION
	QE.PRO==-1,,0		;THE PROTECTION FIELD
	 BLOCK	1		;NOT USED (SPARE)
.QELIM:! BLOCK	EQLMSZ		;LIMITS WORDS
.QENID:! BLOCK	1		;/NOTIFY ID (LOGIN TIME, PID, DIRECTRY NBR)
.QEJBN:! BLOCK	1		;JOB NUMBERS (For /NOTIFY)
	QE.UJN==0,,-1		;USERS JOB NUMBER (ORIGIONAL JOB NUMBER)
	QE.BJN==-1,,0		;BATCH JOB NUMBER
.QESTN:! BLOCK	1		;REMOTE INFORMATION
	QE.DPA==-1,,0		;DISK PAGE ADDRESS
.QEMDR:! BLOCK	1		;REQUESTS MDR ADDRESS
.QEACT:! BLOCK	10		;ACCOUNT STRING (POSSIBLY DIFFERENT FROM .EQACT)
TOPS20 <
.QEOWN:! BLOCK	10		;REQUEST OWNER
.QECON:! BLOCK	12		;CONNECTED DIRECTORY
> ;END TOPS20

QNTSIZ:!			;SIZE OF THE QUEUE ENTRY
	SUBTTL JOB INFORMATION BLOCK (.QEJBB) DESCRIPTION




		.QEJOB==.QEJBB+JIB.JN	;EXTERNAL JOB NAME
		.QESEQ==.QEJBB+JIB.SQ	;EXTERNAL VALUES
		   QE.SEQ==777700,,0	;EXTERNAL SEQUENCE NUMBER
		   QE.ALR==1B17		;ALLOCATION REQUESTED
		   QE.WAL==1B18		;BATCH REQUEST WAITING FOR ALLOCATION
		   QE.WAM==1B19		;BATCH REQUEST WAITING FOR A MOUNT
		   QE.ACT==3B21		;REQUEST REQUIRES ACCOUNT VALIDATION
		      %VALID==0		;ACCOUNT STRING IS VALID
		      %VALRQ==1		;ACCOUNT VALIDATION IS REQUIRED
		      %VALPD==2		;ACCOUNT VALIDATION HAS BEEN REQUESTED
		   QE.IAS==1B22		;REQUEST CONTAINS INVALID ACCT STRING
		   QE.NOT==3B24		;JOB REQUESTED /NOTIFY
		      %NOTTY==1		;NOTIFY VIA USERS TTY
		      %NOTML==2		;NOTIFY USER VIA MAIL
		      %NOTJB==3		;NOTIFY USERS JOB
		   QE.JBC==1B25		;JOB HAS BEEN CHECKPOINTED
		   QE.HBO==1B26		;JOB HELD BY OPERATOR
		   QE.PRV==1B27		;REQUEST CREATOR WAS PRIVILEGED
		   QE.SPL==1B28		;THIS REQUEST CONTAINS SPOOLED FILES
		   QE.RDE==1B29		;THIS REQUEST DOESN'T EXIST (CLEAN-UP)
		   QE.PRI==77B35	;EXTERNAL PRIORITY
		.QEOID==.QEJBB+JIB.US	;OWNER IDENTIFIER
		.QERID==.QEJBB+JIB.ID	;REQUEST ID.
TOPS10 <
		.QEUSR==.QEJBB+JIB.NM	;USER'S NAME (2 WORDS)
>

	DEPHASE
SUBTTL	OBJ  --  Object Queue

;For each object on the system, known to QUASAR, an entry in the OBJ queue
;	is made.  This queue is used for scheduling and for interfacing with
;	the operator control.

;	!=======================================================!
;	!                   Object type code                    !
;	!-------------------------------------------------------!
;	!               Unit number of this type                !
;	!-------------------------------------------------------!
;	!                  Node name in SIXBIT                  !
;	!-------------------------------------------------------!
;	!              PID which has object setup               !
;	!-------------------------------------------------------!
;	!   	    ITN of request currently on OBJect     	!
;	!-------------------------------------------------------!
;	!SCHEDULER STATE INFORMATION!  QUEUE HEADER FOR OBJECT  !
;	!-------------------------------------------------------!
;	!                   OBJect Timer Word                   !
;	!-------------------------------------------------------!
;	!            OBJect Attributes (DEC defined)            !
;	!-------------------------------------------------------!
;	!         OBJect Attributes (Customer defined)          !
;	!-------------------------------------------------------!
;	\           5 Word Object specific parameter            \
;	\                         area                          \
;	!-------------------------------------------------------!
;	!              CURRENT DEVICE STATUS CODE               !
;	!       (FILLED IN BY QUASAR, UPDATED BY SPOOLER)       !
;	!-------------------------------------------------------!
;	\               Current status, expressed               \
;	\                 in as an ASCIZ string                 \
;	!=======================================================!

;Define a macro which will allow a mapping between an object type
;	and various object-type specific data like the queue in
;	which jobs for that object reside, initial object parameters
;	etc.
;
;Format for each line is:
;	X	obj,que,<p1,p2,p3,p4,p5>
;
;where		obj is the object type specified as the XXX in .OTXXX
;		que is the queue in which jobs reside for this object
;		p1 - p5 are the initial contents of the 5 parameter
;			words when an object entry is created.
;			These are a single macro argument.

DEFINE	MAPOBJ,<
	X	BAT,INP,<<1,,77>,<0,,^D600>,0,<INPOIP,,0>,<1,,^D512>>
	X	LPT,LPT,<<1,,77>,<1,,^D500>,<FRMNOR>,<FLEACT,,0>,0>
	X	PTP,PTP,<<1,,77>,<1,,^D500>,<FRMNOR>,<FLEACT,,0>,0>
	X	CDP,CDP,<<1,,77>,<1,,^D500>,<FRMNOR>,<FLEACT,,0>,0>
	X	PLT,PLT,<<1,,77>,<1,,^D30>,<FRMNOR>,<FLEACT,,0>,0>
	X	RDR,RDR,<0,0,0,0,0>
	X	BIN,BIN,<0,0,0,0,0>
	X	DBM,DBM,<0,0,0,0,0>

   TOPS20 <
	X	RET,RET,<0,0,0,0,0>
	X	NOT,NOT,<0,0,0,0,0>
          > ;END TOPS20

>  ;END DEFINE MAPOBJ

;OBJ definitions are on the following page
	PHASE	QEHSIZ		;APPEND TO QUEUE ENTRY HEADER

OBJTYP:! BLOCK	1			;OBJECT TYPE
OBJUNI:! BLOCK	1			;UNIT NUMBER OF THIS TYPE
OBJNOD:! BLOCK	1			;NODE THAT THIS UNIT IS ON
OBJPID:! BLOCK	1			;PID WHICH HAS THIS OBJ SETUP
OBJITN:! BLOCK	1			;ITN OF CURRENT REQUEST ON OBJECT
OBJSCH:! BLOCK	1			;SCHEDULER STATE INFORMATION
	OBSSTA==1B0			;OBJECT IS STARTED
	OBSSUP==1B1			;OBJECT IS SETUP
	OBSBUS==1B2			;OBJECT IS BUSY
	OBSSIP==1B3			;SETUP IN PROGRESS
	OBSIGN==1B4			;IGNORE THIS FOR A WHILE
	OBSDAA==1B5			;DEVICE (DEC) ATTRIBUTES AVAILABLE
	OBSSEJ==1B6			;SHUTDOWN AT END-OF-JOB
	OBSINV==1B7			;OBJECT IS INVISIBLE
	OBSINT==1B8			;DO AN INTERNAL SHTDWN WHEN QUEUE EMPTYS
	OBSHUT==1B9			;OBJECT IS INTERNALLY SHUTDOWN
	OBSFRR==1B10			;A FREE RUNNING DEVICE.
	OBSSTP==1B11			;STOPPED BY THE OPERATOR
	OBSSER==1B12			;STOP AFTER EVERY REQUEST
	OBSSPL==1B13			;OBJECT IS SPOOLING TO TAPE
	OBSATR==1B14			;DEVICE ATTRIBUTES SET BY PROCESSOR
	OBSFRM==1B15			;FORMS CHANGE SCHEDULED
	OBSSNA==1B16			;OBJECT BELONGS TO SNA WORKSTATION
	OBSIBM==1B17			;Object belongs to an IBM node
	OBSQUH==0,,-1			;ADDRESS OF QUEUE HEADER FOR OBJECT
OBJRID:! BLOCK	1			;[NXT] REQUEST-ID TO SCHEDULE NEXT
OBJDAT:! BLOCK	1			;DEC-DEFINED ATTRIBUTES
;	RO.ATR==-1,,0			;   OBJECT ATTRIBUTES
OBJCAT:! BLOCK	1			;CUSTOMER-DEFINED ATTRIBUTES
OBJPRM:! BLOCK	OBPRSZ			;DEPENDENT PARAMETERS
OBJSTS:! BLOCK  1			;CURRENT DEVICE STATUS CODE
					;FILLED IN BY QUASAR, UPDTED BY SPOOLER
OBJST1:! BLOCK	STSSIZ			;CURRENT JOB STATUS IN ASCIZ
					;UPDATED BY THE SPOOLER

OBJSIZ:!				;SIZE OF AN OBJ QUEUE ENTRY


;DEFINITIONS OF WORDS WITHIN THE OBJPRM BLOCK

;COMMON MASKS
	OBPMIN==-1,,0			;MINIMUM VALUE
	OBPMAX==0,,-1			;MAXIMUM VALUE

;OUTPUT PARAMETERS (PRINTERS, PAPERTAPE, CARDPUNCH, PLOTTER)

	.OOPRI==0			;MIN AND MAX EXTERNAL PRIORITY
	.OOLIM==1			;MIN AND MAX OUTPUT LIMITS
	.OOFRM==2			;FORMS TYPE
	.OOFLG==3			;OUTPUT FLAGS
	   .OFLEA==-1,,0		;FORMS LIMIT EXCEEDED ACTION
	.OOTAP==4			;SIXBIT DEVICE NAME FOR SPOOLING TO TAPE
	;CONTINUED FROM THE PREVIOUS PAGE

;BATCH-STREAM PARAMETERS

	.OBPRI==0			;MIN AND MAX EXTERNAL PRIORITY
	.OBTIM==1			;MIN AND MAX RUNTIME LIMITS
	.OBFLG==3			;BATCH STREAM FLAGS
	   .OPRIN==-1,,0		;OPERATOR INTERVENTION FLAG
	       .OPINY==1		;ALLOW OPERATOR INTERVENTION JOBS
	       .OPINN==2		;NO OPERATOR INTERVENTION JOBS
	.OBCOR==4			;MIN AND MAX CORE LIMITS

;Retrieve-stream parameters

	.OBSTM==0			;Time stamp and flag
	.OBTAP==1			;Tape ID
	.OBSSN==2			;Saveset,,tape file #
	  OB.SSN==-1,,0			;Saveset
	  OB.TFN==0,,-1			;Tape file number
;OBJECT ATTRIBUTES (DEC)
	;THESE ATTRIBUTES ARE DEFINED IN SHORT CREATE MESSAGE


;OBSOLETE OBJECT ATTRIBUTES

	RO.PHY==1B0			;PHYSICAL UNIT SPECIFIED
	OBDLLC==1B1			;LOWERCASE PRINTER
	OBDLUC==1B2			;UPPERCASE PRINTER


	DEFINE	STATUS,<
	LSTOF.
		X	<Invalid>,%INVLD,100
		X	<Idle>,%IDLE,0
		X	<Active>,%ACTIV,0
		X	<Stopped>,%STOPD,0
		X	<Not Started>,%NSTRT,0
		X	<Not Available>,%NAVAL,0
		X	<No Ptys>,%NPTYS,.OTBAT
		X	<Offline>,%OFLNE,<.OTLPT,.OTPTP,.OTCDP,.OTPLT,.OTRDR>
		X	<System Full>,%SFULL,.OTBAT
		X	<Shutting Down>,%SHTDN,0
		X	<Aborting>,%CNCLG,0
		X	<Opr Resp Wait>,%OREWT,0
		X	<Aligning Forms>,%ALIGN,.OTLPT
		X	<>,%RESET,0
		X	<Reading>,%READN,.OTRDR
		X	<Requeing>,%REQUE,0
		X	<Shutting Down>,%SHUTD,0
		X	<Opr Output Wait>,%OPRWT,.OTLPT
		X	<Stop is Pending>,%STPPN,0
		X	<No processor>,%NOPRC,0
	LSTON.>  ;END STATUS MACRO


	ZZ==0			;START WITH VALUE OF 0
	DEFINE X(A,SYM,VAL),<
	  SYM==ZZ
	  %STMAX==ZZ		;;DECLARE MAXIMUM VALUE
	  ZZ==ZZ+1>

	STATUS			;DECLARE THE SYMBOL VALUES
SUBTTL	PSB  --  Processor Status Block

;	!=======================================================!
;	\                                                       \
;	\                The Queue Entry Header                 \
;	\                                                       \
;	!=======================================================!
;	!                   Process ID  (PID)                   !
;	!-------------------------------------------------------!
;	!                     Program Name                      !
;	!-------------------------------------------------------!
;	!  Current number of jobs   !  Maximum number of jobs   !
;	!-------------------------------------------------------!
;	!           Flags           !  Number of OBJect types   !
;	!-------------------------------------------------------!
;	!                                                       !
;	\                 List of object types                  \
;	\                                                       \
;	\                  Maximum of 5 types                   \
;	!                                                       !
;	!=======================================================!


	PHASE	QEHSIZ			;APPEND TO THE QUEUE ENTRY HEADER
PSBPID:! BLOCK	1			;PROGRAM'S PID
PSBNAM:! BLOCK	1			;PROGRAM NAME
PSBLIM:! BLOCK	1			;CURRENT AND MAX NUMBER OF JOBS
	PSLCUR==-1,,0			;CURRENT NUMBER OF JOBS
	PSLMAX==0,,-1			;MAXIMUM NUMBER OF JOBS
PSBFLG:! BLOCK	1			;FLAGS AND NUMBER OF OBJ TYPES
	PSFNOT==0,,-1			;NUMBER OF OBJECT TYPES
PSBOBJ:! BLOCK	OBPRSZ			;LIST OF OBJECTS (UP TO OBPRSZ)

PSBSIZ:!				;SIZE OF A PSB

	DEPHASE
SUBTTL	SPL  --  Spool Queue Definition

;	!=======================================================!
;	/                                                       /
;	/                THE QUEUE ENTRY HEADER                 /
;	/                                                       /
;	!=======================================================!
;	\                                                       \
;	\                REQUESTED OBJECT BLOCK                 \
;	\                                                       \
;	!-------------------------------------------------------!
;	!        JOB NUMBER         !     RETRIEVAL POINTER     !
;	!-------------------------------------------------------!
;	!                      FORMS TYPE                       !
;	!-------------------------------------------------------!
;	!                    AFTER PARAMETER                    !
;	!-------------------------------------------------------!
;	!                      NOTE FIELD                       !
;	!                       (2 WORDS)                       !
;	!-------------------------------------------------------!
;	!                           !      REQUEST LENGTH       !
;	!=======================================================!

	PHASE	QEHSIZ		;APPEND TO THE QUEUE ENTRY HEADER

SPLOID:! BLOCK	1		;OWNER'S ID
SPLROB:! BLOCK	ROBSIZ		;REQUESTED OBJECT BLOCK
SPLJOB:! BLOCK	1		;JOB INFORMATION
	SPYJOB==-1,,0		;THE JOB NUMBER
	SPYDPA==0,,-1		;THE RETRIEVAL POINTER

SPLFRM:! BLOCK	1		;FORMS TYPE
SPLAFT:! BLOCK	1		;AFTER PARAMETER
SPLNOT:! BLOCK	2		;NOTE FIELD
SPLRQZ:! BLOCK	1		;SIZE OF CURRENT REQUEST
	SPYLEN==0,,-1		;THE LENGTH (FROM .MSTYP)

SPLSIZ:!			;SIZE OF THE SPOOL QUEUE ENTRIES

	DEPHASE

;DURING Q$FSPL, THE SPL QUEUE IS SCANNED TO COMPRESS MULTIPLE SPOOL REQUESTS INTO A
;	SINGLE REQUEST.  THE FOLLOWING DECISIONS ARE MADE WITH THE INPUT BEING
;	THE CURRENT SPOOL MESSAGE FROM THE MONITOR AND THAT QUEUE AND STATION TESTS
;	HAVE SUCCEEDED.

;	  INPUT		CURRENT QUEUE	ACTION

;	STN. GENERIC	STN. GENERIC	APPEND
;	REAL DEVICE	STN. GENERIC	APPEND AND CHANGE TO REAL DEVICE
;	LL:/LU:		STN. GENERIC	APPEND AND CHANGE TO LL: OR LU:

;	STN. GENERIC	REAL DEVICE	APPEND
;	REAL DEVICE	REAL DEVICE	APPEND IF DEVICES MATCH
;	LL:/LU:		REAL DEVICE	NEVER APPEND

;	STN. GENERIC	LL:/LU:		APPEND
;	REAL DEVICE	LL:/LU:		NEVER APPEND
;	LL:/LU:		LL:/LU:		APPEND IF BOTH FOR LL: OR FOR LU:
SUBTTL	STR  --  Structure Queue Definition

	PHASE	QEHSIZ			;APPEND TO QUEUE ENTRY HEADER

IFN FTUUOS,<
STRNAM:! BLOCK	2			;STRUCTURE NAME
>  ;END IFN FTUUOS

IFN FTJSYS,<
STRNAM:! BLOCK	^D16			;STRUCTURE NAME (TOPS-20) MAX 79 CHARS
>  ;END IFN FTJSYS

STRSTS:! BLOCK	1			;STRUCTURE STATUS
	STSSSV==1B0			;STRUCTURE STATUS VALID
	STSONL==1B1			;STRUCTURE IS ONLINE

STRSIZ:!				;SIZE OF THE STR QUEUE ENTRY

	DEPHASE
	SUBTTL	NETWORK DATA BASE STRUCTURE


;	!=======================================================!
;	/							/
;	/		THE QUEUE ENTRY HEADER			/
;	/							/
;	!-------------------------------------------------------!
;	!		SIXBIT NODE (NETWORK) NAME		!
;	!-------------------------------------------------------!
;	!		   NODE (NETWORK) NUMBER		!
;	!-------------------------------------------------------!
;	!		ONLINE/OFFLINE STATUS			!
;	!-------------------------------------------------------!
;	\                                                       \
;	\                ASCIZ NETWORK NODE NAME                \
;	\                                                       \
;	!-------------------------------------------------------!
;	!                  CLEAR TO SEND DELAY                  !
;	!-------------------------------------------------------!
;	!                  RECORDS PER MESSAGE                  !
;	!-------------------------------------------------------!
;	!                   BYTES PER MESSAGE                   !
;	!-------------------------------------------------------!
;	!                  SILO WARNING LEVEL                   !
;	!-------------------------------------------------------!
;	!     NODE PORT NUMBER      !     NODE LINE NUMBER      !
;	!-------------------------------------------------------!
;	!         PORT/LINE HANDLE (FOR DN60 FRONT END)         !
;	!=======================================================!

		PHASE	QEHSIZ

TOPS20<	NETCOL:!	>	;-20 COLLATING SEQ BY NAME
TOPS10<	NETLOC:!	>	;-10 NOT COLLATING SEQ
NETNAM:! BLOCK	1		;SIXBIT NODE NAME

TOPS10<	NETCOL:!	>	;-10 COLLATING SEQ BY NUMBER
TOPS20<	NETLOC:!	>	;-20 NOT COLLATING SEQ
NETNBR:! BLOCK	1		;NODE NUMBER

NETSTS:! BLOCK	1		;FLAG WORD
   NT.FLG==777000,,0		;NETWORK FLAG BITS
	NETNSV==1B0		;  ONLINE/OFFLINE STATUS BIT IS VALID
	NETONL==1B1		;  ONLINE
	NETADD==1B2		;  THIS NODE ADDED LAST PASS
	NETIBM==1B3		;  NODE IS DN60 DRIVEN
	NETSHT==1B4		;  NETWORK SHUTDOWN IS IN PROGRESS
	NETSGN==1B5		;  NODE REQUIRES SIGNON PROCESSING
	NETNUP==1B6		;  NODE WAS ONLINE SOMETIME
	NETPRO==1B7		;  Proto-actual is online
	NETSNA==1B8		;  Node is SNA Workstation

	;CONTINUED ON THE NEXT PAGE
	;CONTINUED FROM THE PREVIOUS PAGE

   NT.TYP==700,,0		;NETWORK TYPE
	DF.DEC==0		;  'DEC' NODE
	DF.378==1		;  3780 NODE
	DF.278==2		;  2780 NODE
	DF.HSP==3		;  HASP NODE
	DF.SNA==4		;  SNA NODE
   NT.MOD==70,,0		;NETWORK MODE
	DF.TRM==1		;  TERMINATION MODE
	DF.EMU==2		;  EMULATION MODE
	DF.PRO==3		;  Proto mode
   NT.TOU==7,,0			;PROTOCOL TIMEOUT CATAGORY
	ST.PRI==1		;  PRIMARY
	ST.SEC==2		;  SECONDARY
   NT.DTR==700000		;DATA TERMINAL READY
	ST.ON==1		;  ON
	ST.OFF==2		;  OFF
   NT.TRA==70000		;TRANSPARENCY
;	ST.ON==1		;  ON
;	ST.OFF==2		;  OFF
   NT.XTA==7777			;EXTRA BITS

NETASC:! BLOCK	3		;ASCIZ NETWORK NODE NAME FOR RAMDOM OUTPUT
NETCLM:! BLOCK	3		;ASCIZ NETWORK NODE NAME FOR COLUMNIZED OUTPUT
NETDAT:! BLOCK	6		;NODE DATA
NETSIZ:!
		DEPHASE

;
; FOR IBM EMULATION/TERMINATION (DN60) TYPE NODES
;
		PHASE	NETDAT

NETCSD:! BLOCK	1		;CLEAR TO SEND DELAY
NETRPM:! BLOCK	1		;RECORDS PER MESSAGE
NETBPM:! BLOCK	1		;BYTES PER MESSAGE
NETSWL:! BLOCK	1		;SILO WARNING LEVEL
NETPTL:! BLOCK	1		;PORT,,LINE NUMBER
   NT.PRT==-1,,0		;NODE PORT NUMBER
   NT.LIN==0,,-1		;NODE LINE NUMBER
NETIDN:! BLOCK	1		;PORT/LINE HANDLE (FOR DN60 FRONT END)
		DEPHASE

;
; FOR SNA WORKSTATION TYPE NODES
;

		PHASE	NETDAT

NETGWY:! BLOCK	1		;SNA GATEWAY NAME (SIXBIT)
NETACC:! BLOCK	3		;ACCESS NAME
NETNAB:! BLOCK	1		;SNA NODE ATTRIBUTE BLOCK
   NA.LEN==-1,,0		;NODE ATTRIBUTE BLOCK SIZE
   NA.ADR==0,,-1		;NODE ATTRIBUTE BLOCK ADDRESS
NETNOB:! BLOCK	1		;SNA NODE OBJECT LIST

		DEPHASE
	SUBTTL	NODE ATTRIBUTE BLOCK (for SNA Workstations)

;	!=======================================================!
;	/							/
;	/		    LOGON DATA				/
;	/							/
;	!-------------------------------------------------------!
;	/							/
;	/		    LOGON MODE				/
;	/							/
;	!-------------------------------------------------------!
;	/							/
;	/		    APPLICATION				/
;	/							/
;	!-------------------------------------------------------!
;	/							/
;	/		     CIRCUIT				/
;	/							/
;	!-------------------------------------------------------!
;	/							/
;	/		 TRANSLATION FILE			/
;	/							/
;	!=======================================================!

		PHASE	0

NABDAT:! BLOCK	7		; LOGON Data (ASCIZ)
NABLOM:! BLOCK	2		; LOGON Mode (ASCIZ)
NABPLU:! BLOCK	2		; Application (ASCIZ)
NABCIR:! BLOCK	2		; Circuit (ASCIZ)
NABCHS:! BLOCK	FDXSIZ		; Character Translation File

NABSIZ:!

		DEPHASE
	SUBTTL	NODE OBJECT BLOCK (for SNA Workstations)

;	!=======================================================!
;	!                    OBJECT TYPE                        !
;	!-------------------------------------------------------!
;	!                    OBJECT UNIT                        !
;	!-------------------------------------------------------!
;	!                    OBJECT NODE                        !
;	!-------------------------------------------------------!
;	!                     SNA FLAGS                         !
;	!-------------------------------------------------------!
;	/							/
;	!              DESTINATION SPECIFICATION                !
;	/							/
;	!=======================================================!

		PHASE	0

NOBOBJ:! BLOCK	OBJ.SZ		; Object Block
   NOBTYP==NOBOBJ		;   Type
   NOBUNI==NOBOBJ+1		;   Unit
   NOBNOD==NOBOBJ+2		;   Node
NOBFLG:! BLOCK	1		; Flags
   NOBSPL==1B0			;  /SPOOL
   NOBNTL==1B1			;  /NOTRANSLATE
 DSTSIZ==^D100/^D5		; Reserve room for 100 characters
NOBDST:! BLOCK	DSTSIZ		; Destination specification

NOBSIZ:!

		DEPHASE
	SUBTTL	ROUTE TABLE ENTRY DESCRIPTION

;	!=======================================================!
;	!		SOURCE OBJECT TYPE			!
;	!-------------------------------------------------------!
;	!		SOURCE UNIT NUMBER			!
;	!-------------------------------------------------------!
;	!		SOURCE NODE NAME			!
;	!-------------------------------------------------------!
;	!	      DESTINATION OBJECT TYPE			!
;	!-------------------------------------------------------!
;	!	      DESTINATION UNIT NUMBER			!
;	!-------------------------------------------------------!
;	!	      DESTINATION NODE NAME			!
;	!=======================================================!

			PHASE	0

	RTEOB1:! BLOCK	OBJ.SZ		;SOURCE OBJECT BLOCK
	RTEOB2:! BLOCK	OBJ.SZ		;DESTINATION OBJECT BLOCK
	RTELEN:!			;TABLE ENTRY LENGTH
			DEPHASE
SUBTTL	CSM  --  Canonical SPOOL Message

;	!=======================================================!
;	!        JOB NUMBER         !  STATION #  !    FLAGS    !
;	!-------------------------------------------------------!
;	!                      OWNER'S ID                       !
;	!-------------------------------------------------------!
;	\                                                       \
;	\                REQUESTED OBJECT BLOCK                 \
;	\                                                       \
;	!-------------------------------------------------------!
;	!              ENTERED (GTJFN'ED) FILENAME              !
;	!-------------------------------------------------------!
;	!                   SIZE OF THE FILE                    !
;	!-------------------------------------------------------!
;	!           FLAGS FOR .FPINF OF INCLUDED FILE           !
;	!-------------------------------------------------------!
;	!                      FORMS TYPE                       !
;	!-------------------------------------------------------!
;	!                     OUTPUT LIMIT                      !
;	!-------------------------------------------------------!
;	!                AFTER PARAMETER FOR JOB                !
;	!-------------------------------------------------------!
;	!                      NOTE FIELD                       !
;	!                       (2 WORDS)                       !
;	!-------------------------------------------------------!
;	!                           !     ADDRESS OF THE FD     !
;	!=======================================================!
;
;	!                 -----  TOPS 10  -----                 !
;	!                                                       !
;	!-------------------------------------------------------!
;	!                 USER'S NAME IN SIXBIT                 !
;	!                       (2 WORDS)                       !
;	!-------------------------------------------------------!
;	\							\
;	\		ASCIZ ACCOUNT STRING			\
;	\							\
;	!=======================================================!


	PHASE	0

CSM.JB:! BLOCK	1		;JOB INFORMATION
	CS.JOB==-1,,0		;JOB NUMBER
	CS.LOC==777000		;NODE NUMBER (20-ONLY)
	CS.LOC==777000		;STATION NUMBER.
	CS.FLG==000777		;FLAGS
		CS.DFR==1B27	;DEFERRED MODE SPOOLING

CSM.OI:! BLOCK	1		;OWNER'S ID
CSM.RO:! BLOCK	ROBSIZ		;REQUESTED OBJECT
CSM.EN:! BLOCK	1		;ENTER'ED (GTJFN'ED) FILENAME
CSM.FS:! BLOCK	1		;SIZE OF THE FILE
CSM.FP:! BLOCK	1		;FLAGS FOR .FPINF OF INCLUDED FILE
CSM.FM:! BLOCK	1		;FORMS TYPE
CSM.LM:! BLOCK	1		;OUTPUT LIMIT
CSM.AF:! BLOCK	1		;AFTER PARAMETER FOR JOB
CSM.NT:! BLOCK	2		;NOTE FIELD
CSM.FD:! BLOCK	1		;FILE DESCRIPTOR INFORMATION
	CS.FDA==0,,-1		;ADDRESS OF THE FD TO INCLUDE

TOPS10 <
CSM.US:! BLOCK	2		;USER NAME (2 WORDS)
CSM.AC:! BLOCK	10		;ASCIZ ACCOUNT STRING
>  ;END TOPS10

CSMSIZ:!			;LENGTH OF THE CANONICAL SPOOL MESSAGE

	DEPHASE
SUBTTL	CLM  --  Canonical LOGOUT Message

;	!=======================================================!
;	!                     FUNCTION CODE                     !
;	!-------------------------------------------------------!
;	!         JOB NUMBER        !       FLAG SETTINGS       !
;	!=======================================================!


	PHASE	0

CLM.FC:! BLOCK	1			;FUNCTION CODE - CONTAINS:
					;	 .IPCSL IF FROM MONITOR
					;        .QIFNC IF INTERNAL
CLM.JB:! BLOCK	1			;JOB INFORMATION
	CL.JOB==-1,,0			;JOB NUMBER
	CL.BAT==1B18			;JOB IS A BATCH JOB
	CL.BQE==0,,-1			;THIS FIELD CONTAINS THE ADDRESS
					; OF THE BATCH JOB REQUEST (.QExxx)
					; IF IT IS AN INTERNAL CALL


CLMSIZ:!				;LENGTH OF THE CANONICAL LOGOUT MESSAGE

	DEPHASE
SUBTTL	The Messages and their respective codes

;THE FOLLOWING PAGES CONTAIN THE FORMAT OF THE VARIOUS MESSAGES WHICH
;	ARE SENT TO OR BY QUASAR TO VARIOUS SYSTEM COMPONENTS.

	   ;EXTERNAL OPERATIONS

		.QOHEL==1	;HELLO - ESTABLISH CONTACT
		.QOREL==2	;RELEASE - FINISHED A REQUEST
		.QOCHE==3	;CHECKPOINT - FAILSOFT A REQUEST
		.QOREQ==4	;REQUEUE - RETURN A REQUEST
		.QONEX==5	;NEXTJOB - REQUEST GIVEN TO A COMPONENT
		.QOABO==6	;ABORT - STOP PROCESSING THAT REQUEST
		.QOCRE==7	;CREATE - MAKE A REQUEST
		.QOLIS==10	;LIST - GET A CROSS SECTION OF THE QUEUES
		.QOMOD==11	;MODIFY - CHANGE THE PARAMETERS OF A REQUEST
		.QOKIL==12	;KILL - REMOVE A REQUEST
		.QOLAN==13	;ANSWER MESSAGE TO LIST REQUEST
		;       14	;FUNCTION 14 OBSOLETE TEXT MSG (.QOOBS)
		.QORCK==15	;CHECKPOINT-REQUEST MESSAGE
		.QODFR==16	;DEFER MESSAGE
		.QOROU==17	;ROUTING CHANGE
		.QOCOU==20	;COUNT MESSAGE
		.QOCAN==21	;COUNT ANSWER MESSAGE
		.QOSUP==22	;SETUP MESSAGE
		.QORSU==23	;RESPONSE-TO-SETUP MESSAGE
		;       24	;FUNCTION 24 OBSOLETE OPR ACTION MSG (.QOOAC)
		.QOHBO==25	;HOLD/RELEASE MESSAGE
		;	26	;MONITOR SPOOL MESSAGE
		;	27	;MONITOR LOGOUT MESSAGE

		.QOMNT==30	;TAPE MOUNT REQUEST (USER TO QUASAR)
		.QOSTU==31	;DEVICE STATUS UPDATE MESSAGE
		.QOMTR==32	;TAPE MOUNT RELEASE MSG (SAME AS .QOREL)
		.QOMTC==33	;TAPE MOUNT CHKPNT MSG (SAME AS .QOCHE)
		.QOMTA==34	;TAPE MOUNT ABORT MSG (QUASAR TO MTCON)
		.QOMAT==35	;TAPE MOUNT ATTRIBUTES REQUEST
		.QONWA==36	;NODE-WENT-AWAY NOTIFICATION MESSAGE
		.QOCQE==37	;CREATE QUEUE ENTRY (SHORT CREATE MSG)
		.QOREC==40	;TAPE RECOGNIZE MESSAGE (QUASAR TO TAPE LABELER)
		.QOTST==41	;TAPE STATUS MESSAGE (TAPE LABELLER TO QUASAR)
		.QOUNL==42	;TAPE UNLOAD MESSAGE (QUASAR TO TAPE LABELLER)
		.QOVMN==43	;TAPE VOLUME IN USE (REASSIGNED)
				;	(QUASAR TO TAPE LABELLER)
		.QOVDM==44	;TAPE VOLUME DEASSIGNED (QUASAR TO TAPE LAB)
		.QOVSR==45	;VOLUME SWITCH REQUEST (TAPE LAB TO QUASAR)
		.QOVSD==46	;VOLUME SWITCH DIRECTIVE (QUASAR TO TAPE LAB)
		.QOREW==47	;TAPE REWIND MESSAGE (QUASAR 2 TAPE LABELER)
		.QORCT==50	;REQUEST FOR SYSTEM CATALOG INFO
		.QOCAT==51	;ANSWER TO SYSTEM CATALOG INFO REQUEST
		.QOBLD==52	;BUILD A STRUCTURE (QUASAR 2 TAPE LABELER)
		.QODSM==53	;DISMOUNT A STRUCTURE (QUASAR 2 TAPE LABELER)
		.QOACK==54	;MDA ACK MESSAGE (TAPE LABELER TO QUASAR)
		.QOASL==55	;ADD A STR TO A USERS SEARCH LIST (QUA 2 LBLR)
		.QODVS==56	;DISMOUNT/DEALLOCATE A VOL SET (USER 2 QUASAR)
		.QOLAC==57	;LIST SOME ALLOCATIONS
		.QOALC==60	;BATCH ALLOCATION PROCESSOR MESSAGE
		.QOPRM==61	;ANSWER TO ABOVE (A MOUNT MESSAGE)
		.QOIDN==62	;TAPE INITIALIZATION DONE
		.QOFCH==63	;LPTSPL FORMS CHANGE MESSAGE
		.QOIBM==64	;IBMCOM STATISTICS MESSAGE
		.QOGFR==65	;TOPS20 [SYSTEM]GOPHER


	   ;INTERNAL OPERATIONS

		.QIFNC==1B18	;IF BIT 18 IS SET, THE CALL IS INTERNAL
				; AND THE REQUEST MAY BE INTERPRETED
				; DIFFERENTLY THAN EXTERNAL CALLS
		.QIRET==1B19	;If bit 18 is set, this is a
				;monitor archive request, so
				;dont bomb it if queue entry
				;is disabled.
		.QIMOD==1B20	;If bit 20 is set, this is a
				;modify request, so don't increment
				;the external request id number
SUBTTL	The HELLO Message -- Function 1

;	!=======================================================!
;	\                                                       \
;	\                  The Message Header                   \
;	\                                                       \
;	!=======================================================!
;	!                     Program Name                      !
;	!-------------------------------------------------------!
;	!  QUASAR Internal Version  !           Flags           !
;	!-------------------------------------------------------!
;	!  Number of OBJect Types   !  Max no. concurrent jobs  !
;	!-------------------------------------------------------!
;	!                                                       !
;	\                 List of object types                  \
;	\                                                       \
;	\           From 1 to 5 object types allowed            \
;	!                                                       !
;	!=======================================================!

	PHASE	MSHSIZ			;APPEND TO THE MESSAGE HEADER

HEL.NM:! BLOCK	1			;PROGRAM NAME
HEL.FL:! BLOCK	1			;INTERNAL VERSION AND FLAGS
	HEFVER==-1,,0			;INTERNAL VERSION NUMBER (%%.QSR)
	HEFFLG==0,,-1			;MASK FOR FLAGS
	HEFBYE==1B18			;PROCESSOR SAYING "GOOD BYE"
HEL.NO:! BLOCK	1			;NUMBER OF OBJ TYPES AND MAX NO JOBS
	HENNOT==-1,,0			;NUMBER OF OBJECT TYPES
	HENMAX==0,,-1			;MAXIMUM NUMBER OF JOBS
HEL.OB:! BLOCK	OBPRSZ			;LIST OF OBJECTS (UP TO OBPRSZ)
	HELOBJ==0,,-1			;OBJECT TYPE
	HELATR==-1,,0			;DEVICE ATTRIBUTES

HEL.SZ:!				;SIZE OF THE HELLO MESSAGE

	DEPHASE
SUBTTL The RELEASE Message -- Function 2

;	!=======================================================!
;	/                                                       /
;	/                THE MESSAGE HEADER                     /
;	/                                                       /
;	!=======================================================!
;	!                  INTERNAL TASK NAME                   !
;	!=======================================================!

; EXTRA INFORMATION IS RETURNED BY BATCON DURING ITS RELEASE MESSAGE

;	!=======================================================!
;	!       FLAG SETTINGS       !      THE JOB NUMBER       !
;	!-------------------------------------------------------!
;	/                                                       /
;	/       STANDARD FD AREA DESCRIBING THE LOG FILE        /
;	/  THE LENGTH IS DERIVED FROM THE RELEASE MESSAGE SIZE  /
;	/                                                       /
;	!=======================================================!

	PHASE	MSHSIZ

REL.IT:! BLOCK	1		;INTERNAL TASK NAME
REL.FL:! BLOCK	1		;FLAG WORD
   RF.DEC==777777B17		   ;LF FOR DEC
   RF.ABO==1B0			   ;JOB ABORTED (OUTPUT) OR FATAL ERROR (INPUT)
   RF.CST==777777B35		   ;RH FOR WSM
REL.TX:! BLOCK	STSSIZ		;RELEASE MESSAGE TEXT

REL.SZ:!			;SIZE OF THE RELEASE MESSAGE

REL.BJ:! BLOCK	1		;BATCH JOB INFORMATION
	RL.DLG==1B0		;DELETE THE LOG FILE AFTER PRINTING
	RL.SPL==1B1		;LOG FILE IS SPOOLED
	RL.JOB==0,,-1		;THE JOB NUMBER

REL.FD:! BLOCK	FDXSIZ		;RESERVE SPACE FOR THE MAXIMUM FD RETURNED

REL.BL:!			;MAXIMUM LENGTH OF A BATCON RELEASE

	DEPHASE
SUBTTL	The CHECKPOINT and REQUEUE messages -- Functions 3 and 4

;	!=======================================================!
;	/                                                       /
;	/                  THE MESSAGE HEADER                   /
;	/                                                       /
;	!=======================================================!
;	!                  INTERNAL TASK NAME                   !
;	!-------------------------------------------------------!
;	!                                                       !
;	/            CHECKPOINT/REQUEUE INFORMATION             /
;	/                                                       /
;	/                       (5 WORDS)                       /
;	!                                                       !
;	!-------------------------------------------------------!
;	!                  AFTER TIMER (REQ)                    !
;	!=======================================================!

	PHASE	MSHSIZ

REQ.IT:! BLOCK	1		;INTERNAL TASK NAME
REQ.FL:! BLOCK	1		;REQUEUE FLAGS
	RQ.HBO==1B0		;HOLD BY OPR
	RQ.RLC==1B1		;RESTART AT LAST CHECKPOINT
				;I.E. DONT UPDATE CHECKPOINT INFO
	RQ.TIM==777		;TIME IN MINUTES TO WAIT BEFORE RESCHEDULING
REQ.IN:! BLOCK	EQCKSZ		;CHECKPOINTING INFORMATION

REQ.SZ:!

	DEPHASE

	PHASE	MSHSIZ

CHE.IT:! BLOCK	1		;INTERNAL TASK NAME
CHE.FL:! BLOCK	1		;FLAG WORD
	CH.FCH==1B0		;DO A CHECKPOINT
	CH.FST==1B1		;UPDATE STATUS
	CH.JBN==0,,-1		;BATCH JOB NUMBER

CHE.MS:!			;MINIMUM SIZE OF CHECKPOINT MESSAGE

CHE.IN:! BLOCK	EQCKSZ		;CHECKPOINT INFORMATION
CHE.ST:! BLOCK	STSSIZ		;SPOOLER STATUS

CHE.SZ:!

	DEPHASE
;Definition of the request limit words for each object type

DEFINE DEFLIM(NAME,WORD,SIZE,POS),<
	RADIX 5+5
	IF1,<IFDEF L.'NAME,<PRINTX Mult. defined limit parameter NAME>>
	IFL <36-SIZE>,<PRINTX Illegal size for limit NAME>
	IFL <35-POS>,<PRINTX Illegal position for limit NAME>
	IFLE <EQLMSZ-WORD>,<PRINTX Illegal word for limit NAME>
	L.'NAME==<BYTE (18) WORD (9) SIZE,POS>
	RADIX 4+4
>  ;END DEFINE DEFLIM

;Batch job parameters
	DEFLIM	UNIQ,0,2,1		;/UNIQUE
	DEFLIM	REST,0,2,3		;/RESTART
	DEFLIM	OINT,0,2,5		;/OPRINT (OPR INTERVENTION)
	DEFLIM	OUTP,0,3,8		;/OUTPUT
	DEFLIM	BSPR,0,9,17		;(SPARE BITS FOR INPUT DEPENDENCY)
	DEFLIM	DEPN,0,18,35		;/DEPENDENCY
	DEFLIM	CORE,1,18,17		;/CORE
	DEFLIM	TIME,1,18,35		;/TIME
	DEFLIM	SLPT,2,18,17		;SPOOLED LPT LIMIT
	DEFLIM	SCDP,2,18,35		;SPOOLED CDP LIMIT
	DEFLIM	SPTP,3,18,17		;SPOOLED PTP LIMIT
	DEFLIM	SPLT,3,18,35		;SPOOLED PLT LIMIT
	DEFLIM	ONOD,4,36,35		;BATCH OUTPUT DESTINATION NODE
	DEFLIM	BLOG,5,2,1		;/BATLOG

;Output job parameters
	DEFLIM	FORM,0,36,35		;FORMS
	DEFLIM	NBLK,1,18,17		;NUMBER OF BLOCKS
	DEFLIM	OLIM,1,18,35		;OUTPUT LIMIT
	DEFLIM	NOT1,2,36,35		;FIRST HALF OF NOTE
	DEFLIM	NOT2,3,36,35		;SECOND HALF OF NOTE
	DEFLIM	FLEA,4,2,1		;FORMS-LIMIT-EXCEEDED ACTION (SET BY OPR)

;Batch input parameters
	DEFLIM	CJOB,1,18,17		;NUMBER OF JOBS
	DEFLIM	CTIM,2,36,35		;START TIME
	DEFLIM	CNOD,3,36,35		;NODE AT WHICH READER IS LOCATED

TOPS20 <
;Archive tape parameters
	DEFLIM TDTD,0,36,35		;DUMPER timestamp
	DEFLIM TUFT,0,1,0		;Use 1st tape rather than 2nd if on
	DEFLIM TDAT,0,35,35		;Actual time stamp
	DEFLIM TID1,1,36,35		;Tape 1 ID
	DEFLIM TTN1,2,36,35		;Saveset and tape file #
	DEFLIM TTS1,2,18,17		; Saveset 1
	DEFLIM TTF1,2,18,35		;Tape file # 1
	DEFLIM TID2,3,36,35		;Tape 2 ID
	DEFLIM TTN2,4,36,35		;Saveset and tape file # 2
	DEFLIM TTS2,4,18,17		;Saveset 2
	DEFLIM TTF2,4,18,35		;Tape file # 2
> ;END TOPS20 CONDITIONAL
DEFINE GETLIM(AC,BLOCK,NAME),<
	IFNDEF L.'NAME,<PRINTX Undefined limit parameter NAME>
	..Z==BLOCK
	..O==<L.'NAME&777777000000>_-^D18
	..Z==..Z+..O
	..S==<L.'NAME&777000>_-^D9
	..P==<L.'NAME&777>
	..P==^D35-..P
	..Z==..Z+<..S>B11+<..P>B5
	LDB	AC,[EXP ..Z]
>  ;END DEFINE GETLIM

DEFINE STOLIM(AC,BLOCK,NAME),<
	IFNDEF L.'NAME,<PRINTX Undefined limit parameter NAME>
	..Z==BLOCK
	..O==<L.'NAME&777777000000>_-^D18
	..Z==..Z+..O
	..S==<L.'NAME&777000>_-^D9
	..P==<L.'NAME&777>
	..P==^D35-..P
	..Z==..Z+<..S>B11+<..P>B5
	DPB	AC,[EXP ..Z]
>  ;END DEFINE STOLIM

DEFINE WIDLIM(NAME),<<L.'NAME&777000>_-^D9>

DEFINE MAXLIM(NAME),<<1_<WIDLIM(NAME)>>-1>
SUBTTL The NEXTJOB and CREATE Messages -- Functions 5 and 7


; The NEXTJOB Message, Function 5, is  the  message  which  instructs  a
; known  component to process a job.  The CREATE Message, Function 7, is
; sent to QUASAR by an unknown component as a request to create a job in
; one of the external queues.  Both of these messages are in the form of
; the External Queue Entry (EQ).
;
; The External Queue Entry (EQ) consists of a header section followed by
; a list of file-specifications.
;
; The header section has three (3) parts:
;
;      1.  The operating system independent header which is required and
;          is the same on both operating systems.
;
;      2.  The  operating  system  dependent  header  which  immediately
;          follows  the  operating  system  independent  header.   It is
;          required and is different for each operating system.
;
;     The above parts comprise the minimum header size EQHSIZ.
;
;
;      3.  The operating system dependent optional parameters which when
;          present  immediately  follow  the  operating system dependent
;          part of the header.
;
;
; The length of the entire header for a given request is stored  in  the
; header in .EQLEN<EQ.LOH>.
;
; Following  the  header  sections  is   a   list   of   one   or   more
; file-specifications.  Each file-spec consists of a File-Parameter area
; (FP) followed by the standard File Descriptor area (FD).
SUBTTL	EQ   --  The External Queue Entry

;	!=======================================================!
;	\                                                       \
;	\                  THE MESSAGE HEADER                   \
;	\                                                       \
;	!=======================================================!
;	!               INTERNAL TASK NAME (ITN)                !
;	!-------------------------------------------------------!
;	! INTERNAL REQUEST VERSION  !     LENGTH OF HEADER      !
;	!-------------------------------------------------------!
;	\                                                       \
;	\                REQUESTED OBJECT BLOCK                 \
;	\                                                       \
;	!-------------------------------------------------------!
;	\                                                       \
;	\                 JOB INFORMATION BLOCK                 \
;	\                                                       \
;	!-------------------------------------------------------!
;	!  REQUEST PROTECTION CODE  !NUMBER OF FILES IN REQUEST !
;	!-------------------------------------------------------!
;	!                    SPARE EQ FIELD                     !
;	!-------------------------------------------------------!
;	!      AFTER PARAMETER (INTERNAL DATE/TIME FORMAT)      !
;	!-------------------------------------------------------!
;	!			SPARE				!
;	!-------------------------------------------------------!
;	!                                                       !
;	\               REQUEST LIMIT INFORMATION               \
;	\             CONTENTS ARE QUEUE DEPENDENT              \
;	\                        5 WORDS                        \
;	!                                                       !
;	!-------------------------------------------------------!
;	!                                                       !
;	\            REQUEST CHECKPOINT INFORMATION             \
;	\            MAINTAINED BY KNOWN COMPONENTS             \
;	\                     EQCKSZ WORDS                      \
;	!                                                       !
;	!-------------------------------------------------------!
;	!                                                       !
;	\                    ACCOUNT STRING                     \
;	\                                                       \
;	\                        8 WORDS                        \
;	!                                                       !
;	!-------------------------------------------------------!
;	!                                                       !
;	!         THE LAST FEW WORDS OF THE "EQ" HEADER         !
;	!       ARE OPERATING SYSTEM DEPENDENT AS FOLLOWS       !
;
;
;	!                 -----  TOPS 10  -----                 !
;	!                                                       !
;	!-------------------------------------------------------!
;	!                  USER NAME IN SIXBIT                  !
;	!                       (2 WORDS)                       !
;	!=======================================================!
;	!                                                       !
;	\                  PATH SPECIFICATION                   \
;	\                      (OPTIONAL)                       \
;	\                       SIX WORDS                       \
;	!                                                       !
;	!=======================================================!
;
;	!                 -----  TOPS 20  -----                 !
;	!                                                       !
;	!-------------------------------------------------------!
;	!                                                       !
;	\              REQUEST OWNER SPECIFICATION              \
;	\                                                       \
;	\                      (10 WORDS)                       \
;	!                                                       !
;	!-------------------------------------------------------!
;	!                                                       !
;	\        CONNECTED DIRECTORY OF REQUEST CREATOR         \
;	\                                                       \
;	\                      (12 WORDS)                       \
;	!                                                       !
;	!=======================================================!
;	!               SPOOLED INPUT SET HANDLE                !
;	!=======================================================!
	PHASE	MSHSIZ

.EQITN:! BLOCK	1		;INTERNAL TASK NAME
.EQLEN:! BLOCK	1		;LENGTH WORD
	EQ.VRS==-1,,0		;VERSION NUMBER OF REQUEST (%%.QSR)
	EQ.LOH==0,,-1		;LENGTH OF THE HEADER ( e.g. EQHSIZ)

.EQROB:! BLOCK	ROBSIZ		;REQUESTED OBJECT BLOCK
.EQJBB:! BLOCK	JIBSIZ		;JOB INFORMATION BLOCK
.EQSPC:! BLOCK	1		;FILE SPECIFICATION WORD
	EQ.PRO==-1,,0		;REQUEST PROTECTION
	EQ.NUM==0,,-1		;NUMBER OF FILES IN THE REQUEST

TOPS20<	BLOCK	1		;SPARE (TOPS20 ONLY) >
.EQAFT:! BLOCK	1		;AFTER PARAMETER (INTERNAL FORMAT)

.EQLIM:! BLOCK	EQLMSZ		;NOTE THAT EQLMSZ IS DEFINED IN
				;THE OVERALL STRUCTURE DEFINITION
.EQCHK:! BLOCK	EQCKSZ		;CHECKPOINT/REQUEUE INFORMATION

.EQACT:! BLOCK	10		;ACCOUNT STRING

.EQUSR:! BLOCK	5		;ASCIZ /USER:name (MAX 24 CHARS)

.EQBOX:! BLOCK	^D10		;ASCIZ STRING FOR ROUTING OUTPUT REQUESTS
				;IE. /LOC:"ROOM 203, BOX 25"

.EQCST:! BLOCK	^D10		;CUSTOMER USE ONLY

.EQDEC:! BLOCK	^D20		;FOR DEC USE ONLY

EQISIZ:!

;END OF OPERATING SYSTEM INDEPENDENT HEADER  -  MORE OF CREATE MESSAGE FOLLOWS

	;THIS IS THE JOB INFORMATION BLOCK STRUCTURE DESCRIPTION

	.EQJOB==.EQJBB+JIB.JN	;JOB NAME (SIXBIT)
	.EQSEQ==.EQJBB+JIB.SQ	;EXTERNAL VALUES
	    EQ.SEQ==777700,,0	;EXTERNAL SEQUENCE NUMBER
	    EQ.CHP==1B16	;Priority change has occurred
	    EQ.ALR==1B17	;ALLOCATION REQUESTED
	    EQ.WAL==1B18	;BATCH REQUEST WAITING FOR ALLOCATION
	    EQ.WAM==1B19	;BATCH REQUEST WAITING FOR A MOUNT
	    EQ.ACT==3B21	;REQUEST REQUIRES ACCOUNT VALIDATION
	      %VALID==0		;ACCOUNT STRING IS VALID
	      %VALRQ==1		;ACCOUNT VALIDATION IS REQUIRED
	      %VALPD==2		;ACCOUNT VALIDATION HAS BEEN REQUESTED
	    EQ.IAS==1B22	;REQUEST CONTAINS AN INVALID ACCT STRING
	    EQ.NOT==3B24	;JOB REQUESTED /NOTIFY
	    EQ.JBC==1B25	;JOB HAS BEEN CHECKPOINTED
	    EQ.HBO==1B26	;JOB HELD BY OPERATOR
	    EQ.PRV==1B27	;REQUEST CREATOR WAS PRIVILEGED
	    EQ.SPL==1B28	;REQUEST CONTAINS SPOOLED FILES
	    EQ.RDE==1B29	;THIS REQUEST DOESN'T EXIST (CLEAN-UP)
	    EQ.PRI==77B35	;EXTERNAL PRIORITY
	.EQOID==.EQJBB+JIB.US	;-10(PPN), -20(USER NUMBER)
	.EQRID==.EQJBB+JIB.ID	;REQUEST ID
TOPS10 <
	.EQOWN==.EQJBB+JIB.NM	;TOPS-10 USER NAME IN SIXBIT (2 WORDS)
>
;BEGINNING OF OPERATING SYSTEM DEPENDENT HEADER


TOPS20 <
.EQOWN:! BLOCK	EQNMSZ		;EXTERNAL OWNER SPECIFICATION
.EQCON:! BLOCK	12		;CONNECTED DIRECTORY
>  ;END TOPS20 CONDITIONAL


;END OF OPERATING SYSTEM DEPENDENT HEADER


;BEGINNING OF OPERATING SYSTEM DEPENDENT OPTIONAL PARAMETERS

TOPS10 <			;MAKE ROOM FOR THE INPUT QUEUE PATH SPEC
.EQPAT:! BLOCK	6		;PATH
.EQPSZ:!			;SIZE OF HEADER WITH PATH
> ;END TOPS10 CONDITIONAL

TOPS20 <
.EQSIS:! BLOCK	1		;HANDLE FOR SPOOLED INPUT SET
> ;END TOPS20 CONDITIONAL

EQHSIZ:!			;TO DEFINE THE EQ HEADER SIZE


EQXSIZ:!			;MAXIMUM "DEFINED" SIZE OF AN EQ
				;THIS MAXIMUM SHOULD NOT BE ENFORCED SINCE
				; VARIOUS USER APPLICATIONS MAY PASS MORE

	DEPHASE
;	!=======================================================!
;	! LENGTH OF FILE-PARAM AREA !				!
;	!-------------------------------------------------------!
;	!FILE FMT !PAPR FMT!SPACING !    FLAGS    !   COPIES    !
;	!-------------------------------------------------------!
;	!         STARTING INFORMATION (CUSP DEPENDENT)         !
;	!-------------------------------------------------------!
;	!                    /REPORT WORD 1                     !
;	!-------------------------------------------------------!
;	!                    /REPORT WORD 2                     !
;	!-------------------------------------------------------!
;	!RCRD FMT!                                ! RECORD LGTH !
;	!-------------------------------------------------------!
;	!                     RECORD COUNT                      !
;	!=======================================================!

	PHASE	0

.FPLEN:! BLOCK	1		;SIZE WORD
	FP.LEN==-1,,0		;SIZE OF THE FP

	PHASE	1		;OUTPUT QUEUES

.FPINF:! BLOCK	1		;FILE PARAMETER INFORMATION
	FP.FFF==77B5		;FILE FORMAT
		.FPFAS==1	;ASCII
		.FPFFO==2	;FORTRAN
		.FPFCO==3	;COBOL
		.FPFAI==4	;AUGMENTED IMAGE (FOR BIN QUEUE)
		.FPFSA==5	;STREAM ASCII (FOR BIN QUEUE)
		.FPF11==6	;ELEVEN
		.FPFIM==7	;IMAGE (FOR XFR QUEUE)
		.FPF8B==10	;8 BIT ASCII FILE
		.FPMAX==.FPF8B	;MAX FP VALUE DEFINED

	FP.FPF==77B11		;PAPER FORMAT (SEE THE NEXT PAGE)
	FP.FSP==77B17		;SPACING CODE
	FP.DEL==1B18		;ON = DELETE THIS FILE
	FP.FLG==1B19		;THIS IS THE LOG FILE
	FP.NFH==1B20		;NO FILE HEADERS
	FP.SPL==1B21		;THIS IS A SPOOLED FILE
	FP.PCR==1B22		;SPOOLED CARD READER FILE
	FP.REN==1B23		;/DISPOSE:RENAME FILE
	FP.XXX==7B26		;EXTRA FLAG BITS
	FP.FCY==777B35		;COPY COUNT

.FPFST:! BLOCK	1		;STARTING POINT INFORMATION
.FPFR1:! BLOCK	1		;/REPORT WORD 1
.FPFR2:! BLOCK	1		;/REPORT WORD 2

TOPS10<
.FPONM:! BLOCK	1		;ORIGINAL FILE NAME IF /DISP:REN
.FPOXT:! BLOCK	1		;ORIGINAL EXTENSION IF /DISP:REN
>
FPMSIZ:!			;MINUMUM FP AREA SIZE

FPXSIZ:!			;MAXIMUM FP AREA SIZE

	PHASE	1		;BIN QUEUE

.FPINF:! BLOCK	1		;FP INFORMATION (SEE NEXT PAGE)
	FP.RCF==77B5		;RECORD FORMAT
	FP.RCL==777B35		;RECORD LENGTH (FOR FIXED FORMAT)
.FPRCD:! BLOCK	1		;RECORD COUNT


	PHASE	1		;BATCH QUEUE (FOR SNA WORKSTATIONS)

.FPINF:! BLOCK	1		;FP INFORMATION
	FP.TAB==1B24		;Preserve tabs
	FP.NXL==1B25		;No Translate
	FP.RCL==777B35		;RECORD LENGTH (FOR FIXED FORMAT)

	DEPHASE
;PAPER FORMATS FOR LPT QUEUE (/PRINT)
	%FPLAR==1		;ARROW FORMAT
	%FPLAS==2		;ASCII FORMAT
	%FPLOC==3		;OCTAL FORMAT
	%FPLSU==4		;SUPPRESS FORMAT


;PAPER FORMATS FOR PTP QUEUE (/TAPE)
	%FPTAS==1		;ASCII FORMAT
	%FPTIM==2		;IMAGE FORMAT
	%FPTIB==3		;IMAGE BINARY FORMAT
	%FPTBI==4		;BINARY FORMAT


;PAPER FORMATS FOR CDP QUEUE (/PUNCH)
	%FPCAS==1		;ASCII FORMAT
	%FPCBC==2		;026 (BCD) FORMAT
	%FPCBI==3		;BINARY FORMAT
	%FPCIM==5		;IMAGE FORMAT


;PAPER FORMAT FOR PLT QUEUE  (/PLOT)
	%FPPIM==1		;IMAGE FORMAT
	%FPPAS==2		;ASCII FORMAT
	%FPPBI==3		;BINARY FORMAT

;VALUES FOR .EQLM1<EQ.OUT> (/OUTPUT FIELD)
	%EQONL==1		;NO LOG
	%EQOLG==2		;LOG FILE ALWAYS
	%EQOLE==3		;LOG FILE ON ERROR ONLY

;VALUES FOR .EQLM1<EQ.UNI> (/UNIQUE FIELD)
	%EQUNO==1		;/UNIQUE:NO
	%EQUYE==2		;/UNIQUE:YES

;VALUES FOR .EQLM1<EQ.RST> (/RESTART FIELD)
	%EQRNO==1		;/RESTART:NO
	%EQRYE==2		;/RESTART:YES

;VALUES FOR .EQLIM WORD 6 (BATCH ONLY)  (/BATLOG: FIELD)
	%BAPND==1		;APPEND OUTPUT LOG
	%BSCDE==2		;SUPERSEDE OUTPUT LOG
	%BSPOL==3		;SPOOL OUTPUT LOG

	;CONTINUED ON THE NEXT PAGE
	;CONTINUED FROM THE PREVIOUS PAGE


;DEFINITIONS FOR XFR QUE FP

	FP.RFM==FP.FPF		;RECORD FORMAT INSTEAD OF PAPER FORMAT
	FP.MRS==FP.FCY		;MAXIMUM RECORD SIZE INSTEAD OF COPIES

    ;VALUES FOR RECORD FORMAT (FP.RFM)

	%FPXFI==1		;FIXED LENGTH RECORDS
	%FPXVA==2		;VARIABLE LENGTH RECORDS

;VALUE FOR FILE RETREIVAL .EQLM1<EQ.UFT>

	%EQUFT==1B0		;USE FIRST TAPE NOT SECOND IF LIT
	SUBTTL The ABORT Message -- Function 6

;	!=======================================================!
;	/                                                       /
;	/                  THE MESSAGE HEADER                   /
;	/                                                       /
;	!=======================================================!
;	!                  INTERNAL TASK NAME                   !
;	!-------------------------------------------------------!
;	!                      OBJECT TYPE                      !
;	!-------------------------------------------------------!
;	!                      UNIT NUMBER                      !
;	!-------------------------------------------------------!
;	!                         NODE                          !
;	!-------------------------------------------------------!
;	!                      REASON CODE                      !
;	!-------------------------------------------------------!
;	!          ID OF PERSON REQUESTING THE CANCEL           !
;	!=======================================================!

	PHASE	MSHSIZ

ABO.IT:! BLOCK	1		;INTERNAL TASK NAME
ABO.TY:! BLOCK	1		;OBJECT TYPE
ABO.UN:! BLOCK	1		;UNIT NUMBER
ABO.NO:! BLOCK	1		;NODE
ABO.CD:! BLOCK	1		;CODE INDICATING CAUSE OF MESSAGE
	ABOUSR==1		; BY USER REQUEST
ABO.ID:! BLOCK	1		;ID OF PERSON REQUESTING THE KILL

ABO.SZ:!			;SIZE OF THE ABORT MESSAGE

	DEPHASE
SUBTTL	The LIST Message -- Function 10

;	!=======================================================!
;	/                                                       /
;	/                  THE MESSAGE HEADER                   /
;	/                                                       /
;	!=======================================================!
;	!		   	FLAG WORD			!
;	!-------------------------------------------------------!
;	!		      ARGUMENT COUNT			!
;	!=======================================================!

;			ARGUMENT DATA BLOCK

;	!-------------------------------------------------------!
;	! LENGTH OF ARGUMENT BLOCK  !     TYPE OF ARGUMENT	!
;	!-------------------------------------------------------!
;	\							\
;	\		   DATA FOR THE ARGUMENT		\
;	\							\
;	!=======================================================!

	;THE FLAG WORD (.OFLAG) CAN HAVE THE FOLLOWING BITS LIT:

		LS.FST==1B1	;YOU WANT A QUICK QUEUES LISTING.
		LS.ALL==1B2	;YOU WANT TO SEE EVERYTHING !!!


	;THE LIST QUEUES MESSAGE CONTAINS 2 BLOCKS.

		.LSQUE==0	;THE QUEUES YOU WANT TO LIST.
		.LSUSR==1	;THE USER ID FOR THE QUEUE ENTRYS YOU WANT.
		.LSUSM==2	;THE USER ID MASK (FOR .LSUSR)
		.LSJOB==3	;THE JOB NAME YOU WANT TO LIST
		.LSJBM==4	;THE JOB NAME MASK (FOR .LSJOB)
		.LSUNT==5	;THE UNIT NUMBER YOU WANT TO LIST
		.LSDND==6	;THE DESTINATION NODE (WHERE OUTPUT GOES)
		.LSPND==7	;THE PROCESSING NODE (WHERE BATCH JOBS RUN)
		; .ORNOD	;THE NODE WHOSE QUEUE ENTRIES YOU WANT

	;THE .LSQUE BLOCK AND ITS POSSIBLE VALUES IS DEFINED BELOW.

		LIQBAT==1B0	;LIST THE BATCH QUEUE
		LIQLPT==1B1	;LIST THE PRINTER QUEUE
		LIQCDP==1B2	;LIST THE CARD-PUNCH QUEUE
		LIQPTP==1B3	;LIST THE PAPER-TAPE PUNCH QUEUE
		LIQPLT==1B4	;LIST THE PLOTTER QUEUE
		LIQMNT==1B6	;LIST THE TAPE MOUNT QUEUE
		LIQRET==1B7	;LIST THE RETRIEVAL QUEUE
		LIQALC==1B8	;LIST THE JOBS ALLOCATION

		LIQOUT==LIQLPT+LIQCDP+LIQPTP+LIQPLT ;LIST ALL OUTPUT QUEUES.

		LIQALL==LIQOUT+LIQBAT+LIQRET+LIQMNT ;LIST ALL THE QUEUES.

	;CONTINUED ON THE NEXT PAGE
	;CONTINUED FROM THE PREVIOUS PAGE


;	!=======================================================!
;	!		2	!		.LSQUE		!
;	!-------------------------------------------------------!
;	!	THE QUEUE(S) YOU WANT TO LIST			!
;	!=======================================================!

	;THE .LSUSR BLOCK IS DEFINED BELOW.

;	!=======================================================!
;	!		2	!		.LSUSR		!
;	!-------------------------------------------------------!
;	!	THE USER ID (PPN ON THE -10) OF THE		!
;	!		QUEUE ENTRYS YOU WANT			!
;	!=======================================================!

	;THE .ORNOD BLOCK IS DEFINED BELOW

;	!=======================================================!
;	!		2	!		.ORNOD		!
;	!-------------------------------------------------------!
;	!	    SIXBIT NODE NAME or OCTAL NODE #		!
;	!=======================================================!
	SUBTTL	The MODIFY Message -- Function 11

;	!=======================================================!
;	/                                                       /
;	/                  THE MESSAGE HEADER                   /
;	/                                                       /
;	!=======================================================!
;	!                      QUEUE NAME                       !
;	!-------------------------------------------------------!
;	!                                                       !
;	\            REQUEST DESCRIPTOR BLOCK (RDB)             \
;	\                                                       \
;	\              TO DESCRIBE MODIFY REQUEST               \
;	!                                                       !
;	!-------------------------------------------------------!

; THE FOLLOWING BLOCK IS DUPLICATED FOR EACH "GROUP" TO BE MODIFIED
; THE LENGTH OF THE BLOCK IS DEPENDENT ON THE GROUP.
;  IF AN ELEMENT IS NOT TO BE CHANGED, SPECIFY -1 AS THE VALUE.

; ELEMENTS ARE POSITIONAL WITHIN A GROUP AND NO ENDING INDICATION IS NECESSARY
; AS THE VARIOUS LENGTH FIELDS DETERMINE THE NEXT OR END OF THE MESSAGE

; FOR DESCRIPTIONS OF THE GROUP ELEMENTS AND POSITIONS THE READER IS DIRECTED TO:
;	QSRQUE - MAJMOD FOR MAJOR REQUEST GROUP 0
;	QSRSCH - MODIFIERS FOR QUEUE DEPENDENT GROUP 1

;	!=======================================================!
;	!       GROUP NUMBER        !        WORD COUNT         !
;	!=======================================================!
	PHASE	MSHSIZ

MOD.OT:! BLOCK	1		;OBJECT TYPE

MOD.RQ:! BLOCK	RDBSIZ		;REQUEST DESCRIPTOR BLOCK

MOD.SZ:!			;MINIMUM SIZE OF A MODIFY REQUEST
MOD.FG:!			;FIRST GROUP WORD IN MODIFY REQUEST

	PHASE	0		;RELATIVE OFFSET

MOD.GN:! BLOCK	1		;GROUP WORD
	MODGPN==-1,,0		;THE GROUP NUMBER
		.GPMAJ==0	;MAJOR PARAMETERS (AFTER, PRIORITY, etc...)
		.GPQUE==1	;QUEUE DEPENDENT (FORMS, TIME LIMIT, etc...)

	MODGLN==0,,-1		;THE NUMBER OF ELEMENTS (INCLUDING THIS WORD)
MOD.GE:!			;THE FIRST GROUP ELEMENT TO BE MODIFIED
	DEPHASE


;IF MODIFYING /DEPENDENCY COUNT FOR INPUT QUEUES, 3 FORMS ARE RECOGNIZED

	.MODAB==0	;NEW VALUE IS ABSOLUTE CHANGE
	.MODPL==1	;NEW VALUE IS ADDITIVE
	.MODMI==2	;NEW VALUE IS SUBTRACTIVE
SUBTTL	The KILL Message -- Function 12

;	!=======================================================!
;	/                                                       /
;	/                  THE MESSAGE HEADER                   /
;	/                                                       /
;	!=======================================================!
;	!                      QUEUE NAME                       !
;	!-------------------------------------------------------!
;	!                                                       !
;	\            REQUEST DESCRIPTOR BLOCK (RDB)             \
;	\                                                       \
;	\               TO DESCRIBE KILL REQUEST                \
;	!                                                       !
;	!-------------------------------------------------------!

	PHASE	MSHSIZ

KIL.OT:! BLOCK	1		;OBJECT TYPE

KIL.RQ:! BLOCK	RDBSIZ		;REQUEST DESCRIPTOR BLOCK

KIL.SZ:!			;SIZE OF KILL ENTRY
	DEPHASE
	SUBTTL	THE LIST ANSWER MESSAGE.

	;THE LIST ANSWER MESSAGE IS CONSTRUCTED AS FOLLOWS:

;	!=======================================================!
;	\							\
;	\		THE MESSAGE HEADER			\
;	\							\
;	!=======================================================!
;	!		   FLAG WORD				!
;	!-------------------------------------------------------!
;	!		ARGUMENT COUNT				!
;	!=======================================================!
;	! HEADER LENGTH		!  HEADER BLOCK TYPE (.WTTYP)	!
;	!-------------------------------------------------------!
;	\							\
;	\		THE MESSAGE HEADER			\
;	\							\
;	!-------------------------------------------------------!
;	! ANSWER LENGTH		!  ANSWER BLOCK TYPE (.WTTXT)	!
;	!-------------------------------------------------------!
;	\							\
;	\	THE QUEUES LISTING IN ASCIZ			\
;	\							\
;	!=======================================================!


	;THE FLAG WORD CAN CONTAIN THE FOLLOWING BITS:

		WT.MOR==WT.MOR		;MORE DISPLAY PAGES COMMING.
					;THIS IS ORIGIONALLY DEFINED IN ORNMAC.
SUBTTL	The REQUEST FOR CHECKPOINT Message  --  Function 15

;	!=======================================================!
;	/                                                       /
;	/                  THE MESSAGE HEADER                   /
;	/                                                       /
;	!=======================================================!
;	!                 INTERNAL TASK NUMBER                  !
;	!-------------------------------------------------------!
;	!                      OBJECT TYPE                      !
;	!-------------------------------------------------------!
;	!                      UNIT NUMBER                      !
;	!-------------------------------------------------------!
;	!                         NODE                          !
;	!=======================================================!

	PHASE	MSHSIZ

RCK.IT:! BLOCK	1		;THE ITN
RCK.TY:! BLOCK	1		;THE OBJECT TYPE
RCK.UN:! BLOCK	1		;THE UNIT NUMBER
RCK.NO:! BLOCK	1		;THE NODE

RCK.SZ:!			;THE SIZE OF THE REQUEST FOR CHECKPOINT MESSAGE

	DEPHASE
SUBTTL The DEFER Message  --  Function 16

;	!=======================================================!
;	/                                                       /
;	/                  THE MESSAGE HEADER                   /
;	/                                                       /
;	!=======================================================!
;	!         QUEUE NAME FOR THE REQUEST (0 IF ALL)         !
;	!-------------------------------------------------------!
;	!    FLAGS     !  FUNCTION   !        JOB NUMBER        !
;	!=======================================================!

	PHASE	MSHSIZ

DFR.OT:! BLOCK	1		;THE OBJECT TYPE ( 0 IF ALL)
DFR.JB:! BLOCK	1		;JOB INFORMATION
	DF.FNC==777B17		;THE FUNCTION REQUESTED
		.DFREL==0	;RELEASE ALL DEFERRED FILES
		.DFKIL==1	;KILL ALL DEFERRED FILES

	DF.JOB==0,,-1		;THE JOB NUMBER

DFR.SZ:!			;SIZE OF THE DEFER MESSAGE

	DEPHASE
SUBTTL	Event Counters

;QUASAR MAINTAINS A SET OF EVENT COUNTERS FOR VARIOUS EVENTS THAT
;	MIGHT BE OF INTEREST.  THESE COUNTERS ARE PRIMARILY FOR THE
;	USE OF SOFTWARE DEVELOPMENT PEOPLE TO HELP KEEP A HANDLE ON
;	WHAT IS REALLY HAPPENING INSIDE OF QUASAR.
;
;TWO MESSAGES EXIST TO HANDLE THESE COUNTERS:
;	COUNT		FUNCTION 20	SENT TO REQUEST CURRENT COUNTS
;	CNTANSWER	FUNCTION 21	SENT AS RESPONSE TO COUNT MESSAGE

;FOLLOWING ARE THE MACROS USED TO MANIPULATE THE COUNTERS:

DEFINE	X(A,B),<
	LSTOF.
	INTERN	$$'A
	$$'A==$$
	IFIDN <MNXT><A>,<$$==$$+.OTMAX>
	$$==$$+1
	LSTON.>  ;END DEFINE X

DEFINE	$COUNT(A),<
	IFNDEF $$'A,<
		PRINTX UNDEFINED COUNTER A USED
	>
	IFNDEF	G$ITEM,<EXTERN G$ITEM>
	AOS G$ITEM+$$'A
>  ;END DEFINE $COUNT

DEFINE	$SITEM(AC,A),<
	IFNDEF $$'A,<
		PRINTX UNDEFINED COUNTER A USED
	>
	IFNDEF	G$ITEM,<EXTERN G$ITEM>
	STORE AC,G$ITEM+$$'A
>  ;END DEFINE $SITEM


;THE COUNTERS ARE DEFINE ON THE NEXT PAGE
;THE COUNTERS

DEFINE $ITEM,<
	LSTOF.
	X	(ICNT,NUMBER OF ITEMS IN RECORD)
	X	(NOW,CURRENT TIME OF DAY)
	X	(STAR,QUASAR START TIME)
	X	(QJOB,QUASARS JOB NUMBER)
	X	(IPCI,TOTAL NUMBER OF IPCF INTERRUPTS RECEIVED)
	X	(RIPC,IPCF MESSAGES RECEIVED)
	X	(SIPC,IPCF MESSAGES SENT)
	X	(IPCF,IPCF SEND FAILURES)
	X	(IPCU,UNRECOVERABLE IPCF SEND FAILURES)
	X	(MREL,RELEASE MESSAGES RECEIVED)
	X	(MCHK,CHECKPOINT MESSAGES RECEIVED)
	X	(MREQ,REQUEUE MESSAGES RECEIVED)
	X	(MNXT,TOTAL NEXTJOB MESSAGES SENT BY TYPE)
	X	(MLST,LIST MESSAGES RECEIVED)
	X	(NLAP,LISTANSWER PAGES SENT)
	X	(SCRE,SUCCESSFUL CREATES DONE)
	X	(MMOD,MODIFY MESSAGES RECEIVED)
	X	(MKIL,KILL MESSAGES RECEIVED)
	X	(MDEF,DEFER MESSAGES RECEIVED)
	X	(ISPL,IMMEDIATE SPOOL MESSAGES RECEIVED)
	X	(DSPL,DEFFERED SPOOL MESSAGES RECEIVED)
	X	(MCAN,COUNTANSWER MESSAGES SENT)
	X	(SLCD,SCHEDULER LOOP COUNTDOWNS)
	X	(DEAD,MDA DEADLOCK AVOIDANCE CALLS)
	X	(DFAL,DEADLOCK AVOIDANCE FAILURES)
	X	(VSWM,VOLUME SWITCH TAPE MOUNT)
	X	(TAPM,TAPE MOUNT)
	X	(STRM,PHYSICAL STRUCTURE MOUNT)
	X	(USTM,USER STRUCTURE MOUNT)
	X	(GENM,GENERIC MOUNT)
	X	(TINP,TERMINATION BATCH REQUESTS)
	X	(TOUT,TERMINATION PRINT REQUESTS)
	X	(TCNI,TERMINATION CONSOLE INPUT)
	X	(TCNO,TERMINATION CONSOLE OUTPUT)
	X	(EINP,EMULATION BATCH REQUESTS)
	X	(EOUT,EMULATION PRINT REQUESTS)
	X	(ECNI,EMULATION CONSOLE INPUT)
	X	(ECNO,EMULATION CONSOLE OUTPUT)
	LSTON.>  ;END DEFINE $ITEM

	$$=0				;START CLEAN
	$ITEM				;NOW CALL IT

	NITEMS=$$			;TOTAL NUMBER OF ITEMS
SUBTTL	The COUNT Message  --  Function 20

	PHASE	MSHSIZ

COU.SZ:!			;SIZE OF COUNT MESSAGE
	DEPHASE
SUBTTL	The COUNTANSWER Message  --  Function 21

	PHASE	MSHSIZ

CAN.BL:! BLOCK	NITEMS		;BLOCK OF ITEMS

CAN.SZ:!			;SIZE OF COUNTANSWER MESSAGE
	DEPHASE
SUBTTL The SETUP/SHUTDOWN Message  --  Function 22

;The SETUP message is sent to cause a component to service an object for
;	which we have a job..  The SHUTDOWN message is sent to cause a
;	component to give up control of a object.


;	!=======================================================!
;	\                                                       \
;	\                  The Message Header                   \
;	\                                                       \
;	!=======================================================!
;	!                         Flags                         !
;	!-------------------------------------------------------!
;	!               Type of OBJect to set up                !
;	!-------------------------------------------------------!
;	!            Unit number of OBJect to set up            !
;	!-------------------------------------------------------!
;	!               Node to set up OBJect at                !
;	!-------------------------------------------------------!
;	!	 Port Number	!	Line Number		!
;	!-------------------------------------------------------!
;	!		Network Status Bits			!
;	!-------------------------------------------------------!
;	!		Port/Line Handle			!
;	!=======================================================!


		PHASE MSHSIZ		;START WITH STD. MESSAGE HEADER

SUP.FL:! BLOCK	1			;FLAGS
	SUFSHT==1B0			;SHUTDOWN INSTEAD OF SETUP
	SPLTAP==1B1			;BIT FOR PRINTER SPOOLER (SPOOL TO TAPE)
SUP.TY:! BLOCK	1			;TYPE OF OBJECT TO SET UP FOR
SUP.UN:! BLOCK	1			;UNIT NUMBER, OF THIS TYPE, TO SET UP
SUP.NO:! BLOCK	1			;SIXBIT NODE AT WHICH TO SET UP OBJ
SUP.CN:! BLOCK	7			;DN60 LINE CONDITIONING BLOCK
SUP.ST:! BLOCK	1			;NETWORK STATUS/FLAG BITS
					;SEE 'NETSTS' BIT VALUES
SUP.GW:! BLOCK	1			;Gateway node in sixbit
SUP.AN:! BLOCK	3			;Access Name
SUP.AB:! BLOCK	NABSIZ			;SNA Attribute Block
SUP.SZ:!				;SIZE OF THE SETUP MESSAGE

		DEPHASE
SUBTTL	The RESPONSE-TO-SETUP Message  --  Function 23

;The RESPONSE-TO-SETUP message is sent to QUASAR by a known component
;	after the component receives a SETUP message for an object.

;	!=======================================================!
;	\                                                       \
;	\                  The Message Header                   \
;	\                                                       \
;	!=======================================================!
;	!                    The OBJect Type                    !
;	!-------------------------------------------------------!
;	!                The OBJect Unit Number                 !
;	!-------------------------------------------------------!
;	!         The NODE at which the OBJect Resides          !
;	!-------------------------------------------------------!
;	!                   The RESPONSE Code                   !
;	!-------------------------------------------------------!
;	!                    RESPONSE REASON                    !
;	!-------------------------------------------------------!
;	!              The DEC Device Attributes                !
;	!-------------------------------------------------------!
;	!                  Prototype Node Name                  !
;	!=======================================================!

	PHASE	MSHSIZ			;STANDARD MESSAGE HEADER

RSU.TY:! BLOCK	1			;OBJECT TYPE
RSU.UN:! BLOCK	1			;UNIT NUMBER
RSU.NO:! BLOCK	1			;NODE
RSU.CO:! BLOCK	1			;RESPONSE CODE
	%RSUOK==0			;SETUP OK
	%RSUNA==1			;OBJECT NOT AVAILABLE (TRY AGAIN LATER)
	%RSUDE==2			;OBJECT DOESNT EXIST (DONT TRY AGAIN)
	%RSUNC==3			;OBJECT PORT/LINE NOT CONDITIONED
RSU.CD:! BLOCK	1			;RESPONSE REASON
					;SEE OBJECT STATUS CODES IN OBJECT
					;    QUEUE DESCRIPTION
RSU.DA:! BLOCK	1			;DEC DEVICE ATTRIBUTES

RSU.PN:! BLOCK	1			;Prototype node name (SIXBIT)

RSU.SZ:!

	DEPHASE
	SUBTTL	The HOLD/RELEASE Message  --  Function 25

;	!=======================================================!
;	\                                                       \
;	\                  THE MESSAGE HEADER                   \
;	\                                                       \
;	!=======================================================!
;	!                   THE OBJECT QUEUE                    !
;	!-------------------------------------------------------!
;	!                         FLAGS                         !
;	!-------------------------------------------------------!
;	\                                                       \
;	\               REQUEST DESCRIPTOR BLOCK                \
;	\                                                       \
;	!=======================================================!


	PHASE	MSHSIZ			;STANDARD MESSAGE HEADER

HBO.OT:! BLOCK	1			;OBJECT TYPE (QUEUE)
HBO.FL:! BLOCK	1			;FLAGS
	HB.FRL==1B0			;RELEASE FLAG
HBO.RQ:! BLOCK	RDBSIZ			;THE RDB SPECIFIED

HBO.SZ:!				;SIZE OF THE HBO MESSAGE

	DEPHASE
	SUBTTL	The SPOOL Message - Function 26 (sent by IPCC)

IFN FTUUOS,<
;	!=======================================================!
;	!          LENGTH           !    FUNCTION 26 - SPOOL    !
;	!-------------------------------------------------------!
;	!	!  JOB NUMBER       !  JBTLOC(J)  !    FLAGS    !
;	!-------------------------------------------------------!
;	!                      USERS NAME                       !
;	!                    2 SIXBIT WORDS                     !
;	!-------------------------------------------------------!
;	!              DEVICE INIT'ED BY THE USER               !
;	!-------------------------------------------------------!
;	!             STRUCTURE CONTAINING THE FILE             !
;	!-------------------------------------------------------!
;	!              MONITOR GENERATED FILE NAME              !
;	!-------------------------------------------------------!
;	!                   ENTERED FILE NAME                   !
;	!-------------------------------------------------------!
;	!                       FILE SIZE                       !
;	!-------------------------------------------------------!
;	!      FILE EXTENSION       !                           !
;	!-------------------------------------------------------!
;	!                   NUMBER OF COPIES                    !
;	!-------------------------------------------------------!
;	!                      FORMS NAME                       !
;	!-------------------------------------------------------!
;	!                     OUTPUT LIMIT                      !
;	!-------------------------------------------------------!
;	!SFL!                  FLAGS                  !DEV TYPE !
;	!-------------------------------------------------------!
;	!                   DEVICE ATTRIBUTES                   !
;	!-------------------------------------------------------!
;	!                         NODE                          !
;	!-------------------------------------------------------!
;	!                    AFTER PARAMETER                    !
;	!-------------------------------------------------------!
;	\							\
;	\		ASCIZ ACCOUNT STRING			\
;	\							\
;	!=======================================================!

	PHASE	0

SPL.HD:! BLOCK	1		;THE HEADER FROM IPCC
SPL.JB:! BLOCK	1		;USERS JOB NUMBER
	SP.STR==177000,,0	;BATCH STREAM NUMBER
	SP.JOB==777,,0		;THE JOB NUMBER CLOSING THE SPOOLED FILE
	SP.LOC==777B26		;CURRENT REMOTE STATION (.LOCATE n)
	SP.BAT==1B27		;THIS IS FOR A BATCH JOB
	SP.DFR==1B28		;DEFERRED MODE SPOOLING

SPL.US:! BLOCK	2		;THE USERS NAME (2 SIXBIT WORDS)
SPL.DV:! BLOCK	1		;DEVICE INIT'ed BY THE USER (e.g. LPT0:)
SPL.ST:! BLOCK	1		;STRUCTURE CONTAINING THIS FILE
SPL.FN:! BLOCK	1		;MONITOR GENERATED FILE NAME
SPL.EN:! BLOCK	1		;ENTERED FILE NAME
SPL.FS:! BLOCK	1		;FILE SIZE (IN BLOCKS)
SPL.EX:! BLOCK	1		;FILE EXTENSION
	SP.EXT==-1,,0		;IN LEFT HALF
SPL.CP:! BLOCK	1		;# COPIES
SPL.FM:! BLOCK	1		;FORMS NAME
SPL.LM:! BLOCK	1		;OUTPUT LIMIT
SPL.SF:! BLOCK	1		;SPOOLING FLAGS
	SP.FLG==3B2		;SPOOLING FLAG LOCATION
	   .SPDFD==1		;DEFERED SPOOLING
	   .SPDFI==2		;IMMEDIATE SPOOLING
	SP.TYP==77		;TYPE OF EDVICE
SPL.DA:! BLOCK	1		;DEVICE ATTRIBUTES
SPL.ND:! BLOCK	1		;NODE
SPL.AF:! BLOCK	1		;AFTER PARM
	 BLOCK	2		;SPARE SPOOLED PARAMETER WORDS
SPL.AC:! BLOCK	10		;ASCIZ ACCOUNT STRING

SPL.SZ:!			;SIZE OF THE SPOOL MESSAGE
	DEPHASE

>  ;END IFN FTUUOS
IFN FTJSYS,<

;	!=======================================================!
;	!                  FUNCTION 26 - SPOOL                  !
;	!-------------------------------------------------------!
;	!      # HEADER WORDS       !        JOB NUMBER         !
;	!-------------------------------------------------------!
;	!           FLAGS           !      STATION NUMBER       !
;	!-------------------------------------------------------!
;	!                     PROGRAM NAME                      !
;	!-------------------------------------------------------!
;	!         BYTE SIZE         !  NUMBER OF PAGES IN FILE  !
;	!-------------------------------------------------------!
;	!          BYTE COUNT WHICH WOULD ADDRESS EOF           !
;	!-------------------------------------------------------!
;	!                                                       !
;	/               FILESPEC FOR SPOOLED FILE               /
;	!                                                       !
;	!=======================================================!

	PHASE	0
SPL.HD:! BLOCK	1		;HEADER FROM IPCC
SPL.JB:! BLOCK	1		;JOB INFORMATION
	SP.NHW==-1,,0		;NUMBER OF HEADER WORDS
	SP.JOB==0,,-1		;JOB NUMBER
SPL.FL:! BLOCK	1		;FLAGS
	SP.BAT==1B0		;JOB MAKE REQUEST IS A BATCH JOB
	SP.DFR==1B1		;REQUEST IS DEFERED
	SP.LOC==0,,-1		;STATION NUMBER
SPL.PG:! BLOCK	1		;NAME OF PROGRAM WRITING FILE
SPL.BV:! BLOCK	1		;CONTENTS OF FDBBYV
	SP.SIZ==0,,-1		;NUMBER OF PAGES IN FILE
SPL.EF:! BLOCK	1		;BYTE COUNT WHICH ADDRESSES TO EOF
SPL.FI:!			;BEGINNING OF FILESPEC FOR SPOOLED FILE

SPL.SZ:!			;SPOOL MSG SIZE

	DEPHASE

>  ;END IFN FTJSYS
SUBTTL	The LOGOUT Message - Function 27 (sent by IPCC)

IFN FTUUOS,<

;	!=======================================================!
;	!          LENGTH           !   FUNCTION 27 - LOGOUT    !
;	!-------------------------------------------------------!
;	!	!  JOB NUMBER       !  JBTLOC(J)  !    FLAGS    !
;	!=======================================================!

	PHASE	0

LGO.HD:! BLOCK	1		;THE HEADER FROM IPCC
LGO.JB:! BLOCK	1		;USERS JOB NUMBER
	LG.STR==177000,,0	;BATCH STREAM NUMBER
	LG.JOB==777,,0		;THE JOB NUMBER
	LG.LOC==777B26		;THE CURRENT LOCATION
	LG.BAT==1B27		;THIS IS A BATCH JOB
	LG.DFR==1B28		;DEFERRED MODE SPOOLING
	LG.BSS==1B29		;BATCH STREAM NUMBER SET

LGO.SZ:!			;SIZE OF THE LOGOUT MESSAGE

	DEPHASE

>  ;END IFN FTUUOS

IFN FTJSYS,<

;	!=======================================================!
;	!                 FUNCTION 27 - LOGOUT                  !
;	!-------------------------------------------------------!
;	!    NO. OF HEADER WORDS    !        JOB NUMBER         !
;	!-------------------------------------------------------!
;	!           FLAGS           !      STATION NUMBER       !
;	!=======================================================!

	PHASE 0

LGO.HD:! BLOCK	1		;HEADER FROM IPCC
LGO.JB:! BLOCK	1		;JOB INFORMATION
	LG.NHW==-1,,0		;NUMBER OF HEADER WORDS
	LG.JOB==0,,-1		;JOB NUMBER

LGO.FL:! BLOCK	1		;FLAG WORD
	LG.BAT==1B0		;THIS WAS A BATCH JOB
	LG.DFR==1B1		;DEFERRED MODE SPOOLING
	LG.LOC==0,,-1		;JOBS STATION NUMBER

LGO.SZ:!			;SIZE OF THE LOGOUT MESSAGE

	DEPHASE

>  ;END IFN FTJSYS
	SUBTTL	MONITOR LOGIN MESSAGE PROCESSOR


TOPS10	<
		PHASE	0

	LGN.HD:! BLOCK	1	;MESSAGE HEADER  (LEN,,TYPE)
	LGN.JB:! BLOCK	1	;JOB DATA (SAME AS LGO.JB)
	LGN.US:! BLOCK	2	;SIXBIT USER NAME
	LGN.PV:! BLOCK	1	;USER PRIV WORD
	LGN.TT:! BLOCK	1	;USER TTY NUMBER (SIXBIT/TTYxxx/)

		DEPHASE

> ;END TOPS10 CONDITIONAL
	SUBTTL	TAPE ONLINE MESSAGE Function 31 (sent by IPCC)


TOPS10 <

;	!=======================================================!
;	!	Length		!	Function code		!
;	!-------------------------------------------------------!
;	!		Device Name (Sixbit)			!
;	!-------------------------------------------------------!
;	!					!Device Type	!
;	!=======================================================!


		PHASE	0

	.TONHD:! BLOCK	1		;TAPE ONLINE MESSAGE HEADER
	.TONDV:! BLOCK	1		;TAPE ONLINE DEVICE
	.TONST:! BLOCK	1		;TAPE ONLINE DEVICE TYPE
	    TON.TY==77			;DEVICE TYPE

		DEPHASE
>
	SUBTTL	THE DEVICE STATUS UPDATE MESSAGE - FUNCTION 31


;	!======================================================	!
;	\							\
;	\		THE MESSAGE HEADER			\
;	\							\
;	!=======================================================!
;	\							\
;	\		THE REQUESTED OBJECT BLOCK		\
;	\							\
;	!=======================================================!
;	!		THE DEVICE STATUS CODE			!
;	!=======================================================!


		PHASE	MSHSIZ		;STANDARD MESSAGE HEADER

	STU.RB:! BLOCK	OBJ.SZ		;THE OBJECT BLOCK YOU WANT
	STU.CD:! BLOCK	1		;THE DEVICE STATUS CODE

	STU.SZ:!

		DEPHASE
	SUBTTL	TAPE DEASSIGN/DISMOUNT MESSAGE (IPCC FUNCTION 34)



;	!=======================================================!
;	!	3		!	     34			!
;	!-------------------------------------------------------!
;	!	        SIXBIT DEVICE NAME			!
;	!-------------------------------------------------------!
;	!		   DEVICE TYPE				!
;	!-------------------------------------------------------!
;	!		     JOB NUMBER				!
;	!=======================================================!


		PHASE	0

	.TDHDR:! BLOCK	1		;HEADER
	.TDDEV:! BLOCK	1		;SIXBIT DEVICE NAME
	.TDDVT:! BLOCK	1		;DEVICE TYPE
	.TDJBN:! BLOCK	1		;USER JOB NUMBER

		DEPHASE
SUBTTL	Job reset message (IPCC function 37)


;	!=======================================================!
;	!	    2		    !	        37		!
;	!-------------------------------------------------------!
;	!	        	Job number			!
;	!=======================================================!

		PHASE	0

	.RSTHD:! BLOCK 	1		;MESSAGE HEADER
	.RSTJB:! BLOCK	1		;JOB NUMBER

		DEPHASE
	SUBTTL	Disk unit ATTACH/DETACH Message (IPCC FCN 42/43)

;	!=======================================================!
;	!	4		!	     42/43		!
;	!-------------------------------------------------------!
;	!	        SIXBIT UNIT NAME			!
;	!-------------------------------------------------------!
;	!		   PRIMARY PORT				!
;	!-------------------------------------------------------!
;	!		     SECONDARY PORT			!
;	!=======================================================!

		PHASE	0

	.ATTHD:! BLOCK 	1		;MESSAGE HEADER
	.ATTUN:! BLOCK	1		;AFFECTED UNIT NAME
	.ATTPR:! BLOCK	1		;NEW PRIMARY PORT
	.ATTSC:! BLOCK	1		;NEW SECONDARY PORT OR 0

		DEPHASE
	SUBTTL	Disk unit XCHANGE Message (IPCC function 44)

;	!=======================================================!
;	!	3		!	  .IPCXC (44)		!
;	!-------------------------------------------------------!
;	!		First unit name in SIXBIT		!
;	!-------------------------------------------------------!
;	!		Second unit name in SIXBIT		!
;	!=======================================================!

		PHASE	0

	.XCHHD:! BLOCK 	1		;MESSAGE HEADER
	.XCHU1:! BLOCK	1		;FIRST UNIT NAME IN SIXBIT
	.XCHU2:! BLOCK	1		;SECOND UNIT NAME IN SIXBIT

		DEPHASE
SUBTTL	Structure removal message (IPCC function 45)


;	!=======================================================!
;	!	2		!	  .IPCRM (45)		!
;	!-------------------------------------------------------!
;	!		Structure name in SIXBIT		!
;	!=======================================================!

		PHASE	0

	.REMHD:! BLOCK 	1		;MESSAGE HEADER
	.REMSN:! BLOCK	1		;STRUCTURE NAME IN SIXBIT

		DEPHASE
SUBTTL	Magtape unit accessible message (IPCC function 46)


;	!=======================================================!
;	!	2		!	  .IPCMT (45)		!
;	!-------------------------------------------------------!
;	!	     Magtape unit name in SIXBIT		!
;	!=======================================================!

		PHASE	0

	.MTAHD:! BLOCK 	1		;MESSAGE HEADER
	.MTAUN:! BLOCK	1		;MAGTAPE UNIT NAME IN SIXBIT

		DEPHASE
	SUBTTL	NODE-WENT-AWAY NOTIFICATION MESSAGE (FUNCTION 36)



;	!=======================================================!
;	!							!
;	!		MESSAGE HEADER				!
;	!							!
;	!-------------------------------------------------------!
;	!		   FLAG WORD				!
;	!-------------------------------------------------------!
;	!		ARGUMENT COUNT				!
;	!-------------------------------------------------------!


;	THE ONLY BLOCK DEFINED FOR THIS MESSAGE IS .OROBJ
;	IT DEFINES THE NODE WHICH WENT OFFLINE

;	The .OFLAG word will contain a port,,line # if the node was
;	an IBM remote. It will be zero otherwise.

;	Also: If the %ONLINE bit is lit in .MSFLG then this msg
;	      is a Node-Online Message

	%ONLINE==1B3		;MAKE THIS A NODE ONLINE MESSAGE
	SUBTTL	.QOCQE - CREATE QUEUE ENTRY MESSAGE (FUNCTION 37)

;	!=======================================================!
;	!							!
;	!		MESSAGE HEADER				!
;	!							!
;	!-------------------------------------------------------!
;	!		   FLAG WORD				!
;	!-------------------------------------------------------!
;	!		ARGUMENT COUNT				!
;	!-------------------------------------------------------!


	;THE MESSAGE BLOCK TYPES ARE:

	.QCFIL==10		;FILE SPEC BLOCK

	;This block is the Standard Galaxy FD with .QCFIL put in
	;the right half of the .FDLEN word.

	.QCCOP==11		;NUMBER OF COPIES BLOCK

;	!-------------------------------------------------------!
;	!   BLOCK LENGTH (2)	!	.QCCOP			!
;	!-------------------------------------------------------!
;	!	THE NUMBER OF COPIES OF THE FILE TO		!
;	!		   BE OUTPUT				!
;	!-------------------------------------------------------!

	.QCFRM==12		;FORMS TYPE BLOCK

;	!-------------------------------------------------------!
;	!   BLOCK LENGTH (2)	!	.QCFRM			!
;	!-------------------------------------------------------!
;	!	THE FORMS TYPE YOU WANT (SIXBIT)		!
;	!-------------------------------------------------------!

	.QCPTP==13		;FILE FORMAT BLOCK (ASCII, FORTRAN, ETC)

;	!-------------------------------------------------------!
;	!   BLOCK LENGTH (2)	!	.QCPTP			!
;	!-------------------------------------------------------!
;	!  THE FILE FORMAT TYPE (SEE .FPINF - FP.FFF)		!
;	!-------------------------------------------------------!

	;CONTINUED ON THE NEXT PAGE
	;CONTINUED FROM THE PREVIOUS PAGE

	.QCODP==14		;/DISP: OUTPUT DISPOSITION BLOCK

;	!-------------------------------------------------------!
;	!   BLOCK LENGTH (2)	!	.QCODP			!
;	!-------------------------------------------------------!
;	!  OUTPUT FILE DISPOSITION %PRESERVE or %DELETE		!
;	!-------------------------------------------------------!

		%PRESERVE==0	;DONT DELETE FILE AFTER PROCESSING
		%DELETE==1	;DELETE FILE AFTER PROCESSING
		%RENAME==2	;RENAME THE FILE INTO DSK:[3,3]

	.QCUNT==15		;UNIT TYPE (/UNIT:, /LOWER, /UPPER)

;	!-------------------------------------------------------!
;	!   BLOCK LENGTH (2)	!	.QCUNT			!
;	!-------------------------------------------------------!
;	!     DEVICE ATTRUBUTES ( %LOWER,%UPPER,%GENRC,%PHYCL)	!
;	!-------------------------------------------------------!

	.QCAFT==16		;/AFTER BLOCK

;	!-------------------------------------------------------!
;	!   BLOCK LENGTH (2)	!	.QCAFT			!
;	!-------------------------------------------------------!
;	!	/AFTER TIME (IN UDT FORMAT)			!
;	!-------------------------------------------------------!

	.QCLIM==17		;LIMIT BLOCK (/TIME:, /PAGES:, ETC)

;	!-------------------------------------------------------!
;	!   BLOCK LENGTH (2)	!	.QCLIM			!
;	!-------------------------------------------------------!
;	!   LIMIT BLOCK (# OF PAGES,ETC or TIME IN SECS)	!
;	!-------------------------------------------------------!

	.QCUNI==20		;/UNIQUE BLOCK

;	!-------------------------------------------------------!
;	!   BLOCK LENGTH (2)	!	.QCUNI			!
;	!-------------------------------------------------------!
;	!	/UNIQUE: VALUE (%EQUNO or %EQUYE)		!
;	!-------------------------------------------------------!

	.QCRES==21		;/RESTART BLOCK

;	!-------------------------------------------------------!
;	!   BLOCK LENGTH (2)	!	.QCRES			!
;	!-------------------------------------------------------!
;	!	/RESTART: VALUE (%EQRNO or %EQRNY)		!
;	!-------------------------------------------------------!

	;CONTINUED ON THE NEXT PAGE
	;CONTINUED FROM THE PREVIOUS PAGE

	.QCLOG==22		;/OUTPUT: (LOG,NOLOG,ERROR)

;	!-------------------------------------------------------!
;	!   BLOCK LENGTH (2)	!	.QCLOG			!
;	!-------------------------------------------------------!
;	!   /OUTPUT: VALUE (%EQONL or %EQOLG or %EQOLE)		!
;	!-------------------------------------------------------!

	.QCACT==23		;/ACCOUNT: ACCOUNT STRING BLOCK

;	!-------------------------------------------------------!
;	!   BLOCK LENGTH 	!	.QCACT			!
;	!-------------------------------------------------------!
;	\							\
;	\	USERS ACCOUNT STRING IN ASCIZ			\
;	\							\
;	!-------------------------------------------------------!

	.QCQUE==24		;QUEUE TYPE BLOCK

;	!-------------------------------------------------------!
;	!   BLOCK LENGTH (2)	!	.QCQUE			!
;	!-------------------------------------------------------!
;	!   QUEUE TYPE (SEE GLXMAC OBJ.TY FIELD)		!
;	!-------------------------------------------------------!

	.QCNOD==25		;/NODE: DESTINATION NODE BLOCK

;	!-------------------------------------------------------!
;	!   BLOCK LENGTH (2)	!	.QCNOD			!
;	!-------------------------------------------------------!
;	!   DESTINATION NODE NUMBER OR SIXBIT NODE NAME		!
;	!-------------------------------------------------------!

	.QCNAM==26		;USERS NAME BLOCK

;	!-------------------------------------------------------!
;	!  BLOCK LENGTH 	   !	.QCNAM			!
;	!-------------------------------------------------------!
;	\							\
;	\   USERS NAME (ASCIZ ON -20, SIXBIT ON THE -10)	\
;	\							\
;	!-------------------------------------------------------!

	;CONTINUED ON THE NEXT PAGE
	;CONTINUED FROM THE PREVIOUS PAGE


	.QCOID==27		;USERS NUMBER BLOCK

;	!-------------------------------------------------------!
;	!   BLOCK LENGTH (2)	!	.QCOID			!
;	!-------------------------------------------------------!
;	! USERS ID (36 BIT USER ID ON -20, PPN ON -10)		!
;	!-------------------------------------------------------!


	.QCNOT==30		;/NOTIFY BLOCK

;	!-------------------------------------------------------!
;	!   BLOCK LENGTH (2)	!	.QCNOT			!
;	!-------------------------------------------------------!
;	!	/NOTIFY VALUE (%NOTTY, %NOTML, %NOTJB)		!
;	!-------------------------------------------------------!


	.QCBLT==31		;/BATLOG: BLOCK

;	!-------------------------------------------------------!
;	!   BLOCK LENGTH (2)	!	.QCBLT			!
;	!-------------------------------------------------------!
;	!  /BATLOG VALUE (%BAPND or %BSCDE or %BSPOL)		!
;	!-------------------------------------------------------!


	.QCJBN==32		;JOB NAME

;	!-------------------------------------------------------!
;	!   BLOCK LENGTH (2)	!	.QCJBN			!
;	!-------------------------------------------------------!
;	!		SIXBIT JOB NAME				!
;	!-------------------------------------------------------!


	.QCCDI==33		;CONNECTED DIRECTORY BLOCK

TOPS20	<
;	!-------------------------------------------------------!
;	!   BLOCK LENGTH (2)	!	.QCCDI			!
;	!-------------------------------------------------------!
;	!	36 BIT CONNECTED DIRECTORY NUMBER		!
;	!-------------------------------------------------------!
>

	;CONTINUED ON THE NEXT PAGE
	;CONTINUED FROM THE PREVIOUS PAGE


TOPS10	<
;	!-------------------------------------------------------!
;	!   BLOCK LENGTH 2-6	!	.QCCDI			!
;	!-------------------------------------------------------!
;	\							\
;	\		USER PATH BLOCK				\
;	\		 UP TO 6 WORDS				\
;	\							\
;	!-------------------------------------------------------!
>

	.QCNTE==34		;/NOTE: BLOCK

;	!-------------------------------------------------------!
;	!  BLOCK LENGTH 1-2	!	.QCNTE			!
;	!-------------------------------------------------------!
;	\							\
;	\		1 TO 12 SIXBIT CHARACTERS		\
;	\							\
;	!-------------------------------------------------------!


	.QCBGN==35		;/BEGIN: BLOCK

;	!-------------------------------------------------------!
;	!  BLOCK LENGTH (2)	!	.QCBGN			!
;	!-------------------------------------------------------!
;	!	BEGINNING PAGE NUMBER FOR STARTING OUTPUT	!
;	!-------------------------------------------------------!


	.QCPRI==36		;/PRIORITY: BLOCK

;	!-------------------------------------------------------!
;	!  BLOCK LENGTH (2)	!	.QCPRI			!
;	!-------------------------------------------------------!
;	!		PRIORITY (1 TO 20 OR 1 TO 77)		!
;	!-------------------------------------------------------!

	.QCFRR==37		;FREE RUNNING DEVICE LIMIT BLOCK (IE DBMS)

;	!-------------------------------------------------------!
;	!  LENGTH 1 - EQLMSZ	!	.QCFRR			!
;	!-------------------------------------------------------!
;	\							\
;	\		1 TO EQLMSZ LIMIT WORDS			\
;	\							\
;	!-------------------------------------------------------!

	.QCSNA==42		;FILE FORMAT BLOCK (SNA-WORKSTATIONS)

;	!-------------------------------------------------------!
;	!   BLOCK LENGTH (2)	!	.QCSNA	        	!
;	!-------------------------------------------------------!
;	!	  THE FILE FORMAT TYPE (SEE .FPINF)		!
;	!-------------------------------------------------------!
	SUBTTL	RECOGNIZE MESSAGE (FUNCTION .QOREC - 40)

TOPS10<

;	!=======================================================!
;	/							/
;	/		MESSAGE HEADER				/
;	/							/
;	!-------------------------------------------------------!
;	!		BLOCK COUNT (1)				!
;	!-------------------------------------------------------!
;	!		   FLAG WORD				!
;	!-------------------------------------------------------!


	;THE ONLY BLOCK DEFINED IS .RECDV WHICH CONTAINS THE
	;SIXBIT DEVICE NAME

	.RECDV==3		;DEFINE THE DEVICE NAME BLOCK TYPE

;	!-------------------------------------------------------!
;	!	2		!	.RECDV			!
;	!-------------------------------------------------------!
;	!		SIXBIT DEVICE NAME			!
;	!=======================================================!

	PHASE	0

.RECDN:! BLOCK	1		;SIXBIT DEVICE NAME
.RECSZ:!			;SIZE OF THE BLOCK

	DEPHASE

>;END TOPS10
	SUBTTL	Tape status message (.QOTST functions 41)

TOPS10<
;	!=======================================================!
;	/	EXPANDED GALAXY MESSAGE HEADER			/
;	!-------------------------------------------------------!

	;There are 3 blocks defined for this message: .TLSTA & .DSSTA
	;  and .STSTS.

;The Device Status Block (.STSTS)

	.STSTS==10		;UNIT STATUS BLOCK

;	!-------------------------------------------------------!
;	!	3		!	.STSTS			!
;	!-------------------------------------------------------!
;	!		SIXBIT DEVICE NAME			!
;	!-------------------------------------------------------!
;	!		DEVICE STATUS BITS			!
;	!-------------------------------------------------------!

		PHASE	0

	.STUNT:! BLOCK	1		;UNIT NAME IN SIXBIT
	.STFLG:! BLOCK	1		;UNIT STATUS BITS (DEVICE DEPENDENT)
		ST.OFL==1B0		;ON IF UNIT IS OFF-LINE
		ST.LOK==1B1		;ON IF UNIT IS WRITE-LOCKED
		TS.DEN==77B8		;ACTUAL DENSITY OF TAPE (SEE UUOSYM)
		TS.LAB==77B14		;TAPE LABEL TYPE (SEE UUOSYM)
	.STLEN:!			;UNIT STATUS BLOCK LENGTH

		DEPHASE


;The tape volume status block (.TLSTA)

	.TLSTA==12		;TAPE STATUS BLOCK TYPE

;	!-------------------------------------------------------!
;	!	2		!	.TLSTA			!
;	!-------------------------------------------------------!
;	!                 SIXBIT VOLUME ID                      !
;	!=======================================================!

			PHASE	0

	.TLVOL:! BLOCK	1		;SIXBIT VOLUME ID
	.TLSIZ:!			;TAPE STATUS BLOCK SIZE
			DEPHASE

	;CONTINUED ON THE NEXT PAGE
	;CONTINUED FROM THE PREVIOUS PAGE


;The disk structure status block (.DSSTA)

	.DSSTA==14		;DISK STATUS BLOCK TYPE

;	!-------------------------------------------------------!
;	!	6		!	.DSSTA			!
;	!-------------------------------------------------------!
;	!		SIXBIT HOME BLOCK ID			!
;	!-------------------------------------------------------!
;	!		SIXBIT NEXT VOL ID			!
;	!-------------------------------------------------------!
;	!		SIXBIT PREVIOUS VOL ID			!
;	!-------------------------------------------------------!
;	!		SIXBIT STRUCTURE NAME			!
;	!-------------------------------------------------------!
;	!		     OWNER PPN      			!
;	!=======================================================!

			PHASE	0
	.DSHID:! BLOCK	1		;HOME BLOCK ID IN SIXBIT
	.DSNXV:! BLOCK	1		;NEXT VOLUME IN STRUCTURE IN SIXBIT
	.DSLUN:! BLOCK	1		;LOGICAL UNIT NUMBER
	.DSSNM:! BLOCK	1		;STRUCTURE NAME IN SIXBIT
	.DSPPN:! BLOCK	1		;OWNER PPN
	.DSSIZ:!			;DISK STATUS BLOCK SIZE
			DEPHASE
>;END TOPS10
	SUBTTL	TAPE DRIVE UNLOAD MESSAGE (FUNCTION .QOUNL - 42)

	;ALSO	TAPE DRIVE REWIND MESSAGE (FUNCTION .QOREW - 47)


;	!=======================================================!
;	/							/
;	/		MESSAGE HEADER				/
;	/							/
;	!-------------------------------------------------------!
;	!		BLOCK COUNT (1)				!
;	!-------------------------------------------------------!
;	!		   FLAG WORD				!
;	!-------------------------------------------------------!


	;THE ONLY BLOCK DEFINED IS .RECDV WHICH CONTAINS THE
	;SIXBIT DEVICE NAME

;	!-------------------------------------------------------!
;	!	2		!	.RECDV			!
;	!-------------------------------------------------------!
;	!		SIXBIT DEVICE NAME			!
;	!=======================================================!
	SUBTTL	Volume Mounted message to tape labeller (.QOVMN = 43)

TOPS10<

;	!=======================================================!
;	/							/
;	/		MESSAGE HEADER				/
;	/							/
;	!-------------------------------------------------------!
;	!		BLOCK COUNT (2)				!
;	!-------------------------------------------------------!
;	!		   FLAG WORD				!
;	!-------------------------------------------------------!

	;ONE BLOCK IS .RECDV WHICH CONTAINS THE
	;SIXBIT DEVICE NAME

;	!-------------------------------------------------------!
;	!	2		!	.RECDV			!
;	!-------------------------------------------------------!
;	!		SIXBIT DEVICE NAME			!
;	!=======================================================!

	;THERE IS ONE VOLUME (SET) BLOCK ATTACHED TO THE MESSAGE
	;THIS BLOCK DESCRIBE THE INITIAL VOLUME BEING GIVEN TO THE
	;USER AND THE FIRST VOLUME IN THE VOLUME SET

	.VOLMN==4		;BLOCK TYPE FOR THE VOLUME BLOCK

;	!-------------------------------------------------------!
;	!         SIXBIT VOLUME ID FOR MOUNTED VOLUME		!
;	!-------------------------------------------------------!
;	!        SIXBIT VOLUME ID FOR FIRST VOLUME IN SET	!
;	!-------------------------------------------------------!
;	!LABEL TYPE!WLOCK!JOB #!				!
;	!-------------------------------------------------------!

	PHASE	0		;DEFINE THE CONTENTS OF THE BLOCK

.VMNIV:! BLOCK	1		;SIXBIT NAME OF INITIAL VOLUME
.VMNFV:! BLOCK	1		;SIXBIT NAME OF FIRST VOL IN SET
.VMNIN:! BLOCK	1		;INFORMATION ABOUT THE VOL SET
	VI.LTY==77B5		;LABEL TYPE
	VI.WLK==1B6		;WRITE LOCKED IF 1
	VI.JOB==777B17		;JOB NUMBER OF REQUESTOR
.VMNSZ:!			;SIZE OF THE BLOCK (WITHOUT HEADER)

>;END TOPS10
	SUBTTL	Volume dismounted message to tape labeller (.QOVDM = 44)

TOPS10<

;	!=======================================================!
;	/							/
;	/		MESSAGE HEADER				/
;	/							/
;	!-------------------------------------------------------!
;	!		BLOCK COUNT (1)				!
;	!-------------------------------------------------------!
;	!		   FLAG WORD				!
;	!-------------------------------------------------------!

	;THE ONLY BLOCK DEFINED IS .RECDV WHICH CONTAINS THE
	;SIXBIT DEVICE NAME

;	!-------------------------------------------------------!
;	!	2		!	.RECDV			!
;	!-------------------------------------------------------!
;	!		SIXBIT DEVICE NAME			!
;	!=======================================================!
>;END TOPS10
	SUBTTL	Volume switch request from tape labeller (.QOVSR = 45)

TOPS10<

;	!=======================================================!
;	/							/
;	/		MESSAGE HEADER				/
;	/							/
;	!-------------------------------------------------------!
;	!		BLOCK COUNT (2)				!
;	!-------------------------------------------------------!
;	!		   FLAG WORD				!
;	!-------------------------------------------------------!

	;ONE BLOCK IS A .RECDV BLOCK WHICH HAS THE
	;SIXBIT DEVICE NAME OF THE DRIVE NEEDING A NEW VOLUME

;	!-------------------------------------------------------!
;	!	2		!	.RECDV			!
;	!-------------------------------------------------------!
;	!		SIXBIT DEVICE NAME			!
;	!=======================================================!

	;THE OTHER BLOCK DESCRIBES WHICH VOLUME OF THE SET IS
	;NEEDED BY THE USER ON THAT DRIVE

;	!-------------------------------------------------------!
;	!	2		!	.RLVOL			!
;	!-------------------------------------------------------!
;	!WRT!		RELATIVE VOLUME CODE			!
;	!=======================================================!

	.RLVOL==4

	PHASE	0

.RLVCD:! BLOCK	1			;SPACE FOR THE RELATIVE VOLUME CODE
	%VWRT==1B0			;WANT TO USE 'NEXT' VOLUME FOR WRITING
	RLV.CD==7			;WHERE THE CODE GOES
	  %RLNXT==1			;GET THE NEXT VOLUME
	  %RLPRV==2			;GET THE PREVIOUS VOLUME
	  %RLFIR==3			;GET THE FIRST VOLUME OF THE SET

.RLVSZ:!				;SIZE OF THIS BLOCK

	DEPHASE

>;END TOPS10
	SUBTTL Volume Switch Directive From MDA to Tape Labeler (.QOVSD - 46)

TOPS10<

;This message is sent by MDA in response to a volume switch request
;	message from the tape labeller.  It directs the labeller
;	to continue the labelling process on the same drive
;	or on another drive which the OPR/MDA has chosen

;	!=======================================================!
;	/							/
;	/		MESSAGE HEADER				/
;	/							/
;	!-------------------------------------------------------!
;	!		BLOCK COUNT (1)				!
;	!-------------------------------------------------------!
;	!		   FLAG WORD				!
;	!-------------------------------------------------------!

	;Flags for this message

	%VEOF==1B0			;There are no more volumes in the set
					;give EOF to the requestor
	%VABT==1B1			;OPR has aborted the volume
					;switch request
	%VTMV==1B2			;Too many volumes in the
					;volume set

	;There are two blocks passed on this message
	;One is the Volume set directive block which describes
	;the two drives being swapped, and the other is a Volume
	;info block describing the new volume in use, its label type,
	;and its write enable/lock status


	.VSDBL==12		;VOLUME SET DIRECTIVE BLOCK

;	!-------------------------------------------------------!
;	!	4		!	.VSDBL			!
;	!-------------------------------------------------------!
;	!	INITIAL DRIVE NAME IN SIXBIT			!
;	!-------------------------------------------------------!
;	!	CURRENT DRIVE NAME IN SIXBIT			!
;	!-------------------------------------------------------!
;	!		CURRENT VOLUME NAME			!
;	!=======================================================!


		PHASE	0

	.VSDID:! BLOCK	1		;INITIAL DRIVE NAME
	.VSDCD:! BLOCK	1		;CURRENT DRIVE NAME

	VSDLEN:!			;BLOCK LENGTH

		DEPHASE

>;END TOPS10
	SUBTTL	Request for System Catalog Information (.QORCT)

	;This message is sent to the Tape Labeler Requesting information
	;from the System Catalog (STRLST for now).

;	!=======================================================!
;	\							\
;	\		Standard Galaxy Header			\
;	\							\
;	!-------------------------------------------------------!


	;There is one block defined for this message, .RCTVS

	.RCTVS==12		;Asciz Volume Set Name

;	!-------------------------------------------------------!
;	!	Length		!	.RCTVS			!
;	!-------------------------------------------------------!
;	\							\
;	\		Volume Set Name in Asciz		\
;	\							\
;	!-------------------------------------------------------!


		PHASE	0
	.RCTAV:	BLOCK	1	;VOLUME SET NAME
	.RCTLN:			;MINIMUM BLOCK LENGTH
		DEPHASE
	SUBTTL	Catalog information message (.QOCAT)

;	This message is sent from the system catalog to QUASAR
;	in response to a .QORCT message.

;	!=======================================================!
;	\							\
;	\		Standard Galaxy Header			\
;	\							\
;	!-------------------------------------------------------!

;	This message consists of at least two argument blocks.
;	The first is the .RCTVS block, which tells the
;	volume set being "looked up" in the catalog.

;	!-------------------------------------------------------!
;	!	Length		!	.RCTVS			!
;	!-------------------------------------------------------!
;	\							\
;	\		Volume Set Name in Asciz		\
;	\							\
;	!-------------------------------------------------------!

;	The second is the .CVSFS block, which describes
;	the information in the catalog about the volume set
;	asked for.  This second block is the last block if
;	the catalog contains no information about the volume set
;	(in this case, the error bit is on)

;	!-------------------------------------------------------!
;	!	Length		!	.CVSFS			!
;	!-------------------------------------------------------!
;	!			!	# of volumes		!
;	!-------------------------------------------------------!
;	!		Owner's PPN				!
;	!-------------------------------------------------------!
;	\		Owner's name 				\
;	\			(SIXBIT)			\
;	!-------------------------------------------------------!

	.CVSFS==.RCTVS+1		;Block type

	PHASE	0			;At end of Block header
.CVSNV:! BLOCK	1			;# of volumes
	CVS.NV==RHMASK			;Number of volumes
					;(# of .CVLPR blocks following)
.CVSOW:! BLOCK	1			;PPN of owner
.CVSON:! BLOCK	EQNMSZ			;Owner name
.CVSLN:!				;Length of the block
	DEPHASE

	;CONTINUED ON THE NEXT PAGE
	;CONTINUED FROM THE PREVIOUS PAGE

;	These blocks are generally followed by (n) .CVLPR blocks,
;	one for each volume in the volume set

;	!-------------------------------------------------------!
;	!	Length		!	.CVLPR			!
;	!-------------------------------------------------------!
;	!		Volume ID (SIXBIT)			!
;	!-------------------------------------------------------!
;	!					    !Kon!Uni!Cls!
;	!-------------------------------------------------------!

	.CVLPR==.CVSFS+1		;Block type

	PHASE	0			;After arg block header

.CVLID:! BLOCK	1			;Volume ID (SIXBIT)
.CVLST:! BLOCK	1			;Status bits
	CVL.KT==7000			;Kontroller type
	CVL.UT==70			;Unit type
	CVL.CL==7			;Class (?)
.CVLLN:!				;Length of block

	DEPHASE
	SUBTTL	INTERNAL CATALOG CACHE STRUCTURE

;	!-------------------------------------------------------!
;	!		SIXBIT VOL SET NAME			!
;	!-------------------------------------------------------!
;	!		   OWNER ID				!
;	!-------------------------------------------------------!
;	!		  VOLUME COUNT				!
;	!-------------------------------------------------------!
;	!		SIXBIT VOL NAME # 1			!
;	!-------------------------------------------------------!
;	!		VOLUME RESOURCE NUMBER			!
;	!-------------------------------------------------------!
;				.
;				.
;				.
;	!-------------------------------------------------------!
;	!		SIXBIT VOL NAME # n			!
;	!-------------------------------------------------------!
;	!		VOLUME RESOURCE NUMBER			!
;	!-------------------------------------------------------!


		PHASE	0

	.CTVSN:! BLOCK	1		;SIXBIT VOLUME SET NAME
	.CTOID:! BLOCK	1		;OWNERS PPN
	.CTNAM:! BLOCK	EQNMSZ		;OWNER'S NAME
	.CTBLD:! BLOCK	1		;BUILD CODE
	   .CTCAT==0			   ;FROM CATALOG (STRLST)
	   .CTQSR==1			   ;FROM QUASAR
	.CTCNT:! BLOCK	1		;VOLUME COUNT
	.CTVOL:!			;VOLUME BLOCK STARTING OFFSET

	CATLEN:!			;HEADER LENGTH
		DEPHASE

	;Volume Block Description

		PHASE	0

	.CTVID:! BLOCK	1		;VOLUME ID (SIXBIT)
	.CTRSN:! BLOCK	1		;VOLUME RESOURCE NUMBER
	CATBLN:!			;CATALOG BLOCK LENGTH

		DEPHASE
	SUBTTL	BUILD A STRUCTURE MESSAGE (.QOBLD)
	;
	;	DISMOUNT A STRUCTURE MESSAGE (.QODSM)

	;This message is sent to the Tape Labeler to define what volumes
	;comprise a structure

;	!=======================================================!
;	\							\
;	\		Standard Galaxy Header			\
;	\							\
;	!-------------------------------------------------------!

;	There are two flags in .OFLAG, for the /REMOVE and /NOCHECK switchs
;	The flags are defined in ORNMAC, and passed in to QUASAR and
;	out to the tape labeler.
;	The bits are .DMRMV for /REMOVE and .DMNCK for /NOCHECK.
;	One additional field is only of interest to QUASAR and PULSAR.
;	and is defined here. It indicates the number of queue requests
;	requiring a structure.

	.DMNRQ==7777B35		;NUMBER OF QUEUE REQUESTS REQUIRING STR


	;There are 2 blocks defined for this message, .BLDSN
	;   and .BLDUN

	.BLDSN==5		;STRUCTURE NAME BLOCK

;	!-------------------------------------------------------!
;	!	3		!	.BLDSN			!
;	!-------------------------------------------------------!
;	!		SIXBIT STRUCTURE NAME			!
;	!-------------------------------------------------------!
;	!		OWNERS PPN				!
;	!-------------------------------------------------------!


		PHASE	0
	.BLDNM:! BLOCK	1		;SIXBIT STRUCTURE NAME
	.BLDOW:! BLOCK	1		;OWNERS PPN
	.BLDLN:!			;BLOCK LENGTH
		DEPHASE


	.BLDUN==7		;UNIT(S) BLOCK

;	!-------------------------------------------------------!
;	!	n		!	.BLSUN			!
;	!-------------------------------------------------------!
;	!		SIXBIT UNIT NAME #1			!
;	!-------------------------------------------------------!
;	!	     SIXBIT HOME BLOCK NAME #1			!
;	!-------------------------------------------------------!
;	\			.				\
;	\-------------------------------------------------------\
;	\			.				\
;	\-------------------------------------------------------\
;	\			.				\
;	\-------------------------------------------------------\
;	!		SIXBIT UNIT NAME # n			!
;	!-------------------------------------------------------!
;	!	     SIXBIT HOME BLOCK NAME #n			!
;	!-------------------------------------------------------!
	SUBTTL	MDA ACK MESSAGE (.QOACK)

	;This message is sent by the Tape Labeler to QUASAR to ACK
	;certain actions requested by QUASAR.


;	!=======================================================!
;	!	LENGTH		   !	.QOACK			!  .MSTYP
;	!-------------------------------------------------------!
;	!							!  .MSCOD
;	!-------------------------------------------------------!
;	!NAK!			   !		Ack Type	!  .MSFLG
;	!-------------------------------------------------------!
;	!			0				!  .OFLAG
;	!-------------------------------------------------------!
;	!		BLOCK COUNT				!  .OARGC
;	!-------------------------------------------------------!


	;The .MSFLG word contains the NAK bit (sign bit). If this bit is
	; on, the the message is a NAK.
	;The AK.TYP field describes what flavor of ACK/NAK this message is
	;In addition, the message may have some number (0-n) of qualifier
	; argument blocks tacked on.

	;FIELDS OF .MSFLG:
	AK.NAK==MF.FAT			;THIS MESSAGE IS A NAK, NOT AN ACK
	AK.TYP==RHMASK			;FIELD FOR TYPE OF ACK/NAK
	;The valid ACK/NAK flavors are:
		%MOUNT==1	;MOUNT STRUCTURE ACK
		%DSMNT==2	;DISMOUNT STRUCTURE ACK
		%CATLG==3	;CATALOG REQUEST ACK (ONLY ON ERROR)
		%ADSTR==4	;ADD STRUCTURE TO SEARCH LIST ACK
		%RMSTR==5	;REMOVE STRUCTURE FROM A SEARCH LIST ACK
		%MNTNO==6	;MOUNT STRUCTURE ACK (NO OWNER PPN)

	;The allowable argument blocks follow:

	;	.RCTVS			;VOLUME SET BLOCK

		.ACUFD==.RCTVS+1	;QUALIFIER FOR ADD-TO-SEARCH-LIST ACK
					;INDICATES NO UFD CREATED ON STR
					;LENGTH = 1

		.ACQTO==.ACUFD+1	;QUALIFIER FOR REMOVE-FROM-SEARCH-LIST NAK
					;INDICATES USER IS OVER QUOTA BY N
					;BLOCKS. N IS THE ARG.DA WORD OF THE BLOCK
					;LENGTH = 2
	SUBTTL	ADD/REMOVE A STRUCTURE TO A USERS SEARCH LIST MESSAGE (.QOASL)


	;This message is sent to the tape labeler to add a structure to that
	;users search list. The flag bits are stored in .OFLAG.
	;The only block defined for this message is .BLDSN


	;If bit ASL.RM is lit in .OFLAG, Then this is a request
	;to remove the structure from the users search list
	;If bit ASL.RM is on, then ASL.NQ may be lit indicating
	;No quota check is to be performed.  This is lit when MDA
	;wants to take back a structure to keep deadlocks
	;straight, and can't be bothered with quota checks.


;	!=======================================================!
;	!	10		!	.QOASL			!  .MSTYP
;	!-------------------------------------------------------!
;	!							!  .MSCOD
;	!-------------------------------------------------------!
;	!							!  .MSFLG
;	!-------------------------------------------------------!
;	!WL!NC!PS!SA!NQ!			!JOB NUMBER	!  .OFLAG
;	!-------------------------------------------------------!


		ASL.WL==1B0		;ADD STRUCTURE 'WRITE LOCKED'
		ASL.NC==1B1		;ADD STRUCTURE 'NO CREATE'
		ASL.PS==1B2		;ADD STRUCTURE 'PASSIVE'
		ASL.SA==1B3		;ADD STRUCTURE 'SINGLE ACCESS'
		ASL.RM==1B4		;REMOVE THIS STR FROM USER SEARCH LIST
		ASL.NQ==1B5		;IF REMOVING, DON'T ENFORCE QUOTAS
		ASL.AR==1B6		;ALWAYS RECOMPUTE
		ASL.NR==1B7		;NEVER RECOMPUTE
		ASL.JB==777B35		;USERS JOB NUMBER
	SUBTTL	DISMOUNT/DEALLOCATE A VOLUME SET MESSAGE (.QODVS)

	;This Message is sent by the user to dismount or deallocate a
	;volume set

;	!=======================================================!
;	\							\
;	\		Standard Galaxy Msg Header		\
;	\							\
;	!-------------------------------------------------------!
;	!		Message flags (.OFLAG)			!
;	!-------------------------------------------------------!
;	!		Block count (.OARGC)			!
;	!_______________________________________________________!


;The allowable message flags are:

;	MM.DLC==MM.DLC			;Remove from jobs allocation state


	;There are two blocks defined for this message, .RECDV (Device Name)
	;   and .RCTVS (Volume Set Name)

	;Either type of block can be sent, but not both. On Deallocate, if
	;   .RCTVS is sent, the volume set name is also treated as a logical
	;   name. If the volume set name does not match for this user, the
	;   first 6 characters are treated as a logical name and this is used
	;   for a logical name search.

;.RECDV defined in Recognize message

;	.RECDV==3		;DEFINE THE DEVICE NAME BLOCK TYPE

;	!-------------------------------------------------------!
;	!	2		!	.RECDV			!
;	!-------------------------------------------------------!
;	!		SIXBIT DEVICE NAME			!
;	!=======================================================!

;	PHASE	0
;
;.RECDN:! BLOCK	1		;SIXBIT DEVICE NAME
;.RECSZ:!			;SIZE OF THE BLOCK
;
;	DEPHASE


;.RCTVS defined in Catalog message

;	.RCTVS==12		;Asciz Volume Set Name
;
;	!-------------------------------------------------------!
;	!	Length		!	.RCTVS			!
;	!-------------------------------------------------------!
;	\							\
;	\		Volume Set Name in Asciz		\
;	\							\
;	!-------------------------------------------------------!
;
;
;		PHASE	0
;	.RCTAV:	BLOCK	1	;VOLUME SET NAME
;	.RCTLN:			;MINIMUM BLOCK LENGTH
;		DEPHASE
	SUBTTL	.QOLAC - List allocations for a job
	SUBTTL	.QOALC - Prescan a control file for allocations

;This message is sent from QUASAR to the batch control file scanner
; (currently BATCON)
; to extract the batch job's required mountable
; device requirements before scheduling the stream
;This message is just a NEXTJOB message with an EQ already built,
; and all of the requisite FPs, and FDs attached
; In particular, the .EQRID field must be supplied.
	SUBTTL	.QOPRM - Response to .QOALC request

;This message is sent from the batch control file scanner
; to QUASAR after that process has performed pre-scanning of
; a control file for mountable device requirements

;The contents of this message are identical to the .QOMNT message
; except that the ME entries may have varying allocate/mount requirements
;Also, there is a bit defined in .OFLAG which indicates that
; there were no allocations found.
;The batch control file scanner extracts the Request
; ID from the EQ in the .QOALC message and places it in the .QOPRM
; message (in OFLAG, actually) so that QUASAR can line up the response
; with a waiting batch request

;	.OFLAG==.OFLAG			;Bits in the flag word
		PR.NON==1B0		;No allocations found
		PR.RID==RHMASK		;Request ID for identification
SUBTTL	.QOIDN - Tape Initialization Done message

;This message is set by PULSAR to QUASAR when a tape
; initialization sequence is finished.  The message tells QUASAR that
; the drive is now available for use.

;The message contains only one block. a .RECDV block
; which contains the drive name which is finished
	SUBTTL	LPTSPL forms change message (.QOFCH (63) )


;	!=======================================================!
;	\							\
;	\		Standard Galaxy Msg Header		\
;	\							\
;	!-------------------------------------------------------!
;	!		New forms type in sixbit (.OFLAG)	!
;	!-------------------------------------------------------!
;	!		Block count = 1 (.OARGC)		!
;	!_______________________________________________________!

;	!_______________________________________________________!
;	!	OBJ.SZ		!	.OROBJ			!
;	!_______________________________________________________!
;	\							\
;	\		OBJECT BLOCK				\
;	!_______________________________________________________!
	SUBTTL	IBMCOM Statistice message (.QOIBM)

;	!=======================================================!
;	\							\
;	\		Standard Galaxy Msg Header		\
;	\							\
;	!-------------------------------------------------------!
;	!		Statistics update code			!
;	!-------------------------------------------------------!


IFN FTDN60,<
	XP	FTIBMS,-1>	;Include IBM statistics
IFE FTDN60,<
	XP	FTIBMS,0>	;But only if IBMCOM is used

	;Possible statistics codes are:

		%TINP==1	;Termination batch requests   (CDRIVE)
		%TOUT==2	;Termination printer requests (LPTSPL)
		%TCNI==3	;Termination console input    (CDRIVE)
		%TCNO==4	;Termination console output   (LPTSPL)

		%EINP==5	;Emulation batch requests     (IBMSPL)
		%EOUT==6	;Emulation printer requests   (IBMSPL)
		%ECNI==7	;Emulation console input      (IBMSPL)
		%ECNO==8	;Emulation console output     (IBMSPL)
	SUBTTL	Common Parameters

;THE PARAMETERS DEFINED HERE ARE ONES THAT ARE NEEDED BY QUASAR BUT ARE
;SYSTEM DEPENDENT.  TO MINIMIZE FEATURE TESTS AND DUPLICATION OF ROUTINES,
;QUASAR PARAMETERS ARE USED AND EQUATED TO THE CORRECT SYSTEM VALUE.

;**NOTE: THESE VALUES ARE NOT TO BE CONSTRUED AS 'OPTIONS' AND ANY CHANGES
;		WILL CAUSE UNPREDICTABLE RESULTS.


	SYSPRM	ACC.KM,.ACREN,.CKAWT		;KILL/MODIFY ACCESS CODE
	SYSPRM	INT.PI,0,0			;IPCF INTERRUPT CHANNEL OR OFFSET
	SYSPRM	INT.PL,1,1			;IPCF PRIORITY INTERRUPT LEVEL
	SYSPRM	FSSBKS,200,1000			;STANDARD BLOCKSIZE
	SYSPRM	FSSFIB,2,1			;BLK. # OF 1ST INDEX BLK
SUBTTL	Random Macros

;DOSCHD is a macro which may be called to flag that something has
;	happened which might allow a scheduling pass to bear fruit.

DEFINE DOSCHD,<
	IFN <%%.MOD-<SIXBIT /QUASAR/>>,<EXTERN G$SCHD>
	SETOM	G$SCHD
>  ;END DEFINE DOSCHD
SUBTTL	Failsoft System Definitions

;I/O CHANNELS
	ND	CMQ1,10			;FIRST MASTER QUEUE CHANNEL
	ND	CMQ2,11			;SECOND MASTER QUEUE CHANNEL

;OTHER SYMBOLS
	XP	FSSSTR,FSSSTR		;STRUCTURE FOR MASTER QUEUES
	ND	FSSPRT,277		;PROTECTION FOR MASTER QUEUES

;FILE FORMAT AND INDEX DEFINITIONS
	XP	FSSQFV,%%.QSR		;QUEUE FILE VERSION
	XP	FSSMRS,1000		;MAXIMUM REQUEST SIZE
	XP	FSSBPR,<FSSMRS/FSSBKS>	;MAXIMUM BLOCKS/REQUEST
	XP	FSSWPI,1000		;NUMBER OF WORDS/INDEX
	XP	FSSNIB,<FSSWPI/FSSBKS>	;NUMBER OF INDEX BLOCKS/SECTION
	XP	FSSFDB,<FSSFIB+FSSNIB>	;BLK. NO.  OF FIRST DATA BLOCK
	XP	FSSBPS,FSSWPI		;BLOCKS PER SECTION
	XP	FSSMNS,5		;MAXIMUM NUMBER OF SECTIONS

;MASTER FILE NAMES

IFN FTUUOS,<
	DEFINE	MQFNM1,<SIXBIT\QSRMS1\>	;THE PRIMARY MASTER
	DEFINE	MQFNM2,<SIXBIT\QSRMS2\>	;    REDUNDANT MASTER
	ND	DFSSTR,<SIXBIT /DSK/>	;STRUCTURE TO USE IF DEBUGGING
	ND	SPLSTR,<SIXBIT/DSK/>	;SPOOL STRUCTURE
>  ;END OF IFN FTUUOS

IFN FTJSYS,<
	DEFINE	MQFNAM,<ASCIZ\DSK:<SPOOL>PRIMARY-MASTER-QUEUE-FILE.QUASAR\>
	DEFINE	DMQFNM,<ASCIZ \DSK:PRIVATE-MASTER-QUEUE-FILE.QUASAR\>
	ND	SPLSTR,<ASCII/DSK:/>	;SPOOL STRUCTURE
>  ;END OF IFN FTJSYS


;REBUILD CODES
;	A REBUILD CODE IS STORED IN THE FILE INDEX ENTRY FOR EACH REQUEST
;	IN THE MASTER QUEUE FILE.  AT QUASAR INITIALIZATION THE CORRECT
;	ROUTINE IS CALLED WITH THE ENTRY BASED ON THE REBUILD CODE.

	%RBMIN==1			;Minimum valid code number
	%RBBAT==1			;BATCH JOB (INP, LPT, PLT, ...)
	%RBDEL==2			;DELETED FILES
	%RBMAX==%RBDEL			;Maximum valid code number
SUBTTL	QUASAR Fatal Error Codes

;ARGUMENTS USED ARE

;	X	'SUFFIX' , 'TEXT' , 'ERROR SEVERITY'

;THE EXPANDER IS TO DEFINE THE CORRECT 'X' MACRO

DEFINE	ERRCDS,<
	LSTOF.

	X	BMG,<Bad MODIFY Group>,MF.FAT
	X	ICM,<Illegal CREATE Message>,MF.FAT
	X	IFS,<Illegal File Specification>,MF.FAT
	X	ILM,<Illegal LIST Message>,MF.FAT
	X	IFD,<Illegally Formatted Device Name>,MF.FAT
	X	IMT,<Illegal Message Type>,MF.FAT
	X	INF,<Illegal Number of Files>,MF.FAT
	X	IPE,<Insufficient Privileges Enabled>,MF.FAT
	X	MTL,<Message Too Long>,MF.FAT
	X	MTS,<Message is Too Short>,MF.FAT
	X	NKC,<Not a Known Component>,MF.FAT
	X	NOR,<Number Out of Range>,MF.FAT
	X	NYO,<Not Your Object>,MF.FAT
	X	SNY,<Specified request is Not Yours>,MF.FAT
	X	UQS,<Unknown Queue Specified>,MF.FAT
	X	UOS,<Unknown Object Specified>,MF.FAT
	X	WVN,<Wrong Version Number>,MF.FAT
	X	IAS,<Invalid Account String Specified>,MF.FAT
	X	OHR,<Operator Has Restricted Queue Entry Commands>,MF.FAT
	X	IMM,<Illegal MOUNT Message>,MF.FAT
	X	MPN,<MOUNT Request Processor Not Running>,MF.FAT
	X	CDU,<Can't Default User Name>,MF.FAT
	X	CDD,<Can't Default Connected Directory>,MF.FAT
	X	NSD,<No such device>,MF.FAT
	X	CDA,<Can't Delete an Allocated request>,MF.FAT
	X	PRB,<Privileges Required for Bypass Label Processing>,MF.FAT
	X	ICD,<Illegal Connected Directory Specified>,MF.FAT
	X	IFC,<Invalid Function Code Specified>,MF.FAT
	X	MDA,<MDA is not supported in this monitor>,MF.FAT
	X	SDY,<Specified Device is not Yours>,MF.FAT
	X	IVN,<Invalid Volume Set Name Specified>,MF.FAT
	X	ISS,<Invalid Switch Specified in a Structure Mount Request>,MF.FAT
	X	MRP,<Mount Request is not Pending>,MF.WRN
	X	MIN,<Mount Illegal for 'No Operator Intervention' Request>,MF.FAT
	X	IPB,<Invalid Path Block Specified>,MF.FAT
	X	IBL,<Invalid Block Length/Count Specified>,MF.FAT
	X	MVB,<Multiple Volume Set Name Blocks is Illegal>,MF.FAT
	X	IMO,<Invalid message received from ORION>,MF.FAT
	X	NUA,<No Units Available for Mounting this Request>,MF.FAT
	X	RTE,<Route Table Entry does not Exist>,MF.FAT
	X	ISO,<Invalid Source Object Specified in Route Command>,MF.FAT
	X	IDO,<Invalid Destination Object Specified in Route Command>,MF.FAT
	X	CRG,<Cannot Route a Generic Unit>,MF.FAT
	X	UST,<Unknown device or structure name>,MF.FAT
	X	ERZ,<Ersatz devices may not be mounted>,MF.FAT
	X	DNM,<Device may not be mounted>,MF.FAT
	X	VID,<Volume identifier must be specified>,MF.FAT
	X	VIU,<Volume identifiers must be unique>,MF.FAT
	X	ISA,<Illegal attribute for structure mount request>,MF.FAT
	X	ITA,<Illegal attribute for tape mount request>,MF.FAT
	X	ILN,<Illegal logical name>,MF.FAT
	X	IDE,<Invalid density>,MF.FAT
	X	ILT,<Invalid label type>,MF.FAT
	X	RNS,<Reelid not specified in mount command>,MF.FAT
	X	XXX,<This is a text buffer for messages built on the fly. MAX 70 characters>,MF.FAT

	LSTON.>  ;END OF DEFINE ERRCDS

DEFINE X(CODE,STRING,FLAGS),<
	ER$'CODE==..XX
	..XX=..XX+1
>;END DEFINE X

	..XX==1
	ERRCDS				;DEFINE THE ERROR OFFSETS
	SUBTTL	MDA ERROR MACROS AND CODES

	;Define the $ERJMP Macro
	;
	;Use: $ERJMP ERROR-CODE,AC-CONTAINING-VSL-ADDRESS

	DEFINE	$ERJMP(CODE,VSL),<
	LSTOF.
	  PUSHJ	P,D$MDAE
	  CAI	<<VSL>B23!<CODE>B35>
	LSTON.>

	AC.VSL==770000		;DEFINE VSL AC FIELD
	ER.CDE==007777		;DEFINE ERROR CODE FIELD

	;Define the error codes and strings

	DEFINE	MDAERR,<
	LSTOF.

	X	NVM,<No Volume Mounted On Drive>
	X	VAU,<Volume is Already in Use>
	X	DAU,<Drive is Already in Use>
	X	VIL,<Volume on Drive is Labeled>
	X	RDM,<Reelid does not match user's request>
	X	URB,<User Requested Bypass Label Volumes>
	X	URL,<User Requested Labeled Volumes>
	X	URW,<User Requested Write-Locked Volumes>
	X	URE,<User Requested Write-Enabled Volumes>
	X	RDD,<Requested Density Does not Match Volume Density>
	X	VND,<Requested Volume not on this Device>
	X	IUD,<Illegal for unavailable device>
	X	RLD,<Request Label Type Doesn't Match Volume Label Type>
	X	DAD,<Drive is already available>
	X	NVI,<VOLID Required for This Volume>
	X	CIU,<Cannot identify the Users Current Volume>
	X	TDM,<Request Track type Doesn't Match Device Type>
	X	DDD,<Device Allocation Error - Deadlock Detected>
	X	IDD,<Illegal density for drive>
	LSTON.>


	DEFINE	X(CODE,STRING),<
	MD$'CODE==..XX
	..XX==..XX+1
	>

	..XX==1

	MDAERR		;GENERATE THE MDA ERROR CODES
	SUBTTL	Definition of the Known Queues

;ARGUMENTS USED ARE

;	X	'QUENAME' , 'ENTRYSIZE' , 'TYPE' , 'FLAGS' , 'SCHEDULER'

DEFINE	QUEUES,<

	LSTOF.

	X	INP,QNTSIZ,.QHTIP,0,S$INPT,LIQBAT
	X	LPT,QNTSIZ,.QHTOU,0,S$LPT,LIQLPT
	X	PTP,QNTSIZ,.QHTOU,0,S$PTP,LIQPTP
	X	CDP,QNTSIZ,.QHTOU,0,S$CDP,LIQCDP
	X	PLT,QNTSIZ,.QHTOU,0,S$PLT,LIQPLT
	X	RET,QNTSIZ,.QHTAR,QH.INV,S$RET,LIQRET
	X	NOT,QNTSIZ,.QHTAR,QH.INV,S$NOT,0
	X	BIN,QNTSIZ,.QHTIP,QH.INV,S$BIN,0
	X	DBM,QNTSIZ,.QHFRR,QH.INV,S$DBM,0
	X	RDR,QNTSIZ,.QHFRR,0,S$RDR,0
	X	SPL,SPLSIZ,.QHTQS,QH.INV,0,0
	X	PSB,PSBSIZ,.QHTQS,QH.INV,0,0
	X	OBJ,OBJSIZ,.QHTQS,QH.INV,0,0
	X	USE,USESIZ,.QHTQS,QH.INV,0,0
	X	STR,STRSIZ,.QHTQS,QH.INV,0,0
	X	NET,NETSIZ,.QHTQS,QH.INV,0,0

	LSTON.>  ;END OF DEFINE QUEUES

	;DEFINE THOSE QUEUES WHICH ARE DEVICES.

DEFINE	DEVQUE,<
	X	BAT
	X	LPT
	X	CDP
	X	PTP
	X	PLT
	X	MNT
	X	RET
> ;END OF DEVICE QUEUES MACRO

	MAX	<QNTSIZ>	;INCLUDE ANY QUEUE THAT CAN HAVE AFTER OR INUSE
USESIZ==MAXSIZ			;DEFINE LARGEST ENTRY IN USE QUEUE
RDESIZ==MAXSIZ		;DEFINE LARGEST ENTRY IN RDE QUEUE


DEFINE	QUEHDR,<  ;MACRO TO GENERATE THE QUEUE HEADERS FROM THE QUEUES MACRO
	DEFINE	X(A,B,C,D,E,F),<	;DEFINE X FOR THE LATER EXPANSION OF QUEUES
HDR'A::	INSVL.(<SIXBIT\   A\>,QH.NAM)!INSVL.(C,QH.TYP)!D
	EXP	0
	IFDIF	<E> <0> ,<GLOB(E)>
	XWD	E,INSVL.(B,QH.SIZ)
	EXP	F
	EXP	0
	>  ;END OF DEFINE X
	QUEUES			;NOW EXPAND QUEUES
>  ;END OF DEFINE QUEHDR
	SUBTTL	MTCON MOUNT STRUCTURES

	;MOUNT REQUEST (SENT BY USER TO QUASAR)

;	!=======================================================!  /+\
;	\                                                       \   !
;	\                  THE MESSAGE HEADER                   \   !
;	\                                                       \   !
;	!=======================================================!   !
;	!        FLAGS THAT APPLY TO THE ENTIRE MESSAGE         !   !
;	!-------------------------------------------------------!   LM
;	!             SIXBIT NAME OF MOUNT REQUEST              !   !
;	!-------------------------------------------------------!   !
;	!        MOUNT ENTRY COUNT (MUST BE 1 FOR RLS 4)        !   !
;	!=======================================================!   !
;	!                 -----  TOPS 10  -----                 !   !
;	!                                                       !   !
;	!-------------------------------------------------------!   !
;	!                   SIXBIT USER NAME                    !   !
;	!                       (2 WORDS)                       !   !
;	!-------------------------------------------------------!   !
;	!                                                       !   !
;	\                  USER ACCOUNT STRING                  \   !
;	\                       IN ASCIZ                        \   !
;	\                      (10 WORDS)                       \   !
;	!                                                       !   !
;	!=======================================================!  \./

        PHASE MSHSIZ
.MMFLG:! BLOCK  1               ;FLAG WORD FOR MOUNT MESSAGE
	MM.WAT==1B0		;USER IS WAITING FOR IPCF ACK WHEN DONE
	MM.NOT==1B1		;USER WANTS NOTIFICATION VIA TRMOP.
	MM.DLC==1B2		;(DISMOUNT/DEALLOCATE ONLY) DEALLOCATE, NOT DISMOUNT
	MM.REM==1B3		;(DISMOUNT/DEALLOCATE ONLY) /REMOVE WAS TYPED
	MM.GFR==1B4		;INTERNAL USE ONLY (MSG SENT BY [SYSTEM]GOPHER)
.MMNAM:! BLOCK  1               ;SIXBIT NAME OF MOUNT REQUEST
.MMARC:! BLOCK  1               ;ARGUMENT COUNT FOR MOUNT MESSAGE

TOPS10 <
.MMUSR:! BLOCK	EQNMSZ		;SIXBIT USER NAME
.MMUAS:! BLOCK	10		;ASCIZ USER ACCOUNT STRING
>

.MMHSZ:!                        ;SIZE OF MOUNT MESSAGE HEADER
        DEPHASE
	SUBTTL	MOUNT REQUESTS (WITHIN THE MESSAGE)

;!=======================================================!  /+\
;!     ENTRY LENGTH (LE)     !         TYPE CODE         !   !
;!-------------------------------------------------------!   !
;!                REQUEST-SPECIFIC FLAGS                 !   !
;!-------------------------------------------------------!   !
;!                    SUBENTRY COUNT                     !   !
;!-------------------------------------------------------!   !
;!                     SUBENTRY # 1                      !   !
;!-------------------------------------------------------!   LE
;!                     SUBENTRY # 2                      !   !
;!-------------------------------------------------------!   !
;!                           .                           !   !
;!                           .                           !   !
;!                           .                           !   !
;!-------------------------------------------------------!   !
;!                     SUBENTRY # n                      !   !
;!=======================================================!  \./


        PHASE 0
.MEHDR:! BLOCK  1               ;MOUNT ENTRY HEADER WORD
	 .MNUNK==0		  ;Unknown Mount request type
	  .MNTTP==1		  ;Tape Mount Request Code
	  .MNTST==2		  ;Disk Mount Request Code
	  .DSMST==3		  ;Disk Dismount Request Code
.MEFLG:! BLOCK  1               ;FLAG WORD FOR ENTRY
;	(See below for bit definitions)

.MECNT:! BLOCK  1               ;SUBENTRY COUNT
.MEHSZ:!                        ;SIZE OF HEADER
        DEPHASE


;  The argument block is defined in GLXMAC under General Message Format.
;  Refer there for latest information.

;        PHASE 0
;ARG.HD:! BLOCK  1               ;SUBENTRY HEADER WORD
;        AR.LEN=-1,,0            ;LENGTH OF SUBENTRY
;        AR.TYP=0,,-1            ;TYPE OF SUBENTRY
;ARG.DA:!                        ;START OF DATA AREA
;        DEPHASE
	SUBTTL	TAPE MOUNT REQUEST BLOCKS

	.MDINV==0		;BLOCK TYPE 0 IS INVALID

	.TMDEN==1		;MAG TAPE DENSITY CODE

;	!-------------------------------------------------------!
;	!	2		!	.TMDEN			!
;	!-------------------------------------------------------!
;	!		The Tape Density Code			!
;	!-------------------------------------------------------!

	SYSPRM	(.TFD00,.TFD00,0)	;SYSTEM DEFAULT
	SYSPRM	(.TFD20,.TFD20,.SJDN2)	; 200 BPI
	SYSPRM	(.TFD55,.TFD55,.SJDN5)	; 556 BPI
	SYSPRM	(.TFD80,.TFD80,.SJDN8)	; 800 BPI
	SYSPRM	(.TFD16,.TFD16,.SJD16)	;1600 BPI
	SYSPRM	(.TFD62,.TFD62,.SJD62)	;6250 BPI

	.TMDRV==2		;MAG TAPE DRIVE TYPE

;	!-------------------------------------------------------!
;	!	2		!	.TMDRV			!
;	!-------------------------------------------------------!
;	!		.TMDR9 or .TMDR7			!
;	!-------------------------------------------------------!

		.TMDR9==1	;Nine Track Drive
		.TMDR7==2	;Seven Track Drive
		.TMDMX==2	; ?


	.TMLT==3		;Mag TAPE LABEL TYPE

;	!-------------------------------------------------------!
;	!	2		!	.TMLT			!
;	!-------------------------------------------------------!
;	!	.LTUNL or .LTANS or .LTEBC or .LTT20		!
;	!-------------------------------------------------------!

	SYSPRM	(%TFLBP,.TFLBP,-1)	;BYPASS
	SYSPRM	(%TFANS,.TFLAL,.LTANS)	;ANSII
	SYSPRM	(%TFEBC,.TFLIL,.LTEBC)	;EBCDIC (IBM)
	SYSPRM	(%TFUNL,.TFLNL,.LTUNL)	;UNLABELED
	SYSPRM	(%TFT20,-1,.LTT20)	;TOPS20
	SYSPRM	(%TFUNV,.TFLNV,-1)	;UNLABELED USER-EOV
	SYSPRM	(%TFMIN,.TFLBP,.LTUNL)	;MINIMUM LABEL TYPE
	SYSPRM	(%TFMAX,.TFLNV,.LTT20)	;MAXIMUM LABEL TYPE


	.TMSET==4		;MAG TAPE SET NAME

;	!-------------------------------------------------------!
;	!	2		!	.TMSET			!
;	!-------------------------------------------------------!
;	!		sixbit Volume Set Name			!
;	!-------------------------------------------------------!


	;CONTINUED ON THE NEXT PAGE
	;CONTINUED FROM THE PREVIOUS PAGE

	.TMRMK==5		;Asciz Remark for the Operator

;	!-------------------------------------------------------!
;	!	length		!	.TMRMK			!
;	!-------------------------------------------------------!
;	\							\
;	\		An Asciz remark for the OPR		\
;	\							\
;	!-------------------------------------------------------!


	.TMSTV==6		;Mag Tape Starting Volume

;	!-------------------------------------------------------!
;	!	2 or 3		!	.TMSTV			!
;	!-------------------------------------------------------!
;	!		Index into Volume set if length = 2	!
;	!-------------------------------------------------------!
;	!	Sixbit volume Id (Length = 3 & word 2 = 0)	!
;	!-------------------------------------------------------!



	.TMVOL==7		;Volume List

;	!-------------------------------------------------------!
;	!	Length		!				!
;	!-------------------------------------------------------!
;	\							\
;	\		Sixbit list of volumes			\
;	\							\
;	!-------------------------------------------------------!


	.TMVPR==10		;Volume Protection code For new volumes

;	!-------------------------------------------------------!
;	!	2		!	.TMVPR			!
;	!-------------------------------------------------------!
;	!	0		!	Protection Code		!
;	!-------------------------------------------------------!


	;CONTINUED ON THE NEXT PAGE
	;CONTINUED FROM THE PREVIOUS PAGE

	.TMINI==11		;Volume Initialization Parms

;	!-------------------------------------------------------!
;	!	2 or 3		!	.TMINI			!
;	!-------------------------------------------------------!
;	!		Tape Label Type				!
;	!-------------------------------------------------------!
;	!		User Number (Optional)			!
;	!-------------------------------------------------------!


	.SMNAM==12		;Disk Structure Name in sixbit

;	!-------------------------------------------------------!
;	!	2		!	.SMNAM			!
;	!-------------------------------------------------------!
;	!		Sixbit Structure Name			!
;	!-------------------------------------------------------!


	.SMALI==13		;Disk Structure Alias Name in sixbit

;	!-------------------------------------------------------!
;	!	2		!	.SMALI			!
;	!-------------------------------------------------------!
;	!		Sixbit Structure Alias			!
;	!-------------------------------------------------------!



	.TMLNM==14		;VOLUME SET LOGICAL NAME

;	!-------------------------------------------------------!
;	!	2		!	.TMLNM			!
;	!-------------------------------------------------------!
;	!		The Logical Volume Set name		!
;	!-------------------------------------------------------!



	.TMEXP==15		;VOLUME SET EXPIRATION DATE/TIME

;	!-------------------------------------------------------!
;	!	2		!	.TMEXP			!
;	!-------------------------------------------------------!
;	!		Expiration date time in UDT		!
;	!-------------------------------------------------------!

	%MDMAX==15		;Maximum block number allocated
	SUBTTL	.MEFLG BIT DEFINITIONS


;The following flags may be
;present in the .MEFLG word of a tape-mount request:

;FLAG  BIT     MEANING
;----  ---     -------
TM%SCR==1B0      ; Request to access temporary volume set.
                 ; Implies TM%NEW, TM%NOV, TM%WEN
                 ; TM%OSV is ignored if set
TM%NEW==1B1      ; Creating new volume set.
                 ; Implies TM%NOV, TM%WEN
TM%VFY==1B2      ; Verify that user-supplied setname
                 ; matches setname of volume(s) being mounted.
                 ; Meaningful for labeled tapes only.
TM%OSV==1B3      ; Operator will be asked to key in list of
                 ; volume identifiers.
TM%WEN==1B4      ; Volume(s) must be mounted write-enabled.
		 ;
TM%BYP==1B5      ; If label-type is unlabeled, bypass any label
                 ; security checks.
TM%NUL==1B6      ; Do not unload volumes at volume-switch or
                 ; when DISMOUNT TAPE command given.

SM%PAS==1B7	; Put structure in jobs passive search list

SM%EXC==1B8	; Request exclusive access

SM%DEF==1B9	; Defer mounting (reserved)

SM%NOC==1B10	; Don't allow creates on structure

TM%WLK==1B11	; User requested Write Locked Volumes

ME%ALC==1B12	; User requesting only allocation of these resources, not mount

SM%ARD==1B13	; Always recompute disk usage
	SUBTTL	MOUNT REQUEST

;                   TAPE MOUNT REQUEST
;          IPCF MESSAGE SENT FROM QUASAR TO MTCON
;!=======================================================!
;!   MESSAGE LENGTH (512)    !   MESSAGE TYPE (.QOMNT)   !
;!-------------------------------------------------------!
;!           FLAGS           !       SIXBIT SUFFIX       !
;!-------------------------------------------------------!
;!                  ACKNOWLEDGMENT CODE                  !
;!=======================================================!
;!                                                       !
;\      UNMODIFIED USER IPCF MESSAGE (MINUS HEADER)      \
;!                                                       !
;!-------------------------------------------------------!
;!                                                       !
;\                           0                           \
;!                                                       !
;!-------------------------------------------------------!
;!               INTERNAL TASK NAME (ITN)                !
;!-------------------------------------------------------!
;!                      USER'S PID                       !
;!-------------------------------------------------------!
;!             SIZE OF USER'S MOUNT MESSAGE              !
;!-------------------------------------------------------!
;!         ACK CODE FROM USER'S MESSAGE HANDLER          !
;!-------------------------------------------------------!
;!                  USER'S USER NUMBER                   !
;!-------------------------------------------------------!
;!              USER'S ENABLED CAPABILITIES              !
;!-------------------------------------------------------!
;!                                                       !
;\              USER'S ASCIZ ACCOUNT STRING              \
;!                                                       !
;!=======================================================!

	PHASE	762
.MMUMX:!                        ;MAXIMUM LENGTH OF USER MOUNT MESSAGE
.MMITN:! BLOCK  1               ;INTERNAL TASK NAME ASSIGNED BY QUASAR
.MMPID:! BLOCK  1               ;USER'S PID
.MMUMS:! BLOCK  1               ;SIZE OF USER'S MOUNT MESSAGE
.MMUCD:! BLOCK  1               ;ACK CODE FROM USER'S MESSAGE HEADER
.MMUNO:! BLOCK  1               ;USER'S USER NUMBER
.MMCAP:! BLOCK  1               ;USER'S ENABLED CAPABILITIES
.MMACT:! BLOCK  10              ;USER'S ASCIZ ACCOUNT STRING
        DEPHASE
	SUBTTL	Response to User Tape Mount Request

;After the user process has sent an IPCF message  to  QUASAR  to
;request  a  tape  mount, it will typically wait for a response,
;which will be sent when:
;     1.  QUASAR finds an error while parsing and validating the
;         user request;  the request is aborted.
;     2.  MTCON encounters  a  problem  trying  to  satisfy  the
;         request;  the request is aborted.
;     3.  MTCON  mounts  the  first  volume   of   the   request
;         successfully;   the  response  indicates  a successful
;         mount.

;The mount response message sent by MTCON or QUASAR to the  user
;will have the following format:

;!=======================================================!
;!      MESSAGE LENGTH       !   MESSAGE TYPE (.QOMNA)   !
;!-------------------------------------------------------!
;!           FLAGS           !       SIXBIT SUFFIX       !
;!-------------------------------------------------------!
;!     ACKNOWLEDGMENT CODE FROM USER'S MOUNT REQUEST     !
;!=======================================================!
;!                 FLAGS (NONE DEFINED)                  !
;!-------------------------------------------------------!
;!                      ENTRY COUNT                      !
;!-------------------------------------------------------!
;!                        ENTRY 1                        !
;!-------------------------------------------------------!
;!                           .                           !
;!                           .                           !
;!                           .                           !
;!-------------------------------------------------------!
;!                        ENTRY n                        !
;!=======================================================!


	;DEFINE THE MESSAGE TYPE

	.QOMNA==1		;TAPE MOUNT REQUEST ANSWER


;Either of two responses is conveyed:
;     1.  The request was completed successfully.  The  response
;         contains one .MNRDV and one .MNRTX.
;     2.  The request was aborted.  The  response  contains  one
;         .MNREC and possibly one .MNRTX.
	SUBTTL	MOUNT RESPONSES

;Mount response entry formats are described below:

	.MNREC==2		;Error Code

;     !=======================================================!
;     !        LENGTH (2)         !          .MNREC           !
;     !-------------------------------------------------------!
;     !             0             !    TOPS-20 ERROR CODE     !
;     !=======================================================!

	.MNRDV==1		;Device block

;     !=======================================================!
;     !      LENGTH (2 OR 3)      !          .MNRDV           !
;     !-------------------------------------------------------!
;     !           VOLUME SET NAME OR STRUCTURE NAME           !
;     !-------------------------------------------------------!
;     !       MT DEVICE DESIGNATOR (TAPE REQUESTS ONLY)       !
;     !=======================================================!

	.MNRTX==3		;Asciz Text

;     !=======================================================!
;     !          LENGTH           !          .MNRTX           !
;     !-------------------------------------------------------!
;     !                                                       !
;     \                      ASCIZ TEXT                       \
;     !                                                       !
;     !=======================================================!

	.MNSDV==4		;Sixbit Structure Alias

;	!=======================================================!
;	!	LENGTH		!	   .MNSDV		!
;	!-------------------------------------------------------!
;	!	SIXBIT STRUCTURE NAME				!
;	!=======================================================!

	.MNRNM==5		;Sixbit Mount Request Name

;	!=======================================================!
;	!	LENGTH		1	   .MNRNM		!
;	!-------------------------------------------------------!
;	!	SIXBIT MOUNT REQUEST NAME			!
;	!=======================================================!
	SUBTTL	CANCELING TAPE MOUNT REQUESTS


;Response to User Cancel Request

;MTCON will send the following message to the user PID to convey
;the actions taken as a result of the cancel request:

;!=======================================================!
;!      MESSAGE LENGTH       !   MESSAGE TYPE (.QOMCA)   !
;!-------------------------------------------------------!
;!           FLAGS           !       SIXBIT SUFFIX       !
;!-------------------------------------------------------!
;!     ACKNOWLEDGMENT CODE FROM USER'S MOUNT REQUEST     !
;!=======================================================!
;!                 FLAGS (NONE DEFINED)                  !
;!-------------------------------------------------------!
;!                   ENTRY COUNT                         !
;!=======================================================!
	SUBTTL	ABORT MSG FROM QUASAR TO MTCON


	;THIS MESSAGE IS SENT BY QUASAR TO MTCON WHEN A USER
	;CANCELS 1 OR MORE OF HIS MOUNT REQUESTS


;!=====================================================	!
;!   MESSAGE LENGTH	!  MESSAGE TYPE (.QOMTA)	!
;!------------------------------------------------------!
;!	FLAGS		!	SUFFIX			!
;!------------------------------------------------------!
;!	    ACKNOWLEDGEMENT CODE			!
;!------------------------------------------------------!
;!		FLAG WORD (NONE)			!
;!------------------------------------------------------!
;!		ARGUMENT COUNT				!
;!------------------------------------------------------!
;!    ENTRY LENGTH	!   ENTRY TYPE (.MTPID)		!
;!------------------------------------------------------!
;!		    USERS PID				!
;!------------------------------------------------------!
;!    ENTRY LENGTH	!   ENTRY TYPE (.MTITN)		!
;!------------------------------------------------------!
;!		      ITN				!
;!------------------------------------------------------!
;!		      ITN				!
;!------------------------------------------------------!

;			ETC


;	THE MESSAGE BLOCK TYPES ARE:

	.MTPID==1	;USERS PID
	.MTITN==2	;A LIST OF ITN'S TO CANCEL
	SUBTTL	MOUNT RELEASE MESSAGE
;When  a  request  completes,  MTCON  notifies  the   user   (if
;appropriate)  and  sends  a  RELEASE message to QUASAR for that
;request.

;           RELEASE MESSAGE FROM MTCON TO QUASAR

;!=======================================================!
;!      MESSAGE LENGTH       !   MESSAGE TYPE (.QOREL)   !
;!-------------------------------------------------------!
;!           FLAGS           !       SIXBIT SUFFIX       !
;!-------------------------------------------------------!
;!                  ACKNOWLEDGMENT CODE                  !
;!=======================================================!
;!             INTERNAL TASK NAME OF REQUEST             !
;!=======================================================!




	;CHECKPOINT MESSAGE DEFINITIONS

	;THESE DEFINE THE OFFSETS INTO THE CHE.IN BLOCK OF THE
	;TAPE/DISK CHECKPOINT MESSAGE

	.MTSTA==0		;CHECKPOINT STATUS INFORMATION
	.MTVOL==1		;CHECKPOINT VOLUME INFORMATION
	  %VOLBL==0		;NO VOLUME PRESENT
	  %VOLSC==1		;SCRATCH VOLUME
	  			;WORD MAY ALSO CONTAIN A SIXBIT VOLUME ID
	.MTTYP==2		;CHECKPOINT VOLUME TYPE
				;SEE THE MOUNT REQUEST BLOCK CODES FOR TYPES
	SUBTTL	QUASAR TAPE MOUNT REQUEST QUEUE STRUCTURE

;	!=======================================================!
;	!		36 BIT USER ID				!
;	!-------------------------------------------------------!
;	/		ASCIZ USER NAME				/
;	/							/
;	!-------------------------------------------------------!
;	!	FLAGS		!	USERS JOB NUMBER	!
;	!-------------------------------------------------------!
;	!		SIXBIT REQUEST NAME			!
;	!-------------------------------------------------------!
;	/							/
;	/		USERS ASCIZ ACCOUNT STRING		/
;	/							/
;	!-------------------------------------------------------!
;	!		   USERS PID #				!
;	!-------------------------------------------------------!
;	!	# OF VSL'S	!	REQUEST ID		!
;	!-------------------------------------------------------!
;	/							/
;	/		POINTERS TO THE VOLUME			/
;	/		     SET LISTS				/
;	/							/
;	!-------------------------------------------------------!




		PHASE	0

	.MRUSR:! BLOCK	1	;36 BIT USER ID OR PPN (-10)
	.MRNAM:! BLOCK	EQNMSZ	;USER NAME (ASCIZ -20, SIXBIT -10)
	.MRJOB:! BLOCK	1	;CAPABILITIES (IPCF MDB.PV),,JOB NBR
	   BA%JOB==400000	;LIT IF THIS IS A BATCH ALLOCATION
				;   THEN THE 'JOB NBR' IS THE REQUEST ID
	.MRQEA:! BLOCK	1	;REQUESTS QE ADDRESS
	.MRNOD:! BLOCK	1	;NODE NAME WHERE USER IS LOCATED
	.MRTTY:! BLOCK	1	;TTY DATA WHERE USER IS LOCATED
	  MR.TRD==-1,,0		;TERMINAL DESIGNATOR
	  MR.TNO==0,,-1		;LINE NUMBER
	.MRACT:! BLOCK	10	;ASCIZ ACCOUNT STRING
	.MRPID:! BLOCK	1	;REQUESTORS PID
	.MRACK:! BLOCK	1	;USER ACK CODE
	.MRFLG:! BLOCK	1	;FLAG BITS FOR THIS MDR
	  MR.FLG==76B4		;Flag field
	  MR.WAT==1B0		;SENDER IS WAITING FOR IPCF ACK WHEN DONE
	  MR.NOT==1B1		;SENDER WANTS NOTIFICATION BY TRMOP.
	  MR.ACK==1B2		;WAITING FOR INITIAL ACK
	  MR.GFR==1B3		;REQUEST CREATED BY UUO ( [SYSTEM]GOPHER )
	  MR.DMO==1B4		;DISMOUNT (USED FOR TEXT FORMATTING)
	  MR.QUE==77B35		;OBJECT TYPE OF THE PSEUDO PROCESS (IF NEEDED)
	.MRLOG:! BLOCK	1	;UNIVERSAL TIME OF LOGIN
	.MRCNT:! BLOCK	1	; 0,,VOL SET COUNT
	  MR.CNT==0,,-1		  ;VOLUME SET COUNT IN THE RIGHT HALF
	  MR.LNK==-1,,0		  ;CURRENT VSL LINK CODE
	.MRVSL:! BLOCK	1	;POINTERS TO THE VOLUME SET LISTS (MINIMUM 1)

	MDRLEN:!		;MINIMUM MDR QUEUE LENGTH

		DEPHASE
	SUBTTL	VOLUME SET LIST (VSL) STRUCTURE

;	!-------------------------------------------------------!
;	!                    POINTER TO MDR                     !
;	!-------------------------------------------------------!
;	!                       FLAG WORD                       !
;	!-------------------------------------------------------!
;	!         # TRACKS          !          DENSITY          !
;	!-------------------------------------------------------!
;	!                    VOLUME SET NAME                    !
;	!-------------------------------------------------------!
;	/                                                       /
;	/                 USER'S ASCIZ REMARKS                  /
;	/                                                       /
;	!-------------------------------------------------------!
;	!        VOLUME SET LOGICAL NAME         !  PROTECTION  !
;	!-------------------------------------------------------!
;	!       VOLUME COUNT        !       VOLUME OFFSET       !
;	!-------------------------------------------------------!
;	!                POINTERS TO VOLUME LIST                !
;	!-------------------------------------------------------!

		PHASE	0

	.VSMDR:! BLOCK	1	;POINTER TO THE CONTROLLING MDR
	.VSFLG:! BLOCK	1	;MOUNT FLAG WORD
	   VS.SCR==1B1		  ;THIS IS A SCRATCH VOLUME SET
	   VS.NEW==1B2		  ;THIS IS A NEW VOLUME SET
	   VS.UAL==1B3		  ;USER ALLOCATED THIS VOLUME SET
	   VS.OPR==1B4		  ;OPR WILL BE ASKED FOR VOLUME SET LIST
	   VS.WLK==1B5		  ;0=WRITE ENABLED, 1=WRITE LOCKED
	   VS.REM==1B6		  ;USER REQUEST TO DISMOUNT THE STRUCTURE
	   VS.TYP==7B9		  ;VOLUME TYPE 1=TAPE, 2=STRUCTURE, 3=DECTAPE
	   VS.LBT==17B13	  ;VOLUME LABEL TYPE FOR LABEL PROCESSING
	   VS.VSW==1B14		  ;VOLUME SWITCH IN PROGRESS
	   VS.ALC==1B15		  ;VOLUME SET IS IN ALLOCATION STATE
	   VS.WAL==1B16		  ;VOL SET IS WAITING FOR DEVICE ALLOCATION
	   VS.CLM==1B17		  ;RESOURCES FOR THIS VSL ARE CLAIMED
	   VS.PAS==1B18		  ;(DISK) PUT IN PASSIVE 1/2 OF SEARCH LIST
	   VS.NOC==1B19		  ;(DISK) DON'T DO CREATES ON THIS STR
	   VS.SIN==1B20		  ;(DISK) SINGLE ACCESS
	   VS.NMT==1B21		  ;VOLUME SET MOUNTED FOR A PSEUDO PROCESS
	   VS.ABO==1B22		  ;REQUEST CANCELLED BY THE OPERATOR
	   VS.REL==1B23		  ;USER SPECIFIED A REEL ID FOR THIS REQUEST
	   VS.CTL==1B24		  ;THIS REQUEST IS PART OF PSEUDO PROCESS ALLOC
	   VS.ARD==1B25		  ;ALWAYS RECOMPUTE DISK USAGE
	.VSATR:! BLOCK	1	;MOUNT REQUEST DEVICE ATTRIBUTES
	   VS.PRT==777B8	  ;PROTECTION CODE
	   VS.DEN==7B20		  ;VOLUME DENSITY STATUS
	   VS.TRK==7B23		  ;VOLUME TRACK STATUS
	   VS.RSN==77B29	  ;REQUESTED RESOURCE TYPE
	   VS.DDN==1B34		  ;DENSITY STATUS IS DEFAULTED
	   VS.DTK==1B35		  ;TRACK STATUS IS DEFAULTED
	.VSRID:! BLOCK	1	;VOLUME SET REQUEST ID
	   VS.RID==-1,,0	  ;VOLUME SET REQUEST ID
	   VS.LNK==0,,-1	  ;VOLUME SET REQUEST LINK
	.VSVSN:! BLOCK	VSNLEN	;ASCIZ VOLUME SET NAME
	.VSTXT:! BLOCK	1	;TEXT POINTER FOR USER ACKS
	   VS.LEN==-1,,0	  ;TEXT BLOCK LENGTH
	   VS.ADR==0,,-1	  ;TEXT BLOCK ADDRESS
	.VSREM:! BLOCK	^D12	;ASCIZ USER REMARKS (59 CHARS MAX)
	.VSCRE:! BLOCK	1	;REQUEST CREATION TIME
	.VSSCH:! BLOCK	1	;REQUEST SCHEDULED TIME
	.VSLNM:! BLOCK	1	;VOLUME SET LOGICAL NAME (-10 ONLY)
	.VSUCB:! BLOCK	1	;POINTER TO LAST DEVICE ALLOCATED TO THIS VSL
	.VSCVL:! BLOCK	1	;VOL COUNT,,OFFSET TO THE CURRENT VOLUME
	   VS.OFF==0,,777000	  ;OFFSET TO THE CURRENT VOLUME
	   VS.CNT==-1,,0	  ;VOLUME COUNT
	.VSVOL:! BLOCK	2	;Pointers to the volume list
;Following the volume list pointers is the sixbit name of the first volume.
;This is used by INFORMATION MOUNT/ALL

	VSLLEN:!		;MINIMUM LENGTH OF A VSL

		DEPHASE
	SUBTTL	VOLUME LIST STRUCTURE (VOL)



;	!-------------------------------------------------------!
;	!		  SIXBIT VOLUME NAME			!
;	!-------------------------------------------------------!
;	!		      OWNER PPN  			!
;	!-------------------------------------------------------!
;	!		VOLUME FLAG BITS			!
;	!-------------------------------------------------------!
;	!       MOUNT COUNT         !       OWNER OFFSET        !
;	!-------------------------------------------------------!
;	!		POINTER TO THE UCB			!
;	!-------------------------------------------------------!
;	/							/
;	/		POINTER(S) TO THE VSL(S)                /
;	/							/
;	!-------------------------------------------------------!

		PHASE	0

	.VLNAM:! BLOCK	1		;VOLUME NAME (STRUCTURE NAME OR VOL ID)
	.VLVID:! BLOCK	1		;INTERNAL VOLUME ID FOR STRUCTURES
	.VLOID:! BLOCK	1		;OWNER PPN OR USER ID
	.VLMTM:! BLOCK	1		;VOLUME MOUNT TIME
	.VLFLG:! BLOCK	1		;VOLUME FLAG BITS
	   VL.STA==7B2			  ;VOLUME STATUS
	     %STAWT==0			    ;VOLUME IS WAITING
	     %STAAB==1			    ;VOLUME USE HAS BEEN ABORTED
	     %STAMN==2			    ;VOLUME IS MOUNTED
	     %STADM==3			    ;VOLUME IS TO BE DISMOUNTED
	   VL.SCR==1B3			  ;VOLUME IS A SCRATCH VOLUME
	   VL.SHR==1B4			  ;VOLUME IS TO BE SHARED (DISK ONLY)
	   VL.DEN==7B7			  ;VOLUME DENSITY
	   VL.LBT==17B11		  ;VOLUME LABEL TYPE
	   VL.LUN==7B14			  ;STRUCTURE LOGICAL UNIT NUMBER
	   VL.REM==1B15			  ;REMOVE THE STRUCTURE ON DISMOUNT
	   VL.LCK==3B17			  ;VOLUME LOCK STATUS
	     %UNLCK==0			     ;NOT LOCKED
	     %LOCKD==1			     ;LOCKED
	     %LOCKP==2			     ;UNLOCKED, LOCK PENDING
	     %ULCKP==3			     ;LOCKED, UNLOCK PENDING
	   VL.SRD==1B18			;SET REQUESTED DENSITY FOR USER
	   VL.RSN==777B35		;VOLUME RESOURCE NUMBER
	   VL.FLG==-1,,777000		;FLAG AREA MASK (NOT INCLUDING RSN)
	.VLLTM:! BLOCK	1	 	;VOLUME LOCK OR UNLOCK TIME (UDT)
	.VLOWN:! BLOCK	1		;COUNT OF REQUESTORS,,OFFSET TO OWNER
	   VL.CNT==-1,,0		  ;NUMBER OF REQUESTORS FOR THIS VOLUME
	.VLUCB:! BLOCK	1		;POINTER TO THE UCB
	.VLPTR:! BLOCK	1		;BACK,,FORWARD PTRS TO MULTIPLE VOL STRS
	   VL.PRV==-1,,0		  ;ADDR OF PREVIOUS VOLUME BLOCK IN STR
	   VL.NXT==0,,-1		  ;ADDR OF NEXT VOLUME BLOCK IN STR
	.VLSTR:! BLOCK	1		;VOLUME STRUCTURE NAME
	.VLNXT:! BLOCK	1		;SIXBIT VOL NAME OF NEXT VOL IN STR
	.VLVSL:! BLOCK	1		;POINTER(S) TO THE VSL(S)
	   VL.ASN==1B0			  ;FLAG BIT INDICATING THAT VOL IS
					  ;   ASSIGNED BY THE USER
	   VL.ASK==1B1			  ;FLAG BIT INDICATING THAT VOL
					  ;   ASSIGNMENT HAS BEEN REQUESTED
	   VL.OWN==1B2			  ;FLAG BIT INDICATING THE VOLUME WAS
					  ;    OWNED BY THE USER AT SOME TIME
	   VL.AAS==1B3			  ;STRUCTURE ALREADY ASSIGNED

	VOLLEN:!			;MINIMUM VOLUME ENTRY LENGTH

		DEPHASE
	SUBTTL	UNIT CONTROL BLOCK STRUCTURE


;	!===============================================================!
;	!		    Device Name (Sixbit)			!
;	!---------------------------------------------------------------!
;	!		    Device Status Bits				!
;	!---------------------------------------------------------------!
;	!		     User Mount Count				!
;	!---------------------------------------------------------------!
;	!		      Volume Pointer				!
;	!===============================================================!



		PHASE	0

	.UCBNM:! BLOCK	1		;UNIT/DEVICE NAME IN SIXBIT
	.UCBAU:! BLOCK	1		;ALTERNATE UNIT FOR DUAL PORTED SYSTEMS
	.UCBST:! BLOCK	1		;DEVICE STATUS BITS
	    UC.SEL==1B0			  ;UNIT IS SELECTED (USED FOR OPR NOT)
	    UC.200==1B2			  ;DEVICE SUPPORTS 200 BPI
	    UC.556==1B3			  ;DEVICE SUPPORTS 556 BPI
	    UC.800==1B4			  ;DEVICE SUPPORTS 800 BPI
	    UC.1600==1B5		  ;DEVICE SUPPORTS 1600 BPI
	    UC.6250==1B6		  ;DEVICE SUPPORTS 6250 BPI
	    UC.AVR==1B7			  ;AVR BIT 1=ENABLED
	    UC.WLK==1B8			  ;UNIT WRITE LOCKED 1=LOCKED
	    UC.OFL==1B9			  ;UNIT IS OFFLINE 1=OFFLINE
	    UC.DVT==17B13		  ;UNIT DEV TYPE (%TAPE, %DISK, %DTAPE)
	    UC.KTP==7B16		  ;UNIT CONTROLLER TYPE
	    UC.AVA==1B17		  ;UNIT IS AVAILABLE FOR USE BY MDA
	    UC.VSW==1B18		  ;UCB IS IN VOLUME SWITCH STATE
	    UC.UTP==3B20		  ;UNIT TYPE (DEPENDS ON UC.KTP)
	    UC.SHR==1B21		  ;UNIT CAN BE SHARED
	    UC.RSN==777B30		  ;UNIT RESOURCE NUMBER
	    UC.SWP==1B31		  ;UNIT HAS SWAP SPACE ON IT
	    UC.INI==1B32		  ;UNIT IS INITIALIZING
	    UC.TRK==3B34		  ;TRACK STATUS 1=7TRK, 2=9TRK
	      %TRK7==1			      ; 7 TRACK
	      %TRK9==2			      ; 9 TRACK
	.UCBCN:! BLOCK	1		;USER MOUNT COUNT
	.UCBVL:! BLOCK	1		;PTR TO VOLUME MOUNTED ON THIS DEVICE
	.UCBVS:! BLOCK	1		;POINTER TO THE VSL WHICH OWNS THIS UCB

	UCBLEN:!			;A UCB LENGTH

		DEPHASE

	;DEVICE AND RESOURCE TYPE DESCRIPTIONS

	     %UNKN==0		    ;THIS IS AN UNKNOWN MOUNT REQUEST
	     %ZER1==%UNKN	    ;THIS IS A 'NO LEVEL' RESOURCE
	     %TAPE==1		    ;THIS IS A TAPE MOUNT REQUEST
	     %DISK==2		    ;THIS IS A STRUCTURE MOUNT REQUEST
	     %DTAP==3		    ;THIS IS A DECTAPE MOUNT REQUEST
	     %DSMT==4		    ;THIS IS A DISMOUNT REQUEST
	     %STRC==5		    ;THIS IS A STRUCTURE
	     %TVOL==6		    ;THIS IS A TAPE VOLUME RESOURCE
	     %DTVOL==7		    ;THIS IS A DEC-TAPE VOLUME RESOURCE
	     %HLR1==%STRC	    ;THIS IS A HIGHER LEVEL RESOURCE
	     %LLR1==%DISK	    ;THIS IS A LOWER LEVEL RESOURCE
	SUBTTL	ALLOCATION AND DEADLOCK AVOIDANCE MATRICES


	;'A' Matrix entry

		PHASE	0
	.AMNAM:! BLOCK	1		;ASCIZ RESOURCE NAME ADDRESS
	  AM.USE==1B0			;SLOT IN USE, (MUST BE SIGN BIT)
	  AM.PRM==1B1			;NAME STRING FROM PERMANENT A MATRIX
	  AM.PRR==1B2			;RESOURCE (STRUCTURE) IS 'PERMANENT'
					;AND WILL 'NEVER' BE REMOVED FROM SYSTEM
	  AM.NAM==RHMASK		;ADRS OF NAME STRING
	.AMSTA:! BLOCK	1		;ENTRY STATUS BITS (SAME AS .UCBST),,0
	  AM.DVT==UC.DVT		;MATRIX ENTRY TYPE (%TAPE, %DISK, ETC)
	.AMCNT:! BLOCK	1		;ENTRY COUNTS
	  AM.AVA==7777B11		;COUNT OF UNITS AVAILABLE
	  AM.ALO==7777B23		;COUNT OF UNITS ALLOCATED
	  AM.CLM==7777B35		;COUNT OF UNITS CLAIMED (OWNED)
	.AMDLK:! BLOCK 1		;SCRATCH WORD FOR USE DURING
					;DEADLOCK AVOIDANCE COMPUTATIONS
	AMALEN:!			;MATRIX ENTRY LENGTH
		DEPHASE

	MAXRES==3777			;MAXIMUM NUMBER OF A RESOURCE AVAILABLE
	SGNBIT==4000			;SIGN BIT FOR RESOURCE COUNTS

	;'A' Matrix Header

		PHASE	0
	.AMHDR:! BLOCK	1		;MATRIX HEADER
	   AM.LEN==-1,,0		;LENGTH IN LEFT HALF
	   AM.CNT==777B35		;HIGHEST INDEX CURRENTLY IN USE
	   AM.MCN==777B26		;# OF SLOTS IN THIS MATRIX (.GE. AM.CNT)
	.AMSPR:! BLOCK	AMALEN-.-.AMHDR ;SPARE HEADER WORDS
		DEPHASE


	;'B' & 'C' Matrix Entries


		PHASE	0
	.SMJOB:! BLOCK	1		;USERS JOB NUMBER 400000+RID FOR BATCH
	.SMFLG:! BLOCK	1		;ENTRY FLAG WORD
	  SM.IGN==400000,,0		;IGNORE THIS ENTRY
	  SM.CNT==0,,-1			;RESOURCE COUNT
	.SMDLK:! BLOCK	1		;DEADLOCK FLAG BITS AND SEQUENCE NUMBERS
	  SM.PLY==1B0			;ON IF THIS PROCESS HAS BEEN PLAYED
	  SM.DLK==1B1			;ON IF THIS PROCESS IS IN A DEADLOCK
	  SM.SEQ==RHMASK		;POSITION PLAYED INTO SAFE SEQUENCE
					;IF SM.PLY IS ON
	.SMRES==.-1			;RESOURCE # OFFSET (WITH BASE OF 1)
	  SM.RSN==-1,,0			;RESOURCE NUMBER
	  SM.CLM==0,,-1			;TOTAL CLAIMED
		BLOCK	2		;SPACE FOR 2 RESOURCE NUMBERS
	SMALEN:!			;MINIMUM ENTRY LENGTH
		DEPHASE
	SUBTTL  REQUEST FOR MOUNT ATTRIBUTES

;THIS IS A REQUEST TO QUASAR (ACTUALLY MTCON) FROM A USER TO RETURN
;ATTRIBUTES OF A MOUNTED DEVICE.  THE MESSAGE SENT BY THE USER
;CONTAINS ONLY THE HEADER AND THE DEVICE DESIGNATOR.  QUASAR
;ADDS THE PID AND CAPABILITIES WORDS AND PASSES THE MESSAGE TO
;MTCON, WHO THEN SENDS A REPLY TO THE USER'S PID.

;!=======================================================!
;!      MESSAGE LENGTH       !     MSG TYPE (.QOMAT)     !
;!-------------------------------------------------------!
;!                         FLAGS                         !
;!-------------------------------------------------------!
;!              USER'S ACKNOWLEDGMENT CODE               !
;!=======================================================!
;!                   DEVICE DESIGNATOR                   !
;!-------------------------------------------------------!
;!                      USER'S PID                       !
;!-------------------------------------------------------!
;!     USER CAPABILITIES     !        USER JOB #         !
;!=======================================================!

	PHASE MSHSIZ

.MATDV:! BLOCK	1		;DEVICE DESIGNATOR
.MATUS:!			;SIZE OF USER ATTRIBUTE REQUEST MESSAGE
.MATPD:! BLOCK	1		;USER'S PID
.MATCP:! BLOCK	1		;USER'S CAPABILITIES AND JOB NUMBER
.MATQS:! 			;SIZE OF QUASAR-TO-MTCON MESSAGE

	DEPHASE
	SUBTTL  RESPONSE TO REQUEST FOR MOUNT ATTRIBUTES

;!=======================================================!
;!      MESSAGE LENGTH       !   MESSAGE TYPE (.QOMAR)   !
;!-------------------------------------------------------!
;!                         FLAGS                         !
;!-------------------------------------------------------!
;!              USER'S ACKNOWLEDGMENT CODE               !
;!=======================================================!
;!                 FLAGS (NONE DEFINED)                  !
;!-------------------------------------------------------!
;!                      ENTRY COUNT                      !
;!-------------------------------------------------------!
;!                        ENTRY 1                        !
;!-------------------------------------------------------!
;!                           .                           !
;!                           .                           !
;!                           .                           !
;!-------------------------------------------------------!
;!                        ENTRY n                        !
;!=======================================================!


	;DEFINE THE MESSAGE TYPE

	.QOMAR==2		;TAPE MOUNT ATTRIBUTES ANSWER


;EACH ENTRY CONSISTS OF A 1-WORD HEADER (LENGTH IN LEFT HALF, TYPE
;IN RIGHT HALF) FOLLOWED BY THE ENTRY-SPECIFIC INFORMATION. THE
;FOLLOWING ENTRIES ARE RETURNED FOR MAGTAPE DEVICES:

;.TMVOL		LIST OF SIXBIT VOLIDS

;.TMSET		SIXBIT SETNAME

;.MATDD		DESIGNATOR OF MT DEVICE

.MATDD==100
SUBTTL  The ARCHIVE Message - Function 41 (sent by IPCC)

TOPS20 <

	PHASE 0
ARC.HD:!BLOCK	1		; Header

ARC.FN:!BLOCK	1		; Function and reason for message
	AR.FNC==0,,-1		; Function code
	AR.MOD==-1,,0		; Function modifier (reason)

ARC.PR:!BLOCK	1		; Protection of file
	AR.PRT==0,,-1		; LH is unused

ARC.T1:!BLOCK	1		; Tape ID #1

ARC.N1:!BLOCK	1		; Further tape #1 info
	AR.TSN==-1,,0		; Tape saveset number
	AR.TFN==0,,-1		; Tape file number

ARC.T2:!BLOCK	1		; Tape ID #2

ARC.N2:!BLOCK	1		; Saveset and file nos. for tape #2

ARC.TT:!BLOCK	1		; TAD file written to tape

ARC.AS:!BLOCK	10		; Account string

ARC.FL:!			; File name begins here

ARC.SZ:!			; Minimum size of ARCHIVE msg

	DEPHASE

>  ;END TOPS20 CODE
;	BLOCK DEFINITIONS FOR MDA (MOUNT/DISMOUNT/ALLOCATE/DEALLOCATE)
;
;TAPE DENSITY BLOCK
.QBDEN==42
;	.QBLEN==0	;TAPE DENSITY BLOCK LENGTH
	.QBTDN==1	;TAPE DENSITY CODE (.TFDxx)
;TAPE TRACK BLOCK
.QBTRK==43
;	.QBLEN==0	;TAPE TRACK BLOCK LENGTH
	.QBDRV==1	;TAPE TRACK REQUEST CODE
	   .QBDR9==1	; WANT 9 TRACK DRIVE
	   .QBDR7==2	; WANT 7 TRACK DRIVE
;LABEL TYPE BLOCK
.QBLTP==44
;	.QBLEN==0	;LABEL TYPE BLOCK LENGTH
	.QBLAB==1	;LABEL TYPE CODE (See .TFxxx)
;REMARK BLOCK
.QBRMK==45
;	.QBLEN==0	;REMARK BLOCK LENGTH
	.QBREM==1	;START OF ASCIZ REMARK TO BE SENT TO OPERATOR
;TAPE VOLUME LIST BLOCK
.QBVOL==46
;	.QBLEN==0	;TAPE VOLUME LIST BLOCK LENGTH
	.QBVLS==1	;START OF LIST OF SIXBIT TAPE VOLUME IDS (MAX 63)
;VOLUME SET LOGICAL NAME BLOCK
.QBLNM==47
;	.QBLEN==0	;LOGICAL NAME BLOCK LENGTH (MUST BE 2)
	.QBLGN==1	;SIXBIT LOGICAL NAME FOR THIS VOLUME SET
;MOUNT/DISMOUNT FLAG BLOCK
.QBMFG==50
;	.QBLEN==0	;FLAG BLOCK LENGTH (MUST BE 2)
	.QBMDF==1	;MOUNT/DISMOUNT FLAG BITS
	  QB.PAS==1B0	;ADD STR TO PASSIVE SEARCH LIST (ACTIVE IS DEFAULT)
	  QB.EXC==1B1	;WANT EXCLUSIVE/SINGLE ACCESS (SHARE IS DEAFULT)
	  QB.NOC==1B2	;WANT /NOCREATE (CREATE IS DEFAULT)
	  QB.DSK==1B3	;THIS IS A STRUCTURE REQUEST (UNKNOWN IS DEFAULT)
	  QB.TAP==1B4	;THIS IS A TAPE REQUEST (UNKNOWN IS DEFAULT)
	  QB.WLK==1B5	;WANT VOLUME SET WRITE LOCKED
	  QB.WEN==1B6	;WANT VOLUME SET WRITE ENABLED
	  QB.REM==1B7	;ASK OPR TO REMOVE STR ON DISMOUNT
	  QB.SCR==1B8	;WANT SCRATCH TAPE
	END