data s ;
name='joseph' ;
new='peter ';
run;
how to assign value of name variable as a label of new variable like see below
| joseph |
he is a stat programmer |
|
harish | harish |
I don't understand your example.
Is this what you want ?
data _NULL_;
set s;
call execute(cats('data S; set S; label new="',name,'"; run;'));
run;
Sorry, but i don't understand what you try to do.
What happened to Peter?
@thanikondharish wrote:
data s ;
name='joseph' ;
new='peter ';
run;how to assign value of name variable as a label of new variable like see below
joseph
he is a stat programmer
harish
harish
@thanikondharish wrote:
data s ;
name='joseph' ;
new='peter ';
run;how to assign value of name variable as a label of new variable like see below
joseph
he is a stat programmer
harish
harish
LABEL is a variable property. You can only have one label for a given variable. And does it need to be a label of a variable or the column heading for a report?
Give a more complex example of what you are attempting such as with three records with different values of name and "new" and what the resulting data set should look like.
Proc Transpose can use the value of variable to NAME a variable using the ID statement.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: