Base SAS Programming – Day 2

  1. Proc Contents – other option
    • Position – to list the variables in alphabetic order as well as in order of creation in the dataset.
    • _all_ option – to list out the contents of all the files / datasets in a library
    • nods option – used only with _all_ , to list out only the file/dataset names in a library
  2. Data step:
    • Creating a copy of a dataset using data and set statement.
    • Keep and Drop options – to modify a dataset by retaining only the required variables in it. Can be used in both Data and Set statements.
    • Rename and Label statements to change the name of the variable and provide a brief description to it.
    • Using Firstobs and obs option in Data step
  3. Proc Print: Options
    • Firstobs and Obs – to specify the number of observations (based on observation number) to be printed in the result / output window
    • Label – Prints the label of the variable in place of the variable name in the output.
    • n – specifies the  number of observations in the result

Base SAS Programming – Day 1

The BASE SAS video series begins with the assumption that the student viewer has no background in SAS programming and in fact very limited to no prior exposure to any kind of programming at all. Base SAS video series comprises of 9 video lectures (Average of hour and a half each), plus additional videos covering Advanced topics like PROC SQL and SAS Macros.

Day 1 topics as below —

  1. Intro to Libraries, Data step and Proc step in SAS
  2. Data step example:
    • Creating a sample dataset using Datalines / Cards statement
    • Understanding data types in SAS
    • Informat and Format
    • Label
  3.  Proc step example: Overview
    • Proc Contents – to know the dataset structure, with list of variables and number of observations
      • Varnum option – to list the variables of a dataset in creation order (otherwise the list is in alphabetic order)
    • Proc Print – to view the data in a dataset.
      • Label option and Var statement
    • Proc Means – to extract basic statistics of a numerical variables in a dataset like N, Mean, Standard Deviation, Minimum and Maximum (default)