	TITLE	'MDBS ERROR MESSAGE PROGRAM'
;PROGRAM
;		MDBS ERROR MESSAGE PROGRAM
;PROGRAMMER
;		ROBERT M. WHITE
;DATE WRITTEN
;		AUGUST 26, 1980
;(C)COPYRIGHT	1980,H & W COMPUTER SYSTEMS, INC.
;PURPOSE
;		THIS ROUTINE ISSUES AN MDBS ERROR MESSAGE BASED
;		ON THE PASSED RETURN CODE.
;REMARKS

ERRMSG	MACRO	MSG
	LOCAL	MSGBGN,MSGEND
	DB	MSGEND-MSGBGN		;;MESSAGE LENGTH
MSGBGN:
	DB	MSG			;;ACTUAL MESSAGE
MSGEND:
	ENDM

;		DO INITIALIZATION.
	NAME	'MDBSER'
ERMDBS:	CSEG
	PUBLIC	ERMDBS

;		GET THE MESSAGE #.
	MOV	E,M
	INX	H
	MOV	D,M
	INX	H
	XCHG
	MOV	A,M

;		IF MSG#=-1 THEN ISSUE SPECIAL MESSAGE.
	CPI	255		;IS IT 255?
	JNZ	NOT255		;...NO.
	LXI	H,PRM255	;POINT TO MESSAGE.
	JMP	PUTERR		;ISSUE IT.
	EXTRN	PUTERR
NOT255:

;		GET THE MESSAGE  AND ISSUE IT.
	ANI	07FH		;LIMIT TO 0-127.
	MOV	E,A		;DE = MESSAGE #
	MVI	D,0
	LXI	H,ERRPRM	;POINT TO PARM TABLE.
	DAD	D		;POINT TO ENTRY.
	DAD	D
	JMP	PUTERR		;ISSUE IT.
	EXTRN	PUTERR
	PAGE
;****************************************************************
;*			PROGRAM CONSTANTS			*
;****************************************************************

;		INPUT PARM.
	DSEG
ERRPRM:				;ERROR MESSAGE PTR TABLE
	DW	ERM000
	DW	ERM001
	DW	ERM002
	DW	ERM003
	DW	ERM004
	DW	ERM005
	DW	ERM006
	DW	ERM007
	DW	ERM008
	DW	ERM009
	DW	ERM010
	DW	ERM011
	DW	ERM012
	DW	ERM013
	DW	ERM014
	DW	ERM015
	DW	ERM016
	DW	ERM017
	DW	ERM018
	DW	ERM019
	DW	ERM020
	DW	ERM021
	DW	ERM022
	DW	ERM023
	DW	ERM024
	DW	ERM025
	DW	ERM026
	DW	ERM027
	DW	ERM028
	DW	ERM029
	DW	ERM030
	DW	ERM031
	DW	ERM032
	DW	ERM033
	DW	ERM034
	DW	ERM035
	DW	ERM036
	DW	ERM037
	DW	ERM038
	DW	ERM039
	DW	ERM040
	DW	ERM041
	DW	ERM042
	DW	ERM043
	DW	ERM044
	DW	ERM045
	DW	ERM046
	DW	ERM047
	DW	ERM048
	DW	ERM049
	DW	ERM050
	DW	ERM051
	DW	ERM052
	DW	ERM053
	DW	ERM054
	DW	ERM055
	DW	ERM056
	DW	ERM057
	DW	ERM058
	DW	ERM059
	DW	ERM060
	DW	ERM061
	DW	ERM062
	DW	ERM063
	DW	ERM064
	DW	ERM065
	DW	ERM066
	DW	ERM067
	DW	ERM068
	DW	ERM069
	DW	ERM070
	DW	ERM071
	DW	ERM072
	DW	ERM073
	DW	ERM074
	DW	ERM075
	DW	ERM076
	DW	ERM077
	DW	ERM078
	DW	ERM079
	DW	ERM080
	DW	ERM081
	DW	ERM082
	DW	ERM083
	DW	ERM084
	DW	ERM085
	DW	ERM086
	DW	ERM087
	DW	ERM088
	DW	ERM089
	DW	ERM090
	DW	ERM091
	DW	ERM092
	DW	ERM093
	DW	ERM094
	DW	ERM095
	DW	ERM096
	DW	ERM097
	DW	ERM098
	DW	ERM099
	DW	ERM100
	DW	ERM101
	DW	ERM102
	DW	ERM103
	DW	ERM104
	DW	ERM105
	DW	ERM106
	DW	ERM107
	DW	ERM108
	DW	ERM109
	DW	ERM110
	DW	ERM111
	DW	ERM112
	DW	ERM113
	DW	ERM114
	DW	ERM115
	DW	ERM116
	DW	ERM117
	DW	ERM118
	DW	ERM119
	DW	ERM120
	DW	ERM121
	DW	ERM122
	DW	ERM123
	DW	ERM124
	DW	ERM125
	DW	ERM126
	DW	ERM127
PRM255:	DW	ERM255

;		ERROR MESSAGES
ERM000:
	ERRMSG '*** SUCCESSFUL COMPLETION ***'
ERM001:
	ERRMSG '*** DATA BASE NOT OPEN ***'
ERM002:
	ERRMSG '*** INVALID SET-TYPE ***'
ERM003:
	ERRMSG '*** INVALID RECORD-TYPE ***'
ERM004:
	ERRMSG '*** INVALID ITEM-TYPE FOR THIS RECORD-TYPE ***'
ERM005:
	ERRMSG '*** INVALID OWNER-TYPE FOR THIS SET-TYPE ***'
ERM006:
	ERRMSG '*** INVALID MEMBER-TYPE FOR THIS SET-TYPE ***'
ERM007:
	ERRMSG '*** INVALID DATA BASE KEY ***'
ERM008:
	ERRMSG '*** NO CURRENT OWNER OF SET-TYPE ***'
ERM009:
	ERRMSG '*** NO CURRENT MEMBER OF THIS SET-TYPE ***'
ERM010:
	ERRMSG '*** NO CURRENT OF RECORD-TYPE ***'
ERM011:
	ERRMSG '*** RECORD ALREADY MEMBER OF SET ***'
ERM012:
	ERRMSG '*** RECORD NOT MEMBER OF SET ***'
ERM013:
	ERRMSG '*** DEPENDING ON ITEM TOO LARGE OR NEGATIVE ***'
ERM014:
	ERRMSG '*** DATA BASE ALREADY OPEN ***'
ERM015:
	ERRMSG '*** DATA BASE NOT CLOSED PREVIOUSLY ***'
ERM016:
	ERRMSG '*** NO CURRENT OF RUN UNIT ***'
ERM017:
	ERRMSG '*** NO MORE SPACE IN DATA BASE ***'
ERM018:
	ERRMSG '*** SET NOT SORTED ***'
ERM019:
ERM020:
ERM021:
ERM022:
ERM023:
ERM024:
ERM025:
ERM026:
ERM027:
ERM028:
ERM029:
ERM030:
ERM031:
	ERRMSG '***----***'
ERM032:
	ERRMSG '*** DATA BASE OPENED FOR READ ACCESS ONLY ***'
ERM033:
	ERRMSG '*** RECORD SIZE TOO LARGE ***'
ERM034:
ERM035:
	ERRMSG '***----***'
ERM036:
	ERRMSG '*** IMPROPER PASSWORD ***'
ERM037:
ERM038:
ERM039:
	ERRMSG '***----***'
ERM040:
	ERRMSG '*** MAXIMUM VALUE OF DEPENDING ON ITEM IS 32767 ***'
ERM041:
	ERRMSG '*** BINARY NUMBER TOO LARGE ***'
ERM042:
ERM043:
ERM044:
ERM045:
ERM046:
ERM047:
ERM048:
ERM049:
ERM050:
ERM051:
ERM052:
ERM053:
ERM054:
ERM055:
ERM056:
ERM057:
ERM058:
ERM059:
ERM060:
ERM061:
ERM062:
ERM063:
ERM064:
ERM065:
ERM066:
ERM067:
ERM068:
ERM069:
ERM070:
ERM071:
ERM072:
ERM073:
ERM074:
ERM075:
ERM076:
ERM077:
ERM078:
ERM079:
ERM080:
ERM081:
ERM082:
ERM083:
ERM084:
ERM085:
ERM086:
ERM087:
ERM088:
	ERRMSG '***----***'
ERM089:
	ERRMSG '*** VARIABLE LENGTH INCONSISTENCY ***'
ERM090:
	ERRMSG '*** NO SUCH DMS ROUTINE ***'
ERM091:
	ERRMSG '*** INSUFFICIENT ROOM IN MEMORY ***'
ERM092:
	ERRMSG '*** INCORRECT NUMBER OF ARGUMENTS ***'
ERM093:
	ERRMSG '*** DUPLICATE DATA-BLOCK NAME ***'
ERM094:
	ERRMSG '*** BLOCK NAME NOT FOUND ***'
ERM095:
	ERRMSG '*** INVALID DATA BLOCK NAME ***'
ERM096:
	ERRMSG '*** INVALID NUMBER OF ARGUMENTS ***'
ERM097:
	ERRMSG '*** CANNOT READ FROM DATA BASE FILES ***'
ERM098:
	ERRMSG '***----***'
ERM099:
	ERRMSG '*** CATASTROPHE ***'
ERM100:
	ERRMSG '*** USER MAY NOT READ THIS RECORD ***'
ERM101:
	ERRMSG '*** USER MAY NOT WRITE THIS RECORD ***'
ERM102:
	ERRMSG '*** USER MAY NOT READ THIS ITEM ***'
ERM103:
	ERRMSG '*** USER MAY NOT WRITE THIS ITEM ***'
ERM104:
	ERRMSG '*** DISK IN WRONG DRIVE ***'
ERM105:
	ERRMSG '*** DISK READ OR WRITE ERROR ***'
ERM106:
	ERRMSG '*** CANNOT EXPAND FILE FOR NEW PAGE ***'
ERM107:
	ERRMSG '*** FILE NOT PRESENT ***'
ERM108:
	ERRMSG '*** USER MAY NOT READ THIS SET ***'
ERM109:
	ERRMSG '*** USER MAY NOT WRITE THIS SET ***'
ERM110:
ERM111:
ERM112:
ERM113:
ERM114:
ERM115:
ERM116:
ERM117:
ERM118
ERM119:
ERM120:
ERM121:
ERM122:
ERM123:
ERM124:
ERM125:
ERM126:
ERM127:
	ERRMSG '***----***'
ERM255:
	ERRMSG '*** END OF SET ***'
	END
