	.TITLE     ***  BDABRT -- BATCH SYSTEM ERROR PROCESSOR

 

 

 

 

/

/ COPYRIGHT (C) 1976

/ DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.

/

/ THIS SOFTWARE IS FURNISHED UNDER A LICENSE FOR USE ONLY

/ ON A SINGLE COMPUTER SYSTEM AND MAY BE COPIED ONLY WITH

/ THE INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS

/ SOFTWARE, OR ANY OTHER COPIES THEREOF, MAY NOT BE PRO-

/ VIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON

/ EXCEPT FOR USE ON SUCH SYSTEM AND TO ONE WHO AGREES TO

/ THESE LICENSE TERMS.  TITLE TO AND OWNERSHIP OF THE

/ SOFTWARE SHALL AT ALL TIMES REMAIN IN DEC.

/

/ THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE

/ WITHOUT NOTICE AND SHOULD NOT BE CONSTRUED AS A COM-

/ MITMENT BY DIGITIAL EQUIPMENT CORPORATION.

/

/ DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY

/ OF ITS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.

/

	.TITLE DESCRIPTION AND EDIT HISTORY

 

 

 

 

/

/ BDABRT

/

/ BATCH SYSTEM ERROR PROCESSOR.  CALLED, WITH ERROR CODE IN

/ AC, ON ALL FATAL ERRORS.  THE FORM OF THE ERROR CODE IS AS

/ FOLLOWS:

/

/	-XXYY

/

/ THE ERROR CODE IS ALWAYS NEGATIVE AND REPRESENTED IN

/ OCTAL.  "XX" INDICATES WHICH MODULE DETECTED THE ERROR.

/ THE MODULE CODES ARE AS FOLLOWS:

/

/	1	BDRES

/	2	BDSLCT

/	3	BDOPEN

/	4	BDMSSG

/	5	BDSTRT

/	6	BDMAIN

/	7	BDDONE

/	10	BDLGOF

/	11	BDFINI

/

/ "YY" INDICATES THE SPECIFIC ERROR DETECTED BY THE

/ MODULE.

/

/ BDABRT PRINTS A MESSAGE OF THE FORM:

/

/	BATCH SYSTEM ERROR XXYY.

/

/ FOLLOWING THIS IT SCANS A MESSAGE TABLE (MSGTBL) FOR

/ A MESSAGE PECULIAR TO THE INDIVIDUAL ERROR CODE.  IF

/ A MESSAGE IS FOUND IN THIS TABLE, IT IS PRINTED FOLLOWING

/ THE STANDARD MESSAGE.

/

/ ALL MESSAGES ARE PRINTED ON THE OPERATOR TTY.  NORMALLY,

/ SCOM LOCATION BATWD WILL BE CLEARED AFTER THE MESSAGES

/ ARE PRINTED.  IF ANY ERROR IS DETECTED, HOWEVER, LOCATION

/ BATWD IS SET TO THE NEGATIVE ERROR CODE.  THIS CAUSES

/ ...OPR TO LATER REPORT THE ERROR.

/

 

 

 

/

/ 100	28-JUN-76 (EAG)		MULTIACCESS BATCH INITIAL

/				VERSION.

/

	.TITLE MISCELLANEOUS ASSEMBLY CONSTANTS & MACROS

 

 

 

 

/

/ NOTE:  THIS PROGRAM USES NO ASSEMBLY PARAMETERS.  ALL

/	 PARAMETERIZED VALUES ARE OBTAINED FROM THE

/	 RESIDENT SECTION VIA INITIALIZATION CODE.

/

 

 

 

/

/ INDIRECT-INDEXED INSTRUCTION MNEMONICS:

/

 

DACIX=DAC* X

DZMIX=DZM* X

LACIX=LAC* X

 

 

 

/

/ SPECIAL INSTRUCTIONS:

/

 

.INH=705522			/ INHIBIT INTERRUPTS.

.ENB=705521			/ ENABLE INTERRUPTS.

 

 

 

/

/ DEFINE MACRO TO EXIT FROM TASK:

/

 

	.DEFIN EXIT

	  CAL (10)

	.ENDM

 

 

 

/

/ MACRO TO DEFINE A TEXT BUFFER WITH CORRECT HEADER

/ WORD PAIR COUNT.

/

 

	.DEFIN TEXT TXT,?LBL

	  .NOLST

	  LBL-.*400+2

	  0

	  .ASCII TXT

LBL=.

	  .LST

	.ENDM

	.TITLE REFERENCES TO EXECUTIVE'S SCOM AREA

 

 

 

 

/

/ REENTRANT REGISTERS USED TO INTERFACE TO REENTRANT

/ ROUTINES:

/

 

R1=101

 

 

 

/

/ REENTRANT SYSTEM ROUTINE ENTRY POINTS:

/

 

NADD=107			/ ADD NODE IN R2 TO

				/ LISTHEAD IN R1.

 

PICK=120			/ PICK NODE FROM LISTHEAD

				/ IN R1, RETURN IN AC & R2.

 

 

 

/

/ POINTER TO BATCH CONTROL VECTOR (VECTOR IS LOCATED IN

/ THE RESIDENT SECTION).  THIS POINTER MUST BE ZEROED PRIOR

/ TO TASK EXIT.

/

 

BATWD=147

 

 

 

/

/ QUEUE LISTHEADS:

/

 

POOL=240			/ POOL OF EMPTY NODES.

 

 

 

/

/ ENTRY POINTS TO I/O HANDLER REENTRANT ROUTINES:

/

 

IOCD=345			/ ADJUST TRANFER PENDING

				/ COUNT OF I/O REQUEST IN R2.

	.TITLE NODE FORMAT DEFINITIONS

 

 

 

 

/

/ REFERENCES TO PDVL NODES:

/

 

D.QF=6				/ I/O REQUEST QUEUE LISTHEAD.

D.TG=10				/ TRIGGER EVENT VARIABLE

				/ ADDRESS (I.E. POINTER).

D.AI=11				/ ASSIGN INHIBIT FLAG IS SIGN

				/ BIT, PLUS OTHER FLAGS.

	.TITLE REFERENCES TO BDRES AND OTHER BATCH OVERLAYS

 

 

 

 

/

/ DEFINE ENTRY POINT TO THIS OVERLAY:

/

 

	.GLOBL BDABRT

 

 

 

/

/ DEFINE ENTRY POINTS TO ROUTINES IN RESIDENT SECTION:

/

 

	.GLOBL CTRL.Y		/ ROUTINE TO SIMULATE A ^Y.

 

 

 

/

/ REFERENCES TO CPB'S AND ASSOCIATED EVENT VARIABLES:

/

 

	.GLOBL TT.CPB,TT.EV	/ CPB TO PRINT LINE IN TT.BFR

				/ ON OPERATOR TTY.

 

 

 

/

/ REFERENCES TO WORDS CONTAINING LUN NUMBERS:

/

 

	.GLOBL IN.LUN		/ JOB FILE INPUT LUN.

 

	.GLOBL LP.LUN		/ LISTING OUTPUT LUN.

 

	.GLOBL TT.LUN		/ OPERATOR TTY LUN.

 

 

 

/

/ REFERENCES TO OTHER WORDS IN RESIDENT:

/

 

	.GLOBL PDVLND		/ ADDRESS OF BATCH'S PDVL NODE.

	.TITLE FLUSH -- SUBROUTINE TO FLUSH I/O REQUEST QUEUE

 

 

 

 

/

/ THIS SUBROUTINE ZEROS THE TRIGGER EVENT VARIABLE ADDRESS

/ IN BATCH'S PDVL NODE SO THAT NO MORE REQUESTS WILL BE

/ QUEUED, THEN REMOVES ALL REQUESTS IN THE QUEUE AND SETS

/ THEIR EVENT VARIABLES TO -103.  THIS MAKES THE BATCH

/ HANDLER APPEAR NON-RESIDENT (NOT IN CORE YET) AND

/ INDICATES THE APPROPRIATE ERROR TO ALL CURRENT AND FUTURE

/ I/O REQUESTS.

/

