Help using Base SAS procedures

Proc document

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 15
Accepted Solution

Proc document

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


Accepted Solutions
Solution
‎08-15-2013 03:40 PM
SAS Employee
Posts: 6

Re: Proc document

Try:

ods output properties=properties;

proc document name=Add;

list/levels=all;

run;

quit;

-- David Kelley, SAS

View solution in original post


All Replies
Super Contributor
Posts: 307

Re: Proc document

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?

Occasional Contributor
Posts: 15

Re: Proc document

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?

Occasional Contributor
Posts: 15

Re: Proc document

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.

Super Contributor
Posts: 307

Re: Proc document

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

Occasional Contributor
Posts: 15

Re: Proc document

Thanks DavidK and Fugue for your help!

Solution
‎08-15-2013 03:40 PM
SAS Employee
Posts: 6

Re: Proc document

Try:

ods output properties=properties;

proc document name=Add;

list/levels=all;

run;

quit;

-- David Kelley, SAS

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

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