To do this, simply loop over each line.
If it is a line printer (txt) incoming file then do the following:
Set up a global variable from the left hand document structure menu called "total".
Then you need to create a run page - create a new page which is at the top of the document tree and change its properties so that "page ejects" is unchecked.
Drop a PressTalk object on the page which has this code in it:
for(¤t.line, 1, 1, 66)
&total := &total + @(¤t.line, startpos, endpos)
endfor()
* I am assuming it is a standard 66 line file - we can change this if necessary.
* Replace 'startpos' and 'endpos' with the start and end character of the total on any line.
Now on a normal page (on which you want the lines to show):
Create a data selection object on the page and in the properties, tick "Custom data selection" and make your custom data selection equal as follows:
You could then set a condition on the object to only show on the page on which you want the total to appear.
Let me know how you get on.