Discussion:
macro text manipulation
(too old to reply)
l***@gmail.com
2018-03-30 09:20:01 UTC
Permalink
I have a macro variable

%macro snap(yyyymm);
data temp;
set temp;
mm=substr(&yyyymm,5,2);
yyyy=substr(&yyyymm,1,4);
run;
%mend;

The macro fails since there is no yyyymm column in temp.
How to correct the macro?
Thanks in advance.
Kenneth M. Lin
2018-03-30 16:01:23 UTC
Permalink
Aren't you supposed to pass the correct column name?

wrote in message news:c59f64de-6ca0-4085-a6d6-***@googlegroups.com...

I have a macro variable

%macro snap(yyyymm);
data temp;
set temp;
mm=substr(&yyyymm,5,2);
yyyy=substr(&yyyymm,1,4);
run;
%mend;

The macro fails since there is no yyyymm column in temp.
How to correct the macro?
Thanks in advance.

Loading...