Assignment Settings

An assignment setting is a setting or definition in an assignment file that determines one aspect of the behavior or environment of a Uniface application. Assignment settings can specify the location of application resources and servers, set environment variables, define application logicals, and set Uniface system settings to influence runtime behavior.

For example, assignment settings can:

  • Define the location of DBMS tables referenced by the application
  • Define the location of non-DBMS files accessed by an application
  • Specify where components are executed
  • Set environment variables for the development, testing, and production of the application behavior
  • Specify the language to be used for messages and help texts
  • Define application logicals that can be accessed with the $logical ProcScript function
  • Define any Uniface system setting, to influence runtime behavior
  • Specify the keyboard translation table and device translation table to be used

By changing the settings in an assignment file, you can change the language or appearance of your application, or change the location of tables or files associated with your entities, without changing entity definitions, and without recompiling the application and its components. For example, you can configure distinct environments for the development, testing, and production of your applications. To change from a development environment to a production environment, you only need to change the assignment file so that it refers to data in your production environment.

Syntax

With a few exceptions, assignment settings have the following syntax:

Setting {=} Value

  • Setting—name as used by Uniface; this can be a setting name, a logical name used by Uniface to locate a non-DBMS file, a DBMS table or file, and so forth.
  • Value—assignment for Setting; this can be one or more values for a setting, the name of the non-DBMS file, a target for a DBMS file, and so forth.

An assignment setting:

  • Must occur on a single line
  • Must be located in the section to which it belongs
  • Cannot be continued onto following lines
  • Cannot be followed by a comment

The two parts of an assignment can be separated by multiple spaces, tabs, and/or a single equal sign (=).

Uppercase and Lowercase

Uniface system settings, parameters, path names, and connector mnemonics are not case-sensitive; by convention, uppercase is usually used. You can use either uppercase or lowercase, although it is advisable to use one convention.

The case used for tables, files, and logon specifications depends on the operating system, or DBMS, or both. Unix, for example, is case-sensitive, while Microsoft Windows is not.

As a simple rule, the left side of an assignment is not case-sensitive, but the value or (right-hand side) may be case-sensitive, depending on the context.

Wildcards

Use the asterisk (*) as the wildcard character in assignment files.

When using wildcards in path assignments:

  • Place assignments specific to an application in a local assignment file, not the global assignment file.

    When the application looks for an assignment to locate a specific entity, it searches the global assignments before local assignments. For example, if it needs to locate ENT2.MYMODEL and finds the assignment *.MYMODEL = $MSS as a global assignment, it uses that instead of the more specific local assignment ENT2.MYMODEL = $ORA

  • Place wildcard assignments after specific assignments, since Uniface uses the first specification that matches the criteria.

Referring to the Installation Directory

In assignment files, Uniface recognizes USYS: as a special symbol for the \usys subdirectory of the Uniface installation directory. Similarly, it recognizes USYSADM, USYSBIN, and USYSLIB as special symbols for the \adm, \bin, and \lib subdirectories.

Uniface adds this as a prefix to the logical names of files it expects to find in the installation directory (for example, USYSADM:usys.asn). In the right-hand part of assignments, you can use USYS:, USYSADM:, and so on, rather than repeatedly specifying the exact directory name for the installation directory.

The location of the installation directory is determined differently on each platform. For example, on Unix an environment variable, $USYS, defines the location, whereas on Microsoft Windows, an .ini file setting is used.

For more information, see USYS Path Logicals.

Related Topics