Creating and using parameter sets in DataStage
You can create and use parameter sets in DataStage®.
- Creating a parameter set
- Adding a parameter set to your DataStage flow
- Using a parameter set in a stage or connector
Creating a parameter set
To create a parameter set to collect multiple job parameters with specified values to reuse in DataStage flows:- Open an existing project or create a project.
- Click New Asset + and select Define reusable sets of parameters.
- Enter a name and description, then click Create. The Parameter set page opens.
- Add parameters.
- Click the Parameters tab.
- Enter the following information:
- 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.
- Add value sets for the parameters:
- Click the Value sets tab. Then, click Create value set.
- Enter a name, then modify the default value of each parameter set to a new value.
- Click Save.
You can view all your parameter sets by opening the Assets tab and clicking Configurations.
Adding a parameter set to your DataStage flow
To add a parameter set to your DataStage flow:
- Open the DataStage flow that you want to add parameter sets for, then click the Add parameters ({#}) icon.
- Click the Parameter sets tab, click Add parameter sets, then select the parameter set that you want to add to the DataStage flow. Then, click Add.
Using a parameter set in a stage or connector
To use a parameter set in a stage or connector:
- Open the DataStage flow, then open the stage or connector that you want to use a parameter set.
- 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 show the Select a parameter page. The page shows all the local parameters and parameters that are from added parameter sets.
- Choose a parameter for the property.