Introduction to SAS Statistical Package

Size: px
Start display at page:

Download "Introduction to SAS Statistical Package"

Transcription

1 Instructor: Introduction to SAS Statistical Package Biostatistics Lecture 1 Lucy Meoni lmeoni@jhmi.edu Teaching Assistant : Sorina Eftim seftim@jhsph.edu Lecture/Lab: Room 3017 WEB site: sas@jhsph.edu to submit exercises 2 Using the PC labs SAS Version 9.0 requires basic Windows skills Set up class folder on your media (thumb drive, diskette) download files from the website for lab into class folder bring thumb drive or diskette to class Text : The Little SAS Book 3rd edition Other References: SAS online documentation Online tutor SAS system help Many, many SAS manuals SAS website WHAT IS SAS? Integrated system of software products began as software package for statistical analysis data management reporting and graphics analytic COURSE OBJECTIVES to introduce and develop skills in SAS; a statistical package used in research data analysis develop the skills necessary to create and modify a SAS data set and perform statistical analyses etc

2 COURSE TOPIC SEQUENCE introduction to SAS data definition and restructuring dates and functions file combination arrays and loops statistical procedures REFERENCE The Little SAS Book Chapter 1 and 2 WEB site: TOPICS: Introduction to SAS SAS programs SAS windowing environment SAS tables (data sets) SAS libraries Creating SAS tables IMPORT wizard StatTransfer Temporary vs permanent files 9 SAS use statements to write a series of instructions called a SAS program not command line driven (STATA) statements are written using the SAS language (a programming language that you use to manage your data). sequence of statements executed in order SAS procedures are software tools for data analysis and reporting. 10 The SAS Programming Process Debug or Modify Define the Need Create a SAS Program Enter the SAS Program Code Process the SAS Program Code Introduction to SAS Programs Review the Results 11 2

3 A SAS program is a sequence of steps that the user submits for execution. Raw Data SAS Data Set SAS Programs DATA steps are typically used to create SAS data sets. DATA Step SAS Data Set PROC Step Report PROC steps are typically used to process SAS data sets (that is, generate reports and graphs, edit data, and sort data). SAS Program LIBNAME mylib 'd:\temp\sasclass'; DATA newclass; SET mylib.class; PROC PRINT DATA=newclass; PROC MEANS DATA=newclass; CLASS gender; VAR bmi; RUN; DATA Step PROC Steps SAS steps begin with a DATA statement Step Boundaries PROC statement. SAS detects the end of a step when it encounters a RUN statement (for most steps) a QUIT statement (for some procedures) the beginning of another step (DATA statement or PROC statement). Step Boundaries : Lecture1.sas DATA newclass; SET mylib.class; PROC PRINT DATA=newclass; PROC MEANS DATA=newclass; CLASS gender; VAR bmi; RUN; Objectives Running SAS Programs Invoke the SAS System and include a SAS program into your session. Submit a program and browse the results. Navigate the SAS windowing environment. 18 3

4 SAS Windowing Environment Interactive windows enable you to interface with SAS. Navigating the SAS Windowing Environment 19 The SAS Programming Process Define the Need Create a SAS Program The SAS Programming Process Define the Need Create a SAS Program Debug or Modify Enter the SAS Program Code Process the SAS Program Code Debug or Modify Enter the SAS Program Code Process the SAS Program Code Review the Results Review the Results Objectives Entering and Executing SAS Code Enter SAS program code in the SAS windowing environment and execute the program. 24 4

5 Enter the SAS Program Code Once the planning and coding effort for a SAS program is complete, the SAS program code must be entered into the computer to process and to test the program. 25 Windowing Mode Windowing mode is a facility that enables you to enter and execute SAS programs and view the results in an interactive environment. An interactive environment permits the program to be processed immediately when submitted for execution. 26 The SAS windowing environment is made up of a collection of windows. There are three primary windows in the windowing environment The Enhanced Program Editor window enables SAS program code to be entered from the keyboard submitted for execution. SAS program elements are color-coded, including procedures, keywords, numeric and string constants, undefined keywords The Log window displays the SAS program code submitted for execution messages from SAS indicating the status of the program execution. The Output window displays reports generated by the SAS program

6 Selecting from pull-down menu Commands are used to navigate among the various windows of the SAS windowing environment and are used to execute a program. Typing the command Clicking on a tool button Depending upon the operating environment, commands can be issued by... Using function keys (F1 - F12) Entering and Executing SAS Code This demonstration illustrates entering SAS program code into the SAS Windowing Environment and executing the program. SAS Windowing Environment windowing system for editing and executing SAS programs interactive full screen collection of windows for editing programs, executing programs and displaying results five basic SAS windows Starting SAS Start SAS from the START button, PROGRAMS, The SAS System for Windows V9 system interactive full screen Enhanced Editor window, LOG window, and Explorer windows appear activate window by clicking within the window

7 ENHANCED PROGRAM EDITOR ENHANCED PROGRAM EDITOR text editor write and edit programs submit programs (use SUBMIT icon) save program statements to file with extension.sas asterisk (*) appears in title bar to indicate file has not been saved multiple windows possible 37 an ASCII editor that uses visual aides to help you write and debug your SAS programs. SAS program elements are color- coded, including procedures, keywords, informats and formats, dates, numeric and string constants, macro keywords, undefined keywords, and more. File, Open on menu to read in an existing SAS program file 38 LOG Window contains the compilation and execution results of DATA contains submitted program statements messages from SAS about compilation and execution -notes, warnings, errors save contents of this window to a file with extension.log (File, Save menu) clear window by clicking NEW icon on Toolbar LOG WINDOW CONTENTS DATA Step name of the SAS data set read and the number of observations and variables in the data set name of the SAS data set created and the number of observations and variables in the new SAS data set PROC Steps LOG WINDOW index with page numbers for successful procedures

8 OUTPUT WINDOW printable results from procedures save contents of this window to a file with extension.lst empty if program did not run - CHECK LOG window for errors indexed in the RESULTS window clear window and by clicking on NEW icon on Toolbar RESULTS WINDOW table of contents for OUTPUT window lists each part of your results in an outline form possible to save and/or print sections of results by right-clicking on section

9 EXPLORER WINDOW provides access to SAS files and libraries similar to Windows Explorer SAS FILE ORGANIZATION File Type Extension program file (EDITOR window).sas SAS table (data set).sas7bdat log file (LOG window).log Listing file (OUTPUT).lst Submitting a SAS Program When you execute a SAS program, the output generated by SAS is divided into two major parts: SAS log contains information about the processing of the SAS program, including any warning and error messages. SAS output contains reports generated by SAS procedures and DATA steps Running a SAS Program lecture1.sas This demonstration illustrates how to start a SAS session, include and submit a SAS program, and browse the results. 53 SAS Log 1 LIBNAME mylib 'd:\temp\sasclass'; NOTE: Libref MYLIB was successfully assigned as follows: Engine: V9 Physical Name: d:\temp\sasclass 2 DATA newclass; SET mylib.class; 3 4 NOTE: There were 5 observations read from the data set MYLIB.CLASS. NOTE: The data set WORK.NEWCLASS has 5 observations and 7 variables. 5 PROC PRINT DATA=newclass; 6 NOTE: There were 5 observations read from the data set WORK.NEWCLASS. 7 proc means DATA=newclass; 8 var bmi ; 9 class gender; 10 NOTE: There were 5 observations read from the data set WORK.NEWCLASS RUN; 54 9

