Solaris Common Desktop Environment: Advanced User's and System Administrator's Guide

Using Variables in Action and Data Type Definitions

You can include string variables and environment variables in action and data type definition files.

Using String Variables in an Action

A string variable definition remains in effect from the location of the definition to the end of the file. There are no global string variables for the database.

If a string variable and environment variable have the same name, the string variable has precedence.

To Define a String Variable

    Use the syntax:

	set variable_name=value

Variable names can contain any alphanumeric characters and underscore (_). Each variable definition must be on a separate line.

For example:

set Remote_Application_Server=sysapp
set Remote_File_Server=sysdata

To Reference a String Variable

    Use the syntax:

	$[{]variable_name[}]

For example:

EXEC-HOST			$Remote_Application_Server
CWD					/net/${Remote_File_Server}/doc/project

Using Environment Variables in Actions and Data Types

    Reference an environment variable using the syntax:

	$[{]variable[}]. 

The variable is expanded (replaced by its value) when the database is loaded. If a string variable and environment variable have the same name, the string variable has precedence.

For example, this execution string prints a file with a banner containing the login name.

EXEC-STRING lp -t$LOGNAME %(File)Arg_1%