Defining Environment Variables

You can define and store values for one or more environment variables as a single Applications Manager object. Environment variables are assigned to agents, applications, program types, jobs, and process flow components. Their values are written to the .pm file after other environment variables are set.

There are many cases where you may want to set one or more environment variables before a task runs. In Applications Manager, you can define environment variables and assign them to agents, applications, program types, and jobs. In the image below, the Oracle SID is set with an environment variable.

Define multiple environment variables as a single object.

You can define and store values for one or more environment variables as a single Applications Manager object. To use environment variables, you:

Creating Environment Variables

To add environment variables to the Applications Manager client:

  1. From the Environment Variables Selector window, click New.
  2. Applications Manager opens the Environment Variables window shown above.

    For information on using selector windows, see Adding, Editing, and Deleting Applications Manager Objects.

  3. Enter a name and description for the object.
  4. After creating the environment variables object, you will add variables to it.

Adding Variables

To add variables to an environment variables object:

  1. From the Environment Variables window, click the New button.
  2. Applications Manager opens the Environment Variable window show above.

  3. Complete the fields in the Environment Variable window using the information in the table below.
    Field Description

    Name

    The name of the environment variable. Names cannot start with numbers. To include substitution variables or replacement values in the name, click the { } button.

    Value

    The value of the environment variable. To include substitution variables or replacement values in the text, click the { } button.

    OS

    Specify the applicable operating system(s) you want to include this variable for.

  4. To save the settings and add the variable, click OK.
  5. Applications Manager adds the variable to the Variable table on the Environment Variables window.

    Environment variables are evaluated in the order they are listed. If you wish to reorder them, use the arrow buttons to the right of the list.

Using Environment Variables in Prompts

You can include environment variables in prompt values. The environment variables must be enclosed in { } curly brackets. When an environment variable is used in a prompt's value, its corresponding environment variable object must be assigned to the job via its agent, application, program type, or job definition.

Order of Precedence for Environment Variables

These variables will be written to the .pm file after all other variables are set by the operating system, user login, script, etc. Be careful not to overwrite any variables unintentionally. Environment variables can be assigned in five places in the Applications Manager user interface: agents, applications, program types, jobs and process flow components. When a task runs, Applications Manager looks at each task's agent, application, program type, job, and process flow assignments—in that order. Each object can override any individual variables that are previously set. For example, if variable X is defined as = '1' for an agent and also defined for the application as = '2' then the program will see X=2 since application follows agent.