10 PROC PRINT Output lname baseage gender race weight height BMI 1 Richardson Lowrey Tierney Sommers Kegan PROC MEANS Output The SAS System The MEANS Procedure Analysis Variable : BMI N gender Obs N Mean Std Dev ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ Minimum Maximum ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ Exercise I ONLY Mastering Fundamental Concepts 57 Objectives Define the components of a SAS data set. Define a SAS variable. Identify a missing value and a SAS date value. State the naming conventions for SAS data sets and variables. Explain SAS syntax rules. Investigate a SAS data set using the CONTENTS and PRINT procedures. 59 Data Entry Descriptor Portion SAS Data Sets External File Conversion Process SAS Data Set Other Software Files Data Portion 60 10

11 SAS data sets have a descriptor portion and a data portion. Descriptor Portion Data Portion SAS Data Sets General data set information * data set name * data set label * date/time created * storage information * number of observations Information for each variable * Name * Type * Length * Position * Format * Informat * Label Browsing the Descriptor Portion descriptor portion of a SAS data set contains general information about the SAS data set (such as data set name and number of observations) variable attributes (name, type, length, position, informat, format, label). CONTENTS procedure displays the descriptor portion of a SAS data set Browsing the Descriptor Portion General form of the CONTENTS procedure: PROC CONTENTS DATA=SAS-data-set; RUN; Partial PROC CONTENTS OUTPUT The CONTENTS Procedure Data Set Name WORK.NEWCLASS Observations 5 Member Type DATA Variables 7 Engine V9 Indexes 0 Created Friday, March 18, :02:40 PM Observation Length 64 Last Modified Friday, March 18, :02:40 PM Deleted Observations 0 Protection Compressed NO Data Set Type Sorted NO Label Alphabetic List of Variables and Attributes Example: proc contents data=work.newclass; 63 # Variable Type Len Format Informat 7 BMI Num 8 2 baseage Num 8 BEST12. F12. 3 gender Num 8 BEST12. F12. 6 height Num 8 BEST12. F12. 1 lname Char 15 $F15. $F15. 4 race Num 8 BEST12. F12. 5 weight Num 8 BEST12. F SAS Data Sets: Data Portion The data portion of a SAS data set is a rectangular table of character and/or numeric data values. lname gender BMI Richardson Lowrey Tierney Sommers Kegan Character values Numeric values Variable names Variable values 65 SAS Variable Values There are two types of variables: Character contain any value: letters, numbers, special characters, and blanks. Character values are stored with a length of 1 to 32,767 bytes. One byte equals one character. Numeric stored as floating point numbers in 8 bytes of storage by default. Eight bytes of floating point storage provide space for 16 or 17 significant digits. You are not restricted to 8 digits

12 SAS Data Set and Variable Names SAS names can be 32 characters long. can be uppercase, lowercase, or mixedcase. must start with a letter or underscore. Subsequent characters can be letters, underscores, or numeric digits. Valid SAS Names Select the valid default SAS names. data5mon 5monthsdata data#5 five months data fivemonthsdata five_month_data Valid SAS Names Select the valid default SAS names. data5mon 5monthsdata data#5 five months data fivemonthsdata five_month_data SAS Date Values SAS stores date values as numeric values. A SAS date value is stored as the number of days between January 1, 1960, and a specific date. 01JAN JAN JAN1961 store display 01/01/ /01/ /01/ Missing Data Values A value must exist for every variable for each observation. Missing values are valid values. LastName FirstName JobTitle Salary TORRES JAN Pilot LANGKAMM SARAH Mechanic SMITH MICHAEL Mechanic. WAGSCHAL NADJA Pilot TOERMOEN JOCHEN A character missing value is displayed as a blank. A numeric missing value is displayed as a period. 71 Browsing the Data Portion The PRINT procedure displays the data portion of a SAS data set. By default, PROC PRINT displays all observations all variables an Obs column on the left side

13 Browsing the Data Portion General form of the PRINT procedure: PROC PRINT DATA=SAS-data-set; RUN; Example: PROC PRINT Output The SAS System Obs lname baseage gender race weight height BMI 1 Richardson Lowrey Tierney Sommers Kegan proc print data=work.newclass; 73 c02s3d1 74 SAS Data Set Terminology SAS documentation and text in the SAS windowing environment use the following terms interchangeably: SAS Data Set SAS Table SAS Syntax Rules SAS statements usually begin with an identifying keyword always end with a semicolon. DATA newclass; SET mylib.class; Variable Observation Column Row PROC PRINT DATA=newclass; PROC MEANS DATA=newclass; CLASS gender; VAR bmi; 75 RUN; 76 SAS Syntax Rules SAS statements usually begin with an identifying keyword always end with a semicolon. DATA newclass; SET mylib.class; RUN; PROC PRINT DATA=newclass; RUN; PROC MEANS DATA=newclass; CLASS gender; VAR bmi; 77 RUN; SAS Syntax Rules SAS statements are free-format. One or more blanks or special characters can be used to separate words. They can begin and end in any column. A single statement can span multiple lines. Several statements can be on the same line. Unconventional DATA newclass; Spacing SET mylib.class; PROC PRINT DATA=newclass; PROC MEANS DATA=newclass; CLASS gender; VAR bmi; RUN;

14 SAS Syntax Rules Good spacing makes the program easier to read. Conventional Spacing DATA newclass; SET mylib.class; PROC PRINT DATA=newclass; PROC MEANS DATA=newclass; CLASS gender; VAR bmi; SAS Comments Type * to begin a comment. Type your comment text. Type ; to end the comment. * Create work.staff data set and add bmi; DATA newclass; SET mylib.class; * Produce listing report of newclass ; PROC PRINT DATA=newclass; RUN; RUN; Getting Familiar with SAS Data Sets SAS Data Libraries Objectives Explain the concept of a SAS data library. State the difference between a permanent library and a temporary library. Use the CONTENTS procedure to investigate a SAS data library. 83 SAS Data Libraries A SAS data library is a collection of SAS files that are recognized as a unit by SAS. Directory-based A SAS data library is Systems a directory. Windows: c:\mysasfiles UNIX: /users/dept/mysasfiles A SAS data set is a type of SAS file. SAS Data Library SAS File SAS File SAS File 84 14

15 SAS Data Libraries You can think of a SAS data library as a drawer in a filing cabinet and a SAS data set as one of the file folders in the drawer. FILES LIBRARIES Assigning a Libref Regardless of which host operating system you use, you identify SAS data libraries by assigning each a library reference name (libref). libref SAS Data Libraries When you invoke SAS, you automatically have access to a temporary and a permanent SAS data library. work - temporary library sasuser - permanent library ia - permanent library You can create and access your own permanent libraries. work sasuser ia 87 Assigning a Libref You can use the LIBNAME statement to assign a libref to a SAS data library. General form of the LIBNAME statement: LIBNAME libref 'SAS-data-library' <options>; Rules for naming a libref: must be 8 characters or less must begin with a letter or underscore remaining characters are letters, numbers, or underscores. 88 Examples: Assigning a Libref libname ia 'c:\workshop\winsas\prog1'; Making the Connection When you submit the LIBNAME statement, a connection is made between a libref in SAS and the physical location of files on your operating system. Windows 'c:\workshop\winsas\prog1' libname sasclass d:\temp\sasclass'; Libref exists only during the current SAS session

