I am trying to make a macro variable in SAS Studio which saves the "present working directory" as a macro variable.
The SAS-program is run in a "CPF
" process flow file in SAS Studio, and the whole SAS-file and processes are saved and run in a Linux server.
In SAS-Studio, the location of CPF-process flow file seems like in the directory /sasdata/model_v1
, and when I run a Linux command like X "pwd"
then I expect that the result will give /sasdata/model_v1
, but I get another directory instead like /sasinstall/sasconfig/Lev1/SASApp
instead, I guess the the process flow file with CPF
-suffix is run from this directory.
So the question is how I can find and save the working directory of my cpf
-file and save as a macro-variable, or even maybe for my other sas-files too, I may need the solution for both SAS-files and CPF-files.
If I find the directory, then I guess it should be enough to save them as macro-variable by using %let macrovariable = "/directory"
/sasdata/...
but the commandX "pwd"
gives the directory/sasinstall/...
instead – user3714330