Open Group Standard
Total Page:16
File Type:pdf, Size:1020Kb
Open Group Standard DRDA, Version 5, Volume 1: Distributed Relational Database Architecture (DRDA) The Open Group ©July 2011, The Open Group All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, without the prior permission of the copyright owners. This documentation and the softwaretowhich it relates arederived in part from copyrighted materials supplied by International Business Machines. Neither International Business Machines nor The Open Group makes any warranty of any kind with regardtothis material, including but not limited to, the implied warranties of merchantability and fitness for a particular purpose. The Open Group shall not be liable for errors contained herein, or for any direct or indirect, incidental, special, or consequential damages in connection with the furnishing, performance, or use of this material. Open Group Standard DRDA, Version 5, Volume 1: Distributed Relational Database Architecture(DRDA) ISBN: 1-931624-91-7 Document Number: C112 Published in the U.K. by The Open Group, July 2011. Any comments relating to the material contained in this document may be submitted to: The Open Group Apex Plaza Forbury Road Reading Berkshire, RG1 1AX United Kingdom or by Electronic Mail to: [email protected] ii Open Group Standard (2011) Contents Chapter 1 The DRDA Specification ................................................................ 1 1.1 The DRDA Reference .............................................................................. 2 1.1.1 What it Means to Implement Different Levels of DRDA ..................................................................................................... 2 1.1.2 What it Means to Implement DRDA Level 7 ................................... 3 1.1.3 What it Means to Implement DRDA Level 6 ................................... 11 1.1.4 What it Means to Implement DRDA Level 5 ................................... 17 1.1.5 What it Means to Implement DRDA Level 4 ................................... 37 1.1.6 What it Means to Implement DRDA Level 3 ................................... 40 1.1.7 What it Means to Implement DRDA Distributed Unit of Work .................................................................................................. 43 1.2 The FD:OCA Reference .......................................................................... 46 1.3 The DDM Reference ................................................................................ 47 Part 1 Database Access Protocol .......................................................... 51 Chapter 2 Introduction to DRDA..................................................................... 53 2.1 DRDA Structureand Other Architectures ........................................... 53 2.2 DRDA and SQL ....................................................................................... 54 2.3 DRDA Connection Architecture........................................................... 54 2.4 Types of Distribution .............................................................................. 55 2.5 DRDA Protocols and Functions............................................................ 57 Chapter 3 Using DRDA: Overall Flows........................................................ 61 3.1 Introduction to Protocol Flows ............................................................. 61 3.1.1 Initialization Flows .............................................................................. 62 3.1.2 Bind Flows ............................................................................................. 65 3.1.3 SQL Statement Execution Flows........................................................ 67 3.1.4 Commit Flows ...................................................................................... 69 3.1.5 Termination Flows ............................................................................... 71 3.1.6 Utility Flows .......................................................................................... 73 Chapter 4 The DRDA Processing Model and Command Flows ..... 75 4.1 DDM and the Processing Model........................................................... 76 4.2 DRDA Relationship to DDM................................................................. 77 4.3 The DRDA Processing Model ............................................................... 78 4.3.1 DRDA Managers .................................................................................. 78 4.3.2 The DRDA Processing Model Flow................................................... 87 4.3.3 Product-Unique Extensions................................................................ 93 4.3.4 Diagnostic and Problem Determination Support in DRDA ..................................................................................................... 93 4.3.5 Intermediate Server Processing .......................................................... 94 4.4 DDM Commands and Replies .............................................................. 97 4.4.1 Accessing aRemote Relational Database Manager ........................ 98 DRDA, Version 5, Volume 1: Distributed Relational Database Architecture (DRDA) iii Contents 4.4.2 DRDA Security Flows ......................................................................... 106 4.4.3 Performing the Bind Operation and Creating a Package .................................................................................................. 136 4.4.4 Deleting an Existing Package ............................................................. 148 4.4.5 Performing aRebind Operation......................................................... 152 4.4.6 Activating and Processing Queries ................................................... 154 4.4.7 Executing aBound SQL Statement.................................................... 183 4.4.8 Preparing an SQL Statement .............................................................. 208 4.4.9 Retrieving the Data Variable Definitions of an SQL Statement ...................................................................................... 211 4.4.10 Executing aDescribe Table SQL Statement...................................... 213 4.4.11Executing a Dynamic SQL Statement ............................................... 215 4.4.12 Returning SQL Diagnostics ................................................................ 217 4.4.13 Controlling the Amount of Describe Information Returned ................................................................................................ 221 4.4.14 Interrupting a Running DRDA Request ........................................... 222 4.4.15 Commitment of Work in DRDA ........................................................ 225 4.4.16 Connection Reuse ................................................................................. 254 Chapter 5 Data Definition and Exchange..................................................... 261 5.1 Use of FD:OCA........................................................................................ 261 5.2 Use of Base and Option Sets.................................................................. 262 5.2.1 Basic FD:OCA Object Contained in DDM........................................ 262 5.2.2 DRDA FD:OCA Object........................................................................ 264 5.2.3 Early and Late Descriptors ................................................................. 267 5.3 Relationship of DRDA and DDM Objects and Commands.............. 270 5.3.1 DRDA Command to Descriptor Relationship ................................. 270 5.3.2 Descriptor Classes ................................................................................ 273 5.4 DRDA Descriptor Definitions ............................................................... 276 5.5 Late Descriptors ...................................................................................... 277 5.5.1 Late Array Descriptors........................................................................ 277 5.5.2 Late Row Descriptors .......................................................................... 280 5.5.3 Late Group Descriptors....................................................................... 283 5.6 Early Descriptors ..................................................................................... 296 5.6.1 Initial DRDA Type Representation .................................................... 296 5.6.2 Early Array Descriptors ...................................................................... 296 5.6.3 Early Row Descriptors......................................................................... 304 5.6.4 Early Group Descriptors ..................................................................... 315 5.6.5 Early Environmental Descriptors ...................................................... 355 5.6.6 Late Environmental Descriptors ........................................................ 410 5.7 FD:OCA Meta Data Summary .............................................................. 412 5.7.1 Overriding Descriptors to Handle Problem Data ........................... 416 5.7.2 MDD Materialization Rules................................................................ 419 5.7.3 Error Checking and Reporting for Descriptors ............................... 420 5.8 DRDA Examples ..................................................................................... 422 5.8.1 Environmental Description Objects .................................................