BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
RAVI2000
Lapis Lazuli | Level 10

Please suggest what I am missing here.

 

%let directory_start =/data/;
%let directory_end= /Formats/formats.sas;
%let lib_end= /Programs/temp;
*%let study = %nrstr(Study03-0072);

%macro email(old =, new=, study=);
%include "&directory_start.&study.&directory_end.";

libname temp "&directory_start.&study.&lib_end.";

%mend;

%email;

%email(study = Study03-0072, old =data, new=datanew);

Log:

MLOGIC(EMAIL):  Beginning execution.
MLOGIC(EMAIL):  Parameter OLD has value 
MLOGIC(EMAIL):  Parameter NEW has value 
MLOGIC(EMAIL):  Parameter STUDY has value 
SYMBOLGEN:  Macro variable DIRECTORY_START resolves to /data/
SYMBOLGEN:  Macro variable STUDY resolves to 
SYMBOLGEN:  Macro variable DIRECTORY_END resolves to /Formats/formats.sas
WARNING: Physical file does not exist, /data//Formats/formats.sas.
ERROR: Cannot open %INCLUDE file /data//Formats/formats.sas.

SYMBOLGEN:  Macro variable DIRECTORY_START resolves to /data/
SYMBOLGEN:  Macro variable STUDY resolves to 
SYMBOLGEN:  Macro variable LIB_END resolves to /Programs/temp
MPRINT(EMAIL):   libname temp "/data//Programs/temp";
NOTE: Library TEMP does not exist.
1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

Your %let statement where you "assign" a value to Study is commented out so does not execute.

 

%let lib_end= /Programs/temp;
*%let study = %nrstr(Study03-0072);

Remove the * and try it again.

 

When you get any message like this where there is no "resolved" value appearing the first thought should always be: check where the variable is created/assigned.

SYMBOLGEN:  Macro variable STUDY resolves to 

 

View solution in original post

5 REPLIES 5
Reeza
Super User
Does the code work without macro variables at all? It doesn't seem like a macro variable issue....you do have duplicate // which I'm fairly sure SAS ignores but you could also fix that to confirm. Note that Unix systems have case sensitive paths, so if this is in Academics on Demand, it's a Unix box.

What is the log message for these:

libname temp '/data//Programs/temp';

libname temp '/data/Programs/temp';
Astounding
PROC Star
Take a look at the file you are bringing in with %INCLUDE. It is likely that you will find the answer there.
ballardw
Super User

Your %let statement where you "assign" a value to Study is commented out so does not execute.

 

%let lib_end= /Programs/temp;
*%let study = %nrstr(Study03-0072);

Remove the * and try it again.

 

When you get any message like this where there is no "resolved" value appearing the first thought should always be: check where the variable is created/assigned.

SYMBOLGEN:  Macro variable STUDY resolves to 

 

paulchinky50
Calcite | Level 5

Damm even I am having a similar kind of issue, I have searched all over the internet and even have posted on number of threads on different forum, no solution seems to work. I am really frustrated, can anyone of you here help me resolve this issue, I am very much tired now.  mobdro

PaigeMiller
Diamond | Level 26

@paulchinky50 wrote:

Damm even I am having a similar kind of issue, I have searched all over the internet and even have posted on number of threads on different forum, no solution seems to work. I am really frustrated, can anyone of you here help me resolve this issue, I am very much tired now.


Please start a new thread, and be sure to describe the problem completely, include both the code and the LOG. (We need to see the entire log, not selected parts of it)

--
Paige Miller

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 1378 views
  • 1 like
  • 6 in conversation