Summary:
See also: Tools, Localization Support, Connections, Installation and Setup
On UNIX platforms, environment variables can be set through the following methods, depending on to the command interpreter used:
Bourne shell:
VAR=value; export VAR
Korn shell:
export VAR=value
C shell:
setenv VAR=value
For more details, refer to the documentation for your UNIX system.
On Windows platforms, environment variables can be set by one of the following methods:
For more details, refer to the documentation of your Windows system.
On Windows, double quotes do not have the same meaning as on UNIX systems. For example, if you set a variable with the command SET VAR="abc", the value of the variable will be "abc" (with double quotes), and not abc.
When using Informix, some variables related to the database engine must be set using the SETNET32 utility.This section describes a couple of well-known system environment variables that are used by Genero software components.
This variable defines the list of search paths for executables files.
This variable defines the list of search paths for shared libraries loaded by the dynamic linker on Unix platforms.
This variable defines the locale (language, territory and code-set) for Unix programs.
This variable defines terminal type (vt100, xterm, xtermix) for terminal capabilities.
By default or when INFORMIXTERM equals termcap,
Genero reads terminal capabilities from the file defined by the TERMCAP
environment variable.
When INFORMIXTERM is set to terminfo, Genero reads terminal capabilities from the
terminfo database of the system.
TERMCAP is the older implementation of terminal capabilities database. you should set INFORMIXTERM=terminfo.
It is important to define this variable properly to match the text terminal hardware or the terminal emulation you are using.
This variable defines the termcap terminal capabilities database to be used in conjunction with TERM, when INFORMIXTERM is set to termcap, or not set.
If the TERMCAP variable is not defined, Genero tries to open /etc/termap. If no /etc/termcap file exists, Genero uses $FGLDIR/etc/termcap.
You can add more terminal definitions in this file.
TERMCAP is the older implementation of terminal capabilities database. you should set INFORMIXTERM=terminfo.
It is important to define terminal capabilities properly according to the
text terminal hardware or the terminal emulation you are using.
Especially function keys (F1, F16) and display attributes (bold, reverse,
colors) may not work if the escape sequences do not correspond to the
terminal used.
For more details about the TERMCAP environment variable, please refer to your UNIX Operating System manual.
For more details about terminal capability configuration, see Configuring your text terminal.
This variable defines the terminfo terminal capabilities database to be used in conjunction with TERM, when INFORMIXTERM is set to terminfo.
The default is defined by the UNIX system, it can be for example /etc/terminfo, /usr/lib/terminfo, or /lib/terminfo.
You should not have to modify or set this environment variable.
It is important to define terminal capabilities properly according to the
text terminal hardware or the terminal emulation you are using.
In particular, function keys (F1, F16) and display attributes (bold, reverse,
colors) may not work if the escape sequences do not correspond to the
terminal used.
For more details about the TERMINFO environment variable, please refer to your UNIX Operating System manual.
For more details about terminal capability configuration, see Configuring your text terminal.
Those environment variables define the directory for temporary files.
If your Genero programs connect to a database server, you will probably have to set database vendor specific environment variables (or registry settings on Windows platforms). You must for example set INFORMIXDIR for an Informix client, ORACLE_HOME for Oracle, etc. Read carefully the database client software documentation. You get also some details in the Database Connections page of this documentation.
This section lists and describes in detail all Genero specific environment variables.
Defines the default display format for DATE values and the default picture for automatic string-to-DATE conversions.
Values can be a restricted combination of several symbols described in the following table:
Symbol | Meaning in DBDATE format string |
D | Day of month as one or two digits |
M | Month as one or two digits |
Y2 | Year as two digits |
Y3 | Year as three digits (Ming Guo format only) |
Y4 | Year as four digits |
/ | Default time-unit separator for the default locale |
C1 | Ming Guo format modifier (years as digits) |
- | Minus time-unit separator |
, | Coma time-unit separator |
. | Period time-unit separator |
0 | Indicates no time-unit separator |
The combinations must follow a specific order:
{ DM | MD } { Y2 | Y3 | Y4 } {
/ | - | , | . | 0 }
[C1]
{ Y2 | Y3 | Y4 } { DM | MD } {
/ | - | , | . | 0 } [C1]
In programs, when you assign a string representing a date to a variable defined with the DATE data type, automatic string-to-DATE conversion takes place based on the DBDATE definition.
Note that DBDATE takes also effect when fetching DATE values from the database into CHAR/VARCHAR program variables. However, it is not recommeded to fetch date information into string variables, you should use DATE or DATETIME variables instead.
The default setting for DBDATE is: MDY4/
The C1 modifier can be used at the end of the DBDATE value in order to use MingGuo date format with digit-based years. When using C1, you can use one of the Y4, Y3 or Y2 symbols for the year.
Date formatting specified in a USING clause or FORMAT attribute overrides the formatting specified in DBDATE.Gregorian date format:
DBDATE="DMY4/"
export DBDATE
Migng Guo date format:
DBDATE="Y3MD/C1"
export DBDATE
The DBDELIMITER environment variable defines the value delimiter for LOAD and UNLOAD instructions.
Do not use backslash or hex digits (0-9, A-F, a-f).
DBDELIMITER="@"
export DBDELIMITER
The DBCENTURY environment variable specifies how to expand abbreviated one- and two-digit year specifications within DATE and DATETIME values.
Symbol | Algorithm for Expanding Abbreviated Years |
C | Use the past, future, or current year closest to the current date. |
F | Use the nearest year in the future to expand the entered value. |
P | Use the nearest year in the past to expand the entered value. |
R | Prefix the entered value with the first two digits of the current year. |
Values are case sensitive; only the four uppercase letters are valid.
Three-digit years are not expanded.
If a year is entered as a single digit, it is first expanded to two digits by prefixing it with a zero; DBCENTURY then expands this value to four digits.
Years before 99 AD (or CE) require leading zeros (to avoid expansion).
If the database server and the client system have different settings for DBCENTURY, the client system setting takes precedence for abbreviations of years in dates entered through the application. Expansion is sensitive to the time of execution and to the accuracy of the system clock-calendar. You can avoid the need to rely on DBCENTURY by requiring the user to enter four-digit years or by setting the CENTURY attribute in the form specification of DATE and DATETIME fields.
The DBEDIT environment variable defines the editor program to be used for TEXT fields.
The DBFORMAT environment variable defines the input and display format for numeric values.
See also DBMONEY.
front:thousands:decimal:back
The DBFORMAT environment variable can be set to define the input and display format for values of the following types:
DBFORMAT can specify the leading and trailing currency symbols (but not their default positions within a monetary value) and the decimal and thousands separators. The decimal and thousands separators defined by DBFORMAT apply to both monetary and other numeric data.
BDL instructions affected by the setting in DBFORMAT include (but are not restricted to) the following items:
The asterisk ( * ) specifies that a symbol or separator is not applicable; it is the default for any front, thousands, or back term that you do not define.
If you specify more than one character for decimal or thousands, the values in the decimal or thousands list cannot be separated by spaces (nor by any other symbols). However, only the first character will be used to display numeric or currency values, when converting strings to numbers and when entering values in form fields.
Any printable character that your locale supports is valid for the thousands separator or for the decimal separator, except:
The same character cannot be both the thousands and decimal separator. A blank space (ASCII 32) can be the thousands separator (and is conventionally used for this purpose in some locales). The asterisk ( * ) symbol is valid as the decimal separator, but is not valid as the thousands separator.
The colon ( : ) symbol is supported as thousands or decimal separator but must be
preceded by a backslash ( \ ) symbol, as in the specification :\::.:DM
.
.
You must include all three colons. Enclosing the DBFORMAT specification in a pair of single quotation marks is recommended to prevent the shell from attempting to interpret (or execute) any of the DBFORMAT characters.
The setting in DBFORMAT affects how formatting masks of the FORMAT attribute and USING operator are interpreted. In formatting masks of FORMAT and USING, the following symbols are not literal characters but are placeholders for what DBFORMAT specifies:
The following table illustrates the results of different combinations of DBFORMAT setting and format string on the same value.
Value | Format String | DBFORMAT | Result |
1234.56 |
$#,###.## |
$:,:.: |
$1,234.56 |
1234.56
|
$#,###.##
|
:.:,:DM
| 1.234,56 |
1234.56 |
#,###.##@ |
$:,:.: |
1,234.56 |
1234.56 |
#,###.##@ |
:.:,:DM |
1.234,56DM |
When the user enters numeric or currency values in fields, the runtime system behaves as follows:
When the runtime system displays or prints values:
When MONEY values are converted to character strings by the LET statement, both automatic data type conversion and explicit conversion with a USING clause insert the DBFORMAT-defined separators and currency symbol into the converted strings.
For example, suppose DBFORMAT is set as follows:
*:.:,:DM
The value 1234.56 will print or display as follows:
1234,56DM
Here DM stands for deutsche marks. Values input by the user into a screen
form are expected to contain commas, not periods, as their decimal separator
because DBFORMAT has *:.:,:DM
as its setting in this
example.
When using a graphical front-end, the decimal separator of the numeric keypad will produce the character defined by this environment variable.
The DBMONEY environment variable defines the currency symbol and the decimal separator for numeric values.
See also DBFORMAT.
front{.|,}back
The DBMONEY environment variable can be set to define the input and display format for values of the following types:
Numeric values will be displayed in forms and reports according to this environment variable.
DBMONEY will also be used for implicit data conversion between numeric values and character strings.
DBMONEY can only define the currency symbol and decimal separator characters must be specified in this environment variable. If you want to define the thousands separator, use the DBFORMAT environment variable instead. However, if only DBMONEY is used, an implicit thousands separator is selected.
The position of the currency symbol (relative to the decimal separator) indicates whether the currency symbol appears before or after the MONEY value. When the currency symbol is positioned in DBMONEY before the decimal separator, it is displayed before the value ($1234.56). When it is positioned after the decimal separator, it is displayed after the value (1234.56F).
The runtime system recognizes the period ( . ) and the comma ( , ) as decimal separators. All other characters are considered to be part of the currency symbol. For example, ", FR" defines a MONEY format with the comma as decimal separator and the string " FR" (including the space) as the currency symbol.
The default value for DBMONEY is "$.", defining the currency symbol as the dollar sign ( $ ) and the decimal separator as the period ( . ).
Because only its position within a DBMONEY setting indicates whether a symbol is the front or back currency symbol, the decimal separator is required. If you use DBMONEY to specify a back symbol, for example, you must supply a decimal separator (a comma or period). Similarly, if you use DBMONEY to change the decimal separator from a period to a comma, you must also supply a currency symbol.
To avoid ambiguity in displayed numbers and currency values, do not use the thousands separator of DBFORMAT as the decimal separator of DBMONEY. For example, specifying comma as the DBFORMAT thousands separator dictates using the period as the DBMONEY decimal separator.
When using a graphical front-end, the decimal separator of the numeric keypad will produce the character defined by this environment variable.
DBMONEY="$."
export DBMONEY
DBMONEY=",F"
export DBMONEY
The DBPATH environment variable defines the paths to search for program resource files.
The DBPATH environment variable contains the search paths for the following type of files:
If DBPATH is not defined, the default is the current directory.
You can provide a list of paths, separated by the operating system specific path separator.
The path separator is platform specific ( ":" on UNIX platforms and ";" on Windows platforms).If FGLRESOURCEPATH is defined, DBPATH is ignored by the runtime system and FGLRESOURCEPATH is used instead.
Unix example:
DBPATH="/user/forms1:/user/forms2:/usr/strings/french"
export
DBPATH
Windows example:
set DBPATH=C:\user\forms1;C:\user\forms2;C:\usr\strings\french
See also: FGLRESOURCEPATH.
The DBPRINT environment variable specifies the print device to be used by reports defined TO PRINTER.
To have the DVM print to the printer on the client running the Genero
Desktop Client (GDC), set DBPRINT=FGLSERVER
.
DBPRINT="lpr"
export DBPRINT
DBPRINT=FGLSERVER
export DBPRINT
The DBSCREENDUMP environment variable defines the output file name for text screen shots when pressing CONTROL-P.
The DBSCREENOUT environment variable defines the output file name for text screen shots when pressing CONTROL-P.
The DBTEMP environment variable defines the directory for temporary files.
The FGLDIR environment variable defines the Genero BDL software installation directory.
This environment variable must be set in order to use the Genero components.The FGLIMAGEPATH environment variable defines the search paths to find images for the front-end.
When the front-end needs to display an image which is specified with a simple file name (not an URL), the front end first looks for local image files on the user workstation. If the image file is not found locally, the front-end sends an image request to the runtime system, which provides the image from the server file-system.
You define the search path for images with the FGLIMAGEPATH environment variable.
By default, the image directory is the current directory where the program was started.
You can provide a list of paths, separated by the operating system specific path separator.
The runtime system searches for image files in the locations described below. The search depends on the name of the image file, the list of directories defined in FGLIMAGEPATH, and the expected file extensions provided by the front-end:
The search for the image file would be as follows:
When FGLIMAGEPATH is defined, the current working directory is not searched. If you want to look for image files in the current working directory and in other directories, add "." to the FGLIMAGEPATH path list.
For security reasons, if FGLIMAGEPATH is defined, static image files must be located below one of the directories listed in this environment variable. For example, you cannot use an image file "/home/scott/myicons/smiley" when FGLIMAGEPATH contains "/home/myke:/app/icons". However, this security restriction does only apply to static images: When an filename is displayed by program to an image field with DISPLAY TO / BY NAME or a field used by a dialog with UNBUFFERED mode, the runtime system considers that the file can be transferred to the front-end without risk.
The path separator is platform specific ( ":" on UNIX platforms and ";" on Windows platforms).Image files for static images must be located in a directory of FGLIMAGEPATH, see below for details.
FGLIMAGEPATH="/user/myimages:/user/myicones"
export FGLIMAGEPATH
See also the IMAGE attribute.
The FGLLDPATH environment variable defines the search paths to load C extensions and modules, and by default to find sources with the debugger.
A Genero program can be composed by several p-code modules (42m) and can use C extensions. When linking and when executing the program, the runtime system must known where to search for these modules. You can use the FGLLDPATH environment variable to define the search paths to load C extensions and p-code modules.
The directories are searched for the modules in the following order:
This variable is used at link time and at run time.
If FGLSOURCEPATH is not defined, the debugger will use FGLLDPATH to find program sources.
FGLLDPATH="/user/modules1:/user/modules2"
export FGLLDPATH
See also: IMPORT.
The FGLGUI environment variable indicates whether the applications are run in TUI or GUI mode.
When set to 1 (one), the application executes in GUI mode.
The FGLGUIDEBUG environment variable defines the debug level in GUI mode.
By default, the GUI protocol commands are compressed and not easy to read on the client debug log. If you set this variable to a value different from zero, the protocol commands are indented for better read.
If FGLGUIDEBUG is not set to 0, debug information about the compression initialization is generated.
The FGLRESOURCEPATH environment variable can be used as replacement for DBPATH when needed.
For compatibility with Informix 4gl, DBPATH is used by default to search for resource files such as form files and XML files used by the program. DBPATH is also used by the Informix database software to locate databases: Informix Dynamic Servers uses DBPATH to let you specify fallback servers if INFORMIXSERVER is not available, and former Informix Standard Engine needs DBPATH to find .dbs database files. This can be a problem when connecting from a machine where path format is not the same as on the remote database server: It is not possible to mix UNIX and DOS path formats in DBPATH.
To work around this Informix limitation, FGLRESOURCEPATH can be used instead of DBPATH to specify the directories of program resource files. You are then free to define DBPATH as Informix requires.
For more details about the type of files that this environment variable looks for, see DBPATH.
The path separator is platform specific ( ":" on UNIX platforms and ";" on Windows platforms).Unix example:
DBPATH="/usr/informix/data"
export
DBPATH
FGLRESOURCEPATH="/user/forms1:/user/forms2:/usr/strings/french"
export
FGLRESOURCEPATH
Windows example:
set DBPATH=/usr/informix/data
set FGLRESOURCEPATH=C:\user\forms1;C:\user\forms2;C:\usr\strings\french
See also: DBPATH.
The FGLSERVER defines the front-end location.
{hostname|ipaddress}[:servnum]
FGLSERVER defines the hostname and port of the graphical front end to be used by the runtime system to display the application windows.
The servnum parameter implicitly defines the TCP port number the front end is listening to, as an offset for the base port 6400. For example, FGLSERVER=cobra:1 will use the TCP port 6401 (6400 + 1).
The servnum parameter defines the front end server number (first is 0, second is 1, and so on) and implicitly the TCP port. The port number base is 6400. For example, when using 1, the runtime system connects to the TCP port 6401.FGLSERVER="mars:0"
export FGLSERVER
See also: Automatic front-end startup.
The FGLSOURCEPATH environment variable defines the path to source files for the debugger.
The path separator is platform specific ( ":" on UNIX platforms and ";" on Windows platforms).
The FGLDBPATH environment variable contains the path to database schema files.
The path separator is platform specific ( ":" on UNIX platforms and ";" on Windows platforms).
The FGLSQLDEBUG environment variable defines the debug level for tracing SQL instructions.
FGLSQLDEBUG is only used in development.
The FGLPROFILE environment variable defines a list of configuration files to be used by the runtime system.
FGLPROFILE can define one unique configuration file, or a list of files to be loaded sequentially.
For more information, refer to the FGLPROFILE section of this manual.The path separator is platform specific ( ":" on UNIX platforms and ";" on Windows platforms).
The FGLWRTUMASK environment variable defines the umask for the FGLDIR/lock directory.
For more information, refer to the Installation section of this manual.
The INFORMIXTERM environment variable indicates what terminal capabilities database must be used by Genero for text terminals.
When set to termcap (the default), Genero reads terminal capabilities from the file defined by the TERMCAP environment variable.
When set to terminfo, Genero reads terminal capabilities from the terminfo database of the system.