Database Connectors for Visual COBOL
Database Connectors User's Guide
Database Connectors Overview
Relational Database Management Systems Support
Accessing Data
Database Concepts
How Database Connectors Works
What Is a Transparent Interface?
XFDs and Mapping
Summary
Getting Started
Licensing
The Demonstration Program
XFDs
XFD Files
How XFDs are Formed
Defaults Used in XFD Files
KEY IS Phrase
REDEFINES Clause
Summary of XFD Fields
Identical Field Names
Long Field Names
Naming the XFD File
Forming the Final XFD Name
Mapping Other Files to an XFD
Using XFD Directives
Introduction
XFD Directive Syntax
Line Continuation for Complex XFDs
Supported XFD Directives
Invalid Data
Illegal COBOL Data
Invalid Key Data
Invalid Data Other Than Keys
Invalid Database Data
Working with COBOL
Examples of Preparing and Compiling a Program
Example 1 - Compiling with just the CREATEXFD directive
Example 2 - Compiling with the WHEN XFD Directive
Example 3 - Using Additional XFD Directives
New and Existing Databases
Default Behavior
Accessing Existing Database Files
How Do I Match Existing Text Fields?
How Do I Match Existing Numeric Fields?
Field Names
Resolving Name Conflicts
File Handling Configuration
Configuring the File Handler
Run Time System Configuration
ACUFH Configuration Variables
Database Connectors for DB2
DB2 Concepts Overview
Transactions
Record-locking Issues in Transactions
Database Connectors and Record Locking
Client Configuration
Setting Up the User Environment
Designating the Host Data Source
Configuring the File Handler
Filename Translation
Decimal Points
ACUFH Configuration File Variables for DB2
Record and Table Locking
Limits and Ranges
Data Type Mapping
Run-Time System Errors
Common Questions and Answers
Database Connectors for Microsoft SQL Server
Microsoft SQL Server Concepts Overview
Client Configuration
Installing the Server and Client Machine
Setting Up a User Login
Setting Up the User Environment
Configuring the File Handler for
Filename Translation
ACUFH Configuration File Variables for MSSQL
Using the Database Table
Table Locking
Stored Procedures
Developer- or Site-supplied Stored Procedures
Built-in Stored Procedures
Limits and Ranges
Supported Data Types for SQL Server
Run-Time System Errors
Common Questions and Answers
Database Connectors for ODBC
ODBC Concepts
What Is ODBC?
Origins of ODBC
Restrictions
ODBC Structure
Client Configuration
ODBC Installation
Supported Drivers
Setting Up Data Sources
Setting Up the User Environment
Designating the Host File System
Designating the Host Data Source
Configuring the File Handler for ODBC
Filename Translation
ACUFH Configuration File Variables for ODBC
Decimal Points
Mixed-case SQL Identifiers
Record and Table Locking
Limits and Ranges
Driver Requirements
Data Type Mapping
Run-time System Errors
Common Questions and Answers
Database Connectors for Oracle
Oracle Concepts Overview
Transactions
Record Locking Issues in Transactions
Database Connectors and Record Locking
The open_cursors Parameter
Table Ownership
Security
Client Configuration
Oracle's Instant Client
Checking System Parameters
Setting Up a User Account
Setting Up the User Environment
Configuring the File Handler
Setting Up the Search Path
Handling Transactions
Filename Translation
ACUFH Configuration File Variables for Oracle
Using the Database Table
Unsupported Features
Limits and Ranges
Data Type Mapping
Run-Time System Errors
Common Questions and Answers
Performance and Troubleshooting
Performance Issues
Guidelines
Guideline 1 - Database Administrator
Guideline 2 - Understand COBOL Operations and Database Operations
Guideline 3 - Program and Database Interaction
Guideline 4 - Plan for Growth
The WHERE Constraint
Troubleshooting
Setting External Variables
Compiler Errors
Run-Time System Errors
Using the FILE_TRACE ACUFH Configuration Variable
Questions and Answers
Database Connectors Tasks
To Configure a Login
To create an error map
To enable tracing for Database Connectors connections
To install Database Connectors for Microsoft SQL Server
To prepare your program for execution using Database Connectors
To set the system parameters
To Set Up a Service Name for an Oracle Database
To Set Up The DB2 User Environment
To compile and run the demo program
To Test the Installation of Oracle's Instant Client
To use the WHERE constraint from COBOL
Database Connectors Reference
Configuration Variables
4GL_2000_CUTOFF configuration variable
4GL_8_DIGIT_CUTOFF configuration variable
4GL_COLUMN_CASE configuration variable
4GL_COMMIT_COUNT configuration variable
4GL_CONVERT_DATE_ZERO configuration variable
4GL_DB_MAP configuration variable
4GL_EXTRA_DB_COLS_OK configuration variable
4GL_FULL_DATA_TEST configuration variable
4GL_IGNORED_SUFFIX_LIST configuration variable
4GL_ILLEGAL_DATA configuration variable
4GL_JULIAN_BASE_DATE configuration variable
4GL_USEDIR_LEVEL configuration variable
4GL_WHERE_CONSTRAINT configuration variable
A_DB2_ALTERNATE_COMMIT_LOGIC configuration variable
A_DB2_CATALOG configuration variable
A_DB2_COMMIT_ON_BEGIN
A_DB2_DATASOURCE configuration variable
A_DB2_ERROR_MAP_FILE configuration variable
A_DB2_ISOLATION_LEVEL configuration variable
A_DB2_LOCK_METHOD configuration variable
A_DB2_LOGIN configuration variable
A_DB2_PASSWD configuration variable
A_DB2_STRICT_EQUAL configuration variable
A_DB2_TABLE_TYPES configuration variable
A_DB2_USE_CATALOG configuration variable
A_DB2_USE_CHAR_FOR_BINARY configuration variable
A_DB2_USE_SQLCOLUMNS configuration variable
A_DB2_USE_SQLTABLES configuration variable
A_MSSQL_ADD_IDENTITY
A_MSSQL_ADD_TIMESTAMP
A_MSSQL_APPROLE_NAME
A_MSSQL_APPROLE_PASSWD
A_MSSQL_CREATE_UNICODE_COLUMNS
A_MSSQL_CURSOR_OPTION_1,2,3
A_MSSQL_DATABASE
A_MSSQL_DEADLOCK_LOOPS
A_MSSQL_DEFAULT_CONNECTION
A_MSSQL_DEFAULT_OWNER
A_MSSQL_DO_NOT_TRANSLATE_CHAR
A_MSSQL_FAILOVER_PARTNER
A_MSSQL_FAILOVER_PARTNER_SPN
A_MSSQL_FAST_ACCESS
A_MSSQL_IGNORE_GUID_COLUMNS
A_MSSQL_LIMIT_DROPDOWN
A_MSSQL_LOCK_DB
A_MSSQL_LOGIN
A_MSSQL_MAX_BINARY_LENGTH
A_MSSQL_MAX_CHAR_LENGTH
A_MSSQL_MAX_CHARACTERS
A_MSSQL_MAX_COLUMNS
A_MSSQL_MULTI_SUBNET_FAILOVER
A_MSSQL_NATIVE_LOCK_TIMEOUT
A_MSSQL_NO_23_ON_START
A_MSSQL_NO_CACHED_READ
A_MSSQL_NO_COUNT_CHECK
A_MSSQL_NO_DBID
A_MSSQL_NO_RECORD_LOCKS
A_MSSQL_NO_TABLE_LOCKS
A_MSSQL_NT_AUTHENTICATION
A_MSSQL_ODBC_DRIVER_NAME
A_MSSQL_PACKETSIZE
A_MSSQL_PASSWD
A_MSSQL_ROWCOUNT
A_MSSQL_SELECT_KEY_ONLY
A_MSSQL_SEPARATE_LOCK_CONN
A_MSSQL_SERVER_SPN
A_MSSQL_SKIP_ALTERNATE_KEYS
A_MSSQL_STRIP_PATH_INFO
A_MSSQL_TRANSACTION_LEVEL
A_MSSQL_TRANSLATE_TO_ANSI
A_MSSQL_UNLOCK_ON_EXECUTE
A_MSSQL_UPDATE_PRIMARY_COLS
A_MSSQL_USE_DROPDOWN_QUERIES
A_ODBC_ALTERNATE_COMMIT_LOGIC configuration variable
A_ODBC_CATALOG configuration variable
A_ODBC_COMMIT_ON_BEGIN configuration variable
A_ODBC_DATASOURCE configuration variable
A_ODBC_ERROR_MAP_FILE configuration variable
A_ODBC_ISOLATION_LEVEL configuration variable
A_ODBC_LOCK_METHOD configuration variable
A_ODBC_LOGIN configuration variable
A_ODBC_NO_NULL_COLUMNS
A_ODBC_PASSWD
A_ODBC_PRINT_LOG configuration variable
A_ODBC_QUOTE_IDENTIFIERS configuration variable
A_ODBC_STRICT_EQUAL configuration variable
A_ODBC_TABLE_TYPES configuration variable
A_ODBC_UNSIGNED_TINYINT configuration variable
A_ODBC_USE_CATALOG configuration variable
A_ODBC_USE_CHAR_FOR_BINARY configuration variable
A_ODBC_USE_SPACE_IN_DATES configuration variable
A_ODBC_USE_SQLCOLUMNS configuration variable
A_ODBC_USE_SQLTABLES configuration variable
A_ORA_DATABASE configuration variable
A_ORA_HINTS configuration variable
A_ORA_KEEP_START_CURSOR configuration variable
A_ORA_LIMIT_DROPDOWN configuration variable
A_ORA_MAX_FILE_CURSORS configuration variable
A_ORA_NLS_SORT configuration variable
A_ORA_WAIT_LOCK configuration variable
A_ORACLE_ERROR_FILE configuration variable
COMMIT_COUNT configuration variable
FILE_TRACE configuration variable
FILE TRACE FLUSH
ORA_LOGIN configuration variable
ORA_PASSWD configuration variable
USER_PATH (for Oracle) configuration variable
USER_PATH (for DB2) configuration variable
XFD_DIRECTORY configuration variable
XFD_MAP configuration variable
XFD_MAP_RESETS configuration variable
XFD_PREFIX configuration variable
Database Connectors Error Messages
Run Time - File Status Errors
01 Read error on dictionary file
02 Corrupt dictionary file
04 Open error
04 Too many fields in the key
05 (no message associated with this error)
05 Too many fields in the key (more than 16 for Oracle)
11 Stored procedures not found
12 A column of a key is of data type TEXT or IMAGE, which is illegal
12 DB2 library function returned an unexpected error
13 Illegal size or type of data for variable xxx
13 Internal error
14 More than one table with the same name
16 Trying to rename a table across databases
17 Cache error
18 Primary Key error
09/19 Table Size Error
20 (no message associated with this error)
21 (no message associated with this error)
1001 Invalid Cursor
22007 Invalid Character value for Cast Specification
Compiler Errors
Bad picture for DATE: keyname
Data missing from key segment keyname
Directive word too long: keyname
Field xxx causes duplicate database data
GROUP expected after USE
Missing '=' in XFD directive
Missing field name after WHEN
Visual COBOL lock table missing
Value should be a literal: xxx
Value should be a name: xxx
Value should be numeric: xxx
Variable file name requires FILE directive
WHEN variable xxx not found in record
xxx not unique in first 30 characters
xxx: unknown XFD directive
Stored Procedures
Sample XFD
sp_AcuInit stored procedure
sp_AcuRemoveUnusedLocks_1 stored procedure
sp_AcuTableReport_1 stored procedure
sp_AcuUserCount_1 stored procedure
sp_AcuZeroUserCount_1 stored procedure
tablename_delete stored procedure
tablename_insert stored procedure
tablename_read stored procedure
tablename_startnnn stored procedure
tablename_update stored procedure
XFD Directives
ALPHA XFD directive
BINARY XFD directive
COBOL-TRIGGER XFD directive
IDENTITY-COLUMN XFD directive
COMMENT XFD directive
DATE XFD directive
FILE XFD directive
NAME XFD directive
NULL XFD Directive
NUMERIC XFD directive
SECONDARY_TABLE XFD directive
USE GROUP XFD directive
VAR_LENGTH XFD directive
WHEN XFD directive
WHEN Complex Expressions
XSL XFD directive
Compiler Directives Affecting XFD Creation
CREATEXFD XFD directive