Set an APPX environment variable

Set the variable on the machine that runs the APPX process that uses it. For example, the engine on the server creates a report file, even when the user requests the report from a desktop client.

Test in a terminal on the APPX server

These examples direct new report files to an existing test directory. Use your installation's engine path and a directory that the test user can write to and that has the appropriate access permissions for the reports. Include the final directory separator for compatibility with older releases.

Unix or Linux, using sh, ksh or bash

export APPX_PRT_FI_DIR=/srv/appx/reports/
printenv APPX_PRT_FI_DIR
/usr/local/appx/appx

Windows, using Command Prompt

set "APPX_PRT_FI_DIR=C:\Appx\Reports\"
set APPX_PRT_FI_DIR
C:\Appx\Appx.exe

The engine inherits the value from the window where you start it. On Unix, put the export in the user's login profile or the script that starts a character-mode session to repeat it on later logins. On Windows, put the SET command in the batch file that launches the engine for this workflow. Engines already running keep their own environments. A desktop connecting to a Login Manager starts its engine through that service. Client-side settings belong to the process that reads them. For example, the legacy native client uses APPX_SCRIPT_IN, APPX_SCRIPT_OUT, APPX_SCRIPT_STEP and APPX_TST_DIR for its own script recording and playback.

Set the installation default in appx.env

  1. Locate the data directory for the engine you use. APPX uses the inherited APPXPATH if set. The normal default is the data directory beside the engine executable. For an installation under /usr/local/appx this is normally /usr/local/appx/data/appx.env. The Windows equivalent under C:\Appx is C:\Appx\data\appx.env.
  2. Back up that file. Its comments describe common settings for the installed release. Edit it as plain text. Put one assignment on each line and use a separate line starting with # for a comment. Use a literal pathname. A Unix example is APPX_PRT_FI_DIR=/srv/appx/reports/. A Windows example is APPX_PRT_FI_DIR=C:\Appx\Reports\. Omit shell commands such as set and export from this file.
  3. Start a new engine. An installation file change takes effect when the engine starts. Before upgrading APPX, retain the old file and compare it with the file shipped in the new release so you can carry forward the settings your site uses.

When the same name is set more than once

In the 5.5.4 and 6.2.1 Unix and Windows engines, each later assignment of the same name takes precedence. The engine reads the following settings in order.

  1. The environment supplied by the launching shell, script or login service.
  2. The installation's appx.env.
  3. On Unix, appx.env in the home directory of the operating-system account running the engine. On Windows, C:\appx.env on the engine host. This Windows file applies across accounts on that machine.
  4. A --NAME=value argument passed directly to the engine. For example, /usr/local/appx/appx --APPX_PRT_FI_DIR=/srv/appx/reports/ selects that directory for one run.

To select a different data directory, supply APPXPATH to the launcher before the engine starts. APPX already needs that directory when it looks for the installation's environment file.

Set one APPX Login Manager service

APPX 5.0 and later use appxLoginMgr. Identify the service by the port the client connects to and its installed service name. Record its existing value before changing it. Run the appropriate command as the service administrator during a suitable restart window. The examples assume the service is named appx8060. Replace it with the actual name.

Unix or Linux

Work in the directory containing the service's existing .ini and .env files. Use the Login Manager from the same installation.

/usr/local/appx/services/appxLoginMgr -modify -name=appx8060 APPX_PRT_FI_DIR=/srv/appx/reports/

Windows administrator Command Prompt

C:\Appx\services\appxLoginMgr.exe -modify -name=appx8060 APPX_PRT_FI_DIR=C:\Appx\Reports\

The variable name has no leading dash in a Login Manager command. On Unix the service stores engine variables in its service-specific environment file. On Windows it stores them under the service's Environment registry subkey. The modify operation applies the change and restarts the login service. Sign out of APPX and start a new session through its usual port. The engine still reads its own environment files in the order above.

On pre-5.0 installations, Unix sites using appxd can export the variable in the script that starts their connection daemon, commonly start-appxd.sh. Windows sites using the older connection manager can use the installation appx.env for a server-wide engine setting. Use the instructions for that connection manager if the change must be confined to one service.

Select diagnostic settings for a single run

Many APPX diagnostics have two settings. One selects the log file and the other selects the events written to it. Choose the pair used by the component you are investigating. Use a separate writable file for each test process and keep the capture short.

  • APPXIO file access. In 5.5.4 and 6.2.1, APPX_FD_CACHE_LOG names the file-descriptor cache log. APPX_FD_CACHE_CODE=1 records cache activity including open attempts. Use 3 to include lock activity as well. For example, on Unix, start one engine with /usr/local/appx/appx --APPX_FD_CACHE_LOG=/srv/appx/logs/file-open.log --APPX_FD_CACHE_CODE=1. Use an existing log directory writable by the engine account. Repeat the operation once and inspect file-open.log.
  • Connection diagnostics. APPX_NET_LOG and APPX_NET_LOG_MASK select the native APPX network log and its events. The APPX/ODBC process uses its own APPX_ODBC_LOG and APPX_ODBC_CODE pair. Put the settings in the environment of the process handling the connection you want to trace.
  • License Server startup and login. On both releases, APPX_LS_DBG=0x07 enables errors and startup progress. The server writes to the filename on its -l= argument. For the engine requesting a license, APPX_LS_LOG selects a separate log. Follow Collect a License Server log and a login attempt for platform commands and cleanup.

Close the test engine when finished. A setting passed directly as --NAME=value goes away with that process. For settings entered in appx.env or a service, restore the previous values before starting further sessions.

Verify or undo a change

Start a fresh session the same way as the affected user. For the report-directory example, run a small report and retain its print file, then verify the new file is in the selected directory on the server. A variable displayed by the shell confirms only the launching shell's value. If the report goes elsewhere, check the service name, engine path, last assignment and directory permissions.

For a terminal-only test, close the test window or restore the prior shell value. For an engine environment file, restore the previous line or remove the line you added. For a service, restore its saved setting, restart the affected service and test with a new session.

Comments:

Read what other users have said about this page or add your own comments.


 
Topic revision: r8 - 03 Dec 2026, AdminUser - This page was cached on 03 Dec 2026 - 19:11.

Powered by Foswiki. Wiki content belongs to its contributing authors.