hugheskbh,
you have been less than clear on what you need, both on this thread and on the others mentioned.
You say you are reading a file with variable size records.
And that you then need to move that field into a "output field".
What is the output field you mention? is it a working storage field? is it a FD (file) field? is it a linkage field?
Or are you moving it into a SQL statement for insertion on a database?
Normally (but not a requirement) if you declara a field as
01 f1 pic x(400).
the field will most times be initialized to spaces by the compiler (but not necessaraly!!!).
So if you move any other field into it with a MOVE statement the resulting field WILL have spaces from the last character of the originating field (considering that a space is not a character) to the end of the 400 chars the above example has.
IF you wish that the spaces to the right are substituted by something else then you will need to make sure of that AFTER you do the move, or optionaly before the move by using a combination of initializing the destination field to your desired value (for example X"00") and then using the STRING verb to move the original field to the destination field (or alternatively using reference modification).
So if you wish to have any further help please supply samples of your imput data, variables used (e.g. names and PICTURE), and code variations you have used so far.
Regards
Frederico Fonseca
SysSoft Integrated Ltd