Making your jobs adaptable

You can use parameters, parameter sets, and environment variables in your jobs to specify information that your job requires at run time.

Parameters

Use job parameters to design flexible, reusable jobs. If you want to process data based on the results for a particular week, location, or product, you can include these settings as part of your job design. However, when you want to use the job again for a different week or product, you must edit the design and recompile the job.

Instead of entering variable factors as part of the job design, you can create parameters that represent processing variables. When you run the job, you are prompted to select values for each of the parameters that you define.

You can supply default values for parameters, which are used unless another value is specified when the job runs. For most parameter types, you enter a default value into the Default Value cell. When entering a password or a list variable, double-click the Default Value cell to open further dialog boxes to supply default values.

Parameter sets

You can specify job parameters on a per-job basis by using the Parameters page of the Job Properties window. For parallel jobs, server jobs, and sequences jobs, you can also create parameter sets and store them in the repository. Use parameter sets to define job parameters that you are likely to reuse in different jobs, such as connection details for a particular database. Then, when you need this set of parameters in a job design, you can insert them into the job properties from the parameter set. You can also define different sets of values for each parameter set. These are stored as files in the IBM® InfoSphere® DataStage® server install directory, and are available for you to use when you run jobs that use these parameter sets.

If you make any changes to a parameter set, these changes are reflected in job designs that use this object up until the time the job is compiled. The parameters that a job is compiled with are the ones that will be available when the job is run (although if you change the design after compilation the job will once again link to the current version of the parameter set).

Environment variables

Environment variable parameters use the concept of operating system environment variables. These variables provide a mechanism for passing the value of an environment variable into a job as a job parameter. Environment variable parameters are similar to standard job parameters because they can also be used to vary values for stage properties.

Environment variables that are defined as job parameters start with a dollar sign ($). For example, the $APT_CONFIG_FILE environment variable denotes the InfoSphere DataStage configuration file that is used at run time.

Many environment variable parameters are defined by default. Your InfoSphere DataStage and QualityStage® can define additional parameters to enable or disable features, tune performance, and specify runtime and design time functions.