FGLRESOURCEPATH

Defines search path for resource files.

FGLRESOURCEPATH definition

The FGLRESOURCEPATH environment variable is used to define the search paths for program resource files:

  1. Form definition files (.42f),
  2. Message files (.iem),
  3. Action defaults files (.4ad),
  4. Presentation styles files (.4st),
  5. Start menu files (.4sm),
  6. Toolbar files (.4tb),
  7. Topmenu files (.4tm),
  8. Localized strings files (.42s).

When the specified resource file is not an absolute path, the runtime system searches in directories in the following order:

  1. The current working directory.
  2. A path defined in the FGLRESOURCEPATH (or DBPATH) environment variable.
  3. The $FGLDIR/lib directory.
  4. The directory where the program file resides (the .42m module containing MAIN or the .42r program file).

The path separator is platform specific ( ":" on UNIX™ platforms and ";" on Windows® platforms).

Note: On mobile platforms, localize string files are found by default in the language sub directories of the app directory. For more details, see Loading localized strings at runtime.

FGLRESOURCEPATH versus DBPATH

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.

However, DBPATH is also used by the Informix database software to locate databases: Informix Dynamic Server 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.