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: 17,912

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

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

Super User
Posts: 5,093

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

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?

I think this should work as per your query,

Cheers from India!

Manjeet
Respected Advisor
Posts: 3,901

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

@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
  • 237 views
  • 1 like
  • 5 in conversation