Create a job parameter when you want to set or change the
value of a property at runtime.
Procedure
- On the job design canvas, double-click the Db2 connector icon.
- In the top, left corner of the stage editor, select the
link that you want to edit.
- On the Properties tab click the
property for which you want to create a job parameter. The Use
Job Parameter button is displayed if the property supports
parameters.
- Click the Use Job Parameter button,
and select New Parameter.
- Specify values for the following fields:
- Parameter Name: Specify the name
of the parameter. The value for this field cannot be a keyword in
the BASIC programming language. This value is displayed in the Properties field
with a number sign (#) at the beginning and end of the name.
- Prompt: Specify the prompt to
display for this parameter.
- Type: Specify the type of the
parameter. The default type corresponds to the property type for this
parameter.
- Optional: Default Value:
Specify the value to display for this parameter. You can modify this
value at runtime.
- Optional: Help Text:
Specify the help text to display for this parameter.
- Click OK.
Example
In this example, you want to run the same job against
different data sources. When you create the job, you define job parameters
for the Data source, User name, and Password properties so that the
connector can connect to the data source that you specify at runtime.
When you run the job in InfoSphere®
DataStage® and QualityStage® Director,
you can modify the values for these parameters in the Job
Run Options window. The connector then uses the values
that you specify to connect to the data source.