************************************************************************
* COMMUNICATIONS SYSTEM FOR WINDOWS NT RELEASE 1.0 (5622-991) *
************************************************************************
This document contains information about program enhancements for
this release. This information is intended to supplement and, in some
cases, clarify the information provided in the publications available
for the program. The information is organized by the names of the
affected components of this program.
************************************************************************
* INSTALLATION AND CONFIGURATION *
************************************************************************
Communications System for Windows NT should be installed from an
Administrator ID. If it is not installed by an Administrator, the
folder and icons for Communications System will not be created.
However, all product files will be installed. If your installation did
not create the folder with its icons, you may start Communications
System by calling CS2START in the \CS2\SYS directory. You may shut down
Communications System by calling CS2STOP in the \CS2\SYS directory.
************************************************************************
* TCPIP SUPPORT AND CONFIGURATION *
************************************************************************
For this release of Communications System for Windows NT:
* the TCPIP rem does not support TCPIP communciations to non-DAE
remote nodes.
* the maximum number of remote nodes that a Communications System for
Windows NT can communicate with is: 170. Attempts to connect to
remote nodes when this maximum has been reached will fail and may
result in unexpected behaviour.
* the TCPIP CACB Maximum_number_of_connections field should be set to
a number larger than the maximum number of remote connections made.
This as-shipped CACB CS2TC000.CS2NODE has the field set to: 512.
************************************************************************
* DATABASE TRANSACTION SUPPORT *
************************************************************************
Transaction Mirroring and CS2_TRANSACT:
If you are using database transaction mirroring and the client and
servers are different system architectures, you must do the following:
Set the CS2AP_XACT_T fields client_resp_path and server_drive_path to
NULL, the input_file_ptr and reply_file_ptr to NULL, and num_in_files
and num_reply_files to 0 when you issue the CS2_TRANSACT request to
the server. Otherwise, the mirror transaction may fail due to an
unrecognized path.
If you need to transfer files with CS2_TRANSACT requests, the
client and the servers must have compatible path syntax.
-----------------------------------------------------------------------
TECHNICAL GUIDE AND REFERENCE BOOK UPDATE
CS2_TRANSACT DBCB Non-SQL database type:
CS2_TRANSACT is used by client DAE applications to call user-created
server shared library functions. A Non-SQL DBCB database type is now
supported. In addition, the database component offers the option of
providing user-written CONNECT, DISCONNECT, COMMIT, and ROLLBACK
functions for the Non-SQL DBCB database type. These can be called
automatically (implicitly) by the database component, according to the
client application's specification of the work_opt and fail_opt flags in
the CS2_TRANSACT request parameters.
----------------------------------------
Oracle7 through ODBC Driver support:
Oracle7 through an ODBC Driver support has been added to the following
releases:
AIX Communications System/6000 Release 1.1 (PTF UN87891 and
its prerequites required)
Communications System for Windows NT Release 1.0 (Transaction
support only)
Other DAE releases may support this enhancement for client applications
only. You may need to obtain a PTF to use this support in current
DAE releases.
DBCB Configuration:
A new DBCB database type has been added for ODBC support. The C
programming constant is DB_TYPE_ODBC (cs2codfn.h) and the numeric value
is 12.
When creating a DBCB for an Oracle7 database through an ODBC Driver do,
the following:
1. Set the DBCB database type field to the ODBC type:
CS2_UTIL application program: DB_TYPE_ODBC (macro in cs2codfn.h)
cs2cuoff/cs2cutil utilities: ODBC
cs2utt or cnfgtool utilies: 12
2. For AIX, set the DBCB database name field to the ORACLE_SID of the
Oracle database. For Windows NT, set the DBCB database name field
to the database name.
3. For AIX, verify that the .odbc.ini file in the home directory of
UNIX ID from which DAE is run contains an entry in the [ODBC Data
Sources] section for the ORACLE_SID and contains an [oracle_sid]
section with the appropriate "Driver=" information.
For example, if the ORACLE_SID is PROD, the DBCB database name
should be PROD, the [ODBC Data Sources] secion of .odbc.ini should
have a line that reads PROD=Visigenic Oracle7, and it should have
a [PROD] section with a line that reads
Driver=/usr/opt/odbc/drivers/vsorac.so.1.
-----------------------------------------------------------------------
APPLICATION PROGRAMMING BOOK UPDATES
The following changes should be made throughout Chapter 19,
"Transaction Functions."
Replace "USHORT" with "CS2_USHORT"
Replace "int" and "INT" with "CS2_SHORT"
Replace "unsigned int" with "CS2_USHORT"
Replace "PCHAR" with "CS2_ADDRESS"
Replace "PSZ" with "CS2_ADDRESS"
Replace "CHAR *" with "char **"
For the correct prototypes to the Transaction Functions, see the TxE
header files (txe*.h) in the \cs2\include directory.
----------------------------------------
CS2_TRANSACT API enhancement:
The CS2AP_XACT_T fields client_resp_path and server_drive_path may be
set to NULL, if no files are being transferred. The requirement of a
a valid path for the fields has been removed.
----------------------------------------
CS2_TRANSACT DBCB Non-SQL database type user-written CONNECT,
DISCONNECT, COMMIT, and ROLLBACK:
Users can write their own CONNECT, DISCONNECT, COMMIT, and ROLLBACK
(CDCR) functions for a DBCB database type of Non-SQL. In the user's
TxE server shared library, the following functions need to be written.
CS2_RC CS2ENTRY CONNECT( DB_SQL_STRUCT_P p_sdb ) { }
CS2_RC CS2ENTRY DISCONNECT( DB_SQL_STRUCT_P p_sdb ) { }
CS2_RC CS2ENTRY COMMIT( DB_SQL_STRUCT_P p_sdb ) { }
CS2_RC CS2ENTRY ROLLBACK( DB_SQL_STRUCT_P p_sdb ) { }
The following is the declaration of the DB_SQL_STRUCT data structure.
It is defined in \cs2\include\cs2dbsdb.h:
struct DB_SQL_STRUCT_S {
CS2_LONG sqlcode; /* set to the return code of the function */
CS2_ADDRESS luserid; /* ptr to user ID, only used by connect */
CS2_USHORT userid_len; /* user ID length */
CS2_ADDRESS password; /* ptr to password, only used by connect */
CS2_USHORT passwd_len; /* password length */
CS2_ADDRESS dbname; /* ptr to database name, used by connect */
CS2_USHORT dbname_len; /* database name length */
CS2_USHORT flag_trace; /* NIB trace flag - 0=no trace, 1= trace on */
}
If there are multiple TxE server shared libraries, each library needs
to include the function entry points for the CDCR functions. These
functions can then call common functions in another shared library.
For example:
userlib1.dll:
userfn1(...) {...}
CONNECT(...) {... common_connect(...) ...}
DISCONNECT(...) {... common_disconnect(...) ...}
COMMIT(...) {... common_commit(...) ...}
ROLLBACK(...) {... common_rollback(...) ...}
userlib2.dll:
userfn2(...) {...}
CONNECT(...) {... common_connect(...) ...}
DISCONNECT(...) {... common_disconnect(...) ...}
COMMIT(...) {... common_commit(...) ...}
ROLLBACK(...) {... common_rollback(...) ...}
userlib3.dll:
common_connect{...}
common_disconnect{...}
common_commit{...}
common_rollback{...}
----------------------------------------
Oracle7 through ODBC Driver support
This enhancement is supported using the Visigenic ODBC Driver Set
(Visigenic Software, Inc.). Other ODBC Driver Sets have not been
tested.
Prerequisites:
The following software is required.
AIX Communications System/6000:
Oracle7 Server Release 7.2.2.3.0
Visigenic ODBC Driver Set for AIX Version 1.10.0004 and above only
Communications System for Windows NT:
Oracle7 Release 7.2
Visigenic ODBC Oracle7 Driver Version 1.1 Windows NT and above only
Verifying the Visigenic ODBC Driver Set Installation:
After the ODBC Driver Set has been installed, we suggest the following to
ensure that the driver is installed and configured properly:
1. For AIX in particular, verify that configuration settings such as
environment variables (ORACLE_HOME, ORACLE_SID, LIBPATH) are
correct. Verify that the location and settings in .odbc.ini
are correct.
2. Start Oracle7.
3. Run sample programs found in the ODBC SDK (for example, 'adhoc' and
'static').
Usage Notes on SQLTYPE in the DBDA Structure:
The CS2_DB APIs use an input DBDA structure (CS2AP_DBS_T.dbda field) to
associate host variables with markers in SQL statements and an output
DBDA structure (placed at the start of the output results buffer) to
describe the results of a SELECT. The DBDA structure consists of a
fixed header structure (CS2AP_DBDA_HDR_T) followed by a variable number
of column/marker structures (CS2AP_DBDA_VAR_T). The CS2AP_DBDA_VAR_T
structure consists of fields that indicate the type of column being
accessed and the type of C storage used for sending and receiving data.
The first table below shows the SQL data types supported, the SQL
declaration syntax for DB2 and Oracle7, and the corresponding
CS2AP_DBDA_VAR_T sqltype value. If a SQL declaration is listed as
"n/a," the corresponding sqltype is not applicable for that DBMS.
The second table describes the remaining CS2AP_DBDA_VAR_T fields for
each type.
Oracle7 DBDA
SQL Type DB/2 Declaration Declaration sqltype
--------------------- ----------------------- ----------- -------
fixed-length CHAR(n) CHAR(n) 453
character string w/NOT NULL w/NOT NULL 452
fixed-length CHAR(n) FOR BIT DATA n/a 453
binary data w/NOT NULL 452
varying-length VARCHAR(n) VARCHAR2(n) 449
character string w/NOT NULL w/NOT NULL 448
varying-length VARCHAR(n) FOR BIT DATA RAW(n) 449
binary data w/NOT NULL w/NOT NULL 448
long varying-length LONG VARCHAR LONG 457
character string w/NOT NULL w/NOT NULL 456
long varying-length LONG VARCHAR FOR BIT DATA LONG RAW 457
binary data w/NOT NULL w/NOT NULL 456
fixed-point signed DECIMAL(p,s) NUMBER(p,s) 481*
number with precision w/NOT NULL w/NOT NULL 480
p and scale s
fixed-point number SMALLINT n/a** 501
with precision 5 and w/NOT NULL 500
scale 0
fixed-point number INTEGER n/a** 497
with precision 10 and 496
scale 0
floating-point number n/a FLOAT(b) 481
with binary 480
precision b
double precision DOUBLE PRECISION NUMBER 481
floating-point number 480
date/time data TIMESTAMP DATE 393
392
date (only) data DATE n/a 385
384
time (only) data TIME n/a 389
388
fixed-length GRAPHIC(n) n/a 469
graphic string w/NOT NULL 468
varying-length VARGRAPHIC(n) n/a 465
graphic string w/NOT NULL 464
long varying-length LONG VARGRAPHIC n/a 473
graphic string w/NOT NULL 472
* In prior versions, sqltype 484/485 (packed decimal) was recommended
but required the user to convert numbers to/from BCD (binary coded
decimal) format. The packed decimal sqltype is not supported in
DAE's ODBC version.
** Oracle maps the DB2 types SMALLINT and INTEGER to the Oracle type
NUMBER. If a column is declared as type SMALLINT or INTEGER in
Oracle, the appropriate sqltype is 480/481.
C variable type
DBDA pointed to by DBDA DBDA
SQL Type sqltype DBDA sql_data sqllen ext_attrib
--------------------- ------- ----------------- ------ ----------------
fixed-length 453 char[len] len DB_NO_EXT_ATTRIB
character string 452 no '\0' needed
fixed-length 453 char[len] len DB_FOR_BIT_DATA
binary data 452 no '\0' needed
varying-length 449 struct { len+2 DB_NO_EXT_ATTRIB
character string 448 short int len;
char arr[len];}
no '\0' needed
varying-length 449 struct { len+2 DB_FOR_BIT_DATA
binary data 448 short int len;
char arr[len];}
no '\0' needed
long varying-length 457 struct { len+2 DB_NO_EXT_ATTRIB
character string 456 short int len;
char arr[len];}
no '\0' needed
long varying-length 457 struct { len+2 DB_FOR_BIT_DATA
binary data 456 short int len;
char arr[len];}
no '\0' needed
fixed-point signed 481* double 8 n/a
number with precision 480
p and scale s
fixed-point number 501 short int 2 n/a
with precision 5 and 500
scale 0
fixed-point number 497 long int 4 n/a
with precision 10 and 496
scale 0
floating-point number 481 double 8 n/a
with binary 480
precision b
double precision 481 double 8 n/a
floating-point number 480
date/time data 393 char[19-26] 19 - n/a
392 no '\0' needed 26
date (only) data 385 char[10] 10 n/a
384 no '\0' needed
time (only) data 389 char[8] 8 n/a
388 no '\0' needed
fixed-length 469 char[len] len n/a
graphic string 468 no '\0' needed
varying-length 465 struct { len+2 n/a
graphic string 464 short int len;
char arr[len];}
no '\0' needed
long varying-length 473 struct { len+2 n/a
graphic string 472 short int len;
char arr[len];}
no '\0' needed
* In prior versions, sqltype 484/485 (packed decimal) was recommended
but required the user to convert numbers to/from BCD (binary coded
decimal) format. The packed decimal sqltype is not supported in
DAE's ODBC version.
** Oracle maps the DB2 types SMALLINT and INTEGER to the Oracle type
NUMBER. If a column is declared as type SMALLINT or INTEGER in
Oracle, the appropriate sqltype is 480/481.
DBMS Interoperability:
DBCBs (and their associated schema objects) can be ported from one
supported DBMS to another without modifification of the associated
application program, provided that platform-specific or RDBMS vendor
specific parameters are not used.
ODBC defines certain extensions to SQL that are common to most DBMSs
including:
- Date, time, and timestamp data
- Scalar functions such as numeric, string, and data type conversion
functions
- LIKE predicate escape characters
- Outer joins
- Procedures
Most DBMSs provide the same extensions to SQL as ODBC does. Because of
this, an application may be able to submit an SQL statement using either
the syntax defined by ODBC or the syntax defined by the DBMS. The
interoperability between DBMSs for a client application may be enhanced
if the ODBC syntax is used. Please refer to any ODBC Version 2.0
publications for more details regarding ODBC extensions to SQL.
************************************************************************
* End of file *
************************************************************************