The Middleware source (SRC = " Middleware") can be used to read data in any database accessible via the Hardis Middleware (the AWSCDF utility).
This includes:
AS/400 databases,
PC-based SQL databases accessible via an SQL API driver (DB2, Oracle, SQL Server or ODBC),
SQL databases accessible via a JDBC driver (JAVA Middleware).
The following source-related parameters are recognized:
Input parameters (DATA_SRC)
Parameter name |
Type |
Mandatory |
Description |
SERVER |
string |
Yes |
Host name or IP address of the server (the Middleware daemon, the AWSCDF utility and the necessary SQL drivers must all be installed on the server). |
PORT |
string |
Yes |
Middleware daemon connection port (number or service name). |
MID_CONNECT |
string |
Yes |
Hardis Middleware connection string in the form "user.password". The specified user must be registered on the server. |
SERVER_TYPE |
integer |
No |
Server type (AS/400, Windows or Java). - 0: AS/400 server, - 1: Windows server, - 2: Java server. |
FILE |
string |
Yes |
Name of the AS/400 file, Btrieve file or SQL table whose data is to be exported. |
SELECT |
string |
No |
Optional clause used to select data in the file (with SQL or AS/400 databases). With an SQL database, this clause is the right-hand part of a WHERE clause (select * from table where clause). With an AS/400 database, the clause is converted into an OPENQRYF command. This selection command is not permitted with Btrieve files. |
TRM_LENGTH |
integer |
No |
Estimated maximum size (in Kb) of the generated Middleware frames. |
AS/400 parameters |
|||
LIB |
string |
Yes |
Library containing the file. |
Windows parameters |
|||
DBM |
string |
Yes |
DBMS type (alias): - DB2: API driver for DB2 UDB, - Oracle: API driver for Oracle (8.0 and >), - SQL Server: API driver for SQL Server, - ODBC: API driver for ODBC, - Btrieve: Btrieve database. The Oracle7 and Oracle8 values are recognized for compatibility with existing scripts. |
DATABASE DB |
string |
Yes (*) |
Name, alias or URL access of the database containing the data to be transferred. |
DB_CONNECT |
string |
No (*) |
Database connection string in the form "user.password". If this parameter is not specified, a system connection will be attempted. |
SCHEMA |
string |
No (*) |
Owner schema for the table. The (implicit) default value is the connected user's name (the DB_CONNECT parameter or the AWSCDF program's system connection). |
FILEDIR |
string |
Yes (**) |
Directory containing the Btrieve files on the server. |
Java parameters |
|||
DRIVER |
string |
Yes |
Name of JDBC driver (for example: com.ibm.db2.jcc.DB2Driver). |
URL |
string |
Yes |
JDBC URL used to connect to the database (for example: jdbc:db2:TESTBD). The syntax of this URL depends on the JDBC driver used. |
DB_CONNECT |
string |
No |
Connection to the database string, in the form "user password". |
SCHEMA |
string |
No |
Table owner schema. The (implicit) default value is the connected user's name (DB_CONNECT parameter or the AWSCDF program's system connection). |
Notes:
(*) |
With SQL databases |
(**) |
With Btrieve databases |
Output parameters (DATA_DEST)
Parameter name |
Type |
Mandatory |
Description |
SERVER |
string |
Yes |
Host name or IP address of the server (the Middleware daemon, the AWSCDF utility and the necessary SQL drivers must all be installed on the server). |
PORT |
string |
Yes |
Middleware daemon connection port (number or service name). |
MID_CONNECT |
string |
Yes |
Hardis Middleware connection string in the form "user.password". The specified user must be registered on the server. |
SERVER_TYPE |
integer |
No |
Server type (AS/400, Windows or Java). - 0: AS/400 server, - 1: Windows server, - 2: Java server. |
FILE |
string |
Yes |
Name of the AS/400 file (or SQL table) into which the data is to be inserted. |
MODE |
string |
No |
Data insertion mode: - INSERT: the data are inserted into the table (default setting). - REPLACE: the data replace the data already in the table. You can also specify a DELETE clause, failing which all the existing data in the table are deleted. - UPDATE: the data is updated or added, based on the table's primary key. If the table does not have a key, or if the key contains all the columns, the data is added (This mode is not supported on AS/400). |
DELETE |
string |
No |
Optional clause used to delete data in the files (with SQL or AS/400 databases). With an SQL database on an AS/400, this clause is the right-hand part of a WHERE clause (delete * from table where clause). This clause will only be analyzed if the insertion mode is set to Replace (MODE="REPLACE"). This command is not permitted with Btrieve files. |
TRM_LENGTH |
integer |
No |
Estimated maximum size (in Kb) of the generated Middleware frames. Where the destination is an SQL database on a PC, the changes are validated (by the COMMIT procedure) once the data in the frame has been processed. |
AS/400 parameters |
|||
LIB |
string |
Yes |
Library containing the file. |
Windows parameters |
|||
DBM |
string |
Yes |
DBMS type (alias): - DB2: API driver for DB2 UDB, - Oracle: API driver for Oracle (8.0 and >), - SQL Server: API driver for SQL Server, - ODBC: API driver for ODBC. The Oracle7 and Oracle8 values are recognized for compatibility with existing scripts. |
DATABASE DB |
string |
Yes* |
Name, alias or URL access of the database containing the data to be transferred. |
DB_CONNECT |
string |
No* |
Database connection string in the form "user.password". |
SCHEMA |
string |
No* |
Schema owning the table. The (implicit) default value is the connected user's name (the DB_CONNECT parameter or the AWSCDF program's system connection). |
FILEDIR |
string |
Yes** |
Directory containing the Btrieve files on the server. |
Java parameters |
|||
DRIVER |
string |
Yes |
Name of JDBC driver (for example: com.ibm.db2.jcc.DB2Driver). |
URL |
string |
Yes |
JDBC URL used to connect to the database (for example: jdbc:db2:TESTBD). The syntax of this URL depends on the JDBC driver used. |
DB_CONNECT |
string |
No |
Connection to the database string, in the form "user password". |
SCHEMA |
string |
No |
Table owner schema. The (implicit) default value is the connected user's name (DB_CONNECT parameter or the AWSCDF program's system connection). |
Notes:
(*) |
With SQL databases |
(**) |
With Btrieve databases |
Specific features of the Java version:
The middleware source is 100% compatible with the tool's Windows version. The ANSI data is transferred to the configured ANSI code page (Cp1252 or overriden by -DansiCharset).
Click below for further details about:
The DATA_SRC command.
The DATA_DEST command.