If you are unable to create a new account, please email support@bspsoftware.com

 

Handling job stream failure on command line (Decision Stream)

Started by sappleg, 31 Mar 2009 11:58:03 AM

Previous topic - Next topic

sappleg

Hi Guys,

I have two Decision Stream jobs. For example, one being 'Master_J' and another 'Inventory_J'. I am running them both one after another in a batch file as a command line. Here's the example below:

"d:\program files\rundsjob.exe" "ORACLE" "abc/def@ghi" "MASTER_J" -L%LOGDSJ% -VTRACE_VALUES=PROGRESS,DETAIL,SQL,USER,VARIABLE

"d:\program files\rundsjob.exe" "ORACLE" "abc/def@ghi" "INVENTORY_J" -L%LOGDSINV% -VTRACE_VALUES=PROGRESS,DETAIL,SQL,USER,VARIABLE

Now my question is, how to handle the failure in between these jobs. If the first job 'Master_J' ends up in failure, I don't want the 'Inventory_J' to execute. Currently, if there's a failure in first job, it still proceeds to the second one because of no condition. Is there any condition I can add in between these two jobs on either the command line or in the ETL logic?

Can someone please provide any example?
Any help is greatly appreciated.
Thanks.

UseCog

Hi,

As both of these jobstreams are created in same DS package, why dont you create another jobstream in DS and pull those two jobstreams and into that and set it to your requirement ( I havent used DS, but I think it should be possible.

If the above is not possible, you can create 2 DOS batch scripts for each of the jobstreams and create a third one to handle your situation. I have done this type of scripting long back, so cant remember.

regards,
UC

onevedrov

Yes. you can. If you decide to use jobstream, then you can add condition node after first job and check the result variable. result variable is default and has 2 values true or false. You can also achieve the same result in batch file, but you have to know the windows commands to achieve it. it will  be easier in jobstream.

good luck.

jeamsx

You can try to create a job stream or you can test the command above:

IF("command to run the build" EQU 0 ) "the second build command"

[]s
IBM Certified Solution Expert - Cognos 8 BI
IBM Certified Developer - Cognos 10 BI Metadata Models
IBM Certified Designer - Cognos 10 BI Reports
IBM Certified Developer - Cognos 10 BI Data Warehouses