/ THIS SUBROUTINE ALSO SETS THE ASSIGN INHIBIT FLAG IN

/ BATCH'S PDVL NODE SO THAT NO ONE MAY ASSIGN TO THE BATCH

/ HANDLER.

/

/ CALLING SEQUENCE:

/	JMS FLUSH

/

/ REGISTERS ALTERED:

/	ALL

/

/ VALUES RETURNED:

/	NONE

/

 

 

FLUSH	0

	LAC* PDVLND		/ POINT XR TO PDVL NODE,

	PAX

	.INH			/// AVOID TIMING HACKS.

	DZMIX (D.TG)		/// THEN ZERO TRIGGER EV ADDR.

	LACIX (D.AI)		/// SET ASSIGN INHIBIT FLAG.

	RAL!STL			///

	RAR

	.ENB			///

	DACIX (D.AI)		///

FLSH.A	LAC* PDVLND		/ POINT R1 TO REQUEST QUEUE

	AAC D.QF		/ (IN PDVL NODE) FOR PICK.

	DAC* (R1)

	JMS* (PICK)		/ PICK FIRST REQUEST FROM QUEUE

	  JMP* FLUSH		/ QUEUE IS EMPTY -- RETURN TO

				/ CALLER.

	PAX			/ POINT XR TO REQUEST NODE.

	LACIX (6)		/ PICK UP EVENT VARIABLE ADDR.

	SZA			/ POINT XR TO EV OR TO FIRST

	PAX			/ WORD OF REQUEST NODE (IF NO

	LAW -103		/ EV), THEN SET EV TO -103.

	DACIX (0)

	JMS* (IOCD)		/ ADJUST TRANSFER PENDING

	LAC (POOL)		/ COUNT AND RETURN REQUEST

	DAC* (R1)		/ NODE TO FREE POOL.

	JMS* (NADD)

	JMP FLSH.A		/ AND GO FLUSH NEXT REQUEST.

	.TITLE BDABRT ENTRY POINT & CODING

 

 

 

 

/

/ COME HERE WITH NEGATIVE ERROR CODE NUMBER IN AC.

/ PRINT MESSAGES TO OPERATOR TTY, THEN EXIT.

/

 

 

BDABRT	0

	DAC ERRCOD		/ SAVE ERROR CODE.

/

	LAC* PDVLND		/ CHECK IF PDVL NODE HAS BEEN

	SZA!SMA			/ FOUND -- SKIP IF IT HASN'T.

	JMS FLUSH		/ FLUSH OUT ANY LINGERING

				/ REQUESTS.

	JMS* CTRL.Y		/ HELP LOGOUT THE BATCH USER.

/

	LAC ERRCOD		/ PICK UP ERROR CODE.

	CLL!TCA			/ MAKE IT POSITIVE.

	CLL

	CLQ!LRS+11		/ CONVERT OCTAL TO ASCII

	CLL!RAL!SNA		/ AND INSERT INTO MESSAGE.

	AAC 40-60*2

	TAD (122*200+40*200+60*2)

	DAC ERRMSG-1

	CLL!CLA

	LLS+3

	ALS+4

	LLS+3

	ALS+4

	TAD (60*200+60*20+6)

	DAC ERRMSG

	LACQ

	TAD (60*200+56*200+15*2)

	DAC ERRMSG+1

/

	LAC* TT.LUN		/ COPY LUN NUMBER TO CPB'S.

	DAC ATTACH+2

	DAC WRTERR+2

	DAC WRTMSG+2

	DAC DETACH+2

/

	CAL ATTACH		/ ATTACH OPERATOR TTY AND

	CAL WRTERR		/ WRITE ERROR MESSAGE.

/

	LAC* IN.LUN		/ CONVERT LUN NUMBER TO

	CLL			/ DECIMAL AND INSERT INTO

	IDIV			/ SPECIAL ERROR MESSAGE.

	  12

	MUL-13000

	  200

	DIV

	  12*200

	MUL-13000

	  10000

	LLS+4

	TAD (116*200+40*200+60*2)

	DAC LUN.IN+1

	LACQ

	TAD (60*200+60*20+04)

	DAC LUN.IN+2

