Branching logic without a sequence

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
takyn
Participant
Posts: 6
Joined: Thu May 25, 2006 11:08 pm
Location: Australia

Branching logic without a sequence

Post by takyn »

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.
------------------------------------
-Dave
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

I cant think of a graceful way of doing this within a single job. Its better to keep it in a sequence job. You can have a shell script that is fired as a stand alone that runs the dsrecords orch command and depending upon the output, decides whether to run the job or not. Otherwise stick to a sequence job.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply