Comparing columns in the same table to dictate processing

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
JPalatianos
Premium Member
Premium Member
Posts: 306
Joined: Wed Jun 21, 2006 11:41 am

Comparing columns in the same table to dictate processing

Post by JPalatianos »

Hi,
We have a requirement to maintain an audit table as follows:

CREATE TABLE PRFWSTG.PRSAUDIT
(
TABLENAME CHARACTER(30)
, PRETABLECOUNT INTEGER
, FILECOUNT INTEGER
, POSTTABLECOUNT INTEGER
, PRS_TIMESTAMP TIMESTAMP WITH DEFAULT CURRENT TIMESTAMP
)

We are still in development on this and we are updating the various columns in our jobs but would like to as a final step we would like to dictate s processing decision based on the value of
if POSTTABLECOUNT = (PRETABLECOUNT + FILECOUNT) then continue
else email notification.
I thought this would be the easiest piece but am not sure where this can/should go.

Any thoughts or experience with this would be appreciated.
Thanks - - John
sachin1
Participant
Posts: 325
Joined: Wed May 30, 2007 7:42 am
Location: india

Re: Comparing columns in the same table to dictate processin

Post by sachin1 »

in one transformer you calculate sum of two columns and in second transfomer's constraints, you can make a decision of job processing.
JPalatianos
Premium Member
Premium Member
Posts: 306
Joined: Wed Jun 21, 2006 11:41 am

Post by JPalatianos »

Thank you for your input. A follow up question to your suggestion....
Can I do a similar type thing in a sequnce job to control job execution?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Yes. You need to get the two values into the job sequence - typically via a job that selects them and loads them into its user status area or writes them into a file. Having retrieved them, you would use a Nested Condition activity with a custom trigger expression to make the decision.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply