Job Warning

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

kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Not necessarily. If its a shell script which is ready to call the jobs, why it should be again called from Job Sequence. You can directly call it from Command prompt, or schedule it.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

True, shells are written as part of the control process. Shells control jobs, not the other way around.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

But I have seen in some places, for some reason the shell scripts are called again in Datastage Job Sequence. I guess oacvb is part of that victim.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

I have seen scripts being invoked from jobs as well. But these are mostly for reasons other than control. Otherwise the control becomes confusing and linked in various ways. I am not a big fan of that design.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
oacvb
Participant
Posts: 128
Joined: Wed Feb 18, 2004 5:33 am

Post by oacvb »

Exactly, As DSGuru mentioned, Shell are called for some other purpose not to control jobs. Else it will be difficult to control jobs
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

oacvb wrote:Exactly, As DSGuru mentioned, Shell are called for some other purpose not to control jobs. Else it will be difficult to control jobs
But we were talking about the Shell scripts that use to control job flow which involves 'dsjob -run' command in it.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

I think what oacvb was trying to say is
"Exactly, As DSGuru mentioned, Shell's within a job are called for some other purpose not to control jobs. Else it will be difficult to control jobs."
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
oacvb
Participant
Posts: 128
Joined: Wed Feb 18, 2004 5:33 am

Post by oacvb »

Yes guru. You understood correctly.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Am I missing out something.
The job is aborting if called from Datastage director based on the setting available in each Client. If its really required to avoid that, the suggested option is to call the Job using Shell script which involves 'dsjob -run' command. Hence '-warn' option can be fixed and not does not vary based on each client settings. And this Shell script can be called via command line or scheduler. So where comes the job, that calls the shell script.
:roll:
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
oacvb
Participant
Posts: 128
Joined: Wed Feb 18, 2004 5:33 am

Post by oacvb »

If i understood correctly, are you asking me use Unix Scheduler instead of scheduling at Director ? What if i need to call the sequencer repeatedly. It might lead on writing some more jobs as a cover.

Else i can give other scenario, I have a Job sequence which calls 20 Jobs. Assuming one of the job fails and wanted to trigger it. Won't lead to the same issue if option is not set at project level. Performance might degrade if you call script instead of jobs directly from job sequence. Because CPU has to spent for execution / status maintain for the scripts.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Basically Datastage uses the OS scheduler, it doesn't have its own.
And to answer you question, you need to call the JobSequence which calls the list of jobs again from script. The restartable option is at JobSequence level.
If you need to add any jobs, you are free to add in JobSequence.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
oacvb
Participant
Posts: 128
Joined: Wed Feb 18, 2004 5:33 am

Post by oacvb »

Exactly. Not sure whether you understood correctly or not.

The issue here not with job sequence. It's all with job. To make it clear.

I have Jobs J 1, J 2, J 3...J 20

Job Sequence S 1

Now S 1 Calls J 1, J 2 sequentially and waits for completion of both J 1 and J 2. then J 3, J 4...J 20 called parallely. Now what if J 11 fails and wanted to re-trigger J 11 alone and S 1 won't fail because of failure of Job J 11. Won't be better if you have job warn setting at project level.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

"S1 won't fail because of failure of Job J 11"
As I mentioned, S1 should fail when J11 fails. This can be acheived using options available at JobSequence and Job properties in order to maintain restrartablility.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
oacvb
Participant
Posts: 128
Joined: Wed Feb 18, 2004 5:33 am

Post by oacvb »

It's leading to somewhere i guess. I wanted not to fail Job Seqeunce and wanted to restart only the failed job. Hope it is clear to you now.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

You cannot restart a failed Job from a restart point from a Jobsequence unless the Jobsequence is failed.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Post Reply