Page 1 of 1

Create the sequential file based on condition

Posted: Fri Oct 09, 2009 12:53 pm
by bharathappriyan
Hi,

The job has a source table and target sequential file. It is one to one mapping. If there is any data in the table, the sequential file should be created. Otherwise, the job should not create an Empty file.

Is there a way to handle in the job?

Thanks.

Re: Create the sequential file based on condition

Posted: Fri Oct 09, 2009 12:58 pm
by swades
bharathappriyan wrote: the job should not create an Empty file.
Not possible in single job. Put some check (record count or file size) after job finish successfully and remove file if it is empty.

Posted: Fri Oct 09, 2009 1:01 pm
by chulett
Technically, this is not possible at all. You run the job, the file is created, period. So you have two choices - either delete the file post job if empty or don't run the job without data to process.

Posted: Mon Oct 12, 2009 6:31 am
by keshav0307
you can use an after job subroutine, to delete the file if it is empty