Branching logic without a sequence
Posted: Sun Mar 25, 2007 5:33 pm
Long time reader, first time poster
I need to check if a dataset in order to elect whether to run a database load job. If the dataset is empty (i.e. 0 rows) we skip the job, otherwise we run it*.
From the sequence i'd run an Execute Command invoking the 'dsrecords' command and branch based on the output. However what I'd like to be able to do is have the same logic embedded within the job itself (i'm thinking something in the before-job subroutine or dependencies?)**.
Any help would be much appreciated.
*why? 1) performance - this job is run a LOT 2) we sometimes get a weird DB2 load hang that seems correlated to zero row dataset loads - any help on this one would also help
**why? we have lots of sequences that use this one job (generic RCP DB2 load) - a lot less effort and a lot less room for missing one is we embed the logic at the job level.
I need to check if a dataset in order to elect whether to run a database load job. If the dataset is empty (i.e. 0 rows) we skip the job, otherwise we run it*.
From the sequence i'd run an Execute Command invoking the 'dsrecords' command and branch based on the output. However what I'd like to be able to do is have the same logic embedded within the job itself (i'm thinking something in the before-job subroutine or dependencies?)**.
Any help would be much appreciated.
*why? 1) performance - this job is run a LOT 2) we sometimes get a weird DB2 load hang that seems correlated to zero row dataset loads - any help on this one would also help
**why? we have lots of sequences that use this one job (generic RCP DB2 load) - a lot less effort and a lot less room for missing one is we embed the logic at the job level.