How to generate warnings when rows rejected

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
sarathchandrakt
Participant
Posts: 50
Joined: Fri Aug 29, 2014 1:32 pm
Location: Mumbai

How to generate warnings when rows rejected

Post by sarathchandrakt »

Hi all,

I have a sequential file capturing rejects from a db2 connector. I do not want to fail the job because I want to capture all rejects in file for analysis. But I want to abort the sequence. To achieve that, I want db2 connector to generate warnings when the rows get rejected into the sequential file. How can I achieve that. I'm already calling after job sub-routine so running a command in after job can't be achieved. Appreciate any help.

Thanks,
Sharath.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I assume you already have a reject link for capturing those rejected rows.

An informational message is logged when the reject link is used.

Use a local message handler to promote that message from informational to warning.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
sarathchandrakt
Participant
Posts: 50
Joined: Fri Aug 29, 2014 1:32 pm
Location: Mumbai

Post by sarathchandrakt »

I tried that. Below is the Info generated on DB2 Connector and Reject Sequential File.

"db2Connector_OUT,2: Number of rows rejected: 64"

"seq_Rejects,0: Export complete; 127 records exported successfully, 0 rejected."

But this info is generated even when there are 0 rejects which will also be shown as warning if I do that.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Is the first message generated even with zero rejects? I.E. something like:

"db2Connector_OUT,2: Number of rows rejected: 0"
-craig

"You can never have too many knives" -- Logan Nine Fingers
FranklinE
Premium Member
Premium Member
Posts: 739
Joined: Tue Nov 25, 2008 2:19 pm
Location: Malvern, PA

Post by FranklinE »

If you must abort the job sequence, and you must also complete the after-job routine, try putting an Execute command activity next. I use a row count in a similar way, and the command output value determines the triggered link. For example, if my output file is empty, but always has a header row, if the row count is 1 I trigger a branch to an alternate file. You could easily link to a terminator stage if your reject file is 1 or more rows.
Franklin Evans
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson

Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
Post Reply