Preface

This manual describes the following items:

In this manual, a user application program is referred to as a UAP.

Intended readers

This manual is intended for users who will be constructing or operating HiRDB Version 8 ("HiRDB") relational database systems.

It is assumed that readers of this manual have the following:

Because this manual assumes knowledge of the information presented in HiRDB Version 8 Description, readers should read that manual first.

Organization of this manual

This manual consists of the following 16 chapters and 9 appendixes:

Chapter 1. Overview
This chapter explains the work flow for creating UAPs and the types of SQL statements to be used.
Chapter 2. Database Operations
This chapter explains the data expressions used in a HiRDB database and the basic database operations.
Chapter 3. UAP Design
This chapter explains issues to be taken into consideration in designing a UAP.
Chapter 4. UAP Design for Improving Performance and Handling
This chapter describes issues that UAP designers should consider to improve UAP performance and usability.
Chapter 5. Notes about Creating UAPs that Access Object Relational Databases
This chapter describes notes about creating UAPs that access object relational databases.
Chapter 6. Client Environment Setup
This chapter explains the procedure for installing a HiRDB client and describes the environment definition for creating and executing a UAP.
Chapter 7. UAP Creation
This chapter explains the creation of embedded SQL UAPs written in C or COBOL.
Chapter 8. Preparation for UAP Execution
This chapter explains the flow from UAP preprocessing to execution and the methods used in those operations.
Chapter 9. Java Stored Procedures and Java Stored Functions
This chapter explains the development of stored procedures and stored functions with Java.
Chapter 10. UAP Troubleshooting
This chapter explains collection of historical information for UAP execution and error information; also explains the UAP error types and recovery methods.
Chapter 11. Using a Distributed Database
This chapter explains the creation of a UAP that accesses a distributed database.
Chapter 12. Command Execution from UAPs
This chapter explains the execution of commands from UAPs.
Chapter 13. HiRDB Access from ODBC Application Programs
This chapter explains the ODBC driver installation procedure and ODBC functions.
Chapter 14. HiRDB Access from OLE DB Application Programs
This chapter explains HiRDB access from OLE DB application programs.
Chapter 15. HiRDB Access from ADO.NET-compatible Application Programs
This chapter describes how to access HiRDB from application programs that are compliant with ADO.NET.
Chapter 16. Type2 JDBC Driver
This chapter explains the Type2 JDBC driver installation and JDBC functions.
Chapter 17. Type4 JDBC Driver
This chapter explains the Type4 JDBC driver installation and JDBC functions.
Chapter 18. SQLJ
This chapter explains how to use SQLJ to develop a UAP.
Appendix A. SQL Communications Area
This appendix explains the organization and contents of the SQL Communications Area, as well as expansion of the SQL Communications Areas.
Appendix B. SQL Descriptor Area
This appendix explains the organization and contents of the SQL Descriptor Area, as well as expansion of the SQL Descriptor Area.
Appendix C. Column Name Descriptor Area
This appendix explains the organization and contents of the Column Name Descriptor Area, as well as expansion of the Column Name Descriptor Area.
Appendix D. Type Name Descriptor Area
This appendix explains the organization and contents of the Type Name Descriptor Area and expansion of the area.
Appendix E. SQL Data Types and Data Descriptions
This appendix explains the correspondence between the SQL data types and the C data descriptions, and the correspondence between the SQL data types and the COBOL data descriptions.
Appendix F. Data Dictionary Table Retrieval
This appendix explains the contents of the data dictionary tables and how to reference them.
Appendix G. Functions provided by HiRDB
This appendix explains the hash function for table partitioning, the space conversion function, the function for conversion to a DECIMAL signed normalized number, and the function that sets the character code classification.
Appendix H. Maximum and Minimum HiRDB Values
This appendix explains the HiRDB maximum and minimum values.

Related publications

This manual is related to the following manuals, which should be read as required.

HiRDB (for Windows)
HiRDB (for UNIX)
HiRDB (for UNIX and Windows)

* This manual has been published in Japanese only; it is not available in English.

You must use the UNIX or the Windows manuals, as appropriate to the platform you are using.

Others

Organization of HiRDB manuals

