Introduction to the SAS System

Similar documents
Using an ICPSR set-up file to create a SAS dataset

Chapter 1: Introduction to SAS

SAS Programming Basics

SAS Display Manager Windows. For Windows

Introduction to the SAS Macro Facility

A Guided Tour Through the SAS Windowing Environment Casey Cantrell, Clarion Consulting, Los Angeles, CA

Chapter 2 The SAS Environment

Lab #1: Introduction to Basic SAS Operations

SAS Studio: A New Way to Program in SAS

Introductory SAS example

Relius Documents ASP Checklist Entry , select option 2

Epidemiology Principles of Biostatistics Chapter 3. Introduction to SAS. John Koval

STAT:5400 Computing in Statistics

SAS Windowing environment Tips and Tricks

2. Referencing Files and Sepng Op+ons. GIORGIO RUSSOLILLO - Cours de prépara+on à la cer+fica+on SAS «Base Programming» 47

What Is SAS? CHAPTER 1 Essential Concepts of Base SAS Software

SAS PROGRAMMING AND APPLICATIONS (STAT 5110/6110): FALL 2015 Module 2

Make SAS Enterprise Guide Your Own. John Ladds Statistics Canada Paper

Introduction to SAS Statistical Package

Roadmap to UPK 3.1 Session #1 UPK 3.1 Practice Exercises. A Solbourne White Paper April 2008

Stat 302 Statistical Software and Its Applications SAS: Data I/O

GoLive will first ask you if your new site will be for one individual or a work group; select for a Single User, and click Next.

Oracle General Navigation Overview

ScholarOne Manuscripts Author Guide

Create a personal geodatabase

From the Insert Tab (1), highlight Picture (2) drop down and finally choose From Computer to insert a new image

INTRODUCTION TO SAS STAT 525 FALL 2013

Maximo Self Service Center

Getting PC SAS to Do What You Want, When You Want, How You Want Jodie Gilmore, Fulcrum Communications, Washougal, WA

Beginning Tutorials. PROC FSEDIT NEW=newfilename LIKE=oldfilename; Fig. 4 - Specifying a WHERE Clause in FSEDIT. Data Editing

SAS 101. Based on Learning SAS by Example: A Programmer s Guide Chapter 21, 22, & 23. By Tasha Chapman, Oregon Health Authority

Assignment 0. Nothing here to hand in

MetaTrader 4 for Android. User Manual

Starting SAS. 2. Click START, ALL PROGRAMS, SAS, and the SAS ICON

Best Practices Benchmarking Application

Technical Paper. Defining an OLEDB Using Windows Authentication in SAS Management Console

Law Technology Team (LTT) Offices: OM Hours: 8:30am 5:30pm Panopto D2L Guide

Microsoft FrontPage. An Introduction to. Lecture No.1. Date: April Instructor: Mr. Mustafa Babagil. Prepared By: Nima Hashemian

Introduction to SAS: General

Ektron Advanced. Learning Objectives. Getting Started

ESRI stylesheet selects a subset of the entire body of the metadata and presents it as if it was in a tabbed dialog.

SAS Studio 4.4: User s Guide

3. Hello World! for IDEA. Java. Summer 2008 Instructor: Dr. Masoud Yaghini

Chapter 1 The DATA Step

Fall 2012 OASUS Questions and Answers

Where Did My Files Go? How to find your files using Windows 10

STAT 503 Fall Introduction to SAS

Banner Documentation Bookshelf

Lab 1: Getting started with R and RStudio Questions? or

Stat 302 Statistical Software and Its Applications SAS: Data I/O & Descriptive Statistics

If you re using Internet Explorer as your internet browser, you must answer NO to the security warning when first accessing the catalog.

SAS Studio 4.3: User s Guide

Introductory Guide to SAS:

SAS. Studio 4.1: User s Guide. SAS Documentation

MetaTrader 4 for iphone. User Manual

APPENDIX 4 Migrating from QMF to SAS/ ASSIST Software. Each of these steps can be executed independently.

Grapevine web hosting user manual. 12 August 2005

Creating a new CDC policy using the Database Administration Console

CCH INCORPORATED 05/03

WPS Workbench. user guide. "To help guide you through using the WPS user interface (Workbench) to create, edit and run programs"

Paper William E Benjamin Jr, Owl Computer Consultancy, LLC

Documentation Tool Tutorial Tutorial for Creating a Documentation Tool Interactive in the Texas Gateway

FSEDIT Procedure Windows

Don't quote me. Almost having fun with quotes and macros. By Mathieu Gaouette

ecampus Submission Process

How to Edit Your Website

Creating Online Forms to Collect Data

Desire2Learn: Assignments

VISIONTRACKER FREQUENTLY ASKED QUESTIONS FAQ

Restoring Exchange Server 2003 with Arcserve Version 1.01

182 Introduction to Microsoft Visual InterDev 6 Chapter 7

Faber 6000/Faber 6000 Plus USB Driver Installation for Windows 7/10

Introduction. Key features and lab exercises to familiarize new users to the Visual environment

SAS Training Spring 2006

Getting Started with Cisco WebEx Meeting Applications

Introduction to Cascade Server (web content management system) Logging in to Cascade Server Remember me Messages Dashboard Home

How to Edit Your Website

Login: Quick Guide for Qualtrics May 2018 Training:

Electronic Recontracting

EagleSync 101 Powered by OrgSync

Customizing Your SAS Session

Website Administration Manual, Part One

