Running a job from a different project...

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
rodre
Premium Member
Premium Member
Posts: 218
Joined: Wed Mar 01, 2006 1:28 pm
Location: Tennessee

Running a job from a different project...

Post 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 :)
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post 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.)
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
rodre
Premium Member
Premium Member
Posts: 218
Joined: Wed Mar 01, 2006 1:28 pm
Location: Tennessee

Post by rodre »

Where/How do you use dsjob to run it....
Thanks,
Rodre :)
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post 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.
Mamu Kim
rodre
Premium Member
Premium Member
Posts: 218
Joined: Wed Mar 01, 2006 1:28 pm
Location: Tennessee

Post 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 :)
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
rodre
Premium Member
Premium Member
Posts: 218
Joined: Wed Mar 01, 2006 1:28 pm
Location: Tennessee

Post 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
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post 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.
Mamu Kim
jreddy
Premium Member
Premium Member
Posts: 202
Joined: Tue Feb 03, 2004 5:09 pm

Post 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..
Post Reply