BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Sennahlake
Calcite | Level 5

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

1 ACCEPTED SOLUTION

Accepted Solutions
DavidK_SAS
SAS Employee

Try:

ods output properties=properties;

proc document name=Add;

list/levels=all;

run;

quit;

-- David Kelley, SAS

View solution in original post

6 REPLIES 6
Fugue
Quartz | Level 8

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?

Sennahlake
Calcite | Level 5

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?

Sennahlake
Calcite | Level 5

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.

Fugue
Quartz | Level 8

David K's suggestion will output a dataset with the directory names, which you can then read into a macro.

Sennahlake
Calcite | Level 5

Thanks DavidK and Fugue for your help!

DavidK_SAS
SAS Employee

Try:

ods output properties=properties;

proc document name=Add;

list/levels=all;

run;

quit;

-- David Kelley, SAS

sas-innovate-2024.png

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.

 

Register now!

What is Bayesian Analysis?

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 1284 views
  • 3 likes
  • 3 in conversation