From: A. S. on
Somehow

DATA test;
SET test;
LABEL var=%PUT(&mymacrovar,myformat.) || 'ending';
RUN;

Doesn't work :( It takes the line literally. What else can I try?
From: data _null_; on
On Jun 21, 3:47 am, "A. S." <the.gere...(a)googlemail.com> wrote:
> Somehow
>
> DATA test;
>   SET test;
>   LABEL var=%PUT(&mymacrovar,myformat.) || 'ending';
> RUN;
>
> Doesn't work :( It takes the line literally. What else can I try?

The first thing I would try; write back to the group and describe
what and WHY you want to do this. Input/output etc.

Here is a bit of code that does what I think you are trying to do.
But I don't see this as being very useful, what is the big picture?

proc format;
value myformat 1='Placebo';
run;
%let mymacrovar=1;

DATA _null_;
*SET test;
LABEL var="%sysfunc(PUTN(&mymacrovar,myformat)) ending";
x = vlabel(var);
put x=;
RUN;


Also, to alter a label or other meta data you would not need or want
to recreate the data set. Use PROC DATASETS.

proc datasets;
modify test;
LABEL var="%sysfunc(PUTN(&mymacrovar,myformat)) ending";
run;
contents varnum data=test;
run;
quit;

This way it looks like you know what you're doing.
From: Anton Suchaneck on
Thanks for the answer!

Well, I have a macro and one thing it does is to set labels according
to the macro parameters. Obviously my example is simplyfied and not
the real code.
From: Anton Suchaneck on
Ah, you might want to know that the macro variable is some real data
entry, however for output it has to be converted.
By output I mean that the Excel output macro I'm using takes the
labels for the headers.