Page 1 of 1

Adding trailer with multiple counts

PostPosted: Tue Apr 16, 2013 12:34 pm
by baglasumit21
I have a file with data as below

1020130202PUS
1020130202PUS
1020130202BUS
1020130202PUS
1020130202PUS
1020130202BUS
1020130202PUS
1020130202BUS

I need to add header and trailer which I was able to find on the fourm but in trailer I need multiple count as below

Trailer 0000008 0000003 0000005

where first number is total record count, second is record count with "P" in 11th position and third record count is "B" in 11th Position. Please help me to achieve it

Re: Adding trailer with multiple counts

PostPosted: Tue Apr 16, 2013 1:50 pm
by BillyBoyo
Can you show the code you have, please, so that we know what to make suggestions on?

Re: Adding trailer with multiple counts

PostPosted: Tue Apr 16, 2013 4:55 pm
by baglasumit21
Hi Mod..

with help of few posts on the forum.. i was able to achieve what I required.

Thanks for the reply

Re: Adding trailer with multiple counts

PostPosted: Tue Apr 16, 2013 6:02 pm
by BillyBoyo
Thanks for letting us know.

Perhaps you can post your code, so that it can help others with a similar requirement in the future.