16 Two-level SAS Filenames Every SAS file has a two-level name: libref.filename The data set ia.sales is a SAS file in the ia library. The first name (libref) refers to the library. work Temporary SAS Filename The libref work can be omitted when you refer to a file in the work library. The default libref is work if the libref is omitted. The second name (filename) refers to the file in the library. sales ia sasuser work.employee employee files are deleted when SAS session ends SAS Files SAS data sets and other files are stored in SAS data libraries. SASUSER WORK MYLIB

17 SAS Data Libraries A SAS data library is a collection of SAS files that are recognized as a unit by SAS on your operating environment. WORK - temporary library SASUSER - permanent library You can create and access your own permanent libraries. mylib - permanent library WORK SASUSER MYLIB The LIBNAME Statement LIBNAME statement establishes the library reference (or libref), which is an alias for the SAS data library. global statement - in effect for the entire SAS session until replaced General form of the LIBNAME statement: The libref must be eight characters or fewer. LIBNAME libref 'SAS-data-library' <options>; Ex: LIBNAME mylib your folder ; Two-Level SAS Data Set Names libref.sas-filename Libref SAS Data SAS Data Library SAS DATA SET NAMES 2 level names first level is the libref refers to location of the file Default - file stored in WORK library second level is the member name that identifies the data set within the library Example : work.sales-located in the WORK library 99 mylib.sales-located in the MYLIB library 100 DATA Step PROC Step DATA Step PROC Step SAS Program may consist of a DATA Step Or a PROC Step Or any combination of DATA and PROC Steps EXERCISES II-IV PROC Step

18 DATA Step -- Two Phase Process Phase 1 - Compile phase corresponds to descriptor portion Phase 2 - Execute phase corresponds to data portion 103 Compilation During compilation, SAS checks code for syntax errors translates code to machine code establishes an area of memory called the input buffer if reading raw data establishes an area of memory called the Program Data Vector (PDV) assigns required attributes to variables creates the descriptor portion of the new data set. 104 Execution During the execution phase, SAS initializes the PDV to missing reads data values into the PDV carries out assignment statements and conditional processing writes the observation in the PDV to the output SAS data set at the end of the DATA step (by default) returns to the top of the DATA step initializes any variables that are not read from a SAS data set to missing (by default) 105 repeats the process. The DATA Step Is a Loop Initialize PDV. Execute read statement. Execute program statements. Output observation to SAS data set. End of file? NO YES Stop DATA step. 106 Objectives Reading SAS Data Sets and Creating Variables Create a SAS data set using another SAS data set as input. Create SAS variables. Use operators and SAS functions to manipulate data values. Control which variables are included in a SAS data set

19 Reading a SAS Data Set Create a temporary SAS data set named newclass2 from the permanent SAS data named mylib.class2 and create a variable that represents the bmi. Compute BMI from the variable Height and Weight. mylib.class2 SAS date values New Variable Lname Birthdate Baseage Weight Height BMI Richardson Lowrey Tierney Sommers Reading a SAS Data Set To create a SAS data set using a SAS data set as input, you must use a DATA statement to start a DATA step and name the SAS data set being created (output data set: newclass2) SET statement to identify the SAS data set being read (input data set: myib.class2). To create a variable, you must use an assignment statement to uses the values of the variables Weight and Height and assign the result of the calculation to the variable BMI. 110 Reading a SAS Data Set General form of a DATA step: DATA output-sas-data-set; SET input-sas-data-set; additional SAS statements RUN; By default, the SET statement reads all of the observations from the input SAS data set variables from the input SAS data set. Assignment Statements An assignment statement evaluates an expression assigns the resulting value to a variable. General form of an assignment statement: variable=expression; Define the Variable Name the New Variable new_variable_name = value ASSIGN expression value EVALUATE Rules for naming SAS variables: 1 to 32 characters in length start with a letter (A through Z) or an underscore (_) continue with any combination of numbers, letters, or underscores can be stored in mixed-case

20 An expression contains operands and operators that form a set of instructions that produce a value. Operands are variable names constants. SAS Expressions Operators are symbols that request arithmetic calculations SAS functions. x=3; y=age/10; EXAMPLES assigns 3 to X for all observations assigns the value of age divided by 10 to each observation Clinic= Boston ; assigns the character constant Boston to the variable clinic for each observation bmi= wgtkg/(htm**2); assigns results of calculation to new variable bmi NOTE : X Y and bmi are numeric variables; clinic is a character variable Using Operators Selected operators for basic arithmetic calculations in an assignment statement: Operator Action Example Priority + Addition Sum=x+y; III - Subtraction Diff=x-y; III * Multiplication Mult=x*y; II / Division Divide=x/y; II ** Exponentiation Raise=x**y; I - Negative prefix Negative=-x; I 117 Lname $ 15 Compiling the DATA Step libname mylib 'SAS-data-library'; data newclass2; set mylib.class2; PDV Baseage N 8 Bdate N 8 Race N 8 Weight N 8 Height N PDV lname $ 15 Compiling the DATA Step libname mylib 'SAS-data-library'; data newclass2; set mylib.class2; baseage N 8 Gender N 8 Race N 8 Weight N 8 Height N 8 BMI N Executing the DATA Step Mylib.class2 Lname Birthdate Baseage Weight Height Richardson Lowrey Tierney data newclass2; set mylib.class2; PDV..... newclass

21 Executing the DATA Step PDV Mylib.class2 Lname Birthdate Baseage Weight Height Richardson Lowrey Tierney data newclass2; set mylib.class2; Richardson newclass Executing the DATA Step Mylib.class2 Lname Birthdate Baseage Weight Height Richardson Lowrey Tierney data newclass2; set mylib.class2; PDV Richardson newclass Executing the DATA Step Mylib.class2 Lname Birthdate Baseage Weight Height Richardson Lowrey Tierney Automatic return data newclass2; set mylib.class2; PDV Richardson newclass2 Automatic output Richardson Executing the DATA Step Mylib.class2 Lname Birthdate Baseage Weight Height Richardson Lowrey Tierney. 32 Reinitialize Total data newclass2; to missing set mylib.class2; PDV Richardson newclass2 Richardson Executing the DATA Step Mylib.class2 Lname Birthdate Baseage Weight Height Richardson Lowrey Tierney data newclass2; set mylib.class2; PDV Lowery newclass2 Richardson Executing the DATA Step Mylib.class2 Lname Birthdate Baseage Weight Height Richardson Lowrey Tierney data newclass2; set mylib.class2; PDV Lowery newclass2 Richardson

