HI!
I have some questions about the procedure proc document.
At the start I use the "ods document" to open and write in a open document. After that I close the document.
"ods document name=add(write);
proc report…
ods document close;"
After that I use the following code to figure out which path the different table and directory has
"proc document name=Add;
list;
run;
quit;"
and the result in the output window is;
"
Obs Path Type
1 Report#1 Dir
2 Report#2 Dir
3 Report#4 Dir
4 Report#5 Dir
5 Report#6 Dir
6 Report#7 Dir;
"
My problem is that I need to know what the different directories path is and it would be easy for my coding if I got the path in a data set.
Are there any solution to get the path in a data set or something like that?
Best regards
Hannes
Try:
ods output properties=properties;
proc document name=Add;
list/levels=all;
run;
quit;
-- David Kelley, SAS
Are you looking for a program/macro that will read all of the paths and then use those paths as parameters? Or, are you simply looking to write the directories to a data set?
I'm about writing a program that includes a macro, and in this macro I'm looking for a way to read all those paths and use them as parameters. My program are using loops so there will be different path every time the macro uses the loop.
does it make sense to you?
But If I find a way to write the directions to a data set then it's fine. Because then I can just loop the macro to create data sets with paths.
David K's suggestion will output a dataset with the directory names, which you can then read into a macro.
Thanks DavidK and Fugue for your help!
Try:
ods output properties=properties;
proc document name=Add;
list/levels=all;
run;
quit;
-- David Kelley, SAS
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.