Help using Base SAS procedures

issue with the code

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 75
Accepted Solution

issue with the code

I have this code. I have the error below when I'm on the toto data step.

WARNING: Apparent symbolic reference TODAY not resolved.

Why?

%macro t12;

%let today=%sysfunc(compress(%sysfunc(today(),yymmddd10.),'-'));

%mend;

%t12;

data toto;

itu=put &today;

run;


Accepted Solutions
Solution
‎08-05-2014 05:48 AM
Super User
Super User
Posts: 7,955

Re: issue with the code

Or you could put it in the yymmddn8 format (the n means no delimiter):

today=%sysfunc(today(),yymmddn8.);


&today.;

View solution in original post


All Replies
Frequent Contributor
Posts: 75

Re: issue with the code

Tough thing.

I realized that this would suffice

    %let today=%sysfunc(compress(%sysfunc(today(),yymmddd10.),'-'));

     data toto;

     itu=&today;

     run;

Thanks.

Solution
‎08-05-2014 05:48 AM
Super User
Super User
Posts: 7,955

Re: issue with the code

Or you could put it in the yymmddn8 format (the n means no delimiter):

today=%sysfunc(today(),yymmddn8.);


&today.;

Frequent Contributor
Posts: 75

Re: issue with the code

%let today=%sysfunc(today(),yymmddn8.);

Smiley Wink

Super User
Super User
Posts: 7,955

Re: issue with the code

Copy and paste issue from SAS, normally I would copy to notepad first then into here but was in hurry.  The full code was:

%let today=%sysfunc(today(),yymmddn8.);

%put &today.;

Strange it drops the first %keyword.

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 1884 views
  • 3 likes
  • 2 in conversation