SQL Diagnostics
Overview
Setting environment variable PJS_SQL_DEBUG=1 causes the SQL API to output diagnostic information to standard output. The PJS_SQL_DEBUG option can be set in 3 different ways:
When starting the Profound.js instance;
Via code for a specific Profound.js program;
For the entire Profound.js instance;
1. Enabling from an Interactive Terminal
# SQL diagnostic information will display in the terminal window.
cd /profoundjs
PJS_SQL_DEBUG=1 node start.js2. Enabling Diagnostics in a Profound.js Program
When starting Profound.js as a service on IBM i, the diagnostic information will be written to the instance standard output log in directory /profoundjs-base/INSTANCE_NAME/logs.
// Run this before calling any SQL API.
process.env["PJS_SQL_DEBUG"] = "1";3. Enabling for Profound.js Instance
You can enable this setting for the Profound.js instance as a whole by adding the following environment variable to the instance’s conf file (found here: /profoundjs-base/INSTANCE_NAME/conf):
path=/profoundjs/start.js
nodePath=/QOpenSys/pkgs/lib/nodejs22/bin/node
ccsid=37
autostart=1
env=PJS_SQL_DEBUG=1 #Sets this option at the instance-levelAfter changing the instance’s conf file, you must restart the instance in order for the change to take effect. There’s more information about changing this file on the following page: https://profoundlogicsupport.atlassian.net/wiki/x/ffnNCQ.