how to not create sequential file if there are 0 records

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
RiyaNY
Participant
Posts: 12
Joined: Wed Jan 15, 2014 10:32 pm
Location: Mumbai

how to not create sequential file if there are 0 records

Post by RiyaNY »

Hi,
Almost summer 8)
I have a parallel job that creates a sequential file.
I want the first row to have column names.
I also do not want the file to be created if there are zero records being processed. Currently the job creates a file with just column names in this case.
Is there a way to achieve this?

kind regards,
Riya
Warm Regards,
Riya Yawalkar
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Short answer: you can't. Longer answer: don't run the job when your source is empty, check before and then run conditionally. Worst case: build something to run After Job and delete the file if it is "empty".
-craig

"You can never have too many knives" -- Logan Nine Fingers
UCDI
Premium Member
Premium Member
Posts: 383
Joined: Mon Mar 21, 2016 2:00 pm

Post by UCDI »

you can get the count of records and conditionally bypass the file creation if you are willing to move the parallel job into a sequence job and break it up. Is it worth it?
Post Reply