The RDBMS command provides the connection information required for a relational database management system (RDBMS). There can be only one RDBMS statement within a Apply Engine script and therefore only one RDBMS can be a source target or both. Both the Parser component and the Engine have the ability to connect to a relational database using the RDBMS command information. It is only necessary for the Parser to connect to a database if the SQLDML Description type is used.
RDBMS [ODBC | NATIVEORA | NATIVEDB2] <dbname> [<usernamem> | DUMMY] [<password> | DUMMY] [‘connect_string’];
Keyword | Description |
---|---|
[ODBC] | Specifies ODBC as the connection type to be used by the Parser and Engine at execution. ODBC can be used to connect to a variety of Relational databases but is most often used for connections to SQL Server |
[NATIVEORA] | Specifies a connection to an Oracle database using the Oracle supplied SQL*Net connection type. |
[NATIVEDB2] | Specifies a connection to a DB2 LUW (UDB) database using the IBM supplied connection type. On zOS, it is not necessary to specify the connection TYPE. |
<dbname> | This parameter specifies, in the case of DB2 and Oracle, the name of the relational database instance (SSID for Db2) that the Apply Engine will be connecting to during processing. When connecting to SQLServer or another RDBMS using ODBC, this parameter specifies the "Data Source Name" or DNS defined by the platform's ODBC configuration manager. |
[<username> | DUMMY] |
Specifies the username that to be used to make the connection to the relational database. In the case of DB2, DUMMY must be used. |
[<password > | DUMMY] |
Plain text passwords are exposed in listings and the parse file. DO NOT use plain text passwords. Precisely highly recommends using |
[passcmd] | Any script that will return the RDBMS user password. The filename must be "inlined". Inlined input is between /+ in column 1 on one line, and +/ in column 1 on a subsequent line. For example,
|
[passfile] | A file containing the RDBMS user password that may be hidden from public view using permissions or other means. For example,
|
[‘connect_string’] | This optional parameter specifies additional information that may be required by certain relational database management systems in order to connect properly. |
Example 1: Connecting to a Relational Database using ODBC
RDBMS ODBC EMPLOYEE_MASTER U123 passcmd
/+
./getpw.sh
+/
;
Example 2: Connecting to a DB2 UDB Relational Database
RDBMS NATIVEDB2 HRMASTER U789 passcmd
/+
./getpw.sh
+/
;
Example 3: Connecting to a Oracle Relational Database
RDBMS NATIVEORA CUSTOMER SQDCUST passcmd
/+
./getpw.sh
+/
;