/

	LAC* LP.LUN		/ CONVERT LUN NUMBER TO

	CLL			/ DECIMAL AND INSERT INTO

	IDIV			/ SPECIAL ERROR MESSAGE.

	  12

	MUL-13000

	  200

	DIV

	  12*200

	MUL-13000

	  10000

	LLS+4

	TAD (116*200+40*200+60*2)

	DAC LUN.LP+1

	LACQ

	TAD (60*200+60*20+04)

	DAC LUN.LP+2

/

	LAC* TT.LUN		/ CONVERT LUN NUMBER TO

	CLL			/ DECIMAL AND INSERT INTO

	IDIV			/ SPECIAL ERROR MESSAGE.

	  12

	MUL-13000

	  200

	DIV

	  12*200

	MUL-13000

	  10000

	LLS+4

	TAD (116*200+40*200+60*2)

	DAC LUN.TT+1

	DAC LUN.T1+1

	DAC LUN.T2+1

	LACQ

	TAD (60*200+60*20+04)

	DAC LUN.TT+2

	DAC LUN.T1+2

	DAC LUN.T2+2

/

	LAC* TT.EV		/ CONVERT TT.EV TO OCTAL

	CLL!TCA			/ NUMBER AND INSERT INTO

	LMQ!CLAC!LLS+3		/ SPECIAL ERROR MESSAGE.

	ALS+4

	TAD (55*200+60*20+06)

	DAC EV.TT1

	DAC EV.TT2

	CLAC!LLS+3

	ALS+4

	LLS+3

	ALS+4

	LLS+3

	CLL!RAL

	TAD (60*200+60*200+60*2)

	DAC EV.TT1+1

	DAC EV.TT2+1

	CLAC!LLS+3

	ALS+4

	LLS+3

	ALS+4

	TAD (60*200+60*20+01)

	DAC EV.TT1+2

	DAC EV.TT2+2

/

	LAC (MSGTBL)		/ SET UP MESSAGE TABLE SEARCH.

BDBR.A	SAD (MSGEND)		/ SEARCH MSGTBL FOR A MESSAGE

	JMP BDBR.C		/ PARTICULAR TO THIS ERROR.

	DAC MSGPTR

	LAC* MSGPTR

	ISZ MSGPTR

	SAD ERRCOD		/ FOUND THE MESSAGE?

	JMP BDBR.B		/ JMP IF YES -- PRINT IT.

	LAW 777000		/ ADVANCE POINTER PAST

	AND* MSGPTR		/ THE MESSAGE (A STANDARD

	SWHA			/ IOPS ASCII TEXT BUFFER)

	CLL!RAL			/ IN MSGTBL.

	TAD MSGPTR

	JMP BDBR.A

 

 

/ COME TO BDBR.B IF A MESSAGE IS FOUND IN MSGTBL.

/ COME TO BDBR.C IF NO MESSAGE IS FOUND.

 

BDBR.B	CAL WRTMSG		/ WRITE THE MESSAGE.

BDBR.C	CAL DETACH		/ DETACH THE OPERATOR TTY.

	CAL WAITFOR		/ WAIT FOR DETACH TO COMPLETE,

				/ WHICH IMPLIES ALL OTHER CPB'S

				/ HAVE ALSO COMPLETED.

/

	LAC EV.ATT		/ CHECK IF I/O ERROR HAS

	RAL			/ OCCURRED.  SET LINK IF AN

	LAC EV.ERR		/ ERROR HAS OCCURRED (WHICH

	SPA			/ IMPLIES THAT THE ERROR

	STL			/ MIGHT NOT HAVE BEEN PRINTED).

	LAC EV.MSG		/ CLEAR LINK IF NO ERRORS

	SPA			/ OCCURRED, WHICH IMPLIES THAT

	STL			/ THE MESSAGE WAS PRINTED.

	LAC EV.DET

	SPA

	STL

/

	SZL!CLA			/ SET BATWD TO ZERO IF ERROR

	LAC ERRCOD		/ MESSAGE WAS PRINTED, TO

	DAC* (BATWD)		/ ERROR CODE IF MESSAGE MIGHT

				/ NOT HAVE BEEN PRINTED (USED

				/ BY ...OPR).

