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



Joined: 17 Aug 2018
Posts: 11

Points: 158

Post Posted: Wed Sep 19, 2018 10:50 am Reply with quote    Back to top    

DataStage® Release: 11x
Job Type: Parallel
OS: Unix
I have an Oracle Connector stage that SELECT from Oracle database, and write the result to a Sequential File.
How can I only write to the Sequential File if the SELECT statement returns something (if SELECT statement doesn't return anything, don't write to the Sequential File) ?
Thank you.
chulett

Premium Poster


since January 2006

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

Joined: 12 Nov 2002
Posts: 42796
Location: Denver, CO
Points: 220596

Post Posted: Wed Sep 19, 2018 2:54 pm Reply with quote    Back to top    

Technically it won't write anything to the file so assuming you mean don't create the file... and that's not an option. You either need to delete it post-job if it is "empty", that or put a pre-check in place and only run the job when there is actually data to write to the file.

_________________
-craig

"I don't mind you comin' here and wastin' all my time time"
Rate this response:  
Not yet rated
faujong
Participant



Joined: 17 Aug 2018
Posts: 11

Points: 158

Post Posted: Thu Sep 20, 2018 6:20 am Reply with quote    Back to top    

Thank you for your reply. Yes, I meant not to create the file if SELECT returns nothing.
I will see if I can delete the file post-job, if the file only has 1 row (the column headers).

Thank you.
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