Hi all, I have been trying to join up (concatenate) a series of strings(5) for 100 observations. some of the strings begin with a space. EG. " A" However, when I concatenate it with put: data A; set B; lrecl=900000 put part1 part2 part 3 part4 part5; run; So if part1 = "A" part2= "B" etc. to part5="E" one of the parts will have a space as beginning. Such as "AB CDE" Ideally i want it to be ABCDE, but if there is a space as beginning I need it to be there. such as ABC DE. So far if I use put part1 +(-1) part2 +(-)..... part5; it removes an awkward space that separates the strings but Then it becomes A B C D E, which isnt what I want. but if I remove the +(-1), it just becomes ABCDE even if there IS a space. Any ideas? I have thought on using an IF statement. If part1 begins with " ", Then add another space. So then only one space will be removed? Thank you. Also I really need to join them up but I'm just stuck in this dilemma on the code fixes one problem but causes the next.
... View more