The HiRDB manuals are organized as shown below. For the most efficient use of these manuals, it is suggested that they be read in the order they are shown, going from left to right.

[Figure]

Conventions: Abbreviations

Unless otherwise required, this manual uses the following abbreviations for product and other names.

Name of product or other entityRepresentation
HiRDB/Single Server Version 8HiRDB/Single ServerHiRDB or HiRDB Server
HiRDB/Single Server Version 8(64)
HiRDB/Parallel Server Version 8HiRDB/Parallel Server
HiRDB/Parallel Server Version 8(64)
HiRDB/Developer's Kit Version 8HiRDB/Developer's KitHiRDB Client
HiRDB/Developer's Kit Version 8(64)
HiRDB/Run Time Version 8HiRDB/Run Time
HiRDB/Run Time Version 8(64)
HiRDB Datareplicator Version 8HiRDB Datareplicator
HiRDB Dataextractor Version 8HiRDB Dataextractor
HiRDB Text Search Plug-in Version 7HiRDB Text Search Plug-in
HiRDB Spatial Search Plug-in Version 3HiRDB Spatial Search Plug-in
HiRDB Staticizer Option Version 8HiRDB Staticizer Option
HiRDB LDAP Option Version 8HiRDB LDAP Option
HiRDB Advanced Partitioning Option Version 8HiRDB Advanced Partitioning Option
HiRDB Advanced High Availability Version 8HiRDB Advanced High Availability
HiRDB Non Recover Front End Server Version 8HiRDB Non Recover FES
HiRDB Disaster Recovery Light Edition Version 8HiRDB Disaster Recovery Light Edition
HiRDB External Data Access Version 8HiRDB External Data Access
HiRDB External Data Access Adapter Version 8HiRDB External Data Access Adapter
HiRDB Adapter for XML - Standard EditionHiRDB Adapter for XML
HiRDB Adapter for XML - Enterprise Edition
HiRDB Control ManagerHiRDB CM
HiRDB Control Manager AgentHiRDB CM Agent
Hitachi TrueCopyTrueCopy
Hitachi TrueCopy basic
TrueCopy
TrueCopy remote replicator
JP1/Automatic Job Management System 2JP1/AJS2
JP1/Automatic Job Management System 2 - Scenario OperationJP1/AJS2-SO
JP1/Cm2/Extensible SNMP AgentJP1/ESA
JP1/Cm2/Extensible SNMP Agent for Mib Runtime
JP1/Cm2/Network Node ManagerJP1/NNM
JP1/Integrated Management - ManagerJP1/Integrated Management or JP1/IM
JP1/Integrated Management - View
JP1/Magnetic Tape AccessEasyMT
EasyMT
JP1/Magnetic Tape LibraryMTguide
JP1/NETM/DMJP1/NETM/DM
JP1/NETM/DM Manager
JP1/Performance ManagementJP1/PFM
JP1/Performance Management Agent for HiRDBJP1/PFM-Agent for HiRDB
JP1/Performance Management - Agent for PlatformJP1/PFM-Agent for Platform
JP1/Performance Management/SNMP System ObserverJP1/SSO
JP1/VERITAS NetBackup BS v4.5NetBackup
JP1/VERITAS NetBackup v4.5
JP1/VERITAS NetBackup BS V4.5 Agent for HiRDB LicenseJP1/VERITAS NetBackup Agent for HiRDB License
JP1/VERITAS NetBackup V4.5 Agent for HiRDB License
JP1/VERITAS NetBackup 5 Agent for HiRDB License
OpenTP1/Server Base Enterprise OptionTP1/EE
Virtual-storage Operating System 3/Forefront System ProductVOS3/FSVOS3
Virtual-storage Operating System 3/Leading System ProductVOS3/LS
Extensible Data Manager/Base Extended Version 2
XDM basic program XDM/BASE E2
XDM/BASE E2
XDM/Data Communication and Control Manager 3
XDM Data communication control XDM/DCCM3
XDM/DCCM3
XDM/Relational Database XDM/RDXDM/RDXDM/RD
XDM/Relational Database Extended Version 2
XDM/RD E2
XDM/RD E2
VOS3 Database Connection ServerDB Connection Server
DB2 Universal Database for OS/390 Version 6DB2
DNCWARE ClusterPerfect (Linux Version)ClusterPerfect
Microsoft(R) ExcelMicrosoft Excel or Excel
Microsoft(R) Visual C++(R)Visual C++ or C++
Oracle 8iORACLE
Oracle 9i
Oracle 10g
Sun JavaTM System Directory ServerSun Java System Directory Server or Directory Server
HP-UX 11i V2 (IPF)HP-UX or HP-UX (IPF)
Red Hat LinuxLinux
Red Hat Enterprise Linux
Red Hat Enterprise Linux AS 3 (IPF)Linux (IPF)Linux
Red Hat Enterprise Linux AS 4 (IPF)
Red Hat Enterprise Linux AS 3 (AMD64 & Intel EM64T)Linux (EM64T)
Red Hat Enterprise Linux AS 4 (AMD64 & Intel EM64T)
Red Hat Enterprise Linux ES 4 (AMD64 & Intel EM64T)
turbolinux 7 Server for AP8000Linux for AP8000
Microsoft(R) Windows NT(R) Workstation Operating System Version 4.0Windows NT
Microsoft(R) Windows NT(R) Server Network Operating System Version 4.0
Microsoft(R) Windows(R) 2000 Professional Operating SystemWindows 2000
Microsoft(R) Windows(R) 2000 Server Operating System
Microsoft(R) Windows(R) 2000 Datacenter Server Operating System
Microsoft(R) Windows(R) 2000 Advanced Server Operating SystemWindows 2000 or Windows 2000 Advanced Server
Microsoft(R) Windows ServerTM 2003, Standard EditionWindows Server 2003
Microsoft(R) Windows ServerTM 2003, Enterprise Edition
Microsoft(R) Windows ServerTM 2003 R2, Standard EditionWindows Server 2003 R2 or Windows Server 2003
Microsoft(R) Windows ServerTM 2003 R2, Enterprise Edition
64 bit Version Microsoft(R) Windows ServerTM 2003, Enterprise Edition (IPF)Windows Server 2003 (IPF) or Windows Server 2003
Microsoft(R) Windows ServerTM 2003, Standard x64 EditionWindows Server 2003 or Windows Server 2003 x64 EditionsWindows (x64)
Microsoft(R) Windows ServerTM 2003, Enterprise x64 Edition
Microsoft(R) Windows ServerTM 2003 R2, Standard x64 EditionWindows Server 2003, Windows Server 2003 R2 or Windows Server 2003 x64 Editions
Microsoft(R) Windows ServerTM 2003 R2, Enterprise x64 Edition
Microsoft(R) Windows(R) XP Professional x64 EditionWindows XP or Windows XP x64 Edition
Microsoft(R) Windows(R) XP Professional Operating SystemWindows XP ProfessionalWindows XP
Microsoft(R) Windows(R) XP Home Edition Operating SystemWindows XP Home Edition
Single serverSDS
System managerMGR
Front-end serverFES
Dictionary serverDS
Back-end serverBES

This manual also uses the following abbreviations:

AbbreviationFull name or meaning
ACKAcknowledgement
ADMAdaptable Data Manager
ADOActiveX Data Objects
ADTAbstract Data Type
APApplication Program
APIApplication Programming Interface
ASN.1Abstract Syntax Notation One
BESBack End Server
BLOBBinary Large Object
BOMByte Order Mark
CD-ROMCompact Disc - Read Only Memory
CGICommon Gateway Interface
CLOBCharacter Large Object
CMTCassette Magnetic Tape
COBOLCommon Business Oriented Language
CORBA(R)Common ORB Architecture
CPUCentral Processing Unit
CSVComma Separated Values
DAOData Access Object
DATDigital Audio Taperecorder
DBDatabase
DBMDatabase Module
DBMSDatabase Management System
DDLData Definition Language
DF for Windows NTDistributing Facility for Windows NT
DF/UXDistributing Facility/for UNIX
DICDictionary Server
DLTDigital Linear Tape
DMLData Manipulate Language
DNSDomain Name System
DOMDocument Object Model
DSDictionary Server
DTDDocument Type Definition
DTPDistributed Transaction Processing
DWHData Warehouse
EUCExtended UNIX Code
EXExclusive
FATFile Allocation Table
FDFloppy Disk
FESFront End Server
FQDNFully Qualified Domain Name
FTPFile Transfer Protocol
GUIGraphical User Interface
HBAHost Bus Adapter
HDHard Disk
HTMLHyper Text Markup Language
IDIdentification number
IPInternet Protocol
IPFItanium(R) Processor Family
JARJava Archive File
Java VMJava Virtual Machine
JDBCJava Database Connectivity
JDKJava Developer's Kit
JFSJournaled File System
JFS2Enhanced Journaled File System
JISJapanese Industrial Standard code
JP1Job Management Partner 1
JREJava Runtime Environment
JTAJava Transaction API
JTSJava Transaction Service
KEISKanji processing Extended Information System
LANLocal Area Network
LDAPLightweight Directory Access Protocol
LIPloop initialization process
LOBLarge Object
LRULeast Recently Used
LTOLinear Tape-Open
LULogical Unit
LUNLogical Unit Number
LVMLogical Volume Manager
MGRSystem Manager
MIBManagement Information Base
MRCFMultiple RAID Coupling Feature
MSCSMicrosoft Cluster Server
NAFONetwork Adapter Fail Over
NAPTNetwork Address Port Translation
NATNetwork Address Translation
NICNetwork Interface Card
NISNetwork Information Service
NTFSNew Technology File System
ODBCOpen Database Connectivity
OLAPOnline Analytical Processing
OLEObject Linking and Embedding
OLTPOn-Line Transaction Processing
OOCOBOLObject Oriented COBOL
ORBObject Request Broker
OSOperating System
OSIOpen Systems Interconnection
OTSObject Transaction Service
PCPersonal Computer
PDM II E2Practical Data Manager II Extended Version 2
PICPlug-in Code
PNMPublic Network Management
POSIXPortable Operating System Interface for UNIX
PPProgram Product
PRProtected Retrieve
PUProtected Update
RAIDRedundant Arrays of Inexpensive Disk
RDRelational Database
RDBRelational Database
RDB1Relational Database Manager 1
RDB1 E2Relational Database Manager 1 Extended Version 2
RDORemote Data Objects
RiSeReal time SAN replication
RMResource Manager
RMMResource Manager Monitor
RPCRemote Procedure Call
SAXSimple API for XML
SDSSingle Database Server
SGMLStandard Generalized Markup Language
SJISShift JIS
SNMPSimple Network Management Protocol
SQLStructured Query Language
SQL/KStructured Query Language / VOS K
SRShared Retrieve
SUShared Update
TCP/IPTransmission Control Protocol / Internet Protocol
TMTransaction Manager
TMS-4V/SPTransaction Management System - 4V / System Product
UAPUser Application Program
UOCUser Own Coding
VOS KVirtual-storage Operating System Kindness
VOS1Virtual-storage Operating System 1
VOS3Virtual-storage Operating System 3
WSWorkstation
WWWWorld Wide Web
XDM/BASE E2Extensible Data Manager / Base Extended Version 2
XDM/DFExtensible Data Manager / Distributing Facility
XDM/DSExtensible Data Manager / Data Spreader
XDM/RD E2Extensible Data Manager / Relational Database Extended Version 2
XDM/SD E2Extensible Data Manager / Structured Database Extended Version 2
XDM/XTExtensible Data Manager / Data Extract
XFITExtended File Transmission program
XMLExtensible Markup Language

