Many thanks for visiting my Blog..!!Please share this blog using below share buttons and leave your Comments/Feedback/Appreciations on Tab: Feedback
Share This Blog..!!

Parameters Using Parameter/Value Set/Value File

Problem:  Pass the Parameters Using Parameter Set/Value Set/Value File
                      in Datastage 8x.



Solution : When a file based parameter set is used, the parameter set picks up the contents of the file at the time the job is started. This provides excellent flexibility as long job could manipulate a parameter set file, and leave new parameters for a subsequent job. The key is that the parameters are not compiled into the job or the parameter set. The following steps detail the creation and use of file based parameter sets.
  1. File > New > Other > Parameter Set
  2. In the general tab name the parameter set.

    (Alphanumbeic and Underscore characters only. No spaces.)

    For example: my_file_parm_set


  3. In the Parameters tab create the parameters and defaults


  4. In the Values tab put the name of the file in the "Value File Name" column.

    Specify a file name only. No path component
    Use alpha numneic characters etc. No spaces.

    For example: parm_file.txt



    In the same row, list values for each parameter defined in the Parameters tab. The table should look like this:


  5. Click OK and save the the parameter set.


  6. At this point the parameter set file should have been created using the following system:

    Projects<project_name>/ParameterSets/<parm_nat_name>/<parm_file_name>

    In our example the file name would be:InformationServer\Server\Projects\foo2\ParameterSets\my_file_parm_set\parm_file.txt

  7. The contents of the file looks like this:

    foo=Parm file value for foo
    bar=Parm file value for bar

  8. In the job, navigate to Edit > Job Properties and select the Parameters tab.

    Click Add Parameter Set and select the newly created parameter set:




    =============== Create the Sequence Job ===========================

  9. Create a new sequence and add a Job Activity stage to it. Double click on the stage to edit its properties, and click on the button to select a Job name. Once the job is loaded, its parameters become visible in the Parameters section of the Job Activity screen. The new parameter set should be in the list. Click on the drop down selector in the Value Expression column and select the parameter file:



    Click OK and save the sequence.

  10. Now every time the sequence is run, parameters are read from the file at run time and passes to the job. Any preceding jobs in the sequence can change the file to dynamically modify the parameters.

Note: When the number of parameters in a parameter set is changed, all jobs using the parameter set must be recompiled.

No comments:

Post a Comment

disqus