job to compile jobs

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
stivazzi
Participant
Posts: 52
Joined: Tue May 02, 2006 3:53 am

job to compile jobs

Post by stivazzi »

is it possible to write a job with a routine to compile other jobs?
how could i do that?
thanks for help
jhmckeever
Premium Member
Premium Member
Posts: 301
Joined: Thu Jul 14, 2005 10:27 am
Location: Melbourne, Australia
Contact:

Post by jhmckeever »

If you're looking to compile numerous jobs in our go (say after a bulk import from a CMS into a testing environment) you could use the Multiple Job Compile tool in Manager.

If you're looking to reset aborted jobs (or somehow 'clean' your environment after a test/execution cycle) then you should investigate how the facilities available in routines might help you.

A quick search yields a posting with a title very similar to yours ...

viewtopic.php?t=100360&highlight=routine+compile+jobs

J. :-)
<b>John McKeever</b>
Data Migrators
<b><a href="https://www.mettleci.com">MettleCI</a> - DevOps for DataStage</b>
<a href="http://www.datamigrators.com/"><img src="https://www.datamigrators.com/assets/im ... l.png"></a>
stivazzi
Participant
Posts: 52
Joined: Tue May 02, 2006 3:53 am

Post by stivazzi »

thanks and sorry... i read the thread... interesting!!
my problem now is: "where and how can i use this function?"
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

How about enlightening us with the 'why' behind the question... why do you think you need to do this?
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You can use this function in job control code. But you don't have to; use a Job activity in a job sequence, set it to "Reset if required, then run", and the generated code will contain an appropriate call to DSPrepareJob.

However, note that the thread referred to does not provide any routine for compiling other jobs, because there isn't one. At least not one that uses publicly-available/documented routines. That's why there's a Multi Job Compile tool.

If you must hack, enable server side tracing then open a Manager client, then run Multi Job Compile. Disable server side tracing and close the Manager. Re-open the Manager (now with server side tracing disabled) and inspect the trace to see what got called. If you're really good you could replicate the code.
Last edited by ray.wurlod on Fri Oct 27, 2006 8:07 am, edited 2 times in total.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

I have such a job on my website Members Area. A job that compiles other jobs. As for a routine, the job control library there as well has compilation built into the job control function. So, you can get the logic from there or use as needed.
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
stivazzi
Participant
Posts: 52
Joined: Tue May 02, 2006 3:53 am

Post by stivazzi »

answering to chulett: why sould i do that?
because i have configured the sequence job with multiple instances option. But for each run of the job a new row appears in the director window. i'm afraid that after many runs this window could contain too many rows. Recompiling the job the rows related to the job disappear. i run this job by calling the web service (no interaction with DS client).
Someone suggested me to make a job to compile jobs.

thanks
Kirtikumar
Participant
Posts: 437
Joined: Fri Oct 15, 2004 6:13 am
Location: Pune, India

Post by Kirtikumar »

I think a small code or script to clear the RT_STATUS files for the job could also be used. From the prev post, it seems it is RTI job and each time it is called, in status view of DS director it creates the multiple entries one for each instance.

If you are able to have script for that, it will do that clearing and no need to have routine or script to compile the jobs.
Regards,
S. Kirtikumar.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

stivazzi wrote:answering to chulett: why sould i do that?
because i have configured the sequence job with multiple instances option.
Thanks. Sometimes people ask a specific question about how to do X and they don't mention they are trying to use that answer to solve problem Y... and X isn't the right answer. :wink:

You'll only end up with a number of entries in the Director view as you have unique Invocation IDs you've used to start the Sequence job in question. Hopefully you have the job that you need as Ken noted he has that (as well as other nifty stuff) available for free download from his website.

As to clearing the RT_STATUS files for the job, unfortunately that doesn't work. Keep in mind the fact that there really is only one STATUS 'file' here and each entry is just a 'view' into the base... ah, never mind. I was thinking you meant to clear the logs. I just experimented by doing a Clear Status File on an invocation entry and it does 'make it go away' interestingly enough. However, I'm not sure how to code something like that, if the mechanism is exposed via the API. Hmm...
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply