I started experimenting with the IBM SDK for Node.js â€“ z/OS when it first became available on z/OS.Â In this blog, I will describe the sample program I wrote that uses the IBM SDK for Node.js â€“ z/OS, the jdbc npm module, and the IBM Data Virtualization Manager for z/OS to read data from a VSAM data set using SQL.
The IBM Data Virtualization Manager provides a way to access z/OS relational and non-relational databases and file structures using a SQL, a NoSQL, or a Web service interface.
The following diagram shows the components used in the sample program.
You can get a copy of the sample program in GitHub.
I would like to highlight the following items when using the jdbc npm module with IBM SDK for Node.js â€“ z/OS:
- The jdbc npm module requires the IBM SDK for Node.js on z/OS Version 8.
- The native add-ons require the Make 4.1 and Python 2.7.3 utilities to compile on z/OS.
- Set the following environment variables to compile the jdbc native modules:
export CXXFLAGS="-U_VARARG_EXT_ -qnoopt"
export JAVA_HOME=/usr/lpp/java/IBM/current_64/and issue the following command to install the jdbc npm module.
LDFLAGS="$JAVA_HOME/lib/s390x/j9vm/libjvm.x" V=1 npm install --javahome=$JAVA_HOME jdbc
- Specify the location of the Java shared objects in your LIBPATH.
Refer to the sample in GitHub for additional information on how to configure and run the sample Node.js application.
I hope you find this blog helpful. In my next blog, I will describe another Node.js sample that uses the NoSQL MongoDB interface of IBM Data Virtualization Manager for z/OS. Good luck!