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

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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