BookmarkSubscribeRSS Feed
braam
Quartz | Level 8

I'm wondering if there is such a thing like Juptyer-Lab (or Notebook) for SAS. Put differently, I would like to have my results or figures right after the related code. The way the blog is posted is what I would like to have: https://blogs.sas.com/content/graphicallyspeaking/2012/03/18/graphs-with-class/#prettyPhoto

 

I know there is a SAS markdown package in R, but I'm hesitating to use the package, mostly because I haven't used R. I don't think it's good to use this package with R if this is the only reason I use R.

5 REPLIES 5
Reeza
Super User

https://blogs.sas.com/content/sasdummy/2016/04/24/how-to-run-sas-programs-in-jupyter-notebook/

 

You can use Jupyter Notebooks with SAS. 

 


@braam wrote:

I'm wondering if there is such a thing like Juptyer-Lab (or Notebook) for SAS. Put differently, I would like to have my results or figures right after the related code. The way the blog is posted is what I would like to have: https://blogs.sas.com/content/graphicallyspeaking/2012/03/18/graphs-with-class/#prettyPhoto

 

I know there is a SAS markdown package in R, but I'm hesitating to use the package, mostly because I haven't used R. I don't think it's good to use this package with R if this is the only reason I use R.


 

braam
Quartz | Level 8
Thanks @Reeza. With this approach, do they work well together? Just so you know, I use macro, x statement, libname, %include, dm statement, etc. a lot. Do you think it is possible to move to Jupyter Notebook with SAS completely?
ballardw
Super User

How much work do you want to do?

I doubt is there is a setting change to make all of your output do this.

 

One approach that doesn't involve a lot of work other than your copy and paste of proc code is something like this:

 

Proc odstext;
p "Proc print data=sashelp.class;
   var sex name;
run;";

Proc print data=sashelp.class;
   var sex name;
run;

Proc odstext will create not-very-pretty text output with this simple approach but can be done relatively easy (at least until your program code has lots of quotes in it.

 

Is this supposed to be "publication quality" or just local documentation?

braam
Quartz | Level 8
Thanks @ballardw. It's only for local documentation. I code a lot, and I have to learn the same code especially when my data is updated. Every time I do, I record some important statistics, which is quite annoying. So I'm looking for alternatives. Let me try your suggestion!
Reeza
Super User

Personally, I don’t do my data wrangling in Jupyter, only my reporting to end users. I find the data wrangling part isn’t really conducive to notebooks because most of the time you have no output. 

 

You shouldn’t be recording any statistics manually. Write a process to collect the data and dump it into a data set so you can process it. 


@braam wrote:
Thanks @ballardw. It's only for local documentation. I code a lot, and I have to learn the same code especially when my data is updated. Every time I do, I record some important statistics, which is quite annoying. So I'm looking for alternatives. Let me try your suggestion!

 

SAS Innovate 2025: Call for Content

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!

Submit your idea!

How to Concatenate Values

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.

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
  • 5 replies
  • 1635 views
  • 0 likes
  • 3 in conversation