22 Executing the DATA Step Mylib.class2 Lname Birthdate Baseage Weight Height Richardso Lowrey Tierney Automatic return data newclass2; set mylib.class2; PDV Lowery newclass2 Automatic output Richardson Lowery Assignment Statements proc print data=newclass2; format birthdate date9.; var lname birthdate height weight bmi; Obs lname birthdate height weight BMI 1 Richardson 03FEB Lowrey 23MAR Tierney Sommers 10JUN Kegan 08AUG Why is BMI missing in observation 5? 128 Printing Dates PROC PRINT data=example; Var id birthdate; Format mmddyy10.; SPECIFY FORMAT Run; Obs id birthdate /04/ /28/1991 Without format SAMPLE SAS DATA FORMATS Print: SAS format: MMDDYY6. 04/01/97 MMDDYY8. 04/01/1997 MMDDYY DDMMYY6. 01/04/97 DDMMYY8. 01/04/1997 DDMMYY10. 01APR97 DATE7. 01APR1997 DATE Portions Copyright 2001 SAS Institute Inc., Cary, NC, USA. All Rights Reserved. Reproduced with permission from SAS Institute Inc., Cary NC, USA. 22

Chapter 1 The DATA Step

Chapter 1 The DATA Step Chapter 1 The DATA Step 1.1 Structure of SAS Programs...1-3 1.2 SAS Data Sets... 1-12 1.3 Creating a Permanent SAS Data Set... 1-18 1.4 Writing a SAS DATA Step... 1-24 1.5 Creating a DATA Step View...

More information

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

APPENDIX 4 Migrating from QMF to SAS/ ASSIST Software. Each of these steps can be executed independently. 255 APPENDIX 4 Migrating from QMF to SAS/ ASSIST Software Introduction 255 Generating a QMF Export Procedure 255 Exporting Queries from QMF 257 Importing QMF Queries into Query and Reporting 257 Alternate

More information

Objectives Reading SAS Data Sets and Creating Variables Reading a SAS Data Set Reading a SAS Data Set onboard ia.dfwlax FirstClass Economy

Objectives Reading SAS Data Sets and Creating Variables Reading a SAS Data Set Reading a SAS Data Set onboard ia.dfwlax FirstClass Economy Reading SAS Data Sets and Creating Variables Objectives Create a SAS data set using another SAS data set as input. Create SAS variables. Use operators and SAS functions to manipulate data values. Control

More information

Introduction to SAS Programs. Objectives. SAS Programs. Sample Data. File Containing Data: boxhunter.dat

Introduction to SAS Programs. Objectives. SAS Programs. Sample Data. File Containing Data: boxhunter.dat Introduction to Statistical omputing SS, Minitab, and xcel Simple ata ntry and asic Reporting 1.1 Introduction to SS Programs 1.2 Introduction to Minitab Programs 1.3 Introduction to xcel Spreadsheets

More information

Lecture 1 Getting Started with SAS

Lecture 1 Getting Started with SAS SAS for Data Management, Analysis, and Reporting Lecture 1 Getting Started with SAS Portions reproduced with permission of SAS Institute Inc., Cary, NC, USA Goals of the course To provide skills required

More information

STAT 7000: Experimental Statistics I

STAT 7000: Experimental Statistics I STAT 7000: Experimental Statistics I 2. A Short SAS Tutorial Peng Zeng Department of Mathematics and Statistics Auburn University Fall 2009 Peng Zeng (Auburn University) STAT 7000 Lecture Notes Fall 2009

More information

Accessing Data and Creating Data Structures. SAS Global Certification Webinar Series

Accessing Data and Creating Data Structures. SAS Global Certification Webinar Series Accessing Data and Creating Data Structures SAS Global Certification Webinar Series Accessing Data and Creating Data Structures Becky Gray Certification Exam Developer SAS Global Certification Michele

More information

SAS/ASSIST Software Setup

SAS/ASSIST Software Setup 173 APPENDIX 3 SAS/ASSIST Software Setup Appendix Overview 173 Setting Up Graphics Devices 173 Setting Up Remote Connect Configurations 175 Adding a SAS/ASSIST Button to Your Toolbox 176 Setting Up HTML

More information

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

What Is SAS? CHAPTER 1 Essential Concepts of Base SAS Software 3 CHAPTER 1 Essential Concepts of Base SAS Software What Is SAS? 3 Overview of Base SAS Software 4 Components of the SAS Language 4 SAS Files 4 SAS Data Sets 5 External Files 5 Database Management System

More information

Creation of SAS Dataset

Creation of SAS Dataset Creation of SAS Dataset Contents SAS data step Access to PC files Access to Oracle Access to SQL 2 SAS Data Step Contents Creating SAS data sets from raw data Creating and managing variables 3 Creating

More information

SAS Programming Basics

SAS Programming Basics SAS Programming Basics SAS Programs SAS Programs consist of three major components: Global statements Procedures Data steps SAS Programs Global Statements Procedures Data Step Notes Data steps and procedures

More information

FSEDIT Procedure Windows

FSEDIT Procedure Windows 25 CHAPTER 4 FSEDIT Procedure Windows Overview 26 Viewing and Editing Observations 26 How the Control Level Affects Editing 27 Scrolling 28 Adding Observations 28 Entering and Editing Variable Values 28

More information

Introduction to the SAS System

Introduction to the SAS System 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

More information

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

A Guided Tour Through the SAS Windowing Environment Casey Cantrell, Clarion Consulting, Los Angeles, CA A Guided Tour Through the SAS Windowing Environment Casey Cantrell, Clarion Consulting, Los Angeles, CA ABSTRACT The SAS system running in the Microsoft Windows environment contains a multitude of tools

More information

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

SAS 101. Based on Learning SAS by Example: A Programmer s Guide Chapter 21, 22, & 23. By Tasha Chapman, Oregon Health Authority SAS 101 Based on Learning SAS by Example: A Programmer s Guide Chapter 21, 22, & 23 By Tasha Chapman, Oregon Health Authority Topics covered All the leftovers! Infile options Missover LRECL=/Pad/Truncover

More information

DATA Step Debugger APPENDIX 3

DATA Step Debugger APPENDIX 3 1193 APPENDIX 3 DATA Step Debugger Introduction 1194 Definition: What is Debugging? 1194 Definition: The DATA Step Debugger 1194 Basic Usage 1195 How a Debugger Session Works 1195 Using the Windows 1195

More information

DBLOAD Procedure Reference

DBLOAD Procedure Reference 131 CHAPTER 10 DBLOAD Procedure Reference Introduction 131 Naming Limits in the DBLOAD Procedure 131 Case Sensitivity in the DBLOAD Procedure 132 DBLOAD Procedure 132 133 PROC DBLOAD Statement Options

More information

QUEST Procedure Reference

QUEST Procedure Reference 111 CHAPTER 9 QUEST Procedure Reference Introduction 111 QUEST Procedure Syntax 111 Description 112 PROC QUEST Statement Options 112 Procedure Statements 112 SYSTEM 2000 Statement 114 ECHO ON and ECHO

More information

WKn Chapter. Note to UNIX and OS/390 Users. Import/Export Facility CHAPTER 9

