Hello Patrick. You say you 6 and 7 leading spaces in front of your 1-80 data. What does that mean exactly? My best guess (right now) is OldStringVar holds the numbers 1 to 80 (as strings), and that there are 7 leading blanks for 1-digit "numbers" and 6 leading blanks for 2-digit "numbers". In other words, OldStringVar is formatted as A8. Is that right? If so, why do you need to keep a version of the variable that retains the leading blank spaces? Why not just overwrite the variable, like this:
COMPUTE OldStringVar = LTRIM(OldStringVar).
If you do need both versions for some reason, then you will have to do what Jon suggested:
STRING NewStringVar (A8).
COMPUTE NewStringVar = LTRIM(OldStringVar).
Meanwhile, I find myself wondering if this is an example of the so-called XY problem. I.e., I wonder if you are asking how to carry out your intended solution to some problem without explaining what the actual problem is. If you explain clearly what the actual problem is, someone may be able to offer another solution.
Cheers,
Bruce