Yes Bill... source of the amount is not known. so I have the only option to use the existIng amount value in both the trailers. However I achieve this with my sort card. See above my input and output trailers.
Now the question is to convert the count and amount value in output trailer in signed byte. In my both input trailers count is 1B and 1E so output trailer count should be 2G.same way amount values in both trailers are 22878Q so output trailer should be 45757O being a -ve value.
I have implemented what u told above and got output but not in signed format..thts the only problem remaining.I got count as 27 and amount as 457576 in place of 2G and 45757O. I hope now I clarified the problem. I apologies if this was not clear in my previous post. If u can look at my above sortcard and suggest smthng to get the exact result pls...thanks.