EDIT A CONTENT OBJECT

To complete this database, you will need the following file:

Mobi View. Charging: Turning on Mobi View: Using Your Mobi View: Writing Notes:

Version: Copyright World Programming Limited

Power users are all about shortcuts,

Sitecore guide building a blog

Microsoft Office Outlook 2007: Intermediate Course 01 Customizing Outlook

Membership Portal Manual

Welcome In this chapter

Downloading and editing signatures!

Getting started with Panopto Instructors

Presentation Goals. Now that You Have Version 8, What Do You Do? Top 8 List: Reason #8 Generation Data Sets. Top 8 List

Reading data in SAS and Descriptive Statistics

SAS Universal Viewer 1.3

Connecting Your Turnitin Enabled Dropbox Folder with the Turnitin App

1 Introduction. ThinPrint Client Installation Page 1

Windows 8.1 User Guide for ANU Staff

SoftChalk 10. Level 1. University Information Technology Services. Learning Technologies, Training, Audiovisual, and Outreach

Transcription:

Introduction to the SAS System

The SAS Environment

The SAS Environment The SAS Environment has five main windows

The SAS Environment The Program Editor

The SAS Environment The Log: Notes, Warnings and Errors

The SAS Environment The Explorer: Navigation of SAS Libraries

Running/Submitting a Program Open Demo Code 1 from \\seashare\blumj\stt 305 You may use File Open Program or the Open icon, provided the Program Editor is the active window.

Running/Submitting a Program To run a program

Running/Submitting a Program Click on the running man

Running/Submitting a Program Select submit from the run menu

Running/Submitting a Program Or press F8 on your keyboard

Output Depending on the settings for your session, output may be generated in different ways. SAS 9.4 default is HTML, but we ll change to listing (output window). Caveat: Not all code generates output (and some generates different types).

Output-HTML

Output Changing to Listing

Output Changing to Listing Uncheck Create HTML, Check Create listing

Output--Listing The Output Window

Output--Listing The Results Window provides bookmarks for all output

Managing Results Multiple program submissions can (and likely will) be made in a given session. In fact, blocks of code can be submitted individually. Submissions are cumulative in both the log and output windows.

Managing Results Since log and output results are cumulative, clearing windows is often necessary. You can clear a window by

Managing Results Typing clear into the command box

Managing Results Selecting Clear All from the edit menu

Assigning Hotkeys The function keys and other key combinations can be mapped to certain commands. To bring up the keys window type keys in the command box or press F9. Any legal SAS commands can be used, multiple commands are separated by semicolons.

Assigning Hotkeys I have F12 mapped to a series of commands that clear the log and output windows and return me to the program editor.

Looking at the Code options nodate pageno=1; proc means data=sashelp.cars min q1 median q3 max; class origin; var mpg_city mpg_highway; run; proc freq data=sashelp.cars; table origin*type; run; quit;

Looking at the Code options nodate pageno=1; proc means data=sashelp.cars min q1 median q3 max; class origin; var mpg_city mpg_highway; run; proc freq data=sashelp.cars; table origin*type; run; quit; All statements end with a semicolon

Looking at the Code options nodate pageno=1; proc means data=sashelp.cars min q1 median q3 max; class origin; var mpg_city mpg_highway; run; proc freq data=sashelp.cars; table origin*type; run; quit; Options is a global statement stands alone

Looking at the Code options nodate pageno=1; proc means data=sashelp.cars min q1 median q3 max; class origin; var mpg_city mpg_highway; run; proc freq data=sashelp.cars; table origin*type; run; quit; Procedures PROC for short are blocks of code used for a variety of tasks in SAS

Looking at the Code options nodate pageno=1; proc means data=sashelp.cars min q1 median q3 max; class origin; var mpg_city mpg_highway; run; proc freq data=sashelp.cars; table origin*type; run; quit; One option nearly always required for a procedure is a data set

Data Set Names In any SAS session, SAS data sets have two level names: libref.filename Library Name Data Set Name If the libref is omitted (along with the. ), the work library is taken as default.

Libraries and Data Sets You can navigate the active libraries via the explorer tab or toolbar icon.

Libraries and Data Sets Folder icons represent catalogs (more on those later). Spreadsheet icons represent data sets double clicking opens a table view.

Libraries and Data Sets Columns/Variables can have both names and labels. Here the labels are shown.

Libraries and Data Sets Variables are what you refer to in various statements in your code.

Libraries and Library Assignments A SAS data library is a directory on your computer where SAS data sets are stored or will be stored. A library reference name (libref) can be assigned using the libname statement: libname libref path-specification ; The libref must be 8 characters or less; contain only letters, numbers or underscores and begin with a letter.

Libraries and Library Assignments Some data sets are posted on seashare. A potential library assignment to this folder: libname mysas '\\seashare\blumj\sas Programming Data'; Since this folder allows you only read access, your library privileges are the same.

Assigning Your Own Library Submitting this line

Assigning Your Own Library should produce a successful note in the log

Assigning Your Own Library and allow you to navigate it in the explorer. Open the projects data set.

Labels Are Not Required Here, nothing changes if you switch between names and labels for the variables.

Labels Are Not Required If labels are not assigned, the variable names are the labels.

A few other things Comments can be created in two ways: Starts with * and ends with ; *comment text; Starts with /* and ends with */ /*comment text*/ The editor uses color coding: Bright blue: Commands and options Purple: Quoted text This color: Numbers and formats Red: Bad (usually)