/

	EXIT			/ EXIT.

 

 

 

/ CPB'S USED ABOVE:

 

 

ATTACH	2400			/ ATTACH OPERATOR TTY.

	EV.ATT

	0

 

EV.ATT	0

 

 

WRTERR	2700			/ WRITE "BATCH SYSTEM ERROR NNN."

	EV.ERR

	0

	2

	ERRBFR

 

EV.ERR	0

 

 

WRTMSG	2700			/ WRITE MESSAGE FROM MSGTBL.

	EV.MSG

	0

	2

MSGPTR	-1

 

EV.MSG	0

 

 

DETACH	2500			/ DETACH OPERATOR TTY.

	EV.DET

	0

 

EV.DET	0

 

 

WAITFOR	20			/ WAITFOR EVERYTHING TO FINISH.

	EV.DET

 

 

/ STANDARD ERROR MESSAGE:

 

ERRBFR	BFREND-.*400		/ (ASTERISKS WILL BE REPLACED

	0			/ WITH ERROR NUMBER).

	.ASCII "BATCH SYSTEM ERROR *"

ERRMSG	.ASCII "***."<15>

BFREND=. 

 

/ OTHER TEMPORARIES:

 

ERRCOD	0			/ PLACE TO SAVE ERROR CODE.

	.TITLE MSGTBL -- ERROR MESSAGE TABLE

 

 

 

/

/ TABLE OF ERROR MESSAGES SPECIFIC TO AN INDIVIDUAL ERROR

/ CODE NUMBER.  TABLE ENTRY CONSISTS OF ERROR CODE NUMBER

/ (NEGATIVE) IN FIRST WORD, FOLLOWED BY IOPS ASCII TEXT

/ BUFFER CONTAINING ERROR MESSAGE.  WORD PAIR COUNT OF

/ TEXT BUFFER IS USED TO LOCATE NEXT ENTRY IN TABLE.

/

 

MSGTBL	-101

	TEXT <"PDVL NODE NOT FOUND."<15>>

/

	-102

LUN.IN=.+2

	TEXT <"LUN NNN (INPUT LUN) MUST BE ASSIGNED TO NONE."<15>>

/

	-103

LUN.LP=.+2

	TEXT <"LUN NNN (LISTING LUN) MUST BE ASSIGNED TO NONE."<15>>

/

	-104

LUN.TT=.+2

	TEXT <"LUN NNN (OPERATOR TTY) MUST BE ASSIGNED TO A TTY."<15>>

/

	-105

LUN.T1=.+2

EV.TT1=.+22

	TEXT <"LUN NNN (OPERATOR TTY) I/O ERROR.  EV = -NNNNNN"<15>>

/

	-201

	TEXT <"BATCH REQUIRES AN 9K OR LARGER TDV PARTITION."<15>>

/

	-301

	TEXT <"ASSIGN FAILURE -- CANNOT ASSIGN LP."<15>>

/

	-303

	TEXT <"ASSIGN FAILURE -- LUN ALREADY ASSIGNED."<15>>

/

	-304

	TEXT <"DEASSIGN FAILURE -- LUN IS ATTACHED."<15>>

/

	-401

	TEXT <"OPERATOR TTY LUN IS ASSIGNED TO NONE."<15>>

/

	-501

	TEXT <"BATCH USER ALREADY LOGGED IN."<15>>

/

	-502

	TEXT <"LOGIN DEVICE NOT REQUESTED."<15>>

/

	-601

	TEXT <"TDV ABORTED LOGIN."<15>>

/

	-1101

	TEXT <"DEASSIGN FAILURE -- LUN IS ATTACHED."<15>>

/

	-1102

	TEXT <"CAN'T LOGOFF FROM TDV."<15>>

/

	-1103

LUN.T2=.+2

EV.TT2=.+22

	TEXT <"LUN NNN (OPERATOR TTY) I/O ERROR.  EV = -NNNNNN"<15>>

/

MSGEND=.

 

 

 

	.END
