Creating and using parameters and parameter sets
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 hard coding them.
Creating parameters
To create job parameters to 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. Each parameter represents a source file or a directory:
- 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 Asset ID Used to specify an asset identification number. Date Used to specify the date in the format yyyy-mm-dd. Encrypted Used to specify a password. The default value is set by double-clicking the Default Value cell to open the Setup Password window. Type the password in the Encrypted String field, then type it again in the Confirm Encrypted String field. Enum Used to specify enumerated data types. Int64 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. SFloat 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 parameter.
Create a parameter set
To create a parameter set:
- Open the DataStage flow that you want to define
parameters for and click the Add parameters icon in the toolbar.
The Flow parameters window opens. All the local parameters that are used by DataStage flow are shown.
- Click the Save icon.
- Enter a name and description for the parameter set and then click Save.
Adding parameter sets to your DataStage flows
To add parameter sets to jobs:
- Open the DataStage flow that you want to define
parameters for and click the Add parameters icon (
). - Select the Parameter set tab, click Add parameter sets +, then select the parameter set that you want to add to the DataStage flow. Then, click Add.
The parameter set is now listed in the Parameters section in the properties editor.
Creating a new DataStage Component
You can collect a set of stages and connectors to reuse in DataStage flows by creating a new DataStage component. Use Parameter sets components to collect multiple job parameters with specified values to reuse in DataStage flows and jobs.
- Open an existing project or create a project.
- Click Add to the project + and select DataStage component from the available asset types.
- Select Parameter sets as the DataStage component type.
You can manage all your DataStage components from the Assets tab.