Starting Jobs out of the crontab / reimport of job

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
kakaiser
Participant
Posts: 4
Joined: Wed Feb 12, 2003 2:36 am

Starting Jobs out of the crontab / reimport of job

Post by kakaiser »

Hi,
we are running a DS 5.1 enviroment and starting our jobs out of the crontab.
After I imported an existing job with the overwrite option, I feel that the DS Job ID has changed. Is it possible to make a kind of automatism to re-enter the job ID into the crontab without some kind of manuell involvement?
Thanxs,
Karsten
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Alas, the answer is no, though it's not a bad idea for an enhancement request.
Every job when it is created is assigned a unique job number (mapping is in the DS_JOBS table in the Repository). Job numbers are not re-used. When you import with "overwriting" checked, nothing is in fact overwritten; the previous component is deleted and a new job is created.
Manual intervention in the crontab (or through the Director scheduler window) is therefore required.


Ray Wurlod
Education and Consulting Services
ABN 57 092 448 518
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

So if I'm currently in the same boat, can I -

a) Run some sort of select against DS_JOBS to get a listing of job names and numbers for reference, and then

b) edit the crontab, replacing the old job numbers with the new job numbers?

-craig
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The SQL is case sensitive:

SELECT NAME,JOBNO FROM DS_JOBS WHERE NAME = '';

If you use released jobs, you may need to be more vague:

SELECT NAME,JOBNO FROM DS_JOBS WHERE NAME LIKE '%';


Ray Wurlod
Education and Consulting Services
ABN 57 092 448 518
kakaiser
Participant
Posts: 4
Joined: Wed Feb 12, 2003 2:36 am

Post by kakaiser »

Hi,
I've found a workaround for the case mentioned.
I created a jobsequence which is calling the other jobs. If you are only changing the sequenced jobs and not the jobsequence job, it works.
Karsten Kaiser
Hewlett Packard Services
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

That is because the sequence resolves the job names to their new job numbers, as recorded in DS_JOBS.


Ray Wurlod
Education and Consulting Services
ABN 57 092 448 518
Post Reply