SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop and others

how can I combine many variables into one variable?

Reply
Contributor
Posts: 37

how can I combine many variables into one variable?

I'm trying to combine many variables into one variable.

 

I'm trying to APPEND the values of many variables into a new variable and create a new separate table for this.

 

Can someone please tell me how to do this with an example?

 

Super User
Posts: 19,772

Re: how can I combine many variables into one variable?

Posted in reply to confused_saser

It's not clear what you're trying to do. 
Can you demonstrate your issue with sample data?

Super User
Posts: 5,498

Re: how can I combine many variables into one variable?

Posted in reply to confused_saser

This might work:

 

data want;

set have;

new_variable = catx('|', of _all_);

run;

 

You could always try it and see.  But it is still very unclear how it would help you even if you could get the result you are asking for.

Contributor
Posts: 52

Re: how can I combine many variables into one variable?

Posted in reply to Astounding
I think this should work as per your query,

Cheers from India!

Manjeet
Respected Advisor
Posts: 4,173

Re: how can I combine many variables into one variable?

Posted in reply to confused_saser

@confused_saser

Can be done but it somehow doesn't feel right what you're asking for.

Why do you want to do this? What's the bigger problem you want to solve?

Ask a Question
Discussion stats
  • 4 replies
  • 299 views
  • 1 like
  • 5 in conversation