Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
Common Desktop Environment: Advanced User's and System Administrator's Guide > Chapter 10 Creating Actions Manually

Using Variables in Action and Data Type Definitions

» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

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

  1. 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

  1. 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

  1. 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%
Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© Hewlett-Packard Development Company, L.P.