Path name representations

Windows version: %PDDIR%\CLIENT\UTL\

UNIX version: $PDDIR/client/lib/

Log representations

[Figure]Windows version
The application log that is displayed by Windows Event Viewer is referred to as the event log. The following procedure is used to view the event log.
To view the event log:
1. Choose Start, Programs, Administrative Tools (Common), and then Event Viewer.
2. Choose Log, and then Application.
3. The application log is displayed. Messages with HiRDBSingleServer or HiRDBParallelServer displayed in the Source column were issued by HiRDB.
If you specified a setup identifier when you installed HiRDB, the specified setup identifier follows HiRDBSingleServer or HiRDBParallelServer.
[Figure]UNIX version
The OS log is referred to generically as syslogfile. syslogfile is the log output destination specified in /etc/syslog.conf. Typically, the following files are specified as syslogfile.
OSFile
HP-UX/var/adm/syslog/syslog.log
Solaris/var/adm/messages or /var/log/syslog
AIX 5L/var/adm/ras/syslog
Linux/var/log/messages

Conventions: Diagrams

This manual uses the following conventions in diagrams:

[Figure]

Conventions: Fonts and symbols

Font and symbol conventions are classified as:

These conventions are described below.

General font conventions

The following table lists the general font conventions:

FontConvention
BoldBold type indicates text on a window, other than the window title. Such text includes menus, menu options, buttons, radio box options, or explanatory labels. For example, bold is used in sentences such as the following:
  • From the File menu, choose Open.
  • Click the Cancel button.
  • In the Enter name entry box, type your name.
