Desktop productivity for business analysts and programmers

Getting On Demand SAS Enterprise Guide data in SAS Studio

Posts: 35

Getting On Demand SAS Enterprise Guide data in SAS Studio

Is there any way to get data from Little SAS book and Prg 1 & 2 courses into SAS Studio?

Posts: 9,257

Re: Getting On Demand SAS Enterprise Guide data in SAS Studio


  For Programming 1 and Programming 2, you need to follow the instructions *inside* the e-learning course. There is one set of instructions for SAS Studio used with the SAS University Edition and separate set of instructions for SAS Studio used with SAS OnDemand for Academics.

  I am not sure what you mean by "On Demand Enterprise Guide Data" -- if you are using the Little SAS Book, there are several editions of that book. Some use Enterprise Guide, some illustrate using SAS in programming mode. SAS Enterprise Guide is generally not available to you with SAS Studio unless you have been invited to an Enterprise Guide class by an instructor (and if this is the case, then you should work with your instructor on the process to upload the data to your personal location on the server). We used to have a product called SAS OnDemand for Professionals: Enterprise Guide. However, that server was retired in December 2014 and so everyone who used that older product needed to switch to either SAS Studio with SAS University Edition (Virtual Machine installation) or SAS Studio with SAS OnDemand for Academics (using SAS on our server). So whichever data you're asking about, the instructions will be different depending on how you are using SAS. And as I said, if you are using our e-learning courses, there is information *inside* each course as to how to make the data for the course. I assume that most of the Little SAS books pre-dated the introduction of SAS Studio, so there might not be explicit instructions for that interface.

  But, if you look at the author's web page (one of the authors is Susan Slaughter) SAS Press - Susan Slaughter Author Page , you will see that there is a thumbnail for every book and under the thumbnail, is an "Example Code and Data" link. If you follow that link, for your book, then you will find whatever programs and data they provide. Since I don't have any of these books, I am not sure what instructions are provided to you, but, if you follow the Programming 1 instructions first, then you should be able to use a similar technique to get the Little SAS Book data. The Programming 2 instructions are almost exactly the same as the Programming 1 instructions, except you have a different folder name to make and a different program to run.

  With SAS OnDemand for Professionals data for classes and data for some popular SAS books was pre-loaded on the server because students were not given write access to the server. With SAS University Edition or SAS OnDemand for Academics students will use their drive (SAS University Edition) or they use their 2GB directory on the server (SAS OnDemand for Academics), so there was no need to "pre-load" data for classes or books. But one alternative to the data for books or classes is to use the automatically defined SASHELP datasets, as described here: , I'm sure that there are quite a few datasets there that you could practice with.

  Basically, you have 2 ways of working with SAS Studio:

1) University Edition: you need to set up shared folders and put data or run a program to make data under the shared folder location

2) SAS OnDemand for Academics: since you are using SAS on our server, you need to upload data files or run a program to make data in a server location on the OnDemand server.

  If you are not using our e-learning classes, but are instead using data from a classroom class that you took, please look in Chapter 1 of your course notes. Generally in most of our Programming classes, there is a program called "CRE8DATA.SAS" that you must run in order to make the datasets used in your class. In Chapter 1 of your course notes, you should find a demo and an exercise that explains how to run the CRE8DATA.SAS program.

  Generally, to make that program work with either SAS OnDemand for Academics or SAS University Edition, you will need to modify the program:

1) SAS University Edition: if you are using SAS Studio and SAS University Edition, you would have to unzip the files into your shared folder location with an additional directory folder of either ECPRG193 or ECPRG293. So, for example, if your shared folder location is: c:\SASUniversityEdition\myfolders, then under the myfolders directory, you would make another folder called ECPRG293 (for example for Programming 2). Then, you would change your %LET statement in CRE8DATA.SAS to be:

%LET path=/folders/myfolders/ecprg293;

and then later in the program change the %INCLUDE statement from:

%include "&path\"; to %include "&path/";  (so you use a UNIX slash / instead of a Windows slash \)

2) SAS OnDemand for Academics: if you are using SAS Studio and SAS OnDemand for Academics, you would unzip the files to your local machine and then follow the SODA instructions to upload the data to your 2GB folder on the SODA server. Then, you would modify the CRE8DATA.SAS file with the same 2 changes as described above. The only difference is that the path name you use on the SODA server will be the path allocated to you when you first signed up for the SODA account.

  Since I don't have a copies of all the editions of the Little SAS Book, I am sorry that I can't help you with that. However, the general process will be the same as what I have described above.


Posts: 35

Re: Getting On Demand SAS Enterprise Guide data in SAS Studio

I'm using SAS Studio with SAS University Edition (Virtual Machine installation)

I was using SAS OnDemand for Professionals: Enterprise Guide

Within SAS OnDemand for Professionals: Enterprise Guide there were files from several of the courses (not elearning, in person class at sas institute) that the course notes reference; as well several versions of Little SAS book data available.

