We have moved to www.dataGenX.net, Keep Learning with us.

Wednesday, December 04, 2013

How to setup environment variables in DataStage


In DataStage you can set environment variables using three different methods. The right method depends on how often you need to change the value of an environment variable and how specific this value is for a particular project or job. Here is a description of these methods:

  1. Using the $DSHOME/dsenv file. This file is read only once when the DataStage Engine is starting. The environment variables set in this file are used as default for all the projects and jobs running on this Engine. Since this file is only sourced when the Engine starts, changes in the dsenv do not take effect until you restart the Engine. The dsenv file is a good place to include environment variables that almost never change and that are common to all projects and jobs. Examples of such variables are those used to configure connectivity with database.

  2. Using the DataStage Administrator Client. This client lists all the default values for the environment variables of a project. To see this list you need to open the project in Administrator and then click on Environment. The values set in this screen apply to all jobs of the project. These values take precedence over the values set in the dsenv file. These values are read by each job during run-time and therefore any changes made here do not require a restart of the Engine. This is a good place to set environment variables common to all jobs of a project or for variables that might need different values for different projects. Additional information about this method can be found in tech note 1502511

  3. Using the Parameters tab of the Job Properties. Using this screen you can add environment variable as job parameters. This gives you the ability to define values at run-time. These values only impact the running job and they take precedence over the values of the dsenv file and the values from the Administrator Client. This is a good place to set variables that require specific values for a job such as debugging variables.





No comments :

Post a Comment