0% found this document useful (0 votes)
293 views

Dsadmin Command For Administering Projects

dsadmin is a command used for administering DataStage projects that has many options for creating, deleting, and modifying projects and their properties. The command syntax uses options like -createproject, -deleteproject, and -listproperties along with the -file option to specify credentials from a file rather than on the command line. The document provides examples of using dsadmin to create a new project, enable and disable properties, add and modify environment variables, and list various project details. It also discusses how to properly format the credentials file for use with the -file option.

Uploaded by

abbhi19
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
293 views

Dsadmin Command For Administering Projects

dsadmin is a command used for administering DataStage projects that has many options for creating, deleting, and modifying projects and their properties. The command syntax uses options like -createproject, -deleteproject, and -listproperties along with the -file option to specify credentials from a file rather than on the command line. The document provides examples of using dsadmin to create a new project, enable and disable properties, add and modify environment variables, and list various project details. It also discusses how to properly format the credentials file for use with the -file option.

Uploaded by

abbhi19
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

dsadmin is the command used for administering projects and has large range of options.

Command Syntax:
dsadmin [-file <file> <domain> <DataStage server> | -domain <domain> -user <user> -password
<password> -server <DataStage server>]
<primary command> [<arguments>]
Valid primary command options are:
-createproject
-deleteproject
-oshvisible
-enablercp
-enablejobadmin
-envadd
-envdelete
-envset
-advancedruntime
-basedirectory
-deploymentdirectory
-customdeployment
-listprojects
-listproperties
-listenv
-enablegeneratexml
-protectproject
FileFormat:
Format of the file entry should be like :
domain,server,user,password
and the dsadmin command will be like :
dsadmin -file filename domain server <command arguments>
where domain = Information server domain name
Server=Datastage Enginetier Server name
Creating Project:
dsadmin -file file domain dsengine -createproject ProjectName [-location ProjectLocation] [-copyroles
<sourceproject>]
ProjectName is the name of the project.
-location is the project location and is optional.
-copyroles if you want to copy roles from existing project and is optional
If project location is not specified, project is created in the Projects dir in the server install directory.
Ex:
dsadmin -file /tmp/dscredentials.txt isdomain dsengine -createproject dstage2 -location
/projects/dstage2
Status code = 0

dsjob -lprojects
dstage2
Status code = 0
/projects>ls -tlr
total 4
drwxrwxr-x 45 dsadm dstage 4096 Sep 15 20:30 dstage2
================
dsadmin -listproperties dstage2
OSHVisible=0
JobAdminEnabled=
RTCPEnabled=
PXAdvRTOptions=
PXRemoteBaseDirectory=
PXDeployJobDirectoryTemplate=
PXDeployCustomAction=
PXDeployGenerateXML=
Status code = 0

Enabling/disabling OSH display


dsadmin -oshvisible TRUE dstage2
Status code = 0

Enabling/disabling runtime column propagation


dsadmin -enablercp TRUE | FALSE ProjectName
ex:
dsadmin -enablercp TRUE dstage2

Enabling/disabling job administration from the Director


client
dsadmin -enablejobadmin TRUE | FALSE ProjectName
Example:
dsadmin -enablejobadmin TRUE dstage2

Adding an environment variable


dsadmin can be used for created env variable and is added to the User Defined Category
Syntax:
dsadmin -envadd EnvVarName -type STRING | ENCRYPTED
-prompt "PromptText" [-value "Value"] ProjectName
Ex:
Now i will add new env called "TEST" to the dstage project.

We use dsadmin -listenv dstage to check if this env is defined or not.


dsadmin -listenv dstage2 | grep TEST
Status code = 0
dsadmin -envadd TEST -type STRING -prompt TEST ADDING ENV -value Test dstage2
dsadmin -listenv dstage2 | grep TEST
TEST=Test

Deleting an environment variable


dsadmin -envdelete EnvVarName ProjectName
dsadmin -envdelete TEST dstage2
dsadmin -envdelete TEST dstage2
Status code = 0
dsadmin -listenv dstage2 | grep TEST
Status code = 0

Setting the value of an environment variable


Syntax:
dsadmin -envset EnvVarName -value "Value" ProjectName
dsadmin -listenv dstage2 | grep TEST
TEST=Test
Status code = 0
Now we will change the value from Test to Test2
dsadmin -envset TEST -value Test2 dstage2
dsadmin -listenv dstage2 | grep TEST
TEST=Test2

Listing projects:
dsadmin -listprojects
dstage2

Listing properties
dsadmin -listproperties ProjectName
dsadmin -listproperties dstage2
OSHVisible=1
JobAdminEnabled=1
RTCPEnabled=1
PXAdvRTOptions=
PXRemoteBaseDirectory=

PXDeployJobDirectoryTemplate=
PXDeployCustomAction=
PXDeployGenerateXML=
Status code = 0

Listing environment variables:


dsadmin -listenv ProjectName
EX:
dsadmin -listenv dstage2
Initially I struggled to use -file option in dsadmin and following good Technote from IBM.
On IBM Information Server 8, dsadmin line command with -file option will fail with error message
Failed to locate information for server
Technote (FAQ)
Question
When trying to use the dsadmin line command with the -file option in order to avoid specifying the
user/password in the line command, the dsadmin command will fail with the following error message :
Failed to locate information for server (Similar issue will occur with dsjob command)
Cause
Incorrect syntax in the file specified for the -file option
Answer
This issue is caused by a missing or incorrect argument in the file, either the domain name or the
server name.
Note that the dsadmin command is using a combination of both the domain name and the server
name to lookup the connection details in the file.
Format of the file entry should be like :
domain,server,user,password
and the dsadmin command will be like :
dsadmin -file filename domain server <command arguments>
(This is also available for the dsjob command)
We dont have command line options to setup Sequence compilation options and also to set Autopurge of job log
If IBM enhance these two options in the command line then we can totally automate datastage project
creating using script.
WorkAround:
Create a template project and copy the DSParams file from template project to the original project.
Initially i struggled using -file option and found the following Technote from IBM.

You might also like