Page 1 of 1

Appending record count at the end of the file

Posted: Mon Jul 07, 2008 4:21 pm
by yaminids
Friends,

I am working on a small project which requires me to generate some flat files with the data selected from an Oracle db. I am generating one file per table by selecting all the records.
The main requirement is to append the record count at the end of the file.

Is there a way to accomplish this task in DataStage?

Thanks a bunch in advance
Yamini

Posted: Mon Jul 07, 2008 5:15 pm
by chulett
Sure! :D

You can open the file in Append mode and write the record to it. Or capture the count in a separate file (with a link to an Aggregator, for instance) and then concatenate it in append mode to the main file after job. I'm sure there are other techniques.

Code: Select all

cat record_file >> detail_file
Have you tried either way? What issues are you having?