Previous Topic Next topic Print topic


To Specify Dataset Allocation Using Environment Variables

Restriction: This topic applies only when the Enterprise Server feature is enabled.

To configure datasets, you can specify the full path for each dataset accessed by Enterprise Server. However this is cumbersome and can make it difficult to move between test and production environments that have different directory structures.

To reduce the effort required when the system uses large numbers of data files, you can set environment variables to define the datasets that an Enterprise Server instance uses:

  1. From the Enterprise Server Administration page, click the Edit button that corresponds to the Enterprise Server instance to configure.
  2. Select the Server > Properties > General tabs.
  3. In the Configuration Information text box, type: [ES-Environment]
  4. Configure the datasets to use with the ENVIRONMENTVAR=path syntax where:
    • ENVIRONMENTVAR is the name of the environment variable you are creating
    • path is the full path, including the drive letter, to the dataset.

    You can create as many environment variables as you need to cover all of the paths you want to specify.

  5. When you have defined the datasets, click OK. The settings are applied to the Enterprise Server instance.
  6. In the catalog, when allocating datasets using the %PCDSN option to specify a physical file, you can substitute an environment variable that you defined to represent the path to the file. Prefix environment variable names with a dollar sign ($): $ENVIRONMENTVAR

    For example, you could create an environment variable named PRODDATA and set its value to d:\mydataset.

    Then, to allocate a dataset in the catalog for a file named MFIO1.SAMPLE.DATA, you would use this code:

     //*MFE:%PCDSN='$PRODDATA\MFI01.SAMPLE.DATA'
Previous Topic Next topic Print topic