CICS has always been unique in providing developers the choice to use the language most appropriate to tackle the business and technical requirements – be it with Java, COBOL, PL/I, C/C++, or Assembler. CICS TS V5.5 extended this choice by adding support for Node.js.
The integration of Node.js with CICS brings two diverse user communities together; the ecosystem of CICS products and tools can be used to manage a collection of Node.js applications, and the power and flexibility of a modern language is brought to CICS.
If you’re new to CICS - a powerful mixed language application server on the IBM Z mainframe - find out more by watching the video course series or reading What is CICS Transaction Server for z/OS?
Node.js is a good match for CICS
From a CICS perspective, many businesses that use CICS also expose their core business applications as RESTful APIs, for example using CICS web services or z/OS Connect. In some cases, APIs need additional logic for example to combine several APIs, or to augment them with data from other sources.
Node.js is ideally suited for integrating services and, if those services or microservices expose useful function from COBOL applications, it keeps a business responsive and able to quickly fulfill business requirements from its existing CICS application.
Although Node.js applications can be hosted on many operating systems and cloud environments, hosting them on z/OS - along with other applications and the data that they consume - makes management easier, minimizes the likelihood of communications performance degradation, and takes advantage of the strengths of the mainframe, such as security, resilience, and cost-effective scalability.
Have a look at article Reasons to Host your Node.js Applications on z/OS for even more benefits of IBM Open Enterprise SDK for Node.js, including its eligibility for IBM Z container pricing.
As a Node.js developer, you’ll be on familiar ground
To develop for CICS, you can use your existing development and testing tools and a sample is provided to get you going quickly.
You don’t need to know all the ins-and-outs of CICS. CICS services, such as the EXEC CICS commands and transaction and security context, are not available to Node.js applications. Instead, Node.js applications can call CICS programs using either network services, or, for improved response times, they can use a locally optimized memory transport provided by the ibm-cics-api module.
To deploy the Node.js application, it needs to be included in a bundle of CICS resources (a CICS bundle. You do this either by using the CICS Explorer which is an Eclipse-based tool to manage CICS bundles, systems and resources or by using the Zowe CLI CICS deploy plug-in.
As a CICS system programmer, Node.js fits right in
A Node.js application is deployed as part of a CICS bundle. Like with any CICS bundle, you can automate the build and deployment using the CICS build toolkit and DFHDPLOY utility.
Once the CICS bundle is installed, a NODEJSAPP resource provides you with basic information about the Node.js application and the directory location its log files, and you can view this with CEMT. You can get more detailed information from modules such as Node Application Metrics that can be aggregated with other Node.js applications using Prometheus.
Node.js applications are run on general purpose CPs, and some operations use the Integrated Cryptographic Services Facility (ICSF). For details, see Installing and configuring.
How do I run a Node.js application on my system?
You’ll need to download and install CICS Transaction Server for z/OS V5.5 or V5.6, CICS Explorer 5.5 or later, and IBM Open Enterprise SDK for Node.js.
Create a CICS bundle using CICS Explorer V5.5 or later.
Copy in the Node.js application into a sub-directory of the CICS bundle.
Select New > Node.js Application and you’ll be guided through through selecting the Node.js application start script and creating a profile. The profile is used to customize the installation location of Node.js in zFS, and environment variables required by your application, such as TCP/IP port and working directory for log files.
Export the CICS bundle to zFS. If your application requires modules that are not already installed in zFS, use Node Package Manager (npm) that is provided with IBM Open Enterprise SDK for Node.js to install them either in a global location or within the CICS bundle.
The CICS system programmer defines and installs a BUNDLE resource in CICS. The Node.js application will be started.
Need to know more about Node.js?
Node.js applications typically consists of a .js file that is the initial script, a package.json file that describes the modules the script requires, and other scripts, modules, and web site files.
Node.js application are built using a modular architecture:
Node.js applications are inherently asynchronous:
Node.js applications are inherently asynchronous. They don’t share in the implicitly single-threaded mentality of traditional CICS languages and programs.
Node.js is supported by the community:
There is a large community of full-stack developers able to design and code the UI, APIs and server components, and Node.js is their preferred runtime. The Node.js Foundation claim there are 9 million instances of Node.js.
Calling CICS programs:
Although Node.js applications can call CICS programs using network services, for improved response times they can also use a locally optimized memory transport provided by the ibm-cics-api module.