How to Set the Oracle Forms Runtime Environment with default.env

The environment of the Oracle Forms 14.1.2 runtime process: default.env variables, several environment files, and every other config file.

Every Oracle Forms session runs in a runtime process on the Forms server, and that process gets its environment from a file: default.env, or another environment file a configuration section names. The environment decides where forms are found, which database aliases exist, the session's language, and a set of FORMS_ switches that change the runtime's behavior.

This guide covers the Oracle Forms 14.1.2 runtime environment: the variables that matter most, using several environment files on one server, and where every other configuration file lives.

How the Environment File Is Chosen

Each runtime process gets its environment from the section's environment file, named by envFile: default.env unless a section names another, in the same directory as formsweb.cfg. The environment file is read when a runtime process starts, so a change applies to the next session.

envFile is a system parameter: it comes only from the section, never from the URL. Sections and their parameters are explained in how to configure formsweb.cfg in Oracle Forms.

The Variables That Matter Most

VariableSets
FORMS_PATHDirectories searched for forms, menus, and libraries without a path
FORMS_MODULE_PATHWhen set, the only directories from which a form may be started
TNS_ADMINThe directory of tnsnames.ora and sqlnet.ora
NLS_LANGLanguage, territory, and character set of the session
CLASSPATHJava classes of the runtime: imported Java, the debugger, Reports integration
FORMS_INSTANCEThe Forms instance's directory, with its logs and configuration
WEBUTIL_CONFIGThe WebUtil configuration file
COMPONENT_CONFIG_PATHThe Reports Tools configuration, for RUN_REPORT_OBJECT
FORMS_TIMEOUTMinutes without contact from the client before the process ends
FORMS_RESTRICT_ENTER_QUERYWhether users may write their own conditions in the Query/Where dialog
FORMS_USER_DATE_FORMAT, FORMS_USER_DATETIME_FORMATDefault formats for dates without a format mask
FORMS_RECORD_GROUP_MAXThe most records any record group may fetch
FORMS_BLOCK_HOST_CMDWhether calls to HOST are blocked, silently or with an error
FORMS_HIDE_PASSWORDWhether GET_APPLICATION_PROPERTY(PASSWORD) may return the password
FORMS_LOG_MODULE_OPENWhether each opened module is written to the diagnostic log
FORMS_SUPPRESS_LOGONWhether the logon dialog is hidden, for applications that connect otherwise
FORMS_USEREXITSLibraries of foreign functions called by user exits

Several of these change behavior you have seen elsewhere: FORMS_PATH finds forms and libraries attached without a path, as in how to create a PL/SQL library, and FORMS_RESTRICT_ENTER_QUERY controls the Query/Where window described in how to search records using query by example.

Use Several Environment Files

Several environment files serve different needs from one server:

  • A section with envFile=cwtest.env and FORMS_PATH pointing to test modules.
  • Another with a different NLS_LANG, for users in another language.
  • A section whose environment file sets FORMS_RESTRICT_ENTER_QUERY to FALSE, for trusted users only.

In Fusion Middleware Control, the Environment Configuration page edits default.env and the other environment files, and Duplicate File creates a new one. Without Fusion Middleware Control, copy the file with an editor, in the same directory as formsweb.cfg.

Where the Other Configuration Files Live

FileLocationHolds
formsweb.cfgForms application's config directoryConfiguration sections
default.env and other environment filesSameThe runtime's environment (above)
base.htm, basejpi.htm, base.jnlp, basesaa.txtForms instance's server directoryTemplates of the start files
webutil.cfgForms instance's server directoryWebUtil's transfers and logging
ftrace.cfgForms instance's server directoryForms Trace event groups
Registry.datForms application's config/oracle/forms/registryFont mapping, icon location (default.icons.iconpath) and extension, application-specific settings for serverApp
fmrweb.res, fmrweb_utf8.resForms instance's admin/resource/<language>The keys of the Forms client; another file is chosen with term
tnsnames.oraTNS_ADMIN, config/fmwconfig of the domainDatabase aliases

The directory of the Forms instance, forms1, is in the domain.

The Forms instance directory:

$DOMAIN_HOME/config/fmwconfig/components/FORMS/instances/forms1

In Fusion Middleware Control, Font and Icon Mapping edits Registry.dat, and Advanced Configuration edits the other files as text. Fusion Middleware Control writes the files back whole from its own copy, so do not edit the same file with another tool at the same time.

Conclusion

Each Oracle Forms runtime process takes its environment from the envFile of its configuration section, default.env by default, read when the process starts. FORMS_PATH, TNS_ADMIN, NLS_LANG, and CLASSPATH set where modules, database aliases, language, and Java classes come from, while the FORMS_ variables control timeouts, query restrictions, date formats, host commands, and more. Give different sections their own environment files for test modules or other languages, and know where the base files, webutil.cfg, ftrace.cfg, Registry.dat, and the key files live.

Vinish Kapoor
Vinish Kapoor

An Oracle ACE and software veteran with 25+ years of experience, passionate about AI and IT innovation.

guest

0 Comments
Oldest
Newest Most Voted
00