Environment variables for use in Node.js applications

A Node.js application can find out information about the CICS bundle and environment by using environment variables.

CICS_APPLID
The value of the CICS region application identifier APPLID SIT parameter.
CICS_BUNDLE
The name of the BUNDLE resource that is used to manage the CICS bundle that contains the Node.js application.
CICS_BUNDLEID
The ID of the CICS bundle that contains the Node.js application.
CICS_LOCAL_CCSID
The value of the LOCALCCSID SIT parameter.
CICS_LOG

The name of the z/OS UNIX file to which CICS writes log messages during operation of a Node.js application.

CICS_NODEJSAPP
The name of the NODEJSAPP within the CICS bundle.
CICS_OUTPUT_DIR
The directory that contains the STDOUT, STDERR, LOG, and TRACE files, relative to CICS_WORK_DIR, namely <APPLID>/<BUNDLEID>/<NODEJSAPP>.
CICS_PROFILE_PATH
The fully qualified file name to the Node.js application profile.
CICS_STDERR
The fully qualified file name that the Node.js standard error (STDERR) is written to.
CICS_STDOUT
The fully qualified file name that the Node.js standard output (STDOUT) is written to.
CICS_TRACE
The fully qualified file name that the Node.js trace (TRACE) is written to.
CICS_USSCONFIG
The value of the UNIX System Services configuration USSCONFIG SIT parameter.
CICS_USSHOME
The value of the UNIX System Services home USSHOME SIT parameter.
CICS_WORK_DIR
The working directory of the Node.js application.

Example usage

Environment variables can be accessed in the Node.js application by using the process.env global variable, for example:

console.log("Node.js application " + process.env.CICS_NODEJSAPP + 
   " is running in CICS region " + process.env.CICS_APPLID);