Write 0 to sequential file when source DB return 0 records
Posted: Tue Apr 29, 2008 11:57 pm
Hi,
The source for the job is a Sybase database and i am generating the header,footer,body part of a file seperately and then in the after job I am combining the header,body and footer to generate the final outut file.
In addition to that,
1.I need to write message to a log file indicating whether the final output file was generated with record or is empty.
2.I also need to abort the job if the source database returns 0 records.
Both the above functionality can be implemented in the job itself if i could get the record count as 0 in the sequential file when the source database returns no record.But the aggregator returns nothing when the source database returns 0 record and hence the record count sequential file is empty.
Can anyone let me know how a 0 can be append to the file when 0 records are returned from the source database.
Thx,
Rajee
The source for the job is a Sybase database and i am generating the header,footer,body part of a file seperately and then in the after job I am combining the header,body and footer to generate the final outut file.
In addition to that,
1.I need to write message to a log file indicating whether the final output file was generated with record or is empty.
2.I also need to abort the job if the source database returns 0 records.
Both the above functionality can be implemented in the job itself if i could get the record count as 0 in the sequential file when the source database returns no record.But the aggregator returns nothing when the source database returns 0 record and hence the record count sequential file is empty.
Can anyone let me know how a 0 can be append to the file when 0 records are returned from the source database.
Thx,
Rajee