Sunday, April 28, 2013

Creating a project from the command line using dsadmin

reating a project using the Administrator client is easy and simple. The problem with graphical tools is that it is very difficult to ensure repeatability. Sure you can document the process with lots of pictures but at the end of the day there is still the human factor. The best way of ensuring repeatability is by scripting the process.

dsadmin

The dsadmin utility can be used to create and configure a DataStage project, set project properties and manage project environment variables.
Command Syntax:
        dsadmin [-file    | -domain  -user  -password  -server ]
                         []

Valid primary command options are:
        -createproject
        -deleteproject
        -oshvisible
        -enablercp
        -enablejobadmin
        -envadd
        -envdelete
        -envset
        -advancedruntime
        -basedirectory
        -deploymentdirectory
        -customdeployment
        -listprojects
        -listproperties
        -listenv
        -enablegeneratexml
        -protectproject
I've created the attached shell script that creates a project, sets project properties and then sets the project's environment variables. If the project exists, it simply skips the creation part. This script allows me to create the project and once it is created, I can run the script any time a variable is added or modified.
Once I'm satisfied with my development environment, I can run the process in my test and production environment with different values for project variables. Although environments may have differing sets of project variables, in most cases there will be a common subset. This script allows me to ensure that the environments share this common subset of project variables.

0 comments:

Post a Comment

Please Post your Comments..!