Node.js profile and command line options

Node.js profile and command line options are listed with their descriptions.

Command line options

You can specify command line options in the Node.js profile that are passed to the Node.js runtime. Any line beginning with a hyphen is treated as a command line option. Command line options must be specified one per line. Any additional parameters for a command line option must appear on the same line.

This is an example of setting command line options in the profile:
--v8-pool-size=0
--redirect-warnings=/file/path
--require "/path/modules/module.js"

Profile options and their descriptions

Default values, where applicable, are the values that CICS® uses when the option is not specified. The sample Node.js profiles might specify a value that is different from the default value.

_DFH_UMASK={007|nnn}

Sets the UNIX System Services process UMASK that applies when NODEJSAPP files are created. This value is a three digit octal. For example, the default value of 007 allows the intended read/write/execute permissions of owner and group to be respected, while preventing read/write/execute being given to other when a file is created. The supplied value must fall within the range of 000 (least restrictive) to 777 (most restrictive). UMASK applies for the lifetime of the Node.js runtime.

LIBPATH_PREFIX=pathnames
LIBPATH_SUFFIX=pathnames

Specifies directory paths to be searched for native C++ dynamic link library (DLL) files that are used by the Node.js runtime or modules, and that have the extension .so in z/OS® UNIX. This includes files that are required to run the Node.js application and extra native libraries that are loaded by application code or services.

The base library path for the Node.js runtime is built automatically by using the directories that are specified by the USSHOME system initialization parameter and the NODE_HOME option in the Node.js profile.

You can extend the library path by using the LIBPATH_SUFFIX option. This option adds directories to the end of the library path after the base library path. Use this option to specify directories that contain any additional native libraries that are used by Node.js modules your application requires.

The LIBPATH_PREFIX option adds directories to the beginning of the library path before the base library path. Use this option with care. If DLL files in the specified directories have the same name as DLL files on the base library path, they are loaded instead of the supplied files.

Use a colon, not a comma, to separate paths in path names.

LOG={&APPLID;.&NODEJSAPP;.Dyyyymmdd.Thhmmss.log|file_name}

Specifies the name of the z/OS UNIX file to which CICS writes log messages during operation of a Node.js application. The level of messages written to this file is controlled by the LOG_LEVEL option.

If an absolute filename is specified for LOG then CICS creates any directories within the path that do not exist.

If the file exists, output is appended to the end of the file. To create unique output files for each Node.js application, use the &NODEJSAPP; and &APPLID; symbols in your file name, as demonstrated in the sample Node.js profiles.

LOG_FILES_MAX={0|number}

Specifies the number of old log files that are kept on the system. A default setting of 0 ensures that all old versions of the log file are retained. You can change this value to specify how many old log files you want to remain on the file system.

If STDOUT, STDERR, STDIN, LOG, and TRACE use the default scheme, or if customized, include the &DATE;.&TIME; pattern, then only the newest nn of each log type is kept on the system. If your customization does not include any variables, which make the output unique, then the files are appended to, and there is no requirement for deletion. Special value 0 means do not delete.

LOG_LEVEL={INFO|WARNING|ERROR|NONE}
Provides control over the logged information returned in the .log file. A value of NONE suppresses all output and the file is empty. Any other value indicates the lowest log type that is written to the .log file. For example, selecting WARNING gives log entries of WARNING level and above.
NODE_HOME=pathname

Specifies the installation location for IBM® SDK for Node.js -z/OS in z/OS UNIX. This is a required parameter.

NODEJSAPP_DISABLE_TIMEOUT={10000|number}

Specifies the timeout value in milliseconds that CICS waits when attempting to disable a NODEJSAPP. It defaults to 10000 (10 seconds). The minimum value that you can specify is 1000 (1 second).

This is the minimum length of time that CICS will wait for a Node.js application process to terminate after sending a SIGTERM signal. If the process does not terminate before this timeout value expires, CICS issues a SIGKILL signal to forcefully end the process.

PRINT_PROFILE={TRUE|FALSE}

If this option is set to TRUE, the options and environment variables from the Node.js profile that are passed to the Node.js runtime and application are output to SYSPRINT.

