The Parameter sets in DataStage are used to store a collection of parameters in a named object. The values for these parameters can be stored in a value file on the file system. Step-by-step guide how to work with Parameter sets in DataStage could be found on the IBM's site here. Because the values for the parameter sets are picked up at run-time, this will allow us to recreate these value files just before the start of the job where they are used. To do so we need to know the value file format:
Parameter1Name=Parameter1Value
Parameter2Name=Parameter2Value
...
ParameterNName=ParameterNValue
Parameter1Name=Parameter1Value
Parameter2Name=Parameter2Value
...
ParameterNName=ParameterNValue
The above could be easily achieved within a single job with a Transformer stage and Sequential file stage. If you like SQL better you can skip the transformer stage and do the formatting right in the source database stage. Shown below are the DataStage job that produces the value file, the transformer derivation used and the stage that outputs the file:
Now comes the question - where to store the value file. The directory for each DataStage project, has sub directory "ParameterSets" where each Parameter set has its own sub-directory. There you will find all value files for a Parameter set. You can provide this info to the job that generates the value file as shown below (please note the use of the @PATH system variable). The "MyParamsSet" is the name of the parameter set you want to use and the "valueFileDB" is the name of the value file where you will put the values loaded from the database. The more experienced DataStage of course knows, that you can leave out the @PATH, since the default path is the project directory anyways.
Now we are ready to use the parameter set, but we need to make sure that the job that uses it will be started after the job that generates the value file - this is how the sequence looks like:
Of course you could achieve the same with a user status as discussed in our previous post. But as you can see with parameter set value files you leave parsing the parameter names and values to DataStage. No complex Value Expressions in your Job Activities, but simply the predefined value file. Its cleaner, faster to implement and easier to maintain!
can we create a PARAM_FILE and PARAM_PATH directly from designer and use it in the job.
ReplyDeleteCan you teach me more about sequence file?
ReplyDeleteWhat will i set for 'File = ?' in tab Target of sequence file?
Thank you
This comment has been removed by the author.
DeleteWhere and how will we use column 'paramLine' to create new param?
DeleteThis is truely awesome. I never thought of you have been so much in to the technology and have created your own world of Datastage.
ReplyDeleteOnline Datastage Training with free Demo class in USA | UK | INDIA | SINGAPORE I am sure, your liking of technology to such an extent will make you rise in the IT a way ahead of others. This is truely good....I really wish I could meet you again and discuss more about it..
It's a marvellous post. This idea is a decent method to improve the information. I like it and help me to improvement quite well. I was much obliged to you for this short clarification and reputable data. Indeed, they got great information. IT Consulting in Myanmar
ReplyDeleteNice list of bloggers. From this blog I learned more and got to know more .Thank you for sharing this great post. IT Consulting and offshore services in Raleigh
ReplyDeleteI read your post and got it quite informative. I couldn't find any knowledge on this matter prior to. I would like to thanks for sharing this article here.government grant consultant Vancouver Canada
ReplyDeleteYou have a real ability to write a content that is helpful for us. Thank you for your efforts in sharing such blogs to us.nidhi software company
ReplyDeleteReally I enjoy your site with effective and useful information. It is included very nice post with a lot of our resources.thanks for share. i enjoy this post. technical service
ReplyDelete