DSXchange: DataStage and IBM Websphere Data Integration Forum
View next topic
View previous topic
Add To Favorites
Author Message
sarathchandrakt
Participant



Joined: 29 Aug 2014
Posts: 37
Location: Mumbai
Points: 378

Post Posted: Thu May 03, 2018 2:00 pm Reply with quote    Back to top    

DataStage® Release: 11x
Job Type: Parallel
OS: Unix
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

Premium Poster
Participant

Group memberships:
Premium Members, Inner Circle, Australia Usergroup, Server to Parallel Transition Group

Joined: 23 Oct 2002
Posts: 54434
Location: Sydney, Australia
Points: 295220

Post Posted: Fri May 04, 2018 1:36 am Reply with quote    Back to top    

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.

_________________
RXP Services Ltd
Melbourne | Canberra | Sydney | Hong Kong | Hobart | Brisbane
currently hiring: Canberra, Sydney and Melbourne (especially seeking good business analysts)
Rate this response:  
Not yet rated
sarathchandrakt
Participant



Joined: 29 Aug 2014
Posts: 37
Location: Mumbai
Points: 378

Post Posted: Fri May 04, 2018 6:37 am Reply with quote    Back to top    

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.
Rate this response:  
Not yet rated
chulett

Premium Poster


since January 2006

Group memberships:
Premium Members, Inner Circle, Server to Parallel Transition Group

Joined: 12 Nov 2002
Posts: 42838
Location: Denver, CO
Points: 220827

Post Posted: Fri May 04, 2018 6:48 am Reply with quote    Back to top    

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

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

_________________
-craig

Your brain is full of spiders, you've got garlic in your soul, Mr. Grinch!
I wouldn't touch you With a thirty-nine-and-a-half foot pole!
Rate this response:  
Not yet rated
FranklinE



Group memberships:
Premium Members

Joined: 25 Nov 2008
Posts: 727
Location: Malvern, PA
Points: 6904

Post Posted: Fri May 04, 2018 8:28 am Reply with quote    Back to top    

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: http://www.dsxchange.com/viewtopic.php?t=143596 Using CFF FAQ: http://www.dsxchange.com/viewtopic.php?t=157872
Rate this response:  
Not yet rated
Display posts from previous:       

Add To Favorites
View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2002 phpBB Group
Theme & Graphics by Daz :: Portal by Smartor
All times are GMT - 6 Hours