Specifying environment variables in a run configuration

You can specify environment variables in a run configuration. These variables then apply only when running your application. You can either specify that the configuration uses the variables as set in the project's properties or specify other variables

To specify environment variables to use at run time:

  1. Right-click your project in COBOL Explorer and click Run As > Run Configurations.

    This opens the Run Configurations dialog box.

  2. In the left-hand pane, select an existing run configuration from the COBOL Application section, or double-click COBOL Application to create a new one.
  3. If you created a new one, in the Name field, type a name for the run configuration.
  4. Click the Environment tab.
  5. Set environment variables for the configuration as follows:
    • Add one manually:
      Note: Specifying a variable already set in the project settings or build configuration here will override those settings.
      1. Click Add.
      2. Complete the Variable and Value fields, and then click OK.
    • Add a script file containing variables:
      1. Click Browse and use the Locate script dialog box to select the file containing the variables.
      2. In the Parameters field, add any parameters needed to run the script file.
    • Inherit variable values from an associated project:

      1. Select Inherit values from the build environment of the associated project.

        This configuration inherits variable values specified at the build configuration level of any associated projects, or if there are no variables set in the build configuration settings, then the ones specified in at project level.

  6. Click Apply.
  7. To run the configuration, click Run.