CONTENTS Title Page Copyright Page Preface 1 Introduction to Programming and Customizing 1.1 Writing Programs That Call DEC DATATRIEVE 1.1.1 How Writing Calling Programs Extends DEC DATATRIEVE 1.1.2 How DEC DATATRIEVE Extends Programming Languages 1.2 Customizing DEC DATATRIEVE 2 Writing Programs That Call DEC DATATRIEVE 2.1 Overview of DEC DATATRIEVE Programming Calls 2.1.1 Declare the DEC DATATRIEVE Access Block (DAB) 2.1.2 Initialize the Call Interface 2.1.3 Issue DEC DATATRIEVE Commands and Statements 2.1.4 Closing the DEC DATATRIEVE Interface 2.1.5 Compiling and Linking DEC DATATRIEVE Programs 2.2 DEC DATATRIEVE Stallpoints-Transfer of Control 2.3 The DEC DATATRIEVE Access Block 2.3.1 DAB$L_CONDITION-Condition Codes 2.3.2 Message Buffers 2.3.2.1 Messages DEC DATATRIEVE Stores in the Message Buffer 2.3.2.2 Messages DEC DATATRIEVE Stores in the Auxiliary Message Buffer 2.3.3 DAB$W_STATE-Stallpoint Information 2.3.4 DAB$W_REC_LEN-Record Lengths 2.3.5 Input/Output Channels 2.3.6 DAB$L_OPTIONS-Initial Options 2.3.7 User-Defined Keyword Information 2.4 Using the DEC DATATRIEVE Call Interface 2.4.1 Command Processing 2.4.2 Reading and Storing Records 2.4.3 Defining Your Own Keywords 2.4.4 Getting Information About DEC DATATRIEVE Objects 2.4.5 Writing Data to a Log File 2.4.6 Handling Errors 2.4.7 Debugging Your Program 3 Using the DEC DATATRIEVE Client/Server System 3.1 Overview 3.2 Client Components 3.2.1 Calls 3.2.2 Optional Arguments 3.2.3 Return Statuses 3.2.4 Stallpoints 3.2.5 Information Functions 3.3 Server Components 3.4 Developing DEC DATATRIEVE Application Programs 3.4.1 Compiling and Linking the Client Program 3.5 Using the DEC DATATRIEVE Client/Server Call Interface 3.5.1 Command Processing 3.5.2 Reading and Storing Records 3.5.3 Defining Your Own Keywords 3.5.4 Getting Information About DEC DATATRIEVE Objects 3.5.5 Handling Errors 3.6 Converting Old Calling Programs to New Client/Server Applications 4 DEC DATATRIEVE Call Reference (DTR$ Calls) DTR$COMMAND DTR$CONTINUE DTR$CREATE_UDK DTR$DTR DTR$END_UDK DTR$FINISH DTR$FINISH_WINDOWS DTR$GET_PORT DTR$GET_STRING DTR$INFO DTR$INIT DTR$LOOKUP DTR$PORT_EOF DTR$PRINT_DAB DTR$PUT_OUTPUT DTR$PUT_PORT DTR$PUT_VALUE DTR$UNWIND DTR$WINDOW_MSG DTR$WINDOW_OUTPUT DTR$WINDOWS 5 DEC DATATRIEVE Call Reference (DTR_ Calls) DTR_CLEAR_OPTIONS DTR_COMMAND DTR_CONNECT DTR_CONTINUE DTR_CREATE_UDK DTR_DISCONNECT DTR_END_UDK DTR_FINISH DTR_GET_AUX DTR_GET_CONDITION DTR_GET_MSG DTR_GET_OPTIONS DTR_GET_PORT DTR_GET_REC_LEN DTR_GET_STALLPOINT DTR_GET_STRING DTR_GET_UDK_INDEX DTR_INFO DTR_INIT DTR_LOOKUP DTR_PORT_EOF DTR_PUT_PORT DTR_PUT_VALUE DTR_SET_OPTIONS DTR_UNWIND 6 Adding Functions to DEC DATATRIEVE 6.1 Using DEC DATATRIEVE Functions 6.2 DEC DATATRIEVE Functions and External Procedures 6.3 Adding Functions by Rebuilding DEC DATATRIEVE 6.3.1 Write and Compile Your Procedures 6.3.2 Insert the Procedure Object Files into the Object Library 6.3.3 Add the Function Definitions to DTRFNDxx.MAR 6.3.3.1 The Format of a Function Definition 6.3.3.2 Sample Function Definitions 6.3.4 Assemble and Debug DTRFNDxx.MAR 6.3.5 Replace DTRFNDxx.MAR in the Object Library 6.3.6 Relink the DEC DATATRIEVE Shareable Image 6.4 Adding Functions by Creating Subsets 6.5 User Functions and Floating-Point Data (AXP Only) 7 Customizing DEC DATATRIEVE 7.1 Help Text 7.2 DEC DATATRIEVE Messages 7.3 ADT 7.4 Guide Mode 7.5 DEC DATATRIEVE Text 8 Translating DEC DATATRIEVE 8.1 Planning Your Translation 8.2 How to Translate DEC DATATRIEVE A Definitions of the DEC DATATRIEVE Access Block A.1 Location of DEC DATATRIEVE Access Blocks A.2 Location of Sample Programs A.3 Defining the DEC DATATRIEVE Access Block in Other Languages A.3.1 Defining the Access Block A.3.2 Defining the Message Buffers A.3.3 Defining DEC DATATRIEVE Constants B DEC DATATRIEVE Message Information C Argument Data Types EXAMPLES 2-1 Sample Error Checking Routine in DEC BASIC FIGURES 1-1 DEC DATATRIEVE Architecture 1-2 Interactive DEC DATATRIEVE 1-3 Remote Server 1-4 User-Written Programs 1-5 DEC DATATRIEVE Client for Windows 3-1 Client/Server Model for DEC DATATRIEVE A-1 Structure of the DEC DATATRIEVE Access Block TABLES 2-1 Stallpoints and Calls 2-2 Useful DAB Fields 2-3 Content of Message Buffers 2-4 Stallpoint Values 2-5 DEC DATATRIEVE Keywords 3-1 Calls in the Client/Server 3-2 Client/Sever Stallpoints and Calls 3-3 Information Functions 4-1 Types of Context for User-Defined Keywords (DTR$CREATE_UDK Call) 4-2 DTR$DTR Control Options 4-3 DTR$DTR Terminal Server Options 4-4 Token Types for the DTR$GET_STRING Call 4-5 Info-Code Options (DTR$INFO) 4-6 DTR$WINDOWS Control Options 4-7 DTR$WINDOWS DECwindows Motif Terminal Server Options 5-1 Types of Context for User-Defined Keywords (DTR_CREATE_UDK Call) 5-2 Token Types for the DTR_GET_STRING Call 5-3 Info-Code Options (DTR_INFO Call) 6-1 Common Data Types 6-2 Input Argument Types and Clauses 7-1 Guide Mode Levels A-1 DAB Definition Files in DTR$LIBRARY A-2 Sample Programs A-3 Files Containing Sample Programs that Call DEC DATATRIEVE A-4 Fields of the DEC DATATRIEVE Access Block A-5 DEC DATATRIEVE Access Block Constants C-1 Atomic Data Types C-2 String Data Types C-3 Miscellaneous Data Types