Paths and Path Assignments

A path is a named route to a resource required by the application, such as a database connector and database, a remote server, or a file location.

Path names are defined and mapped to specific locations by path settings in the [PATHS] section of the application assignment file. Path settings make it possible to redirect one path to another, providing flexibility in configuration.

For example, the default path assignments for the Repository and user data define a path to a database, and then have other paths point to the appropriate database path:

[PATHS]
; Path to the SQLite database for the Uniface Repository:
$DBMS        SLE:D:\Uniface\Uniface10_Data\project\dbms\usys.db
; Path to the SQLite database for User defined data:
$DBMS_DEF    SLE:D:\Uniface\Uniface10_Data\project\dbms\userdata.db

$SYS    $DBMS
$UUU    $DBMS
$IDF    $DBMS
$DEF    $DBMS_DEF

This two-path structure (path-to-connector and path-to-path) enables you to create as many routes to underlying databases as each DBMS can handle. System administrators can easily change from one DBMS to another, or redirect I/O from one database to another in the same DBMS, or apply varying degrees of operator privileges. The path mechanism is useful, for example, when taking an application into production and changing database I/O from test data to production data.

Types of Path Assignment

A path assignment is a setting that defines a path and maps it to a resource.

  • Path-to-connector assignments define a path and logon information to local database connectors, network connectors, and Uniface Servers. For example, the following assignment defines a path ($MQL) to a MySQL database (MyDatabase) via the MQL database connector, and provides the user name and password for that database:
    $MQL MQL: MyDatabase:|DBUsername|DBPassword

    For more information, see Path-to-Connector Assignments.

  • Path-to-path assignments to direct one path to another. This enables several paths to be directed to one path which opens a single channel to a DBMS or file location. It is typically used to map a logical path to a database path. For more information, see Path-to-Path Assignments .
  • Entity-to-path assignments provide an additional or alternative name or path for entities. This enables you to:
    • Direct an entity or group of entities to another path
    • Change the name of the target table for an entity or group of entities
    • Specify the target directory when the path leads to a record-level DBMS

    For more information, see Entity-to-Path Assignments.

In addition to path assignments, you can define file assignments to direct non-database files used by the application to a specific location. They can also be used to redirect and rename files. For more information, see File Assignments and Redirection.

In path and file assignments, USYS path logicals can be used to direct files to specific locations, without having to explicitly specify the complete path each time. For more information, see USYS Path Logicals.

Uniface Paths

After installing Uniface, a number of paths are automatically defined in the dbms.asn file.

When configuring Uniface for your own environment, you can modify theses paths or define your own.

Paths Used by Uniface
Path Description
DBMS, Network, and GUI Paths
$DBMS Default path for Repository data
$DBMS_DEF Default path for user data (as defined by entity definitions)
Repository Paths
$DEF Path to the default DBMS database for user data.
$IDF Path to the Repository definitions for entities.
$SYS Path to the Repository definitions for print models.
$UUU Path to the Repository definitions for runtime object libraries.
Application Resource Paths
$RES Path to the deployed runtime objects required by the application, as specified in the [RESOURCES] section of the assignment file.
$RSO

Path to the location where runtime objects are generated during the compilation. By default, this is the project directory, but it can set to another location or to a Uniface archive file using the $RESOURCES_OUTPUT assignment setting.

Runtime Paths
$SRU Path to the remote server used for executing Uniface service and report components

User-Defined Paths

You can define your own paths to connectors or other paths. This can be useful to control the number of open channels to a database or to improve the readability of your assignment files.

When you define your own path, place that assignment before any other assignment that uses the new path. The path name must include at least two characters following the initial dollar symbol ($); you cannot use the characters percent sign (%), dollar sign ($), at sign (@), or exclamation mark (!) after the first ‘$’ in your path.

Related Topics