How to Use SAS - Lesson 2 - Creating Datasets on the Fly

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
17,426
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Aug 1, 2010

Mike's SAS Tutorials Lesson 2

This video series is intended to help you learn how to program using SAS for your statistical needs. Lesson 2 introduces some basic data step programming to define variables and specify their values for data sets containing one or more observations.

I also introduce two procedures: the PRINT procedure (PROC PRINT) to display the data contents in the OUTPUT window, and the CONTENTS procedure (PROC CONTENTS) to summarize the data set. Finally, I introduce the concept of libraries to show another method of inspecting the data set by physically opening it from the temporary WORK library.

Helpful Notes:

1. PROC PRINT - displays the entire data set by observation in the OUTPUT window
2. PROC CONTENTS - summarizes the properties of a data set, including an alphabetic listing of the variables and a count of the number of observations.
3. The assignment operator ("=") directly specifies the value of a variable in the data step.
4. The INPUT statement defines one or more variables of our data set.
5. The CARDS statement specifies the values for each of the INPUT variables (in order).
6. It is a good rule of thumb to always pair the INPUT and CARDS statements together.
7. DON'T FORGET SEMI;COLONS! They end statements and without them, you will most certainly have errors arise.
8. If you have any errors, always, ALWAYS, ALWAYS check the LOG first!
9. Creating datasets "on-the-fly" just means you're making a new dataset without bringing in the data from any other source.


Today's Code:

data main;
input x y z;
cards;
1 2 3
7 8 9
;
run;

proc print data=main;
run;

proc contents data=main;
run;

Category:

Education

Tags:

License:

Standard YouTube License

  • likes, 2 dislikes

Link to this comment:

Share to:

Uploader Comments (mbate001)

  • WE NEED PART 3! MIKE, COME BACK TO US!

  • @ctooshi Click on my channel to check out lesson 3 - more videos on the way soon :)

Top Comments

  • Great work! Thank you very much

  • Why have we stopped at lesson 2?

see all

All Comments (13)

Sign In or Sign Up now to post a comment!
  • @Rahde Great appreciation for a good job, nice support

  • stop eating your mic

  • No more of these?

  • great job. best tutorial ive found so far. Im terrible with computers but i really need to learn this. thanks and keep em coming !

  • Very nice.. I am here at the rite time.. Just decided to learn SAS and this is awesome... Keep Continuing

  • even when full screen mode, too small to read screen

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more