Joined: 25 Apr 2007 Posts: 44 Location: chennai, India
Hi
i have the following requirement
there are 2 flat files (both are of same lrecl)
each file contains records like this
1) control record (record 1 of file)
2) datarecords (from record 2 to last but one record)
3) summary record (last record of a file)
For Eg:-
File 1
weekly report
data1
data2
data3
306(summary record which says total count of records and sum of field5)
File 2
weekly report
data4
data5
data6
315 (summary record which says total count of records and sum of field5)
i.e output file should be in such a way that it should contain one control record, merge all the data record and one summary record which says total records and sum of fieldposition5
Joined: 25 Apr 2007 Posts: 44 Location: chennai, India
hi
i have also tried by myself to create a sort card for this requirement. But i was unable to do the summing functionality. the sort card which i used is as follows
The problem is i am not able to produce the trailer record (i.e CCC) with the sum. i was able to get the trailer seperately, but could not find the sum values. could you please help me
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
For this new requirement, we can take advantage of the ids in the record (AAA for header, BBB for detail and CCC for trailer) to do what you want with DFSORT in one pass as follows: