Hello,
I have a typical requirement.
I have a flat file which is a fixed length one.
In this flat file from 3rd position to 21st position (i.e 19 characters) is allocated for the acc #. The acc # may not be of full length. The length can vary from 10-19 characters.
Now my requirement is that I need to replace this acc # in such a way that leaving the first 6 digits and last 4 digits the remaining digits should be 0.
Eg.
123456789108738
8399456789911117386
5734567893333333
output
123456000008738
8399450000000007386
5734560000003333
As i posted something similar to this few days back at that time the requirement was different; sed work for me
Now as far as my knowledge goes first of all we need to find out the length of the acc #
Thanks to all for there help
I have a typical requirement.
I have a flat file which is a fixed length one.
In this flat file from 3rd position to 21st position (i.e 19 characters) is allocated for the acc #. The acc # may not be of full length. The length can vary from 10-19 characters.
Now my requirement is that I need to replace this acc # in such a way that leaving the first 6 digits and last 4 digits the remaining digits should be 0.
Eg.
123456789108738
8399456789911117386
5734567893333333
output
123456000008738
8399450000000007386
5734560000003333
As i posted something similar to this few days back at that time the requirement was different; sed work for me
Now as far as my knowledge goes first of all we need to find out the length of the acc #
Thanks to all for there help