Google
 

Trailing-Edge - PDP-10 Archives - BB-AI48A-BM - datatrieve/dabsym.mac
There are no other files named dabsym.mac in the archive.
	UNIVERSAL DABSYM  ;Callable Datatrieve Symbols
	SUBTTL	Introduction
;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
;
;			   D A B S Y M
;
;
;		   COPYRIGHT (c)  1984 BY
;	       DIGITAL EQUIPMENT CORPORATION, MAYNARD
;		MASSACHUSETTS.  ALL RIGHTS RESERVED.
;
;	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 THAT IS
;	NOT SUPPLIED BY DIGITAL.
;
;
;    FUNCTIONAL DESCRIPTION
;	Define symbols necessary to call Datatrieve from MACRO.
;
;    VERSION NUMBER
;	1
;
;    HISTORY
;
;-----------------------------------------------------------------------
	SUBTTL	Entry points

; Callable Datatrieve is accessed through the following routines.
; All routines are called Fortran/Cobol style and passed a single argument,
; the address of the Datatrieve Access Block (DAB).
;
; All routines are included in the file SYS:DTRLIB.REL. To link your
; program, simply include DTRLIB:
;
;	@LOAD MAIN,SYS:DTRLIB/LIB
;
; Callable Datatrieve EXTERNAL Points:

EXTERNAL DTRINI	;Initialize a callable Datatrieve stream
EXTERNAL DTRUNW	;Abort the current DTR statement or command (^C)
EXTERNAL DTRFIN	;Finish a callable Datatrieve stream

EXTERNAL DTRCOM	;Provide command line in message buffer to DTR
EXTERNAL DTRCON	;Continue Datatrieve
EXTERNAL DTRPVL	;Provide a value in the value buffer to DTR

EXTERNAL DTRGPT	;Get a record from a port
EXTERNAL DTRPPT	;Put a record into a port
EXTERNAL DTRPTE	;Indicate End of File on a port

EXTERNAL DTRPOT	;Outputs data to a log file
EXTERNAL DTRINF	;Get information about a Datatrieve object
	SUBTTL	Datatrieve Access Buffer (DAB) definitions

.DBHDR==0	;First half word is always 0 (bits 0-17)
	DB%BLN==777B26	;DAB$B_BLN Length of DAB (INTERNAL USE ONLY)
	DB%BID==777B35	;DAB$B_BID Block id (INTERNAL USE ONLY)
.DBCND==1	;DAB$L_CONDITION Returned condition code
.DBMBF==2	;DAB$A_MSG_BUF Passed address of message buffer
.DBMBL==3	;DAB$W_MSG_BUF_LEN Passed length of message buffer
.DBMLN==4	;DAB$W_MSG_LEN Passed/Returned length of message
.DBABF==5	;DAB$A_AUX_BUF Passed address of aux buffer
.DBABL==6	;DAB$W_AUX_BUF_LEN Passed length of aux buffer
.DBALN==7	;DAB$W_AUX_LEN Passed/Returned length of message
.DBVBF==10	;DAB$A_VAL_BUF Passed address of value buffer
.DBVBL==11	;DAB$W_VAL_BUF_LEN Passed length of value buffer
.DBVLN==12	;DAB$W_VAL_LEN Passed/Returned length of message
.DBIDI==13	;DAB$W_IDI Returned stream number
.DBSTA==14	;DAB$W_STATE Returned state (stall point)
.DBFLG==15	;DAB$L_FLAGS Returned flags
	DB%HDR==1B35	  ;DAB$V_PRINT_HDR 1 = This line is a header
	DB%EXI==1B34	  ;DAB$V_EXIT 1 = EXIT was interpreted
	DB%PWP==1B33	  ;DAB$V_PW_PROMPT 1 = This prompt for PW
	DB%PLT==1B32	  ;DAB$V_PLOT 1 = Just finished a plot
	DB%REG==1B31	  ;DAB$V_REGIS 1 = This line is regis text
