Support for ODBC was added in Profound.js 5.3.0.
Profound.js's "odbc" database driver works with the odbc package from NPM to allow database connectivity via the Open Database Connectivity (ODBC) standard. The "odbc" driver can be used to connect to any database supported by Profound.js, but is primarily designed and tested for connecting to DB2 on IBM i. For the other supported databases, the DB-specific drivers should be used instead.
The "odbc" driver offers a few advantages over Profound.js's "IBMi" driver:
- Increased performance, both for connections to a remote IBM i and for connections on IBM i to the local database.
- Connections to multiple IBM i systems are supported. The "IBMi" driver only supports connecting to a single IBM i system.
- Nothing needs to be installed on target IBM i systems. The "IBMi" driver requires a Profound.js installation on the target IBM i system.
The "odbc" driver can be used to run SQL statements against DB2 for i using the following APIs:
Installation
The "odbc" driver utilizes 3 different components that need to be installed on the 'source' system. Meaning, the system where you are running Profound.js and want to connect to IBM i.
- The Profound.js "odbc" driver. This component is built into Profound.js, starting with version 5.3.0 and relies on the following components for connectivity to the target system.
- The open source package odbc, which must be installed separately via NPM. This package provides a Node.js interface for using ODBC drivers.
- The ODBC driver for the target system. This package performs the actual work of communicating with the target database. For example, ODBC access to IBM i is provided by the IBM i Access ODBC Driver, which is supplied by IBM.
Installing the odbc Package with NPM
See the package's installation instructions on NPM, here:
https://www.npmjs.com/package/odbc
Follow the instructions for installing necessary pre-requisites, depending on your operating system. When installing the package itself it's recommended to install the latest beta version, due to performance issues in the current release. To do that, run this command from your Profound.js installation directory instead of using the command suggested on the NPM page:
npm install odbc@beta
Installing the IBM i Access ODBC Driver
The ODBC driver is provided as part of the IBM i Access Client Solutions Application Package. The Application Package is a separate installation from the main ACS installation that includes the TN5250 emulator. Versions are available for Windows, Linux, Mac, and IBM i. To download the Application Package, visit the IBM i ACS Home Page here:
https://www.ibm.com/support/pages/ibm-i-access-client-solutions
An IBM account is required to access the downloads. Click on Downloads for IBM i Access Client Solutions, accept the license agreement, and use the ACS App Pkg link for the appropriate source operating system. For IBM i, use ACS PASE App Pkg. Installation instructions are included in each download package.
The IBM i version of the Application package installs via the open-source package manager "yum". See here for instructions on setting up yum on IBM i:
https://www.ibm.com/support/pages/node/706903
For Application Package installers for 32-bit Windows or languages other than English, visit the IBM ESS Website.