Conversion from trailing spaces of text to low-values
Posted: Wed Jan 13, 2010 11:10 am
I have a file that about 400 bytes of data.
Few fields in this file has data in the following format.
I have to convert these trailing spaces of the field to low values.
The length of different fields vary.
eg the above is an address line, similarly there could be a name in the same record, which also needs to fixed.
can we handle this via sort or fileaid
Thanks in advance.
akanchu
Few fields in this file has data in the following format.
1799 ARBYDALE LN
FFFF4CDCECCDC4DD444444444444444444444444444444444444444444
1799019284135035000000000000000000000000000000000000000000
----------------------------------------------------------
1234 HILTON WHITEMALL RD
FFFF4CCDEDD4ECCECDCDD4DC4444444444444444444444444444444444
1234089336506893541330940000000000000000000000000000000000
----------------------------------------------------------
2025 S DUMPBELL AVE APT 317
FFFF4E4CEDDCCDD4CEC4CDE4FFF4444444444444444444444444444444
2025020444725330155017303170000000000000000000000000000000
FFFF4CDCECCDC4DD444444444444444444444444444444444444444444
1799019284135035000000000000000000000000000000000000000000
----------------------------------------------------------
1234 HILTON WHITEMALL RD
FFFF4CCDEDD4ECCECDCDD4DC4444444444444444444444444444444444
1234089336506893541330940000000000000000000000000000000000
----------------------------------------------------------
2025 S DUMPBELL AVE APT 317
FFFF4E4CEDDCCDD4CEC4CDE4FFF4444444444444444444444444444444
2025020444725330155017303170000000000000000000000000000000
I have to convert these trailing spaces of the field to low values.
1799 ARBYDALE LN..........................................
FFFF4CDCECCDC4DD000000000000000000000000000000000000000000
1799019284135035000000000000000000000000000000000000000000
---------------------------------------------------------
1234 HILTON WHITEMALL RD..................................
FFFF4CCDEDD4ECCECDCDD4DC0000000000000000000000000000000000
1234089336506893541330940000000000000000000000000000000000
---------------------------------------------------------
2025 S DUMPBELL AVE APT 317...............................
FFFF4E4CEDDCCDD4CEC4CDE4FFF0000000000000000000000000000000
2025020444725330155017303170000000000000000000000000000000
FFFF4CDCECCDC4DD000000000000000000000000000000000000000000
1799019284135035000000000000000000000000000000000000000000
---------------------------------------------------------
1234 HILTON WHITEMALL RD..................................
FFFF4CCDEDD4ECCECDCDD4DC0000000000000000000000000000000000
1234089336506893541330940000000000000000000000000000000000
---------------------------------------------------------
2025 S DUMPBELL AVE APT 317...............................
FFFF4E4CEDDCCDD4CEC4CDE4FFF0000000000000000000000000000000
2025020444725330155017303170000000000000000000000000000000
The length of different fields vary.
eg the above is an address line, similarly there could be a name in the same record, which also needs to fixed.
can we handle this via sort or fileaid
Thanks in advance.
akanchu