Page 1 of 1

using dsjob command with credential file

Posted: Tue Mar 20, 2012 12:13 am
by h4harry1
Hi All,
Environment -- Windows Server, Datastage 8.01
I am trying to use dsjob command using text file which contains the username, password and server details.
But its not working and produces the error "invalid/unknown primary command switch" , with status code = -9999 DSJE_DSJOB_ERROR.
Command Syntax-- dsjob -authfile c:\....\credentials.txt -ljobs MY_PROJECT
contents of credentials.txt
user=dsuser
password=dsuser
domain=mac100:9080
server=mac100

If i give dsjob command as follow, without credential file it works fine.

dsjob -domain ........ -user ...... -password ......... -server ........-ljobs MY_PROJECT

But I don't want to specify the password,username details on the command prompt.

Thanks in advance...

Posted: Tue Mar 20, 2012 5:31 am
by chulett
I thought it was simply -file rather than -authfile. Or has that changed in 8? :?

Posted: Tue Mar 20, 2012 3:40 pm
by h4harry1
Thanks for your reply. I tried file but it's still the same issue . I even used ; to terminate every line in credential file. Please advice .

Posted: Tue Mar 20, 2012 5:09 pm
by ray.wurlod
Try putting -domain on the command line, even though it's in the credentials file.

Posted: Tue Mar 20, 2012 7:11 pm
by h4harry1
Hi, Thanks for all the replies...

I solved this as follow:

credentials file contents :-

mac100:9080,MAC100,dsuser,dspwd

i.e, domain,server,user,password

and used the following command

dsjob -file credentials.txt mac100:9080 MAC100 -ljobs MY_PROJECT

Thanks again for your help

Posted: Tue Mar 20, 2012 7:15 pm
by qt_ky
In the 8.7 docs it sounds like -authfile does the same thing as the -file option, except that the -authfile option can also support a fully encrypted file.

Run dsjob by itself to see the expected syntax.

Posted: Tue Mar 20, 2012 9:48 pm
by chulett
Good to know. 8)