In Stata, when you have your output, it also shows you the code you used to produce the output.
Is there a similar feature that can be utilized in SAS?
So that you can see the sas code with the output together?
Thanks!
You can use PROC DOCUMENT's IMPORT TO statement to import a text file into an ODS DOCUMENT, and then replay it to the listing or any other ODS destination such as a web page or PDF file. Here's an example.
Not easily. Recently they've added support for Jupyter notebooks so that would give you what you want:
http://blogs.sas.com/content/sasdummy/2016/04/24/how-to-run-sas-programs-in-jupyter-notebook/
SAS code is just text, you could read it in in a datastep infile. Then proc report it out after the output.
Or put the following code at the end of your code. data _null_; file print; infile '/folders/myfolders/temp.sas' lrecl=32767; input; put _infile_; run;
You can use PROC DOCUMENT's IMPORT TO statement to import a text file into an ODS DOCUMENT, and then replay it to the listing or any other ODS destination such as a web page or PDF file. Here's an example.
Thank you! This worked!
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.
Ready to level-up your skills? Choose your own adventure.