05-27-2014 03:46 AM
I am trying to work out how the below macro works and cannot understand how this line ( DATAFILE="&FilePath") in the code works, Filepath is not defined anywhere earlier, &Library is defined.
DBMS = XLS;
SHEET = "Template";
NAMEROW = 5;
STARTROW = 6;
Can some one tell me what does "&Filepath" do (points to this file i guess) but how?
05-27-2014 03:59 AM
Effectively the FilePath macro variable is created in the line %MACRO ABC_ImportMacro(FilePath,Date);.
The data contained within this macro is defined when you call the macro using %ABC_IMPORT(<Filepath>,<Date>), where the information in the angle brackets is defined by the user or another program.
Do you know where you call this Macro from?
Edited to reflect the correct call of macro.
05-27-2014 04:32 AM
options mlogic mprint symbolgen;
This turns on all the macro debug information and in that it will tell you what macro variables decode to at run time.
I would also suggest reading up on macro programming in the SAS documentation to have a full understanding of what is being done.