ItalicsItalics are used to indicate a placeholder for some actual text provided by the user or system. Italics are also used for emphasis. For example:
  • Write the command as follows:
    copy source-file target-file
  • Do not delete the configuration file.
Code fontA code font indicates text that the user enters without change, or text (such as messages) output by the system. For example:
  • At the prompt, enter dir.
  • Use the send command to send mail.
  • The following message is displayed:
    The password is incorrect.

Examples of coding and messages appear as follows (although there may be some exceptions, such as when coding is included in a diagram):

MakeDatabase
...
StoreDatabase temp DB32

In examples of coding, an ellipsis (...) indicates that one or more lines of coding are not shown for purposes of brevity.

Font conventions in syntax explanations and examples

Conventions used in syntax explanations are explained as follows. When typing an actual command, omit the syntax conventions, attributes, and syntax elements described here.

Conventions in syntax explanations

Syntax definitions appear as follows:

StoreDatabase [temp|perm] (database-name ...)

The following table lists the conventions used in syntax explanations:

Example font or symbolConvention
StoreDatabaseCode-font characters must be entered exactly as shown.
database-nameThis font style marks a placeholder that indicates where appropriate characters are to be entered in an actual command.
SDBold code-font characters indicate the abbreviation for a command.
permUnderlined characters indicate the default value.
[ ]Square brackets enclose an item or set of items whose specification is optional.
|Only one of the options separated by a vertical bar can be specified at the same time.
...An ellipsis (...) indicates that the item or items enclosed in ( ) or [ ] immediately preceding the ellipsis may be specified as many times as necessary.
()Parentheses indicate the range of items to which the vertical bar (|) or ellipsis (...) is applicable.
[Figure]The tilde is followed by the attribute of a user-specified value.
<< >>Double angle brackets enclose the default value that the system assumes when the specification is omitted.
< >Angle brackets enclose the syntax element notation for a user-specified value.
(( ))Double parentheses enclose the permitted range of user-specified values.

Syntax element conventions

Syntax element conventions explain the types of user-specified values.