Where can I get that data in SAS Studio.

Posts: 9,257

Re: Getting On Demand SAS Enterprise Guide data in SAS Studio


  As I explained above, SAS OnDemand for Professionals did have data for popular books, e-learning classes and classroom classes already loaded on the server because students did not have write access to make their own libraries. Since SAS in the University Edition is running in a Virtual Machine, in order to keep the VM size small, it was NOT pre-loaded with the same data as SAS OnDemand for Professionals. But, assuming you set up your shared folders, you CAN read from and write to your local machine with the University Edition. So, in order to get your classroom data accessible to the SAS University Edition, you must run a program.

  When you take a classroom or Live Web class from us, generally the first demo in the book and the first exercise in Chapter 1 is the exercise where the students make their data. When you get your zip file of class programs, you should find a program called CRE8DATA.SAS. You must modify that program in 2 places before you run it in the University Edition. (If you took your class before March 2013, you might actually have a zip file of SAS data sets, as this how we delivered the data files before 32/64 bit machines.) But look in your zip file of programs from class. Do you find CRE8DATA.SAS in the zip file? For example, let's assume you have the zip file from Programming 1 and Programming 2. Each zip file has a SEPARATE set of programs and data creation program so here's what you need to do if you have take a classroom or Live Web class and you want to work with your course notes:

1) unzip your Programming 1 files to a shared folder location like: C:\SASUniversityEdition\myfolders\PRG1 and then

2) unzip your Programming 2 files to a shared folder location like: C:\SASUniversityEdition\myfolders\PRG2

(your path may be different)

3) Look in your book in Chapter 1, at the demo where the CRE8DATA.SAS program is run (the page numbers will be different in Programming 1 vs Programming 2)

4) Start with Programming 1. The data for your class was stored in S:\worksop in class Inside CRE8DATA.SAS program you will see a %LET statement you have to CHANGE that statement from:

%let path=s:\workshop;


%let path=/folders/myfolders/PRG1; (note the Unix name of your shared folder location and the Unix slashes)

In our classes, when we write files or output, we use this "helper" macro variable &PATH to store the location of the class files. So you *MUST* change the %LET statement in the CRE8DATA.SAS program. And when you run on the University Edition, you MUST use the Unix name for your shared folder location

5) You have 1 more change to make. Look further down in the program until you see this statement:

%include "&path\";    <---note the Windows slash \

you will need to "flip the slash" and change this statement to:

%include "&path/";   <--note the Unix slash /

6) Now without making any other changes, submit the CRE8DATA.SAS program and assuming you used the correct path location for your shared folder location, the program should run and make ALL the SAS datasets and raw data files you need for class.

7) After the program runs sucessfully and makes all the files you need for class, it will also make you a file called LIBNAME.SAS (just as in class), which is the file you will need to submit to point to the class data the next time you log on.

For your Programming 2 class, repeat septs 3-7, being sure to use the CRE8DATA.SAS program inside the Programming 2 zip file. Be sure to change the folder name for Programming 2 so you don't overwrite the Programming 1 files. The two classes use the same LIBNAME of ORION, but the datasets are different in the 2 classes.

  The bottom line is that you have to do the same thing for your class data using the SAS University Edition that you did in class to make the data -- you have to run a program to make the data. The data is not pre-loaded on your machine. The difference is that in class, the program was aleardy pointed to the correct physical location for class and on your machine or in your environment, you have to change the program as I described above.

  For folks reading this who are using e-learning classes. The above description does NOT apply to the e-learning classes. The above description only applies to people who took a classroom or Live Web class from SAS after March 2013 The data used in our e-learning classes is slightly different than the data used in our classroom classes. The datasets might be named the same, in some instances, but for the e-learning classes, there might be fewer rows or slightly different datasets. That is because of the inherent differences between classroom training with an instructor and listening to a recorded lecture. The e-learning classes have some extra practices to break up the lectures and so some extra data was needed for the e-learning class. The e-learning students need to follow the instructions in Lesson 1 in the e-learning class. There is a Course Overview section in the e-learning class that usually has the setup instructions. For an e-learning class, the program to make the data or the zip file of data is always *inside* the class. And if you are using a book from the SAS Bookstore with the SAS University Edition, then you need to go to the bookstore site and get the Example data from the bookstore site. Remember that many of our books were written before the existence of the University Edition. so if your book has "Windows" names and paths and "Windows" slashes \, then before you run the program, you will need to change any Windows locations to your shared folder location and any Windows slashes in the code to Unix slashes.

  I hope this helps you make the data for Programming 1 and Programming 2 classes that you took so you can continue to work with the course notes from class.


New User
Posts: 1

Re: Getting On Demand SAS Enterprise Guide data in SAS Studio

Posted in reply to Cynthia_sas



where do i find the cre8data program ??

Ask a Question
Discussion stats
  • 4 replies
  • 3 in conversation