CONTENTS Title Page Copyright Page Preface Technical Changes and New Features 1 Overview 1.1 Using RdbAccess for VAX RMS 1.2 How RdbAccess for VAX RMS Works 1.2.1 The Non-SQL Data Server 1.2.2 The Data Driver 1.2.3 The Dictionary Driver 1.3 The Working Environment for RdbAccess for VAX RMS 1.3.1 SQL 1.3.2 Rdb/Dispatch 1.3.3 CDD/Repository 1.3.4 DECnet/SNA VMS Data Transfer Facility (DTF) 1.4 Getting Help 2 A Sample of RdbAccess for VAX RMS Use 2.1 Accessing the Sample Files and Dictionary 2.2 Invoking and Exiting Interactive SQL 2.3 Displaying Information About the Data 2.4 Reading the Sample Data 2.4.1 Querying Average Salaries by Sex 2.4.2 Querying Employee Qualifications 2.4.3 Querying Employees' Career Progression 2.4.4 Querying Managerial Salaries 2.5 Updating the Sample Data 2.5.1 Deleting an Employee 2.5.2 Updating an Employee 2.5.3 Adding an Employee 3 Creating Data Definitions 3.1 Creating Data Definitions Using CDO 3.1.1 Defining Fields 3.1.2 Defining Records 3.1.3 Defining a Logical Database 3.1.4 Defining a Physical Database 3.1.5 Defining a Physical Database for an Existing Data File 3.1.6 Specifying the Data Driver Image 3.2 Dictionary Driver Requirements for Data Files 3.3 Using Record Definitions Containing the VARIANTS Clause 3.4 Using Fields and Records Containing the OCCURS Clause 3.4.1 How the Dictionary Driver Generates Unique Field Names 3.4.2 The OCCURS Clause as a Record Attribute 3.4.3 Restrictions on Support for the OCCURS Clause 3.5 How the Dictionary Driver Handles Datatype Inheritance 3.5.1 How CDD/Repository Handles Datatype Inheritance 3.5.2 How Rdb/VMS Handles Datatype Inheritance 3.5.3 How RdbAccess for VAX RMS Handles Datatype Inheritance 3.6 Getting Information About Databases 3.6.1 Listing Database Definitions in CDD/Repository 3.6.2 Getting Detailed Information About a Particular CDD$DATABASE 3.6.3 Getting Information From SQL 3.6.4 Getting Information About a Particular SQL Table 3.7 Using RdbAccess for VAX RMS With Remote Dictionaries or Data Files 4 Using VAX SQL 4.1 Including SQL Statements in Programs 4.1.1 Programs Using Precompiler Support 4.1.2 Programs Using the Module Processor 4.1.3 Using SQL/Services 4.1.4 Using Interactive SQL 4.2 Attaching to and Detaching From the Dictionary 4.2.1 Using the ATTACH or DECLARE SCHEMA Statements 4.2.2 Specifying the DBKEY SCOPE Clause 4.2.3 Defining SQL$DATABASE 4.3 Reading Data Files 4.4 Updating Data Files 4.5 Declaring Transactions 4.5.1 How Non-SQL Data Server Handles Locking 4.6 Using Internationalization Options 4.6.1 Setting the Collating Sequence 4.6.2 Setting the Decimal Point 4.7 Protecting Data and Data Definitions 5 Using Other Software 5.1 Using DECdecision DECquery and DECquery for VMS 5.2 Using TEAMDATA 5.3 Using VAX Data Distributor 6 Restrictions 6.1 Restrictions on Using CDD/Repository 6.1.1 Variant Records 6.1.2 Datatype Support 6.2 Restrictions on Using SQL 6.2.1 Restrictions on Transactions 6.2.2 Missing Values 6.2.3 SQL Statements Not Supported by RdbAccess for VAX RMS 7 Troubleshooting 7.1 Types of Errors Commonly Encountered 7.1.1 Getting More Information About Errors 7.1.2 Execution Errors 7.1.2.1 Avoiding Execution Errors 7.1.2.2 Resolving Execution Errors 7.1.3 Configuration Errors 7.1.4 Resource Constraints 7.1.5 Internal Errors 7.2 Interpreting Error Messages 7.2.1 Stacked Error Messages 7.2.2 Error Message Format 7.3 Error Message Documentation 7.4 Troubleshooting Distributed Transactions 7.5 Troubleshooting SQL/Services 7.5.1 Most Common Errors 7.5.2 Understanding the SQL/Services Run-time Environment 7.5.3 Troubleshooting DECquery Version 1.0 on a Personal Computer 7.6 Troubleshooting Data Definitions 7.7 How to Submit a Software Performance Report (SPR) 8 Performance Considerations 8.1 Using Transactions With the RESERVING Clause for Optimum Performance 8.2 Designing an Efficient Application 8.3 Creating Efficient Data Definitions 8.4 Tuning Your System 9 Qualifiers on the ATTACH or DECLARE SCHEMA Statements /DATA_DRIVER /DICTIONARY_DRIVER /PATHNAME /TYPE 10 SQL Statements for Updating RMS Data Files DELETE Statement INSERT Statement SET TRANSACTION Statement UPDATE Statement A Error Messages B Using CDD/Repository B.1 CDD/Repository Concepts B.2 Creating a CDD/Repository Dictionary B.3 Examining the Contents of a Dictionary B.4 Defining Dictionary Elements B.4.1 Defining Fields B.4.2 Defining Records B.4.3 Creating CDO Command Procedures B.4.4 Using a Command Procedure to Define Fields B.4.5 Using a Command Procedure to Define a Record B.4.6 Executing a Command Procedure B.4.7 Using the CDO Editor B.5 Deleting Dictionary Elements B.6 Protecting a CDD/Repository Dictionary B.6.1 Protecting a Data Definition Glossary EXAMPLES 3-1 Defining Fields 3-2 Defining Records 3-3 Defining a Logical Database 3-4 Defining a Physical Database 3-5 Specifying the Data Driver Image 3-6 A Record Definition Including a VARIANTS Clause 3-7 Defining Alternate Record Structures 3-8 A Record Definition Including the OCCURS Clause 3-9 A Definition of a BASED ON Field 3-10 Displaying Databases in a Dictionary Directory 3-11 Displaying a Particular CDO Database 3-12 Displaying Databases with SQL 3-13 Displaying A Particular Database with SQL 3-14 The DECLARE SCHEMA Statement for a Remote Data File 3-15 The ATTACH Statement for a Remote Data File 3-16 Defining the Data Location for a Remote RMS File 4-1 Defining SQL$DATABASE 4-2 Reading Data From an RMS Data File 5-1 Transferring Data with Data Distributor, SQL, and RdbAccess for VAX RMS 7-1 NSDS$DEBUG_FLAGS Display FIGURES 1-1 RdbAccess for VAX RMS Components and Their Relationships 1-2 RdbAccess for VAX RMS Software Configuration 3-1 How RdbAccess for VAX RMS Handles OCCURS Records 4-1 Relationship of the Database Name to the Dictionary Hierarchy 7-1 The SQL/Services Run-time Environment TABLES 6-1 Datatype Support 6-2 RdbAccess for VAX RMS Datatype Translations 7-1 Sources of Error Messages 7-2 Error Message Severity Codes 10-1 Comparison of SQL and RMS Terms B-1 CDO SHOW Commands B-2 User-Specified Field Attributes B-3 User-Specified Record Attributes B-4 CDO Editor Key Functions B-5 DELETE Commands Qualifiers B-6 CDO Access Rights B-7 CDO Protection Commands