Page 1 of 1

how to not create sequential file if there are 0 records

Posted: Sun May 05, 2019 4:40 pm
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

Posted: Sun May 05, 2019 7:17 pm
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".

Posted: Mon May 06, 2019 3:13 am
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?