WKn Chapter. Note to UNIX and OS/390 Users. Import/Export Facility CHAPTER 9 117 CHAPTER 9 WKn Chapter Note to UNIX and OS/390 Users 117 Import/Export Facility 117 Understanding WKn Essentials 118 WKn Files 118 WKn File Naming Conventions 120 WKn Data Types 120 How the SAS System

More information

Chapter 2 The SAS Environment

Chapter 2 The SAS Environment Chapter 2 The SAS Environment Abstract In this chapter, we begin to become familiar with the basic SAS working environment. We introduce the basic 3-screen layout, how to navigate the SAS Explorer window,

More information

Using SAS Files CHAPTER 3

Using SAS Files CHAPTER 3 55 CHAPTER 3 Using SAS Files Introduction to SAS Files 56 What Is a SAS File? 56 Types of SAS Files 57 Using Short or Long File Extensions in SAS Libraries 58 SAS Data Sets (Member Type: Data or View)

More information

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

Epidemiology Principles of Biostatistics Chapter 3. Introduction to SAS. John Koval Epidemiology 9509 Principles of Biostatistics Chapter 3 John Koval Department of Epidemiology and Biostatistics University of Western Ontario What we will do today We will learn to use use SAS to 1. read

More information

Introduction to SAS. Cristina Murray-Krezan Research Assistant Professor of Internal Medicine Biostatistician, CTSC

Introduction to SAS. Cristina Murray-Krezan Research Assistant Professor of Internal Medicine Biostatistician, CTSC Introduction to SAS Cristina Murray-Krezan Research Assistant Professor of Internal Medicine Biostatistician, CTSC cmurray-krezan@salud.unm.edu 20 August 2018 What is SAS? Statistical Analysis System,

More information

STATION

STATION ------------------------------STATION 1------------------------------ 1. Which of the following statements displays all user-defined macro variables in the SAS log? a) %put user=; b) %put user; c) %put

More information

Loading Data. Introduction. Understanding the Volume Grid CHAPTER 2

Loading Data. Introduction. Understanding the Volume Grid CHAPTER 2 19 CHAPTER 2 Loading Data Introduction 19 Understanding the Volume Grid 19 Loading Data Representing a Complete Grid 20 Loading Data Representing an Incomplete Grid 21 Loading Sparse Data 23 Understanding

More information

April 4, SAS General Introduction

April 4, SAS General Introduction PP 105 Spring 01-02 April 4, 2002 SAS General Introduction TA: Kanda Naknoi kanda@stanford.edu Stanford University provides UNIX computing resources for its academic community on the Leland Systems, which

More information

Going Under the Hood: How Does the Macro Processor Really Work?

Going Under the Hood: How Does the Macro Processor Really Work? Going Under the Hood: How Does the Really Work? ABSTRACT Lisa Lyons, PPD, Inc Hamilton, NJ Did you ever wonder what really goes on behind the scenes of the macro processor, or how it works with other parts

More information

SAS Institue EXAM A SAS Base Programming for SAS 9

SAS Institue EXAM A SAS Base Programming for SAS 9 SAS Institue EXAM A00-211 SAS Base Programming for SAS 9 Total Questions: 70 Question: 1 After a SAS program is submitted, the following is written to the SAS log: What issue generated the error in the

More information

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

Using an ICPSR set-up file to create a SAS dataset Using an ICPSR set-up file to create a SAS dataset Name library and raw data files. From the Start menu, launch SAS, and in the Editor program, write the codes to create and name a folder in the SAS permanent

More information

SAS/FSP 9.2. Procedures Guide

SAS/FSP 9.2. Procedures Guide SAS/FSP 9.2 Procedures Guide The correct bibliographic citation for this manual is as follows: SAS Institute Inc. 2008. SAS/FSP 9.2 Procedures Guide. Cary, NC: SAS Institute Inc. SAS/FSP 9.2 Procedures

More information

Using SAS Files. Introduction CHAPTER 5

Using SAS Files. Introduction CHAPTER 5 123 CHAPTER 5 Using SAS Files Introduction 123 SAS Data Libraries 124 Accessing SAS Files 124 Advantages of Using Librefs Rather than OpenVMS Logical Names 124 Assigning Librefs 124 Using the LIBNAME Statement

More information

EXAMPLE 2: INTRODUCTION TO SAS AND SOME NOTES ON HOUSEKEEPING PART II - MATCHING DATA FROM RESPONDENTS AT 2 WAVES INTO WIDE FORMAT

EXAMPLE 2: INTRODUCTION TO SAS AND SOME NOTES ON HOUSEKEEPING PART II - MATCHING DATA FROM RESPONDENTS AT 2 WAVES INTO WIDE FORMAT EXAMPLE 2: PART I - INTRODUCTION TO SAS AND SOME NOTES ON HOUSEKEEPING PART II - MATCHING DATA FROM RESPONDENTS AT 2 WAVES INTO WIDE FORMAT USING THESE WORKSHEETS For each of the worksheets you have a

More information

ACCESS Procedure Reference

ACCESS Procedure Reference 59 CHAPTER 5 ACCESS Procedure Reference Introduction 59 Case Sensitivity in the ACCESS Procedure 60 ACCESS Procedure 60 Description 61 PROC ACCESS Statement Options 62 Options 62 SAS System Passwords for

More information

Basic Concept Review

Basic Concept Review Basic Concept Review Quiz Using the Programming Workspace Referencing Files and Setting Options Editing and Debugging SAS Programs End of Review SAS Format Format Formats are variable

More information

Chapter 2 Working with Data Types and Operators

Chapter 2 Working with Data Types and Operators JavaScript, Fourth Edition 2-1 Chapter 2 Working with Data Types and Operators At a Glance Instructor s Manual Table of Contents Overview Objectives Teaching Tips Quick Quizzes Class Discussion Topics

More information

SAS Data Libraries. Objectives. Airline Data Library. SAS Data Libraries. SAS Data Libraries FILES LIBRARIES

SAS Data Libraries. Objectives. Airline Data Library. SAS Data Libraries. SAS Data Libraries FILES LIBRARIES Reading Raw Data, Formats and Data Types 2.1 SAS Data Libraries 2.2 SAS List Reports from SAS Data Sets 2.3 Formats in SAS 2.4 Reading Raw Data into SAS 2.5 Minitab List Reports from Minitab Worksheets

More information

Other Data Sources SAS can read data from a variety of sources:

Other Data Sources SAS can read data from a variety of sources: Other Data Sources SAS can read data from a variety of sources: Plain text files, including delimited and fixed-column files Spreadsheets, such as Excel Databases XML Others Text Files Text files of various

More information

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

SAS PROGRAMMING AND APPLICATIONS (STAT 5110/6110): FALL 2015 Module 2 SAS PROGRAMMING AND APPLICATIONS (STAT 5110/6110): FALL 2015 Department of MathemaGcs and StaGsGcs Phone: 4-3620 Office: Parker 364- A E- mail: carpedm@auburn.edu Web: hup://www.auburn.edu/~carpedm/stat6110

More information

Chapter 1: Introduction to SAS

Chapter 1: Introduction to SAS Chapter 1: Introduction to SAS SAS programs: A sequence of statements in a particular order. Rules for SAS statements: 1. Every SAS statement ends in a semicolon!!!; 2. Upper/lower case does not matter

