In your "not working" process, you are attempting to concatenate a data string to the end of a SAS variable. The concatenation operation does not trim trailing blanks, so your resulting SAS variable (after the array processing) has been truncated.
For what you are trying to accomplish, you must use a function to accomplish the trim, such as CATT (new with SAS 9, or TRIM -- there are others as well).
Also, if you were to add a PUT _ALL_ to your DO/END processing after the assignment, you might have some additional diagnostic information to see the execution as it is processing.
Scott Barry
SBBWorks, Inc.