Page 1 of 1

Running Routing from Parallel Job

Posted: Sun Mar 25, 2007 6:48 pm
by Munish
Hi All,

There comes a scenario where I have a Parallel Routine (Transform Function) which Backs out the data in case of fatal error. It is sql script deleting the rows before loading fresh data.

I need to run it from with in my pre-existing job(s).

How can I get it working??

What I tried so far:
I tried
Adding this code in Job Control section of my job properties
Answer =
BackOutScript(USERNAME,PASSWORD,INSTANCE,PATH,TABLENAME)
Is it the wrong way to do///// Or I should be running it from some other place//// Any other thing I am missing.

Any input will be appreciated.

Thanks and regards,
Munish

Posted: Sun Mar 25, 2007 7:52 pm
by DSguru2B
First of all , what kind of routine is it? Is it a C routine or a Basic routine?
You mentioned Job Control so I am guessing its a Basic routine as for a C routine you must be executing it with DSExecute() at the OS level. Fill in some blanks for us, will ya.

Posted: Sun Mar 25, 2007 7:54 pm
by kumar_s
Also do let know, if not working what not working with error code mentioned.

Posted: Sun Mar 25, 2007 8:39 pm
by Munish
Hi There,
1. It is Basic Routine.
2. It was not compiling and was treating my Routine as Variable and was saying Variable not declared.

I have get the things running, I needed to run this in job stage and wanted to avoid Sequencer.
What I wanted:
was to run a sql script to delete the records>>>Dataset(With Records)>>>Load Database.

What I did:
First:
I used one Routine stage >> followed by my job which loads the detail to DB.
Second: I copied the code from JOBCONTROL tab from Sequencer property window.
Third: I Pasted the same to my job's JOBCONTROL window.

It worked fine.

Is this the right way?
But doing this, can there be chance or error?
I needed to run this in job stage and can not use sequencer....

Your comments are appreciated.

Thanks and regards,
Munish

Posted: Mon Mar 26, 2007 5:06 am
by ray.wurlod
Munish wrote: I needed to run this in job stage and wanted to avoid Sequencer.
I needed to run this in job stage and can not use sequencer....
Why can't you use a job sequence? It would make testing the condition under which you want to unwind the load easier, given that the job that performs the load can be finished before you check.

There's nothing to stop you using an after-job subroutine, of course. And that can be written in DataStage BASIC.

But there's no such thing as an after-stage subroutine in parallel jobs, except in the BASIC Transformer stage. In a parallel Transformer stage you can have an after-stage trigger, but that has to be written in C++.