Page 1 of 1

Running a job from a different project...

Posted: Tue May 02, 2006 1:13 pm
by rodre
Can you run a job of another project?

I want to refresh a hash file job from another project, can this be done from datastage?

Thanks,
Rodre :)

Posted: Tue May 02, 2006 1:20 pm
by kcbland
Sure, dsjob takes as parameters the server, userid, password, project, and jobname. The Sequencer and Batch job control API's only work with the current project.

Awhile back I considered writing a universal job control that included the project name with the job, but the functionality of dsjob is not as robust as the API library so I shelved the idea.

So, to run a job in another project, use dsjob to run it, but be aware that you might be limited in your functionality thru dsjob. But you'll probably be fine if you stay to the basics (check job status, optionally reset, run, check job status.)

Posted: Tue May 02, 2006 1:26 pm
by rodre
Where/How do you use dsjob to run it....
Thanks,
Rodre :)

Posted: Tue May 02, 2006 1:43 pm
by kduke
You can refresh a hashed file in another project without running a job in that project. The hashed file has a path or account option below the name. Use the project name for the account and you can update the hash file directly. You could also use the full path to the hashed file.

Posted: Tue May 02, 2006 1:49 pm
by rodre
I figure out you use the ExecCommand. There might be other ways as well. But, how do you pass the parameters in the command line....?

Here is my command line:
dsjob -user -password -run -mode RESET -wait fazr LeadsNightly_Hash

How do you pass the parameters, which a Enviroment Variable Parameters in the Parameters line:
#$dspwd##$dsuserid#

Rodre :)

Posted: Tue May 02, 2006 1:53 pm
by DSguru2B

Posted: Tue May 02, 2006 1:54 pm
by rodre
You can refresh a hashed file in another project without running a job in that project. The hashed file has a path or account option below the name. Use the project name for the account and you can update the hash file directly. You could also use the full path to the hashed file.

_________________
Mr. Kim Duke
Kim,
This would be a better way to do this. Can you explain a little further as far as how to refresh the hashfile. Do you do it from a sequencer?
Thanks,
Rodre

Posted: Tue May 02, 2006 3:20 pm
by kduke
It is simple. When you type in the hashed file name in the stage. Below it asks for a path or an account name. Choose Account Name and put in the project name.

If you use a path in both projects then it is even easier. The job can be exported from one project and imported into the other project.

Posted: Thu May 04, 2006 2:38 pm
by jreddy
I figure out you use the ExecCommand. There might be other ways as well. But, how do you pass the parameters in the command line....?

Here is my command line:
dsjob -user -password -run -mode RESET -wait fazr LeadsNightly_Hash

How do you pass the parameters, which a Enviroment Variable Parameters in the Parameters line:
#$dspwd##$dsuserid#

Rodre :)

Use the routine activity to call a command with parameters..