Aged One:
If this file was created by a Cobol program, there should not be spaces after the numbers, the numbers should have leading zeros as you expect. In this case the program which created the file is at fault.
If you are trying to convert a field with trailing spaces you might have to pass the field to a subroutine which redefines the field as a table of 1 character fields,
then works from right to left until it hits a non-space character, then starts transferring the rest of the characters to another zero filled table starting from right to left.
123456ssss
||||||___
|||||___ |
||||___ ||
|||___ |||
||___ ||||
|___ |||||
||||||
0000123456
If the original field has a literal decimal point, then you will need logic to set the character index position of the receiving field as soon as you detect the decimal character.