ods rtf file='path' ;
proc report data=sashelp.class nowd ;
run;
ods rtf close ;
in above program to send the data(report) from sas to particular path .
how to get that data from path to sas?
So many ways to read data from "path",
The best method dépends on the nature (format) of your data source.
The standard tool for the job is PROC PRINTTO. Before PROC REPORT, add:
proc printto print=path;
run;
After PROC REPORT, add:
proc printto;
run;
If you intend to use the same path for many reports, you need to read the details within PROC PRINTTO ... when does it replace the original file, and when does it append to the original file.
@thanikondharish Please spend some more time elaborating on your questions. It's hard to understand them and you're not providing enough information at the outset, though we ask constantly. Here's a good primer, and it's mostly in your best interest because you get faster answers and higher quality answers, rather than a lot of back and forth asking for clarifications.
https://stackoverflow.com/help/how-to-ask
Regarding your question, replace the word path with the path of your choice and the file will be there, provided you have the correct permissions.
@thanikondharish wrote:
ods rtf file='path' ;
proc report data=sashelp.class nowd ;
run;
ods rtf close ;
in above program to send the data(report) from sas to particular path .
how to get that data from path to sas?
It is a very good idea when referencing any external location to start from a known specific root location such as:
ods rtf file='c:\foldername\otherfolder' ; proc report data=sashelp.class nowd ; run; ods rtf close ;
Which starts at a known drive on a Windoze system. If you do not specify a starting point the default location is relative to the SAS current directory which may be in a system program folder where you do not have permissions, especially likely in a SAS server environment.
But ODS, Output Delivery System, is for OUTPUT and has nothing to do with reading data. Filename statements are used to point to files to read. And RTF is NOT going to be good source in general. If you don't believe me, open and RTF file in Notepad, the SAS editor or other program that does plain text reading (not Word or Wordpad which render the RTF control codes).
@thanikondharish wrote:
i can't understand this code
When you do not clearly state the problem or what you are attempting to accomplish solution code is next to impossible.
The code I posted was to demonstrate placing a starting point for a path that SAS can use to find sub-folders or directories.
Also ODS does not have anything to do with reading data. So I cannot tell why you included that.
Are you attempting to read data or create output? Not clear from your text and the code shows nothing attempting to read so I don't understand what "get data" means in this context.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.