Skip to Main Content
Return to Navigation

Environmental Variables

This table provides answers to questions about environmental variables.

Question

Answer

What are environmental variables and how are they used?

Environment variables enable you to set the project defaults and these are used in jobs.

What is the DSParams file?

For any datastge project, all project levels, user defined environmental items are stored in a file called DSParams. It is located in <dshome>\DataStage\Projects\<projname>.

How do I copy the DSParams file the first time as opposed to copying from one project to another project?

The methodology described below provides a workaround for moving or sharing the global parameters without having to re-type them in the administrator. The work around consists of replacing and/or editing this file to add the parameters. Be sure to back up the original file before any other activity occurs.

For a new project that has not yet defined any global parameters, just copy the existing DSParams file to the new project. Be sure to rename the existing DSParams file. Ensure all DS clients (Designers, etc.) are logged off, and stop and start the DataStage services to activate it. Then go into the DataStage Administrator and all the parameters should be visible in the user-defined section of the environment screen. At this point, edit the default values for each parameter.

For an existing project that has already defined some global parameters; the DSParams file must be edited to add the desired parameters. The process below describes how to do this. The user-defined parameters are in two sections of the DSParams file: one section defines the parameters [EnvVarDefns] and the second section contains the default values [EnvVarValues]. The approach is to copy the correct lines from the original source project file into the target project DSParams file:

  1. Rename/Backup the DSParams file in the target project directory and backup the source project DSParams file as well.

  2. Edit the source project DSParams. Go to the end of the [EnvVarDefns] section and find the user defined parameters, which are at the end of the section. Select the lines up to but not including the line which contains [PROJECT]".

  3. Copy these lines and paste them into the target project DSParams file before the "[PROJECT]" section.

  4. Go back and edit the source project DSParams file. Find the section starting with the line "[EnvVarValues]". This is usually at the end of the file. Copy all of the lines of that section, or select all the lines for the specific parameters to be moved.

  5. Locate the end of the DSParams file in the target project directory. See if it has a section called "[EnvVarValues]". If it does not, add it. If it does, then go to the next step.

  6. Paste the lines into the target project DSParams file at the end of the "[EnvVarValues]" section and before the end of file.

  7. Save the DSParams file in the target project directory.

  8. Ensure all DS clients (designers and so forth) are logged off, and stop and start the DataStage services to activate it. Then go into the DataStage Administrator and all the parameters should be visible in the user-defined section of the environment screen. At this point, change the default values for each parameter.

What are 'Array' and 'Transaction' sizes?

  • Array Size: Array size is a parameter to specify the number of rows written (to a database) at a time. In other words it refers to the number of rows that are transferred in one call between DataStage and the database before they are written.

    Generally, increasing the array size will increase performance since client memory is used to cache records resulting in lesser server hits. The maximum size for array size is 32767. But increasing the array size too much will result in strain on the client memory. Hence an optimal value must be arrived at considering the client memory.

    For flexibility this has been parameterized as a environmental variable. Separate environmental variables are available for each source as well as for OWS, OWE and MDW. For direct DRS lookups, the recommended array size is 1 since DS lookups generally expects 1 row of data to be returned.

  • Transaction Size: Transaction size refers to the number of rows that are written to the database before the data is committed. Giving a transaction size of zero will ensure that commit doesn't happen until all the records are written. The default value is 0. If the transaction size is set to 100 then the database table commits are performed every 100 rows. Here again an optimal value must be arrived at considering the strain on the Database server and the number of records.

    For flexibility this has also been parameterized as a environmental variable. Separate environmental variables are available for each source as well as for the OWS, OWE and MDW.

How is the DATA_ORIGIN environment variable configured?

The value for DATA_ORIGIN is 'S' for following loads:

  • OWS (data flow from PeopleSoft source system)

  • OWE (data flow from OWS)

  • MDW (data flow from OWS)

The DATA_ORIGIN must be toggled to Enterprise only when running those sets of jobs whose flow is from OWE to MDW.