Hi All,
I finally wrote a piece of macro that runs regressions for all variables and data sets in a library and produces ODS.
My problem is how can i use %include or something similar to call the macro with user specified conditions:
1. The user doesn't need to see the whole code
I beleive this can be done by saying %include 'path' (where path contains the name of the sas file which has the macro reg_adm);
But
2. I also want the user to specify some parameters like Data set names etc. which I have include in %let statements within the macro reg_adm
Struggling on the last leg of the macro
Regards,
I have never tried this, but in principle it is possible to do something similar in SAS Base - but uglier 🙂 - like with the EG:
You should look either at
- an Enterprise Guide project with SAS code (you can dor the %inc there) and user prompts
- a stored process with required parameters. A simple web form is all that is required to call the stored process via /SASStoredProcess on the web application server
If I understood you correctly; 1) include any SAS-code including macros:
Filename MyFile "C:\Users\Username\Desktop\Test.sas";
%Include MyFile;
2) If you would like to user-friendly replace %let-statements, you might be looking for prompts in the enterprise guide (if you#re using one); right-klick on the code in the EG, then "properties", then "prompts".
Hi,
Thanks for your reply. Yes you understood correctly that I have used %let statements within the code. I want the user to be able to specify the %let when they run the %include statement
My problem is that my SAS EG is a server based installation and all users don't have a server. They have SAS Base locally installed. Is there a way that I can change the prompt property in SAS base also? (similar to the right click option you have suggested in SAS EG)
Thanks
I have never tried this, but in principle it is possible to do something similar in SAS Base - but uglier 🙂 - like with the EG:
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.