Syntax elementConvention
<unsigned-integer>Numeric characters
<unsigned-decimal>1Numeric value (0-9), period (.), numeric value (0-9)
<identifier>2Alphanumeric character string beginning with an alphabetic character
<character-string>String of any characters
<alphabetics-and-special-characters>The alphabetic characters (A-Z and a-z) and the special characters #, @, and \.
<symbolic-name>Alphanumeric name beginning with an alphabetic character or a special character
<path-name>3Alphanumeric characters, backslashes (\) or forward slashes (/), and periods (.)
In Windows, path names may include spaces and parentheses.
Use all single-byte characters. Alphabetic characters are case-sensitive. The path name depends on the OS in use.
1
If the numeric value preceding the period is 0, it can be omitted. Similarly, if the numeric value following the period is 0, both the period and the 0 can be omitted.
2
An RDAREA name can begin with an alphabetic character or symbol, an alphanumeric, an underscore (_), or a space. However, when an RDAREA name includes a space, the entire name must be enclosed in double quotation marks (").
A host name is a character string that can consist of alphabetic characters (A to Z, a to z), numeric characters, periods (.), hyphens (-), and underscores (_). Host names can begin with a numeric character.
3
If you use a space or a parenthesis in a path name, you must enclose the entire path name in double quotation marks (").

Notations used in computational expressions

The following notations are used in computational expressions

SymbolMeaning
[Figure][Figure]Round up the result to the next integer.
Example: The result of [Figure]34 [Figure] 3[Figure] is 12.
[Figure][Figure]Discard digits following the decimal point.
Example: The result of [Figure]34 [Figure] 3[Figure] is 11.
MAXSelect the largest value as the result.
Example: The result of Max(10, 2 [Figure] 4, 3 + 8) is 11.
MINSelect the smallest value as the result.
Example: The result of Min(10, 2 [Figure] 4, 3 + 8) is 8.

Notes on Windows path names

Example: C:\win32app\hitachi\hirdb_s\spool\tmp

Example: pdinit -d "C:\Program Files(x86)\hitachi\hirdb_s\conf\mkinit"

However, double quotation marks are not necessary when you use the set command in a batch file or at the command prompt to set an environment variable, or when you specify the installation directory. If you do use double quotation marks in such a case, the double quotation marks become part of the value assigned to the environment variable.

Example: set PDCLTPATH=C:\Program Files\hitachi\hirdb_s\spool

Conventions: KB, MB, GB, and TB

This manual uses the following conventions:

Conventions: Version numbers

The version numbers of Hitachi program products are usually written as two sets of two digits each, separated by a hyphen. For example:

The version number might be shown on the spine of a manual as Ver. 2.00, but the same version number would be written in the program as 02-00.

Sources of the HiRDB Relational database language

The HiRDB relational database language described in this manual was developed by adding Hitachi's unique interpretations and specifications to the following standards. Hitachi expresses its appreciation to the developers and acknowledges the sources of these specifications.

HiRDB Relational Database
JIS X3005-1997 Database Language SQL
IS ISO9075-1992 Information processing systems - Database Language SQL
ANS X3.135-1986 Information systems - Database Language SQL

Relationships to ANSI Standard

The specifications for the HiRDB relational database language have been developed by adding Hitachi's unique interpretations to the specifications of ANS X3.135-1986 Information systems - Database Language SQL.

Hitachi has been granted ANSI's permission for the creation of this manual; however, ANSI is not responsible for this product or the contents of this manual.

Note
JIS: Japanese Industrial Standard
IS: International Standard
ANS: American National Standard
ANSI: American National Standards Institute

Acknowledgements

The COBOL language specifications were developed by CODASYL. The following statements acknowledges Hitachi's indebtedness to the developers, as requested by CODASYL. This acknowledgement restates a portion of the acknowledgement provided in the original specifications of COBOL, CODASYL COBOL Journal of Development 1984:

Any organization interested in reproducing the COBOL report and specifications in whole or in part, using ideas from this report as the basis for an instruction manual or for any other purpose, is free to do so. However, all such organizations are requested to reproduce the following acknowledgement paragraphs in their entirety as part of the preface to any such publication. Any organization using a short passage from this document, such as in a book review, is requested to mention COBOL in acknowledgement of the source, but need not quote the acknowledgement.

COBOL is an industry language and is not the property of any company or group of companies, or of any organization or group of organizations.

No warranty, expressed or implied, is made by any contributor or by the CODASYL COBOL Committee as to the accuracy and functioning of the programming system and language. Moreover, no responsibility is assumed by any contributor, or by the committee, in connection therewith.

The authors and copyright holders of the copyrighted material used herein
FLOW-MATIC (trademark of Sperry Rand Corporation), Programming for the UNIVAC[Figure] I and II, Data Automation Systems copyrighted 1958, 1959, by Sperry Rand Corporation; IBM Commercial Translator Form No. F 28-8013, copyrighted 1959 by IBM; FACT, DSI 27A5260-2760, copyrighted 1960 by Minneapolis-Honeywell

have specifically authorized the use of this material, in whole or in part, in the COBOL specifications. Such authorization extends to the reproduction and use of COBOL specifications in programming manuals or similar publications.

Note

The DB2 linkage facility was unavailable at the time of this publication because the English version of DF/UX Extension could not be supported in time for the document release.

Important notes on this manual

The following facilities are explained, but they are not supported:

The following products and option program products are explained, but they are not supported:

Notes on printed manuals

Please note that even though the printed manuals are separated into Part I and Part II, the chapters and page numbers sequentially continue from Part I to Part II. Also, please note that the index is only included in Part II.