I don't understand why it will not recognize this macro. It is in the folder. Any suggestions? Thanks.
%let home = H:\HardDrive5\Laptop Backup 7-13-14\HEI\;
filename Totals '&home\ Data for HEI calc each day.csv';
filename res '&home\Results';
%include 'H:/HardDrive5/Laptop Backup 7-13-14/HEI /hei2015.score.macro.sas';
WARNING: Physical file does not exist, H:\HardDrive5\Laptop Backup 7-13-14\HEI \hei2015.score.macro.sas.
ERROR: Cannot open %INCLUDE file H:/HardDrive5/Laptop Backup 7-13-14/HEI /hei2015.score.macro.sas.
Your first two FILENAME statement cannot work because you are trying to use macro code inside of a quoted string that is bounded by single quote characters. The macro processor will ignore those strings. You need to use double quote characters instead to make those string literals.
But the %INCLUDE statement looks ok other than that you are using the wrong delimiter for a WIndow filename. Windows uses \ and not / between the directory levels.
Are you sure the H drive is mounted on the machine where SAS is running?
Try this. Are you really using multiple dots in your SAS macro filename?
%let home = H:\HardDrive5\Laptop Backup 7-13-14\HEI; filename Totals "&home\Data for HEI calc each day.csv"; filename res "&home\Results"; %include "&home\hei2015.score.macro.sas";
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.