Header, detail, and trailer records
Posted: Thu Aug 17, 2006 11:37 am
I'm trying to create a file with header records, detail records, and trailer records. I'm pulling all the data from one table, then I need to sort by a given field, then for each record with matching values in that field, I need to write a header record, all the datail records, then a trailer record with a count of the detail records. Is there an easy way to do this?
<HEADER_STRa><HEADER_DATE>
<DETAILa1>
<DETAILa2>
<DETAILa3>
<TRAILERa><RECORD_COUNT>
<HEADER_STRb><HEADER_DATE>
<DETAILb1>
<DETAILb2>
<DETAILb3>
<TRAILERb><RECORD_COUNT>
Thanks
<HEADER_STRa><HEADER_DATE>
<DETAILa1>
<DETAILa2>
<DETAILa3>
<TRAILERa><RECORD_COUNT>
<HEADER_STRb><HEADER_DATE>
<DETAILb1>
<DETAILb2>
<DETAILb3>
<TRAILERb><RECORD_COUNT>
Thanks