I would like to include into a current SAS program a file that exists in parent directory. I would rather not hardcode the path so it can be used from any child directory.
I am working in a UNIX environment
I have tried:
%include "../myconfig.sas";
%include "~/myconfig.sas";
%include "..\myconfig.sas";
%include "~\myconfig.sas";Thanks
i am getting its value as blank ''
%put &_CLIENTPROJECTPATH;
Is there way to get the current path where the SAS program file is located on a SAS server without using a project .egp file?
Thanks
The parent directory of the executing sas file.
But never mind, I have derived it from the macro variable &_SASPROGRAMFILE which does exist when a SAS code runs in EG.
Thanks for pointing me to the right direction.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.
Ready to level-up your skills? Choose your own adventure.