You are here: Administration Riser Bar>Using Macro Variables>Usage Notes for Macro Variables

DataFlux Data Management Studio 2.7: User Guide

Usage Notes for Macro Variables

When to Use Macro Variables

If a data job is embedded in another data job, and you want to pass macro variables into the data job from the outer data job and vice versa, then declare the macro variables using on the Variables tab in the properties dialogs for these two jobs. Specify the macro variables as inputs or outputs, as appropriate.

If you want to pass macro variables into or out of a real-time data service job, or a real-time process service job, do the same as described above. For an example, see Deploying a Process Job as a Real-Time Service.

If you want to pass macro variables into a data job or into a process job that will be executed in batch on a Data Management Server, specify the macro variables as inputs using the Variables tab in the properties dialogs for the jobs.

When New Macro Variables Go Into Effect

If you create new macro variables from the Macro Files folder in the Administration riser, the new variable goes into effect in the current session.

If you create new macros by directly editing a *.cfg file, you must restart DataFlux Data Management Studio to make the new variable go into effect.

Checking to See How Macro Variables and Directives Are Resolving

To see how the current macro variables and configuration directives are resolving, select ToolsData Management Studio OptionsAdvanced from the main menu.

System and User Macro Variables in Data Management Studio

Unlike Data Management Server, DataFlux Data Management Studio supports both system macro variables and user macro variables.

System macro variables are available to all users that have access to DataFlux Data Management Studio. The definitions for system macro variables are stored in *.cfg files in a subfolder in the installation directory for DataFlux Data Management Studio. Here is an example path to a file that contains system macro definitions:

[drive:]\Program Files\DataFlux\DMStudio\studio1\etc\macros.cfg

User macro variables are available only to a specific user. The definitions for user macro variables are stored in *.cfg files in a subfolder of the user profile that is specified by the operating system. Here is an example path to a file that contains user macro definitions:

[drive:]\Documents and Settings\[username]\Application Data\DataFlux\DataManagement\2.1\macros.cfg

Note Note: In general, DataFlux Data Management Studio users should update macro variables and configuration directives in the user area, not the system area. The *.cfg files in the DataFlux Data Management Studio system area should be reserved for Technical Support.

Data Management Studio Files for Macro Variables and Configuration Directives

DataFlux Data Management Studio reads the following files in order to get configuration directives and resolve macro calls:

  1. app.cfg in the etc folder of the installation directory. Contains system configuration directives that are provided by DataFlux. Example path: [drive:]\Program Files\DataFlux\DMStudio\studio1\etc\app.cfg
  2. app.cfg in a user profile directory. Contains configuration directives that are specified by users. Example path: [drive:]\Documents and Settings\[username]\Application Data\DataFlux\DataManagement\2.1\app.cfg
  3. ui.cfg in the etc folder of the installation directory. Contains system configuration directives that are provided by DataFlux.
  4. dfwproc.cfg in the etc folder of the installation directory. Contains system configuration directives that are provided by DataFlux.
  5. ui.cfg in a user profile directory. Contains configuration directives that are specified by users.
  6. dfwproc.cfg in a user profile directory. Contains configuration directives that are specified by users.
  7. *.cfg files in the etc\Macros folder of the installation directory. Contains system macro variable definitions in *.cfg files that are provided by DataFlux. The load order is alphabetical. The default location of the Macros folder can be changed by using the BASE/MACROS_PATH directive in the *.cfg files above.
  8. *.cfg files in the Macros folder in a user profile directory. Contains macro variable definitions in *.cfg files that are added by users. The load order is alphabetical. Only files with a *.cfg extension are read.
  9. macros.cfg in the etc folder of the installation directory. Contains system macro variable definitions that are provided by DataFlux. This file is reserved for Technical Support. Do not add macro variable definitions to this file.
  10. macros.cfg in a user profile directory. Contains macro variable definitions that are added by users. When you add a macro variable definition from the Macro Files folder in the Administration riser, it is added to this file by default. For more information about adding macros from the Macro Files folder, see Create the Macro Variable Definition.
  11. Environment settings, such as operating system environment variables.
  12. Command line options, if applicable. Data jobs, process jobs, and profiles can be executed from the command line as described in Running Jobs from the Command Line. At this stage, any -o options that have been specified for the job or profile are read.

Data Management Server Files for Macro Variables and Configuration Directives

As a shared resource, Data Management Server supports only system macro variables and directives. Data Management Server reads the following files in order to get configuration directives and resolve macro calls:

  1. app.cfg in the etc folder of the installation directory. Contains system configuration directives that are provided by DataFlux.
  2. dmserver.cfg in the etc folder of the installation directory. Contains system configuration directives that are provided by DataFlux.
  3. batch.cfg in the etc folder of the installation directory. Contains system configuration directives that are provided by DataFlux.
  4. *.cfg files in the etc\Macros folder of the installation directory. Contain system macro variable definitions in *.cfg files that are provided by DataFlux. The load order is alphabetical. The default location of the Macros folder can be changed by using the BASE/MACROS_PATH directive in the *.cfg files above.
  5. macros.cfg in the etc folder of the installation directory. Contains system macro variable definitions that are provided by DataFlux. This file is reserved for Technical Support. Do not add macro variable definitions to this file.
  6. Environment settings, such as operating system environment variables.
  7. Command line options, if applicable. Data jobs, process jobs, and profiles can be executed from the command line as described in Running Jobs from the Command Line. At this stage, any -o options that have been specified for the job or profile are read.

Text and HTML Outputs Do Not Display Automatically When You Run Jobs

You can use a macro variable to generate text or HTML output when you run a DataFlux Data Management Studio job. However, this output does not display automatically when you run the job. If you need to review the output, open it in an appropriate text editor or HTML browser.

Documentation Feedback: yourturn@sas.com
Note: Always include the Doc ID when providing documentation feedback.

Doc ID: dfU_T_Macros_Usage.html