Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

concatenate string variable

Status
Not open for further replies.

mrom34

Programmer
Joined
Oct 1, 2007
Messages
1
Location
FR
Hello,

I have a string variable and 80 rows. I would like to concatenate all rows to create only one string varaible.
I tried to use "remain" function, but it seems it does not work.

Could you help me?

Regards

Romain
 
mrom34,
REMAIN function? I don't think there is a function named REMAIN. What you need to do is use the retain statement and a trim function.

example with a column of data named yourtext.
Code:
data test;
  set yourdata;
  length newstring $2000;
  retain newstring;
  newstring = trim(newstring)||' '||trim(yourtext);
run;

I hope that this helps you out.
Klaz

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top