Even though the file is of 1000 bytes the record is max of 480 byes so there are no chances of truncation.

My question is: I want to check the first space encountered starting from 11th byte. Suppose the first space is at 17th byte, In that case I have to keep the first 17th byte as it is and rest of the data should start from a fixed position 30th byte.
The other situtation could be: First space is encountered at 15th byte, In that case I have to keep the first 15th byte as it is and rest of the data should start from a fixed position 30th byte.