It’s been a few weeks since our first technical preview of IBM® SDK for Node.js™ for z/OS®, and we are happy to share that a new update to the tech preview driver is now available at: node/sdk/ztp.

The important feature in this update is initial support for native add-ons, which effectively allows you to load dynamically-linked shared objects written in C/C++ into your Node.js applications. With this ability, you are no longer confined to what you can write with JavaScript and Node.js APIs, but can extend your applications to tap existing native drivers, libraries, and services, etc (i.e. the rest of the world!)

There are a few important points to highlight with the z/OS native add-on support:

  • The standard C/C++ compiler on z/OS is IBM XL C/C++. If you are on z/OS 2.1, you must use XL C/C++ V2R1M1, as native add-ons depend on the -qasm option introduced in that level of XL C/C++ compiler. For z/OS 2.2, you are set with XL C/C++ V2R2. Be sure to export the following environment variables:
    • export CC=/bin/xlc
    • export CXX=/bin/xlC
  • Due to compiler option differences in XL C/C++ versus other compilers, we had to make some z/OS-specific updates to node-gyp. The version of node-gyp packaged in the Technical Preview drivers already includes the necessary z/OS changes, and you should use this version to build your native code (i.e. don’t bother with npm install node-gyp). We will be looking into contributing these changes to the official repositories.
  • Python 2.7.x is required to facilitate native add-ons compilations. A compatible version is available from Rocket Software: http://www.rocketsoftware.com/ported-tools.
  • GNU Make 4.0 or newer is required.  A compatible version is available from Rocket Software: http://www.rocketsoftware.com/ported-tools/make-40.

Thank you to everyone who has shared feedback with us on the Tech Preview for z/OS so far. It’s exciting to hear all the great things folks are building and running on Node.js on z/OS. As always, please reach out to us if you have any issues, via our community or on GitHub.

Join The Discussion

Your email address will not be published. Required fields are marked *