Creating and using local parameters in DataStage
Parameters help to make your jobs more flexible and reusable. After you add parameters to your job, you can specify values at run time rather than hardcoding them.
Creating a local parameter in a DataStage flow
To create job parameters in a DataStage® flow:- Open the DataStage flow that you want to create
parameters for and click the Add parameters icon (
{#}
). - Click Create parameter and enter the following information for the
parameter that you are creating:
- Name
- The name of the parameter.
- Type
- The type of parameter that you are creating, which can be one of the following values:
Parameter type Description Date Used to specify the date in the format yyyy-mm-dd. Encrypted Used to specify a password. List Used to specify enumerated data types. Integer Used to specify a long integer. This value can be -2147483648 up to 2147483647. Path Used to specify a path name or file name. String Used to specify a text string. Float Used to specify a single float. Time Used to specify the time in the format hh:mm:ss. Timestamp Used to specify the timestamp. The format options of timestamp combine the formats of data and time data types. The default timestamp format is: %yyyy-%mm-%dd %hh:%mm:%ss
- Prompt
- The text that displays for this parameter when you run the job.
- Default value
- The default value for the parameter, such as a directory path.
- Click Create.
Using a local parameter in a stage or connector
To use a local parameter in a stage or connector:
- Open the DataStage flow, then open the stage or connector that you want to use parameters.
- In the Properties panel for the stage or connector, open the Properties section.
- Hover your mouse pointer near the end of a property field. If the
Parameterize icon (
{#}
) appears, click the icon to choose a local parameter for the property.