More information

Our Strategy for Learning Fortran 90

Our Strategy for Learning Fortran 90 Our Strategy for Learning Fortran 90 We want to consider some computational problems which build in complexity. evaluating an integral solving nonlinear equations vector/matrix operations fitting data

More information

SAS Studio: A New Way to Program in SAS

SAS Studio: A New Way to Program in SAS SAS Studio: A New Way to Program in SAS Lora D Delwiche, Winters, CA Susan J Slaughter, Avocet Solutions, Davis, CA ABSTRACT SAS Studio is an important new interface for SAS, designed for both traditional

More information

Getting Information from a Table

Getting Information from a Table ch02.fm Page 45 Wednesday, April 14, 1999 2:44 PM Chapter 2 Getting Information from a Table This chapter explains the basic technique of getting the information you want from a table when you do not want

More information

TYPES OF VARIABLES, STRUCTURE OF DATASETS, AND BASIC STATA LAYOUT

TYPES OF VARIABLES, STRUCTURE OF DATASETS, AND BASIC STATA LAYOUT PRIMER FOR ACS OUTCOMES RESEARCH COURSE: TYPES OF VARIABLES, STRUCTURE OF DATASETS, AND BASIC STATA LAYOUT STEP 1: Install STATA statistical software. STEP 2: Read through this primer and complete the

More information

SECTION 1 DBMS LAB 1.0 INTRODUCTION 1.1 OBJECTIVES 1.2 INTRODUCTION TO MS-ACCESS. Structure Page No.

SECTION 1 DBMS LAB 1.0 INTRODUCTION 1.1 OBJECTIVES 1.2 INTRODUCTION TO MS-ACCESS. Structure Page No. SECTION 1 DBMS LAB DBMS Lab Structure Page No. 1.0 Introduction 05 1.1 Objectives 05 1.2 Introduction to MS-Access 05 1.3 Database Creation 13 1.4 Use of DBMS Tools/ Client-Server Mode 15 1.5 Forms and

More information

SAS Online Training: Course contents: Agenda:

SAS Online Training: Course contents: Agenda: SAS Online Training: Course contents: Agenda: (1) Base SAS (6) Clinical SAS Online Training with Real time Projects (2) Advance SAS (7) Financial SAS Training Real time Projects (3) SQL (8) CV preparation

More information

CSc 10200! Introduction to Computing. Lecture 2-3 Edgardo Molina Fall 2013 City College of New York

CSc 10200! Introduction to Computing. Lecture 2-3 Edgardo Molina Fall 2013 City College of New York CSc 10200! Introduction to Computing Lecture 2-3 Edgardo Molina Fall 2013 City College of New York 1 C++ for Engineers and Scientists Third Edition Chapter 2 Problem Solving Using C++ 2 Objectives In this

More information

SAS Data Libraries. Definition CHAPTER 26

SAS Data Libraries. Definition CHAPTER 26 385 CHAPTER 26 SAS Data Libraries Definition 385 Library Engines 387 Library Names 388 Physical Names and Logical Names (Librefs) 388 Assigning Librefs 388 Associating and Clearing Logical Names (Librefs)

More information

Optimizing System Performance

Optimizing System Performance 243 CHAPTER 19 Optimizing System Performance Definitions 243 Collecting and Interpreting Performance Statistics 244 Using the FULLSTIMER and STIMER System Options 244 Interpreting FULLSTIMER and STIMER

More information

A Practical Introduction to SAS Data Integration Studio

A Practical Introduction to SAS Data Integration Studio ABSTRACT A Practical Introduction to SAS Data Integration Studio Erik Larsen, Independent Consultant, Charleston, SC Frank Ferriola, Financial Risk Group, Cary, NC A useful and often overlooked tool which

More information

chapter 2 G ETTING I NFORMATION FROM A TABLE

chapter 2 G ETTING I NFORMATION FROM A TABLE chapter 2 Chapter G ETTING I NFORMATION FROM A TABLE This chapter explains the basic technique for getting the information you want from a table when you do not want to make any changes to the data and

More information

Objectives. In this chapter, you will:

Objectives. In this chapter, you will: Objectives In this chapter, you will: Become familiar with functions, special symbols, and identifiers in C++ Explore simple data types Discover how a program evaluates arithmetic expressions Learn about

More information

SAS/ACCESS Interface to R/3

SAS/ACCESS Interface to R/3 9.1 SAS/ACCESS Interface to R/3 User s Guide The correct bibliographic citation for this manual is as follows: SAS Institute Inc. 2004. SAS/ACCESS 9.1 Interface to R/3: User s Guide. Cary, NC: SAS Institute

More information

CHAPTER 13 Importing and Exporting External Data

CHAPTER 13 Importing and Exporting External Data 127 CHAPTER 13 Importing and Exporting External Data Chapter Overview 127 Exporting a File 127 Instructions 128 Exiting This Task 130 Importing Data from a Flat File 130 Instructions 130 Chapter Overview

More information

Locking SAS Data Objects

Locking SAS Data Objects 59 CHAPTER 5 Locking SAS Data Objects Introduction 59 Audience 60 About the SAS Data Hierarchy and Locking 60 The SAS Data Hierarchy 60 How SAS Data Objects Are Accessed and Used 61 Types of Locks 62 Locking

More information

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

Beginning Tutorials. PROC FSEDIT NEW=newfilename LIKE=oldfilename; Fig. 4 - Specifying a WHERE Clause in FSEDIT. Data Editing Mouse Clicking Your Way Viewing and Manipulating Data with Version 8 of the SAS System Terry Fain, RAND, Santa Monica, California Cyndie Gareleck, RAND, Santa Monica, California ABSTRACT Version 8 of the

More information

Stata: A Brief Introduction Biostatistics

Stata: A Brief Introduction Biostatistics Stata: A Brief Introduction Biostatistics 140.621 2005-2006 1. Statistical Packages There are many statistical packages (Stata, SPSS, SAS, Splus, etc.) Statistical packages can be used for Analysis Data

More information

An Introduction to SAS/SHARE, By Example

An Introduction to SAS/SHARE, By Example Paper AD01 An Introduction to SAS/SHARE, By Example Larry Altmayer, U.S. Census Bureau, Washington, DC ABSTRACT SAS/SHARE software is a useful tool for allowing several users to access and edit the same

More information

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

Stat 302 Statistical Software and Its Applications SAS: Data I/O Stat 302 Statistical Software and Its Applications SAS: Data I/O Yen-Chi Chen Department of Statistics, University of Washington Autumn 2016 1 / 33 Getting Data Files Get the following data sets from the

More information