STDERR={&APPLID;.&NODEJSAPP;.Dyyyymmdd.Thhmmss.stderr|file_name}

Specifies the name of the z/OS UNIX file to which the STDERR stream is redirected. If you do not set a value for this option, CICS automatically creates unique trace files for each Node.js application.

If an absolute filename is specified for STDERR then CICS creates any directories within the path that do not exist.

If the file exists, output is appended to the end of the file. To create unique output files for each Node.js application, use the &NODEJSAPP; and &APPLID; symbols in your file name, as demonstrated in the sample Node.js profiles. If STDERR is left to default then CICS uses the &APPLID; and &NODEJSAPP; symbols, and the date and time stamp when the Node.js application started to create unique output files.

STDIN=file_name

Specifies the name of the z/OS UNIX file from which the STDIN stream is read. CICS does not create this file unless you specify a value for this option.

STDOUT={&APPLID;.&NODEJSAPP;.Dyyyymmdd.Thhmmss.stdout|file_name}

Specifies the name of the z/OS UNIX file to which the STDOUT stream is redirected. If you do not set a value for this option, CICS automatically creates unique trace files for each Node.js application.

If an absolute filename is specified for STDOUT then CICS creates any directories within the path that do not exist.

If the file exists, output is appended to the end of the file. To create unique output files for each Node.js application, use the &NODEJSAPP; and &APPLID; symbols in your file name, as demonstrated in the sample Node.js profiles. If STDOUT is left to default then CICS uses the &APPLID; and &NODEJSAPP; symbols, and the date and time stamp when the Node.js application started to create unique output files.

TRACE={&APPLID;.&NODEJSAPP;.Dyyyymmdd.Thhmmss.trace|file_name}

Specifies the name of the z/OS UNIX file to which Node.js tracing is written during operation of a Node.js application. If you do not set a value for this option, CICS automatically creates unique trace files for each Node.js application.

If an absolute filename is specified for TRACE then CICS creates any directories within the path that do not exist.

If the file exists, output is appended to the end of the file. To create unique output files for each Node.js application, use the &NODEJSAPP; and &APPLID; symbols in your file name, as demonstrated in the sample Node.js profiles.

WORK_DIR={.|/tmp|pathname}

Specifies the directory on z/OS UNIX that the CICS region uses for STDOUT, STDERR, TRACE, and other output files related to a Node.js application. A period (.) is defined in the supplied Node.js profiles, indicating that the home directory of the CICS region user ID is to be used as the working directory. This directory can be created during CICS installation. If the directory does not exist or if WORK_DIR is omitted, /tmp is used as the z/OS UNIX directory name.

You can specify an absolute path or relative path to the working directory. A relative working directory is relative to the home directory of the CICS region user ID. If you do not want to use the home directory as the working directory for activities that are related to Node.js, or if your CICS regions are sharing the z/OS user identifier (UID) and so have the same home directory, you can create a different working directory for each CICS region.

If you specify a directory name that uses the &APPLID; symbol (whereby CICS substitutes the actual CICS region APPLID), you can have a unique working directory for each region, even if all the CICS regions share the set of Node.js profiles. For example, if you specify:
WORK_DIR=/u/&APPLID;/nodeoutput
each CICS region that uses that Node.js profile has its own working directory. Ensure that the relevant directories are created on z/OS UNIX, and that the CICS regions are given read, write, and run access to them.

You can also specify a fixed name for the working directory. In this situation, you must also ensure that the relevant directory is created on z/OS UNIX, and access permissions are given to the correct CICS regions. If you use a fixed name for the working directory, the output files from all the Node.js applications in the CICS regions that share the Node.js profile are created in that directory. If you use fixed file names for your output files, the output from all the Node.js applications in those CICS regions is appended to the same z/OS UNIX files. To avoid appending to the same files, use the &NODEJSAPP; symbol and the &APPLID; symbols to produce unique output and dump files for each Node.js application.

Do not define your working directories in the CICS installation directory on z/OS UNIX, which is the home directory for CICS files as defined by the USSHOME system initialization parameter.