BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
GN0001
Barite | Level 11

Hello all,

What is sashelp.class? What do we use it for?

Respectfully,

Blue Blue

Blue Blue
1 ACCEPTED SOLUTION

Accepted Solutions
SASKiwi
PROC Star

It's an example of one of SAS's sample datasets. It is there so you can experiment and learn with it. Often when you have a coding problem, using one of the sample datasets to demonstrate the problem is a good idea as all other SAS users can access the same datasets. Have a look at the SASHELP library to see some of the other datasets.

View solution in original post

5 REPLIES 5
Kurt_Bremser
Super User

SASHELP.CLASS is one of several "demo" datasets included with every SAS installation, which therefore can be used to easily demonstrate code examples, as the dataset is available for every SAS user.

SASKiwi
PROC Star

It's an example of one of SAS's sample datasets. It is there so you can experiment and learn with it. Often when you have a coding problem, using one of the sample datasets to demonstrate the problem is a good idea as all other SAS users can access the same datasets. Have a look at the SASHELP library to see some of the other datasets.

PaigeMiller
Diamond | Level 26

Take a look at it! Practice with it!

 

proc print data=sashelp.class;
run;

It is the single most used data set in the history of SAS (and by the way, this was predicted by Nostradamus).

--
Paige Miller
WarrenKuhfeld
Rhodochrosite | Level 12
The one thing I would add to all of the previous responses is I put together a book on sashelp data sets before I retired. There are many data sets that you can practice with.
https://support.sas.com/documentation/tools/sashelpug.pdf
ballardw
Super User

Generic response to sometext.othertext:  typically the most used expression in SAS with a dot in the middle is the LIBNAME.DATASET syntax element. So SASHELP.CLASS refers to a data set named CLASS in the Library named SASHELP. Specifically it is a small data set supplied by SAS which is typically used to demonstrate simple(ish) manipulations of data, modeling, reporting or graphing.

 

So if you see this in a DATA= on a procedure that is the name of the data set(or less commonly data view) in the specified library the procedure is to use. If it appears in a SET, MERGE, MODIFY, UPDATE statement in a DATA step, that is the name of a dataset in that libarary. If using Proc SQL and it appears in a FROM clause it is the source of data.

 

There are a number of functions related to data set manipulation that use this as well.

 

Less common it might relate to a CATALOG which stores all kinds of SAS stuff but usage will be different.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 3257 views
  • 8 likes
  • 6 in conversation