Environment variables

The following environment variables are used by Sculptor:


The user logon name (returned by the Sculptor variable sys.UserName). This is standard on many UNIX systems and can be set on Windows systems if required.


The standard operating system path search list. This must include the directory $SCULPTOR/bin. Note that despite the introduction of registry variables for 32-bit Windows versions of Sculptor (see below), the environment variable PATH still defines which software is invoked from the MS-DOS command interpreter. If PATH causes a different version of Sculptor to be executed from that defined as Current Version in the registry, erroneous operation can occur.


This variable is ignored if SCDATA is defined. Otherwise, it is prepended at run time to the name of any file declared in a Sculptor screen form program, unless the file name begins with “\” or “/”, or contains an embedded “:”.


A prefix which is, if defined, prepended at run time to the name of any file declared in a Sculptor screen form program, unless the file name contains an embedded “:”, which is taken to indicate a remote pathname over a network or an absolute pathname on MS-DOS.


The pathname of the exchange rates file for use with the Sculptor multicurrency feature. See Multicurrency.


On a client, specifies the directory in which a downloaded program should be stored. If it is not set the directory $SCULPTOR/app is used. See Loading a Sculptor program from a server.


Specifies the directory in which the Sculptor transaction log file _sclog is to be written. Defaults to $SCULPTOR/recover.


Defines the master Sculptor directory on a server. See Loading a Sculptor program from a server


Defines the Sculptor program directory on a server. If set, over-rides $SCMASTER/app. See Loading a Sculptor program from a server


The name of the terminal parameter file to be used by screen form programs.


The default extension for configurable text files. If undefined, the default is .eng.


The pathname of the standard Sculptor directory.


When due the web server configuration the nph-srep execution starts in the wrong directory this variable can be used to specify a directory to change previous the report program execution.


Destroy and create bitmaps for tables as needed. If this is not set, Sculptor keeps a bitmap permanently allocated for each table. This feature is provided for use when several large programs run concurrently and the physical memory pool is being exhausted, causing swapping. Typically, this will only be an issue in a terminal server environment such as Citrix. Note that if SC_CONSERVE_MEMORY is set, screen drawing is slower.

To use SC_CONSERVE_MEMORY, set its value to 1. Sculptor does not currently check the value, but in the future the value 0 may be interpreted as false.


If set on a server, informs kfserver and local Sculptor programs that the debug record lock tool is running.


May be used on an MS-DOS system to define a terminal number. If set on UNIX, over-rides the system tty number.


If defined with a numerical value on an MS-DOS system, this value is returned by the Sculptor system variable sys.UserID, which is otherwise zero on such systems.


These variables can have the main Sculptor version number 2, 5 or 6 appended, e.g. SCULPTOR6, SAGEDATA2. Such variables take precedence over the non version-specific equivalents. For example, Sculptor Version 5 will look for SCDATA5 before SCDATA. This makes it easier to run Sculptor 2, Sculptor 5 and Sculptor 6 on the same system. A Sculptor 2 update that supports this feature is available. Since Sculptor version 6.0.1 the environment variables SCULPTOR6, SCDATA6, SAGEDATA6, SCLOGDIR6 take precedence over the same names with a 5 suffix, which take precedence over the non-version equivalents.


Since Sculptor version 6.0.0 the TRACE_NPH_SREP environment variable is not supported.

Environment variables may be used in the definition of pathnames within a Sculptor program, as in these examples:

!file Mine "$MYDIR/$MYSUBDIR/myfile"
image = "$SCULPTOR/images/myimage"

Environment variables can be set at run time by means of the putenv() function and retrieved by the getenv() function.


Throughout this manual the traditional form, $variable_name, is used when referring to environment variables. This is the only form accepted by the Sculptor compiler in pathnames. The equivalent under Windows/MS-DOS is %variable_name%; this form cannot be used within the Sculptor language.

Storing variables in the registry

In Sculptor version 4.2 and later, the values above can be stored in the Windows registry (or, on other platforms, an emulation of this registry). The scconfig program is used to set values in the registry. Registry entries may be used wherever environment variables were previously used in Sculptor, without any change to the program code.

The environment variable corresponding to a registry entry can still be defined, and if defined takes precedence over the registry value. However, it is recommended that the environment is only used for temporary changes during development.


nph-srep environment variables