Omit Username and Password in DSJob -run command

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
ch_on14
Participant
Posts: 5
Joined: Thu Aug 03, 2006 12:57 pm

Omit Username and Password in DSJob -run command

Post by ch_on14 »

I am using a Windows Batch file to execute a Master Sequence in DataStage. Presently I am using the following command in the batch file:

echo @"%clientdir%\dsjob" -server %servername% -run -mode NORMAL -warn 50 -wait -param RunSched= %paramval% %ds_project% %mainjob%
@%clientdir%\dsjob -server %servername% -user %dsuserid% -password %dspasswd% -run -mode NORMAL -warn 50 -wait -param RunSched=%paramval% %ds_project% %mainjob%

Where:
set clientdir="C:\Ascential\DataStage\Engine\bin"
set servername= "DS Server IP Address"
set ds_project= "Project Name"
set mainjob=seq_MASTER_Sequence
rem set dsuserid=%1
rem set dspasswd=%2
set paramval=%3

Basically when I call my batch file in Windows I give 3 parameters.... the username, password and an extra parameter for RunSchedule.

My question is .... how can I execute the same job but not pass the UserName and Password as parameters... obviously for security reasons we do not want to display them.
ray.wurlod
Participant
Posts: 54595
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Set them up as environment variables and obtain them from those.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Or you can put them in a file and use the -file option on the command line. Based on the server you specify, it will pull the appropriate record from the file.

File format:

server,user,password

Edited to add: off course, this is all in 'clear text'.
Last edited by chulett on Fri Mar 02, 2007 4:57 pm, edited 1 time in total.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ch_on14
Participant
Posts: 5
Joined: Thu Aug 03, 2006 12:57 pm

Post by ch_on14 »

chulett wrote:Or you can put them in a file and use the -file option on the command line. Based on the server you specify, it will pull the appropriate record from the file.

File format:

sever,user,password




That is definitely an option that I am considering... Although would prefer to not have the username and password show up anywhere.. because then we need to maintain the other file and see that it has the proper data.

I was curious to see if the HostName = 127.0.0.1 can I not give the username and password. Since we can use the Omit when logging into DataStage. Question would be that to use the 127.0.0.1 hostname, do I have to be logged into Windows with the DSAdmin account used to install the DataStage Server ... or can I be logged into Windows with any DataStage user.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I for one can't tell you - don't have a Windows based server. Give it a shot, let us know! :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
ch_on14
Participant
Posts: 5
Joined: Thu Aug 03, 2006 12:57 pm

Post by ch_on14 »

chulett wrote:I for one can't tell you - don't have a Windows based server. Give it a shot, let us know! :wink:


FYI... the batch file worked as long as I was logged into the Server with the same username and password that was used to install the DataStage Server (DSAdmin). Maybe any other user with the same permissions might work. A user with limited permissions gave an error while logging into the server with IP 127.0.0.1.
Post Reply