Introduction to SAS Mike Zdeb ( , #1

Introduction to SAS Mike Zdeb ( , #1 Mike Zdeb (402-6479, msz03@albany.edu) #1 (1) INTRODUCTION Once, the acronym SAS actually did stand for Statistical Analysis System. Now, when you use the term SAS, you are referring to a collection of

More information

SAS. Studio 4.1: User s Guide. SAS Documentation

SAS. Studio 4.1: User s Guide. SAS Documentation SAS Studio 4.1: User s Guide SAS Documentation The correct bibliographic citation for this manual is as follows: SAS Institute Inc. 2016. SAS Studio 4.1: User s Guide. Cary, NC: SAS Institute Inc. SAS

More information

Full file at

Full file at Java Programming: From Problem Analysis to Program Design, 3 rd Edition 2-1 Chapter 2 Basic Elements of Java At a Glance Instructor s Manual Table of Contents Overview Objectives s Quick Quizzes Class

More information

The C++ Language. Arizona State University 1

The C++ Language. Arizona State University 1 The C++ Language CSE100 Principles of Programming with C++ (based off Chapter 2 slides by Pearson) Ryan Dougherty Arizona State University http://www.public.asu.edu/~redoughe/ Arizona State University

More information

Cody s Collection of Popular SAS Programming Tasks and How to Tackle Them

Cody s Collection of Popular SAS Programming Tasks and How to Tackle Them Cody s Collection of Popular SAS Programming Tasks and How to Tackle Them Ron Cody Contents List of Programs... ix About This Book... xv About The Author... xix Acknowledgments... xxi Chapter 1 Tasks Involving

More information

So, Your Data are in Excel! Ed Heaton, Westat

So, Your Data are in Excel! Ed Heaton, Westat Paper AD02_05 So, Your Data are in Excel! Ed Heaton, Westat Abstract You say your customer sent you the data in an Excel workbook. Well then, I guess you'll have to work with it. This paper will discuss

More information

INTRODUCTION to SAS STATISTICAL PACKAGE LAB 3

INTRODUCTION to SAS STATISTICAL PACKAGE LAB 3 Topics: Data step Subsetting Concatenation and Merging Reference: Little SAS Book - Chapter 5, Section 3.6 and 2.2 Online documentation Exercise I LAB EXERCISE The following is a lab exercise to give you

More information

BASIC ELEMENTS OF A COMPUTER PROGRAM

BASIC ELEMENTS OF A COMPUTER PROGRAM BASIC ELEMENTS OF A COMPUTER PROGRAM CSC128 FUNDAMENTALS OF COMPUTER PROBLEM SOLVING LOGO Contents 1 Identifier 2 3 Rules for naming and declaring data variables Basic data types 4 Arithmetic operators

More information

Performance Considerations

Performance Considerations 149 CHAPTER 6 Performance Considerations Hardware Considerations 149 Windows Features that Optimize Performance 150 Under Windows NT 150 Under Windows NT Server Enterprise Edition 4.0 151 Processing SAS

More information

COPYRIGHTED MATERIAL GETTING STARTED LEARNING OBJECTIVES

COPYRIGHTED MATERIAL GETTING STARTED LEARNING OBJECTIVES 1 GETTING STARTED LEARNING OBJECTIVES To be able to use the SAS software program in a Windows environment. To understand the basic information about getting data into SAS and running a SAS program. To

More information

TOP 10 (OR MORE) WAYS TO OPTIMIZE YOUR SAS CODE

TOP 10 (OR MORE) WAYS TO OPTIMIZE YOUR SAS CODE TOP 10 (OR MORE) WAYS TO OPTIMIZE YOUR SAS CODE Handy Tips for the Savvy Programmer SAS PROGRAMMING BEST PRACTICES Create Readable Code Basic Coding Recommendations» Efficiently choosing data for processing»

More information

An Introduction to MATLAB See Chapter 1 of Gilat

An Introduction to MATLAB See Chapter 1 of Gilat 1 An Introduction to MATLAB See Chapter 1 of Gilat Kipp Martin University of Chicago Booth School of Business January 25, 2012 Outline The MATLAB IDE MATLAB is an acronym for Matrix Laboratory. It was

More information

Lecture 2 Tao Wang 1

Lecture 2 Tao Wang 1 Lecture 2 Tao Wang 1 Objectives In this chapter, you will learn about: Modular programs Programming style Data types Arithmetic operations Variables and declaration statements Common programming errors

More information

SAS Training Spring 2006

SAS Training Spring 2006 SAS Training Spring 2006 Coxe/Maner/Aiken Introduction to SAS: This is what SAS looks like when you first open it: There is a Log window on top; this will let you know what SAS is doing and if SAS encountered

More information

Introduction to Programming

Introduction to Programming Introduction to Programming Course ISI-1329 - Three Days - Instructor-Led Introduction This three-day, instructor-led course introduces students to computer programming. Students will learn the fundamental

More information

Beginning Tutorials. Introduction to SAS/FSP in Version 8 Terry Fain, RAND, Santa Monica, California Cyndie Gareleck, RAND, Santa Monica, California

Beginning Tutorials. Introduction to SAS/FSP in Version 8 Terry Fain, RAND, Santa Monica, California Cyndie Gareleck, RAND, Santa Monica, California Introduction to SAS/FSP in Version 8 Terry Fain, RAND, Santa Monica, California Cyndie Gareleck, RAND, Santa Monica, California ABSTRACT SAS/FSP is a set of procedures used to perform full-screen interactive

More information

BLM2031 Structured Programming. Zeyneb KURT

BLM2031 Structured Programming. Zeyneb KURT BLM2031 Structured Programming Zeyneb KURT 1 Contact Contact info office : D-219 e-mail zeynebkurt@gmail.com, zeyneb@ce.yildiz.edu.tr When to contact e-mail first, take an appointment What to expect help

More information

SYSTEM 2000 Essentials

SYSTEM 2000 Essentials 7 CHAPTER 2 SYSTEM 2000 Essentials Introduction 7 SYSTEM 2000 Software 8 SYSTEM 2000 Databases 8 Database Name 9 Labeling Data 9 Grouping Data 10 Establishing Relationships between Schema Records 10 Logical

More information

Working with Mailbox Manager

Working with Mailbox Manager Working with Mailbox Manager A user guide for Mailbox Manager supporting the Message Storage Server component of the Avaya S3400 Message Server Mailbox Manager Version 5.0 February 2003 Copyright 2003

More information

SAS. Information Map Studio 3.1: Creating Your First Information Map

SAS. Information Map Studio 3.1: Creating Your First Information Map SAS Information Map Studio 3.1: Creating Your First Information Map The correct bibliographic citation for this manual is as follows: SAS Institute Inc. 2006. SAS Information Map Studio 3.1: Creating Your

More information

The DATA Statement: Efficiency Techniques

The DATA Statement: Efficiency Techniques The DATA Statement: Efficiency Techniques S. David Riba, JADE Tech, Inc., Clearwater, FL ABSTRACT One of those SAS statements that everyone learns in the first day of class, the DATA statement rarely gets

More information

SAS IT Resource Management Forecasting. Setup Specification Document. A SAS White Paper

SAS IT Resource Management Forecasting. Setup Specification Document. A SAS White Paper SAS IT Resource Management Forecasting Setup Specification Document A SAS White Paper Table of Contents Introduction to SAS IT Resource Management Forecasting... 1 Getting Started with the SAS Enterprise

More information

TOPIC 2 INTRODUCTION TO JAVA AND DR JAVA

TOPIC 2 INTRODUCTION TO JAVA AND DR JAVA 1 TOPIC 2 INTRODUCTION TO JAVA AND DR JAVA Notes adapted from Introduction to Computing and Programming with Java: A Multimedia Approach by M. Guzdial and B. Ericson, and instructor materials prepared

More information

CSc Introduction to Computing

CSc Introduction to Computing CSc 10200 Introduction to Computing Lecture 2 Edgardo Molina Fall 2011 - City College of New York Thursday, September 1, 2011 Introduction to C++ Modular program: A program consisting of interrelated segments

More information

SAS 9.3 LIBNAME Engine for DataFlux Federation Server

SAS 9.3 LIBNAME Engine for DataFlux Federation Server SAS 9.3 LIBNAME Engine for DataFlux Federation Server User s Guide SAS Documentation The correct bibliographic citation for this manual is as follows: SAS Institute Inc. 2012. SAS 9.3 LIBNAME Engine for

More information

Using the SQL Editor. Overview CHAPTER 11

Using the SQL Editor. Overview CHAPTER 11 205 CHAPTER 11 Using the SQL Editor Overview 205 Opening the SQL Editor Window 206 Entering SQL Statements Directly 206 Entering an SQL Query 206 Entering Non-SELECT SQL Code 207 Creating Template SQL

More information

Using SAS Files CHAPTER 3

Using SAS Files CHAPTER 3 77 CHAPTER 3 Using SAS Files Introduction to SAS Files 78 What Is a SAS File? 78 Types of SAS Files 79 Using Short or Long File Extensions in SAS Libraries 80 SAS Data Sets (Member Type: Data or View)

More information

Big Data Executive Program

Big Data Executive Program Big Data Executive Program Big Data Executive Program Business Visualization for Big Data (BV) SAS Visual Analytics help people see things that were not obvious to them before. Even when data volumes are

More information

An Introduction to SAS/FSP Software Terry Fain, RAND, Santa Monica, California Cyndie Gareleck, RAND, Santa Monica, California

An Introduction to SAS/FSP Software Terry Fain, RAND, Santa Monica, California Cyndie Gareleck, RAND, Santa Monica, California An Introduction to SAS/FSP Software Terry Fain, RAND, Santa Monica, California Cyndie Gareleck, RAND, Santa Monica, California ABSTRACT SAS/FSP is a set of procedures used to perform full-screen interactive

More information

Welcome to Top 10 SAS Functions

Welcome to Top 10 SAS Functions Welcome to Top 10 SAS Functions Goal and Agenda By the end of this meeting, you will understand 10 key SAS functions purpose, value and features. What are SAS functions? Why use them? Use Case Manipulating

More information

Department of Computer Science University of Cyprus. EPL342 Databases. Lab 2

Department of Computer Science University of Cyprus. EPL342 Databases. Lab 2 Department of Computer Science University of Cyprus EPL342 Databases Lab 2 ER Modeling (Entities) in DDS Lite & Conceptual Modeling in SQL Server 2008 Panayiotis Andreou http://www.cs.ucy.ac.cy/courses/epl342

More information

Chapter 2 Using Data. Instructor s Manual Table of Contents. At a Glance. A Guide to this Instructor s Manual:

Chapter 2 Using Data. Instructor s Manual Table of Contents. At a Glance. A Guide to this Instructor s Manual: Java Programming, Eighth Edition 2-1 Chapter 2 Using Data A Guide to this Instructor s Manual: We have designed this Instructor s Manual to supplement and enhance your teaching experience through classroom

More information

CMU MSP : SAS FORMATs and INFORMATs Howard Seltman Nov. 7+12, 2018

CMU MSP : SAS FORMATs and INFORMATs Howard Seltman Nov. 7+12, 2018 CMU MSP 36-601: SAS FORMATs and INFORMATs Howard Seltman Nov. 7+12, 2018 1) Formats and informats flexibly re-represent data in a data set on input or output. Common uses include reading and writing dates,

More information

Introduction to Stata First Session. I- Launching and Exiting Stata Launching Stata Exiting Stata..

Introduction to Stata First Session. I- Launching and Exiting Stata Launching Stata Exiting Stata.. Introduction to Stata 2016-17 01. First Session I- Launching and Exiting Stata... 1. Launching Stata... 2. Exiting Stata.. II - Toolbar, Menu bar and Windows.. 1. Toolbar Key.. 2. Menu bar Key..... 3.

More information

Create a SAS Program to create the following files from the PREC2 sas data set created in LAB2.

Create a SAS Program to create the following files from the PREC2 sas data set created in LAB2. Topics: Data step Subsetting Concatenation and Merging Reference: Little SAS Book - Chapter 5, Section 3.6 and 2.2 Online documentation Exercise I LAB EXERCISE The following is a lab exercise to give you

More information

SAS and Data Management Kim Magee. Department of Biostatistics College of Public Health

SAS and Data Management Kim Magee. Department of Biostatistics College of Public Health SAS and Data Management Kim Magee Department of Biostatistics College of Public Health Review of Previous Material Review INFILE statement data bp; infile c:\sas\bp.csv dlm=, ; input clinic $ dbp1 sbp1

More information

Base and Advance SAS

Base and Advance SAS Base and Advance SAS BASE SAS INTRODUCTION An Overview of the SAS System SAS Tasks Output produced by the SAS System SAS Tools (SAS Program - Data step and Proc step) A sample SAS program Exploring SAS

More information

1.00/1.001 Tutorial 1

1.00/1.001 Tutorial 1 1.00/1.001 Tutorial 1 Introduction to 1.00 September 12 & 13, 2005 Outline Introductions Administrative Stuff Java Basics Eclipse practice PS1 practice Introductions Me Course TA You Name, nickname, major,

More information

Introduction to SAS. Hsueh-Sheng Wu. Center for Family and Demographic Research. November 1, 2010

Introduction to SAS. Hsueh-Sheng Wu. Center for Family and Demographic Research. November 1, 2010 Introduction to SAS Hsueh-Sheng Wu Center for Family and Demographic Research November 1, 2010 1 Outline What is SAS? Things you need to know before using SAS SAS user interface Using SAS to manage data

More information

Software and Programming 1

Software and Programming 1 Software and Programming 1 Lab 1: Introduction, HelloWorld Program and use of the Debugger 17 January 2019 SP1-Lab1-2018-19.pptx Tobi Brodie (tobi@dcs.bbk.ac.uk) 1 Module Information Lectures: Afternoon

More information

Lab #1: Introduction to Basic SAS Operations

Lab #1: Introduction to Basic SAS Operations Lab #1: Introduction to Basic SAS Operations Getting Started: OVERVIEW OF SAS (access lab pages at http://www.stat.lsu.edu/exstlab/) There are several ways to open the SAS program. You may have a SAS icon

More information

MATH 707-ST: Introduction to Statistical Computing with SAS and R. MID-TERM EXAM (Writing part) Fall, (Time allowed: TWO Hours)

MATH 707-ST: Introduction to Statistical Computing with SAS and R. MID-TERM EXAM (Writing part) Fall, (Time allowed: TWO Hours) MATH 707-ST: Introduction to Statistical Computing with SAS and R MID-TERM EXAM (Writing part) Fall, 2013 (Time allowed: TWO Hours) Highlight your answer clearly for each question. There is only one correct

More information