Page 2 of 3

Posted: Fri Mar 09, 2007 4:24 am
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.

Posted: Fri Mar 09, 2007 7:51 am
by DSguru2B
True, shells are written as part of the control process. Shells control jobs, not the other way around.

Posted: Fri Mar 09, 2007 7:57 am
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.

Posted: Fri Mar 09, 2007 7:59 am
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.

Posted: Sun Mar 11, 2007 5:17 pm
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

Posted: Sun Mar 11, 2007 6:53 pm
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.

Posted: Sun Mar 11, 2007 7:03 pm
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."

Posted: Sun Mar 11, 2007 7:06 pm
by oacvb
Yes guru. You understood correctly.

Posted: Sun Mar 11, 2007 7:11 pm
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:

Posted: Sun Mar 11, 2007 7:25 pm
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.

Posted: Sun Mar 11, 2007 7:28 pm
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.

Posted: Sun Mar 11, 2007 7:38 pm
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.

Posted: Sun Mar 11, 2007 7:42 pm
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.

Posted: Sun Mar 11, 2007 7:48 pm
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.

Posted: Sun Mar 11, 2007 7:49 pm
by kumar_s
You cannot restart a failed Job from a restart point from a Jobsequence unless the Jobsequence is failed.