.DBOPT==16	;DAB$L_OPTIONS Passed option flags
	DB%SMI==1B35	  ;DAB$V_SEMI 1 = SEMI colon required
	DB%FST==1B34	  ;DAB$V_FAST 1 = Direct output to TTY
.DBRBF==17	;DAB$A_REC_ADDRESS Passed port record address
.DBRLN==20	;DAB$W_REC_LEN Passed/returned port rec len (bytes)
.DBRBY==21	;DAB$W_REC_BYTE Passed/returned port byte size
.DBVER==22	;DAB$W_VERSION Returned version

.DBLEN==23	;DAB$K_BLK_LEN Length of the DAB
.DBBUF==^D256	;DAB$K_BUF_LEN Length of text buffers in characters
	SUBTTL	State (stall point) codes

.DSCMD==1		;DTR$K_STL_CMD  Waiting for command
.DSPMT==2		;DTR$K_STL_PRMPT  Waiting for prompt value
.DSLIN==3		;DTR$K_STL_LINE  Have a print line
.DSMSG==4		;DTR$K_STL_MSG  Have a message
.DSPGT==5		;DTR$K_STL_PGET  Waiting for port get
.DSPPT==6		;DTR$K_STL_PPUT  Waiting for port put
	SUBTTL	Define condition code format

; Condition codes are full words divided as follows:
;	RESERVED	bits 0-17
;	CODE     	bits 18-32
;	SEVERITY 	bits 33-35

DC%COD==77777B32;STS$V_CODE Code for condition
DC%SEV==7B35	;STS$V_SEVERITY Severity field
	.DCWRN==0	;STS$K_WARNING prints %message and continues
	.DCSUC==1	;STS$K_SUCCESS prints message and continues
	.DCERR==2	;STS$K_ERROR prints ?message and unwinds
	.DCINF==3	;STS$K_INFO prints message and continues
	.DCSEV==4	;STS$K_SEVERE prints ??DATATRIEVE ERROR,
			;		message and unwinds


;Note that bit 35 can be used as a flag for determining whether
;an error occured or not (used for BLISS compatibility).
;0 indicates an error occured and 1 indicates success.
	SUBTTL	Condition codes
;
; There are so many of these, that symbols have not been assigned
; to all possible condition codes, just ones used by DDM.MAC.

; If you need to use a condition code not defined here, look
; in DABSYM.REQ.  Use the table on the previous page to translate
; error severity code from a BLISS symbol to the MACRO symbol.

; The number before the B32 is the ordinal number of the condition
; code in decimal.  You will have to count lines in DABSYM.REQ,
; starting at DTR$_SUCCESS, and going up by 1 for each condition code.

	RADIX	10	;Make things easier

DCSUC%==.DCINF+1B32	;DTR$_SUCCESS
DCERR%==.DCERR+2B32	;DTR$_ERROR
DCWSP%==.DCERR+11B32	;DTR$_WRONGSTALL
DCBHD%==.DCERR+12B32	;DTR$_BADHANDLE
DCUSE%==.DCERR+13B32	;DTR$_USESLOEXH
DCUNW%==.DCERR+14B32	;DTR$_UNWIND
DCMNA%==.DCSEV+233B32	;DTR$_MEMNOTAVL
DCMNX%==.DCSEV+234B32	;DTR$_MEMNOTACC
DCMNF%==.DCSEV+235B32	;DTR$_MEMNOTFRE
DCBNA%==.DCERR+236B32	;DTR$_BADNUMARG
DCIBI%==.DCERR+237B32	;DTR$_INFBADID
DCIBC%==.DCERR+238B32	;DTR$_INFBADCOD
DCBSP%==.DCSEV+239B32	;DTR$_BADSTALL
DCEXI%==.DCSUC+240B32	;DTR$_EXIT
DCNPG%==.DCERR+241B32	;DTR$_NOPGETPUT
DCBSD%==.DCERR+242B32	;DTR$_BADSTRDES

	END