SAS Certification Handout #7: Ch

Size: px
Start display at page:

Download "SAS Certification Handout #7: Ch"

Transcription

1 SAS Certification Handout #7: Ch /************ Ch. 19 ********************/ /* Consider a mailing list example, partial from Kansas City Royals Kauffman Stadium One Royal Way Kansas City MO Phone: (816) San Franciso Giants AT&T Park 24 Willie Mays Plaza San Francisco CA Phone: (415) New York Yankees Yankee Stadium One East 161st Street Bronx NY Phone: (718) */ /* NOTE: All of these observations have the same number of records (lines) in the data file (5), in a structured order */ filename mlb "C:\jrstevens\Teaching\SAS_Cert\Notes\a7_mlb.txt" * filename mlb "/home/jrstevens/sas_cert/a7_mlb.txt" /* / sequential line pointer like a line break, moving input pointer to next line (record) */ infile mlb input CityName & $13. Name & $8. / Stadium & $16. / Address & $21. / City & $13. State $2. Zip AreaCode Phone $8. proc print data=a7 Obs CityName Name Stadium Address City State Zip AreaCode Phone 1 Kansas City Royals Kauffman Stadium One Royal Way Kansas City MO San Franciso Giants AT&T Park 24 Willie Mays Plaza San Francisco CA New York Yankees Yankee Stadium One East 161st Street Bronx NY

2 /* multiple INPUT statements work sequentially, applied to records in order */ infile mlb input CityName & $13. Name & $8. input Stadium & $16. input Address & $21. input City & $13. State $2. Zip AreaCode Phone $8. proc print data=a7 Obs CityName Name Stadium Address City State Zip AreaCode Phone 1 Kansas City Royals Kauffman Stadium One Royal Way Kansas City MO San Franciso Giants AT&T Park 24 Willie Mays Plaza San Francisco CA New York Yankees Yankee Stadium One East 161st Street Bronx NY /* # non-sequential line pointer can be used to read in multiple records to a single observation, reading records in any order, and even skipping some lines altogether */ infile mlb input #1 CityName & $13. Name & $8. Phone $8. #2 Stadium & $16. AreaCode 3. #4 City & $13. State $2. Zip proc print data=a7 Obs CityName Name Phone Stadium AreaCode City State Zip 1 Kansas City Royals Kauffman Stadium 816 Kansas City MO San Franciso Giants AT&T Park 415 San Francisco CA New York Yankees Yankee Stadium 718 Bronx NY 10451

3 /************ Ch. 20 ********************/ /* Consider a 'repeated measures' data set, where each subject was measured multiple times */ /* An inefficient data storage: */ input subject score cards proc print data=a7 Obs subject score /* More efficient to have more than one observation in each line (i.e., in each record). Use to hold input pointer on currect record across multiple iterations of the DATA step use this for "repeating blocks" of data */ input subject cards Obs subject score proc print data=a

4 /* Same data, but with just one record per subject. Here, if there are the same number of repeating fields for each subject, and OUTPUT. holds input pointer on current record for the current iteration of the DATA step only. */ input /* Get subject value, and stay on same line. */ input /* Get score from next field. */ output /* Write current PDV to data set. */ cards Obs subject score proc print data=a /* Wait... need to execute OUTPUT for each repeating field in the record p. 625 shows how could do this without DO loop, too */ input do rep = 1 to 3 input output end cards proc print data=a7 Obs subject rep score /* Now, what if have different number of repeating fields for some subjects -- like in an incomplete repeated measures study? First, try OUTPUT input do rep = 1 to 3 /* problem here: not 3 reps for all subjects */ input output end Obs subject rep score cards proc print data=a

5 /* With varying number of repeating fields, need combination of MISSOVER and DO WHILE(... NE.) But: MISSOVER doesn't work with CARDS statement, so must use INFILE */ filename fields "C:/jrstevens/Teaching/SAS_Cert/Notes/a7_varying.txt" * filename fields "/home/jrstevens/sas_cert/a7_varying.txt" infile fields missover /* p. 544: MISSOVER prevents SAS from going to the next record to read a variable value if, when using list input, it does not find values in the current record for all of the INPUT statement variables. So even though we don't have 'missing' values at the end of any datafile row, we do want to keep SAS from trying to get the next data value from the next row, until we are done reading observations from the current row. */ input subject /* MUST have this line to get started. */ rep = 0 /* Will be reset at every iteration of DATA step (each record) */ do while(score ne.) rep+1 output /* Writes current PDV to data set. */ input /* Gets value from next field */ /* (in the current record only, */ /* thanks to MISSOVER). */ end Obs subject score rep proc print data=a /* NOTE: Pages 630 & 636 demonstrate that _N_ in the PDV tracks the number of iterations through the DATA step, NOT the number of observations created to that point. */

6 /************ Ch. 21 ********************/ /* Sometimes a data file is organized into header records (lines) and detail records (lines), where all detail records follow corresponding header records, with possibly multiple detail records for each header record. Such files are called hierarchical (due to this nesting of detail records inside header records). */ /* Example: header record is company (C) detail record is founder (F), with variables lastname firstname networth */ /* Create one observation per detail record */ retain company /* keep value across DATA step iterations */ input type if type="c" then company $10. if type="f" /* recall default THEN is KEEP this subsets the data */ input lastname $ firstname $ networth cards C Microsoft Obs company type lastname firstname networth F Gates Bill 81.1e9 F Allen Paul 17e9 1 Microsoft F Gates Bill C Apple 2 Microsoft F Allen Paul F Jobs Steve 8.3e9 F Wayne Ronald. 3 Apple F Jobs Steve F Wozniak Steve 150e6 4 Apple F Wayne Ronald. proc print data=a7 5 Apple F Wozniak Steve /* What if that last IF statement included a subsequent THEN? */ retain company input type if type="c" then company $10. if type="f" then input lastname $ Obs company type lastname firstname networth firstname $ networth 1 Microsoft C. cards C Microsoft 2 Microsoft F Gates Bill F Gates Bill 81.1e9 F Allen Paul 17e9 3 Microsoft F Allen Paul C Apple F Jobs Steve 8.3e9 F Wayne Ronald. F Wozniak Steve 150e6 4 Apple 5 Apple 6 Apple C F F Jobs Wayne Steve Ronald proc print data=a7 7 Apple F Wozniak Steve /* remember DATA step is executed for each record! */

7 /* Same data, but now create one observation per header record (here, calculate total networth of founders within each company). For this, we need to use the END= option of the INFILE statement, so we can't use CARDS */ filename money "C:/jrstevens/Teaching/SAS_Cert/Notes/a7_company.txt" * filename money "/home/jrstevens/sas_cert/a7_company.txt" /* MISSOVER needed here to handle. for networth at end of 6th record. PAD needed to handle different ending columns for company in 1st and 4th records */ data a7 (keep = company total) infile money end=last missover pad retain company /* Keep value across DATA step iterations. */ input type /* Keep input pointer on current record. */ if type="c" then do if _n_ > 1 then output /* OUTPUT means write current PDV to data set */ total=0 input company $10. /* Input pointer was still where we left it. */ end else if type="f" then do input lastname $ firstname $ networth total+networth end if last then output /* Recall last = 0 for all but final obs, where it is 1 */ proc print data=a7 label format total dollar16. label total = 'Total Net Worth of Founders' company = 'Name of Company' Obs Name of Company Total Net Worth of Founders 1 Microsoft $98,100,000,000 2 Apple $8,450,000,000

SAS Certification Handout #6: Ch

SAS Certification Handout #6: Ch SAS Certification Handout #6: Ch. 16-18 /************ Ch. 16 ******************* /* Suppose we have numeric variables ModelNumber Price Weight Change and date variable Date, plus a string variable Designer

More information

Introduction to DATA Step Programming: SAS Basics II. Susan J. Slaughter, Avocet Solutions

Introduction to DATA Step Programming: SAS Basics II. Susan J. Slaughter, Avocet Solutions Introduction to DATA Step Programming: SAS Basics II Susan J. Slaughter, Avocet Solutions SAS Essentials Section for people new to SAS Core presentations 1. How SAS Thinks 2. Introduction to DATA Step

More information

Chapter 2: Getting Data Into SAS

Chapter 2: Getting Data Into SAS Chapter 2: Getting Data Into SAS Data stored in many different forms/formats. Four categories of ways to read in data. 1. Entering data directly through keyboard 2. Creating SAS data sets from raw data

More information

Your Guide to Mobile Ticketing

Your Guide to Mobile Ticketing Your Guide to Mobile Ticketing MLB Ballpark App The free MLB Ballpark app is your secure and convenient way to instantly access Royals tickets via your mobile device. Download the app to your mobile device

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

ssh tap sas913 sas

ssh tap sas913 sas Fall 2010, STAT 430 SAS Examples SAS9 ===================== ssh abc@glue.umd.edu tap sas913 sas https://www.statlab.umd.edu/sasdoc/sashtml/onldoc.htm a. Reading external files using INFILE and INPUT (Ch

More information

Introduction to DATA Step Programming SAS Basics II. Susan J. Slaughter, Avocet Solutions

Introduction to DATA Step Programming SAS Basics II. Susan J. Slaughter, Avocet Solutions Introduction to DATA Step Programming SAS Basics II Susan J. Slaughter, Avocet Solutions SAS Essentials Section for people new to SAS Core presentations 1. How SAS Thinks 2. Introduction to DATA Step Programming

More information

Contents. About This Book...1

Contents. About This Book...1 Contents About This Book...1 Chapter 1: Basic Concepts...5 Overview...6 SAS Programs...7 SAS Libraries...13 Referencing SAS Files...15 SAS Data Sets...18 Variable Attributes...21 Summary...26 Practice...28

More information

A SAS Macro Utility to Modify and Validate RTF Outputs for Regional Analyses Jagan Mohan Achi, PPD, Austin, TX Joshua N. Winters, PPD, Rochester, NY

A SAS Macro Utility to Modify and Validate RTF Outputs for Regional Analyses Jagan Mohan Achi, PPD, Austin, TX Joshua N. Winters, PPD, Rochester, NY PharmaSUG 2014 - Paper BB14 A SAS Macro Utility to Modify and Validate RTF Outputs for Regional Analyses Jagan Mohan Achi, PPD, Austin, TX Joshua N. Winters, PPD, Rochester, NY ABSTRACT Clinical Study

More information

Understanding and Applying the Logic of the DOW-Loop

Understanding and Applying the Logic of the DOW-Loop PharmaSUG 2014 Paper BB02 Understanding and Applying the Logic of the DOW-Loop Arthur Li, City of Hope National Medical Center, Duarte, CA ABSTRACT The DOW-loop is not official terminology that one can

More information

Essentials of PDV: Directing the Aim to Understanding the DATA Step! Arthur Xuejun Li, City of Hope National Medical Center, Duarte, CA

Essentials of PDV: Directing the Aim to Understanding the DATA Step! Arthur Xuejun Li, City of Hope National Medical Center, Duarte, CA PharmaSUG 2013 - Paper TF17 Essentials of PDV: Directing the Aim to Understanding the DATA Step! Arthur Xuejun Li, City of Hope National Medical Center, Duarte, CA ABSTRACT Beginning programmers often

More information

SAS Certification Handout #10: Adv. Prog. Ch. 5-8

SAS Certification Handout #10: Adv. Prog. Ch. 5-8 SAS Certification Handout #10: Adv. Prog. Ch. 5-8 /************ Ch. 5 ******************* /* First, make example data -- same as Handout #9 libname cert 'C:/jrstevens/Teaching/SAS_Cert/AdvNotes'; /* In

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

DSCI 325: Handout 2 Getting Data into SAS Spring 2017

DSCI 325: Handout 2 Getting Data into SAS Spring 2017 DSCI 325: Handout 2 Getting Data into SAS Spring 2017 Data sets come in many different formats. In some situations, data sets are stored on paper (e.g., surveys) and other times data are stored in huge

More information

A Macro to Keep Titles and Footnotes in One Place

A Macro to Keep Titles and Footnotes in One Place CC25 ABSTRACT A Macro to Keep Titles and Footnotes in One Place John Morrill, Quintiles, Inc., Kansas City, MO A large project with titles and footnotes in each separate program can be cumbersome to maintain.

More information

SAS Certification Handout #9: Adv. Prog. Ch. 3-4

SAS Certification Handout #9: Adv. Prog. Ch. 3-4 SAS Certification Handout #9: Adv. Prog. Ch. 3-4 /************ Ch. 3 ********************/ /* First, make example data -- similar to Handout #8 */ libname cert 'C:/jrstevens/Teaching/SAS_Cert/AdvNotes';

More information

MAILMERGE WORD MESSAGES

MAILMERGE WORD MESSAGES MAILMERGE WORD 2007 It is recommended that Excel spreadsheets are used as source files and created with separate columns for each field, e.g. FirstName, LastName, Title, Address1, Address2, City, State,

More information

This Text file. Importing Non-Standard Text Files using and / Operators.

This Text file. Importing Non-Standard Text Files using and / Operators. Paper CC45 @/@@ This Text file. Importing Non-Standard Text Files using @,@@ and / Operators. Russell Woods, Wells Fargo Home Mortgage, Fort Mill SC ABSTRACT SAS in recent years has done a fantastic job

More information

Name Section: M/W T/TH Number Definition Matching (8 Points)

Name Section: M/W T/TH Number Definition Matching (8 Points) Name Section: M/W T/TH Number Definition Matching (8 Points) 1. (8 pts) Match the words with their definitions. Choose the best definition for each word. Iteration Counter Event Counter Loop Abstract Step

More information

Introduction to DATA Step Programming SAS Basics II. Susan J. Slaughter, Avocet Solutions

Introduction to DATA Step Programming SAS Basics II. Susan J. Slaughter, Avocet Solutions Introduction to DATA Step Programming SAS Basics II Susan J. Slaughter, Avocet Solutions DATA versus PROC steps Two basic parts of SAS programs DATA step PROC step Begin with DATA statement Begin with

More information

CH 87 FUNCTIONS: TABLES AND MAPPINGS

CH 87 FUNCTIONS: TABLES AND MAPPINGS CH 87 FUNCTIONS: TABLES AND MAPPINGS INTRODUCTION T he notion of a function is much more abstract than most of the algebra concepts you ve seen so far, so we ll start with three specific non-math examples.

More information

Database Management Systems

Database Management Systems Database Management Systems Associate Professor Dr. Raed Ibraheem Hamed University of Human Development, College of Science and Technology Computer Science Department 2015 2016 Department of Computer Science

More information

The Programmer's Solution to the Import/Export Wizard

The Programmer's Solution to the Import/Export Wizard The Programmer's Solution to the Import/Export Wizard Lora D. Delwiche, University of California, Davis, CA Susan J. Slaughter, SAS Consultant, Davis, CA Abstract Do you like what the Import/Export Wizard

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

16. Reading raw data in fixed fields. GIORGIO RUSSOLILLO - Cours de prépara)on à la cer)fica)on SAS «Base Programming» 364

16. Reading raw data in fixed fields. GIORGIO RUSSOLILLO - Cours de prépara)on à la cer)fica)on SAS «Base Programming» 364 16. Reading raw data in fixed fields 364 Reading raw Dataset: three solu)ons You can mix all of them! Data that SAS cannot read without further informa)on 365 Reading standard data with column input: review

More information

LECTURE 5 Control Structures Part 2

LECTURE 5 Control Structures Part 2 LECTURE 5 Control Structures Part 2 REPETITION STATEMENTS Repetition statements are called loops, and are used to repeat the same code multiple times in succession. The number of repetitions is based on

More information

The INPUT Statement: Where

The INPUT Statement: Where The INPUT Statement: Where It's @ Ronald Cody, Ed.D. Robert Wood Johnson Medical School Introduction One of the most powerful features of SAS software is the ability to read data in almost any form. For

More information

Events Oracle Arena & McAfee Coliseum

Events Oracle Arena & McAfee Coliseum MARCH 2 Golden State vs. Portland Trail Blazers Oracle Arena 5-9 Disney on Ice-Princess Wishes Oracle Arena 12 Golden State vs. Toronto Raptors Oracle Arena 15 Golden State vs. Memphis Grizzlies McAfee

More information

Reading data in SAS and Descriptive Statistics

Reading data in SAS and Descriptive Statistics P8130 Recitation 1: Reading data in SAS and Descriptive Statistics Zilan Chai Sep. 18 th /20 th 2017 Outline Intro to SAS (windows, basic rules) Getting Data into SAS Descriptive Statistics SAS Windows

More information

Making Sense of Schema-on-Read

Making Sense of Schema-on-Read YOUR DATA, NO LIMITS Making Sense of Schema-on-Read KENT GRAZIANO Chief Technical Evangelist Snowflake Computing @KentGraziano 1 My Bio Chief Technical Evangelist, Snowflake Computing Oracle ACE Director

More information

Databases & Information Retrieval

Databases & Information Retrieval Databases & Information Retrieval Maya Ramanath (Further Reading: Combining Database and Information-Retrieval Techniques for Knowledge Discovery. G. Weikum, G. Kasneci, M. Ramanath and F.M. Suchanek,

More information

TEST DATA MASKING FOR Db2 on z/os

TEST DATA MASKING FOR Db2 on z/os TEST DATA MASKING FOR Db2 on z/os Kai Stroh, UBS Hainer kai.stroh@ubs-hainer.com 1 48 Everybody needs to do masking, but getting it done is hard. 2 48 MASKING IN PRACTICE The challenge is to change the

More information

The INPUT Statement: Where It

The INPUT Statement: Where It The INPUT Statement: Where It s @ Ron Cody email: ron.cody@gmail.com Author page: Support.sas.com/cody List Directed Input data list input X Y A $ Z datalines 1 2 hello 3 4 5 goodbye 6 title 'List Directed

More information

Use That SAP to Write Your Code Sandra Minjoe, Genentech, Inc., South San Francisco, CA

Use That SAP to Write Your Code Sandra Minjoe, Genentech, Inc., South San Francisco, CA Paper DM09 Use That SAP to Write Your Code Sandra Minjoe, Genentech, Inc., South San Francisco, CA ABSTRACT In this electronic age we live in, we usually receive the detailed specifications from our biostatistician

More information

SAS/ACCESS 9.2. DATA Step Interface to CA-IDMS Reference. SAS Documentation

SAS/ACCESS 9.2. DATA Step Interface to CA-IDMS Reference. SAS Documentation SAS/ACCESS 92 DATA Step Interface to CA-IDMS Reference SAS Documentation The correct bibliographic citation for this manual is as follows: SAS Institute Inc 2008 SAS/ACCESS 92 for the DATA Step Interface

More information

Getting Started with the XML Engine

Getting Started with the XML Engine 3 CHAPTER 1 Getting Started with the XML Engine What Does the XML Engine Do? 3 Understanding How the XML Engine Works 3 Assigning a Libref to an XML Document 3 Importing an XML Document 4 Exporting an

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

Name Section: M/W T/TH Number Definition Matching (6 Points)

Name Section: M/W T/TH Number Definition Matching (6 Points) Name Section: M/W T/TH Number Definition Matching (6 Points) 1. (6 pts) Match the words with their definitions. Choose the best definition for each word. Event Counter Iteration Counter Loop Flow of Control

More information

BEYOND FORMAT BASICS 1

BEYOND FORMAT BASICS 1 BEYOND FORMAT BASICS 1 CNTLIN DATA SETS...LABELING VALUES OF VARIABLE One common use of a format in SAS is to assign labels to values of a variable. The rules for creating a format with PROC FORMAT are

More information

COMP 430 Intro. to Database Systems

COMP 430 Intro. to Database Systems COMP 430 Intro. to Database Systems Multi-table SQL Get clickers today! Slides use ideas from Chris Ré and Chris Jermaine. The need for multiple tables Using a single table leads to repeating data Provides

More information

Use mail merge to create and print letters and other documents

Use mail merge to create and print letters and other documents Use mail merge to create and print letters and other documents Contents Use mail merge to create and print letters and other documents... 1 Set up the main document... 1 Connect the document to a data

More information

SAS CURRICULUM. BASE SAS Introduction

SAS CURRICULUM. BASE SAS Introduction SAS CURRICULUM BASE SAS Introduction Data Warehousing Concepts What is a Data Warehouse? What is a Data Mart? What is the difference between Relational Databases and the Data in Data Warehouse (OLTP versus

More information

Chapter 7 File Access. Chapter Table of Contents

Chapter 7 File Access. Chapter Table of Contents Chapter 7 File Access Chapter Table of Contents OVERVIEW...105 REFERRING TO AN EXTERNAL FILE...105 TypesofExternalFiles...106 READING FROM AN EXTERNAL FILE...107 UsingtheINFILEStatement...107 UsingtheINPUTStatement...108

More information

IT 433 Final Exam. June 9, 2014

IT 433 Final Exam. June 9, 2014 Page 1 of 10 IT 433 Final Exam June 9, 2014 Part A: Multiple Choice Questions about SAS. Circle the most correct answer for each question. You may give an optional reason for each answer; if the answer

More information

Stat 302 Statistical Software and Its Applications SAS: Working with Data

Stat 302 Statistical Software and Its Applications SAS: Working with Data 1 Stat 302 Statistical Software and Its Applications SAS: Working with Data Fritz Scholz Department of Statistics, University of Washington Winter Quarter 2015 February 26, 2015 2 Outline Chapter 7 in

More information

data Vote; /* Read a CSV file */ infile 'c:\users\yuen\documents\6250\homework\hw1\political.csv' dsd; input state $ Party $ Age; run;

data Vote; /* Read a CSV file */ infile 'c:\users\yuen\documents\6250\homework\hw1\political.csv' dsd; input state $ Party $ Age; run; Chapter 3 2. data Vote; /* Read a CSV file */ infile 'c:\users\yuen\documents\6250\homework\hw1\political.csv' dsd; input state $ Party $ Age; title "Listing of Vote data set"; /* compute frequencies for

More information

ABSTRACT INTRODUCTION MACRO. Paper RF

ABSTRACT INTRODUCTION MACRO. Paper RF Paper RF-08-2014 Burst Reporting With the Help of PROC SQL Dan Sturgeon, Priority Health, Grand Rapids, Michigan Erica Goodrich, Priority Health, Grand Rapids, Michigan ABSTRACT Many SAS programmers need

More information

Access - Introduction to Queries

Access - Introduction to Queries Access - Introduction to Queries Part of managing a database involves asking questions about the data. A query is an Access object that you can use to ask the question(s). The answer is contained in the

More information

Content-Based Assessments. Mastering Access. For Project 13L, you will need the following file: a13l_lab_administrators

Content-Based Assessments. Mastering Access. For Project 13L, you will need the following file: a13l_lab_administrators CH13_student_cd.qxd 10/17/08 7:17 AM Page 1 Mastering Access Project 13L Lab Administrators In this project, you will apply the skills you practiced from the Objectives in Project 13A. Objectives: 1. Open

More information

DSCI 325: Handout 3 Creating and Redefining Variable in SAS Spring 2017

DSCI 325: Handout 3 Creating and Redefining Variable in SAS Spring 2017 DSCI 325: Handout 3 Creating and Redefining Variable in SAS Spring 2017 Content Source: The Little SAS Book, Chapter 3, by L. Delwiche and S. Slaughter. CREATING NEW VARIABLES OR REDEFINING VARIABLES In

More information

SAS/ACCESS 9.4 DATA Step Interface to CA-IDMS: Reference

SAS/ACCESS 9.4 DATA Step Interface to CA-IDMS: Reference SAS/ACCESS 94 DATA Step Interface to CA-IDMS: Reference SAS Documentation August 9, 2017 The correct bibliographic citation for this manual is as follows: SAS Institute Inc 2017 SAS/ACCESS 94 DATA Step

More information

Getting Your Data into SAS The Basics. Math 3210 Dr. Zeng Department of Mathematics California State University, Bakersfield

Getting Your Data into SAS The Basics. Math 3210 Dr. Zeng Department of Mathematics California State University, Bakersfield Getting Your Data into SAS The Basics Math 3210 Dr. Zeng Department of Mathematics California State University, Bakersfield Outline Getting data into SAS -Entering data directly into SAS -Creating SAS

More information

Relational Processing of Tape Databases

Relational Processing of Tape Databases Relational Processing of Tape Databases Howard Levine, DynaMark - A Fair Isaac Company Outline This paper covers the following topics: Explanation of Relational Processing Simple Relational Processing

More information

Part 2 Uploading and Working with WebCT's File Manager and Student Management INDEX

Part 2 Uploading and Working with WebCT's File Manager and Student Management INDEX Part 2 Uploading and Working with WebCT's File Manager and Student Management INDEX Uploading to and working with WebCT's File Manager... Page - 1 uploading files... Page - 3 My-Files... Page - 4 Unzipping

More information

SAS Certification Handout #8: Adv. Prog. Ch. 1-2

SAS Certification Handout #8: Adv. Prog. Ch. 1-2 /* First, make example data SAS Certification Handout #8: Adv. Prog. Ch. 1-2 libname cert 'C:/jrstevens/Teaching/SAS_Cert/AdvNotes' /* In SAS Studio, after creating SAS_Cert folder with username jrstevens:

More information

SUGI 29 Data Warehousing, Management and Quality

SUGI 29 Data Warehousing, Management and Quality Building a Purchasing Data Warehouse for SRM from Disparate Procurement Systems Zeph Stemle, Qualex Consulting Services, Inc., Union, KY ABSTRACT SAS Supplier Relationship Management (SRM) solution offers

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

Bulk Importing Quota Users from a CSV file

Bulk Importing Quota Users from a CSV file Bulk Importing Quota Users from a CSV file Overview The Account Import feature enables one to easily import accounts using a comma-separated text file into pre-determined User Classes. The imported data

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

Top 10 Ways to Optimize Your SAS Code Jeff Simpson SAS Customer Loyalty

Top 10 Ways to Optimize Your SAS Code Jeff Simpson SAS Customer Loyalty Top 10 Ways to Optimize Your SAS Code Jeff Simpson SAS Customer Loyalty Writing efficient SAS programs means balancing the constraints of TIME Writing efficient SAS programs means balancing Time and SPACE

More information

Contents. Overview How SAS processes programs Compilation phase Execution phase Debugging a DATA step Testing your programs

Contents. Overview How SAS processes programs Compilation phase Execution phase Debugging a DATA step Testing your programs SAS Data Step Contents Overview How SAS processes programs Compilation phase Execution phase Debugging a DATA step Testing your programs 2 Overview Introduction This section teaches you what happens "behind

More information

APPENDIX E SOLUTION TO CHAPTER SELF-TEST CHAPTER 1 TRUE-FALSE FILL-IN-THE-BLANKS

APPENDIX E SOLUTION TO CHAPTER SELF-TEST CHAPTER 1 TRUE-FALSE FILL-IN-THE-BLANKS APPENDIX E SOLUTION TO CHAPTER SELF-TEST CHAPTER 1 2. F The AS/400 family of computers, as with all IBM midrange and mainframe computers, uses the EBCDIC coding system. 3. F Arrival sequence files do not

More information

Tackling Unique Problems Using TWO SET Statements in ONE DATA Step. Ben Cochran, The Bedford Group, Raleigh, NC

Tackling Unique Problems Using TWO SET Statements in ONE DATA Step. Ben Cochran, The Bedford Group, Raleigh, NC MWSUG 2017 - Paper BB114 Tackling Unique Problems Using TWO SET Statements in ONE DATA Step Ben Cochran, The Bedford Group, Raleigh, NC ABSTRACT This paper illustrates solving many problems by creatively

More information

Standardization of Lists of Names and Addresses Using SAS Character and Perl Regular Expression (PRX) Functions

Standardization of Lists of Names and Addresses Using SAS Character and Perl Regular Expression (PRX) Functions Paper CC-028 Standardization of Lists of Names and Addresses Using SAS Character and Perl Regular Expression (PRX) Functions Elizabeth Heath, RTI International, RTP, NC Priya Suresh, RTI International,

More information

Silver Package Signup: Results and Mobile App on ITS YOUR RACE

Silver Package Signup: Results and Mobile App on ITS YOUR RACE Silver Package Signup: Results and Mobile App on ITS YOUR RACE Not ready to put your event s online registration on IYR? You can still get the live web results engine and mobile app! By upgrading your

More information

In either case, remember to delete each array that you allocate.

In either case, remember to delete each array that you allocate. CS 103 Path-so-logical 1 Introduction In this programming assignment you will write a program to read a given maze (provided as an ASCII text file) and find the shortest path from start to finish. 2 Techniques

More information

CPE 112 Spring 2015 Exam II (100 pts) March 4, Definition Matching (8 Points)

CPE 112 Spring 2015 Exam II (100 pts) March 4, Definition Matching (8 Points) Name Definition Matching (8 Points) 1. (8 pts) Match the words with their definitions. Choose the best definition for each word. Relational Expression Iteration Counter Count-controlled loop Loop Flow

More information

If You Need These OBS and These VARS, Then Drop IF, and Keep WHERE Jay Iyengar, Data Systems Consultants LLC

If You Need These OBS and These VARS, Then Drop IF, and Keep WHERE Jay Iyengar, Data Systems Consultants LLC Paper 2417-2018 If You Need These OBS and These VARS, Then Drop IF, and Keep WHERE Jay Iyengar, Data Systems Consultants LLC ABSTRACT Reading data effectively in the DATA step requires knowing the implications

More information

Write SAS Code to Generate Another SAS Program A Dynamic Way to Get Your Data into SAS

Write SAS Code to Generate Another SAS Program A Dynamic Way to Get Your Data into SAS Paper 175-29 Write SAS Code to Generate Another SAS Program A Dynamic Way to Get Your Data into SAS Linda Gau, Pro Unlimited @ Genentech, Inc., South San Francisco, CA ABSTRACT In this paper we introduce

More information

Overview... 2 Login Page... 2 My Account Account Info... 4 Friend List... 5 Payment Info... 6 Change Password Preferences...

Overview... 2 Login Page... 2 My Account Account Info... 4 Friend List... 5 Payment Info... 6 Change Password Preferences... Table of Contents Overview... 2 Login Page... 2 My Account... 4 Account Info... 4 Friend List... 5 Payment Info... 6 Change Password... 7 Email Preferences... 7 My Ticket Inventory... 8 Forward Tickets...

More information

Simple sets of data can be expressed in a simple table, much like a

Simple sets of data can be expressed in a simple table, much like a Chapter 1: Building Master and Detail Pages In This Chapter Developing master and detail pages at the same time Building your master and detail pages separately Putting together master and detail pages

More information

SAS Certification Handout #5: Ch /************ Ch. 13 ********************/ /* NOTE: Ch. 13 presents loads of functions; see pp.

SAS Certification Handout #5: Ch /************ Ch. 13 ********************/ /* NOTE: Ch. 13 presents loads of functions; see pp. SAS Certification Handout #5: Ch. 13-15 /************ Ch. 13 ********************/ /* NOTE: Ch. 13 presents loads of functions see pp. 452-455 */ /* MEAN function */ data a5 input X1-X5 Xmeans = mean(of

More information

BSc (Hons) Web Technologies. Examinations for 2017 / Semester 1

BSc (Hons) Web Technologies. Examinations for 2017 / Semester 1 BSc (Hons) Web Technologies Cohort: BWT/16A/FT Examinations for 2017 / Semester 1 MODULE: Open Source Web Technologies MODULE CODE: WAT 2108C Duration: 2 Hours 15 minutes Instructions to Candidates: 1.

More information

The Ugliest Data I ve Ever Met

The Ugliest Data I ve Ever Met The Ugliest Data I ve Ever Met Derek Morgan, Washington University Medical School, St. Louis, MO Abstract Data management frequently involves interesting ways of doing things with the SAS System. Sometimes,

More information

Recitation 2: Strings and RegExp Statistical Computing, Monday September 28, 2015

Recitation 2: Strings and RegExp Statistical Computing, Monday September 28, 2015 Recitation 2: Strings and RegExp Statistical Computing, 36-350 Monday September 28, 2015 Strings: A Brief Review Intituively, a string is a seris of letters, numbers, and other symbols. R stores these

More information

proc print data=account; <insert statement here> run;

proc print data=account; <insert statement here> run; Statistics 6250 Name: Fall 2012 (print: first last ) Prof. Fan NetID #: Midterm Three Instructions: This is an in-class and open book midterm. You must write your answers on the provide spaces. Give concise

More information

ENGR 1181 MATLAB 09: For Loops 2

ENGR 1181 MATLAB 09: For Loops 2 ENGR 1181 MATLAB 09: For Loops Learning Objectives 1. Use more complex ways of setting the loop index. Construct nested loops in the following situations: a. For use with two dimensional arrays b. For

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

CSE 530A. Synthetic Keys. Washington University Fall 2013

CSE 530A. Synthetic Keys. Washington University Fall 2013 CSE 530A Synthetic Keys Washington University Fall 2013 Review Suppose we have a students table with a primary key of sid a faculty table with a primary key of fid How would we implement a many-to-many

More information

Developing Data-Driven SAS Programs Using Proc Contents

Developing Data-Driven SAS Programs Using Proc Contents Developing Data-Driven SAS Programs Using Proc Contents Robert W. Graebner, Quintiles, Inc., Kansas City, MO ABSTRACT It is often desirable to write SAS programs that adapt to different data set structures

More information

HOW TO... Import Companies/Contacts into OA

HOW TO... Import Companies/Contacts into OA HOW TO... Document Ref: MK-HT001 Date: Aug 17 2010, rev. June 04 2014 Document Version: 2.0 Modules Affected: CRM Earliest available version of COINS: COINS OA 10.28 These notes are published as guidelines

More information

while for do while ! set a counter variable to 0 ! increment it inside the loop (each iteration)

while for do while ! set a counter variable to 0 ! increment it inside the loop (each iteration) Week 7: Advanced Loops while Loops in C++ (review) while (expression) may be a compound (a block: {s) Gaddis: 5.7-12 CS 1428 Fall 2015 Jill Seaman 1 for if expression is true, is executed, repeat equivalent

More information

Q &A on Entity Relationship Diagrams. What is the Point? 1 Q&A

Q &A on Entity Relationship Diagrams. What is the Point? 1 Q&A 1 Q&A Q &A on Entity Relationship Diagrams The objective of this lecture is to show you how to construct an Entity Relationship (ER) Diagram. We demonstrate these concepts through an example. To break

More information

Getting Started with Arrays and DO LOOPS. Created 01/2004, Updated 03/2008, Afton Royal Training & Consulting

Getting Started with Arrays and DO LOOPS. Created 01/2004, Updated 03/2008, Afton Royal Training & Consulting Getting Started with Arrays and DO LOOPS Created 01/2004, Updated 03/2008, Afton Royal Training & Consulting What to Expect We have 30 minutes to learn how to use DO LOOPS and arrays. We will assume you

More information

DSCI 325: Handout 6 More on Manipulating Data in SAS Spring 2017

DSCI 325: Handout 6 More on Manipulating Data in SAS Spring 2017 DSCI 325: Handout 6 More on Manipulating Data in SAS Spring 2017 CREATING VARIABLES IN SAS: A WRAP-UP As you have already seen several times, SAS variables can be created with an assignment statement in

More information

Database Programming with SQL

Database Programming with SQL Database Programming with SQL 6-2 Objectives This lesson covers the following objectives: Construct and execute a join with the ANSI-99 USING Clause Construct and execute a join with the ANSI-99 ON Clause

More information

IP OFFICE PREFERRED VOIC J129 PHONE REFERENCE GUIDE

IP OFFICE PREFERRED VOIC J129 PHONE REFERENCE GUIDE IP OFFICE PREFERRED VOICEMAIL J129 PHONE REFERENCE GUIDE SYRACUSE HOLLAND PATENT 1 Dupli Park Drive, 5 th Floor 9560 Main Street Syracuse, NY 13204 Holland Patent, NY 13354 Tel: 315-671-6200 Tel: 315-624-2000

More information

Understanding the ViewPoint WFM Flat File

Understanding the ViewPoint WFM Flat File Introduction The purpose of this document is to provide a detailed description of what the WFM flat file is and how to configure ViewPoint to import it. Overview In order to provide complete technician

More information

PharmaSUG Paper PO10

PharmaSUG Paper PO10 PharmaSUG 2013 - Paper PO10 How to make SAS Drug Development more efficient Xiaopeng Li, Celerion Inc., Lincoln, NE Chun Feng, Celerion Inc., Lincoln, NE Peng Chai, Celerion Inc., Lincoln, NE ABSTRACT

More information

Pre-Approval Basics. 1. Go to [W&M] Chrome River website: chromeriver.wm.edu 2. Log in using your W&M network credentials

Pre-Approval Basics. 1. Go to [W&M] Chrome River website: chromeriver.wm.edu 2. Log in using your W&M network credentials Pre-Approval Basics 1. Go to [W&M] Chrome River website: chromeriver.wm.edu 2. Log in using your W&M network credentials 3. On the Dashboard page, click on the +New Icon Your name here 1 Completing the

More information

Technical Reference. Field Representative Guide

Technical Reference. Field Representative Guide Technical Reference Field Representative Guide DEMOZILLA TECHNICAL REFERENCE Field Representative Guide 2006 DemoZilla DemoZilla Technical Reference Field Representative Guide This manual, as well as

More information

The Magnificent Do. Paul M. Dorfman. SAS Consultant Jacksonville, FL

The Magnificent Do. Paul M. Dorfman. SAS Consultant Jacksonville, FL The Magnificent Do Paul M. Dorfman SAS Consultant Jacksonville, FL Q.: What is the DO statement in SAS NOT intended for? Doing all kinds of weird stuff with arrays Creating a perpetuum mobile Saving programming

More information

DSCI 325: Handout 9 Sorting and Options for Printing Data in SAS Spring 2017

DSCI 325: Handout 9 Sorting and Options for Printing Data in SAS Spring 2017 DSCI 325: Handout 9 Sorting and Options for Printing Data in SAS Spring 2017 There are a handful of statements (TITLE, FOOTNOTE, WHERE, BY, etc.) that can be used in a wide variety of procedures. For example,

More information

ETC1010: Data Modelling and Computing. Lecture 6: Reading di erent data formats

ETC1010: Data Modelling and Computing. Lecture 6: Reading di erent data formats ETC1010: Data Modelling and Computing Lecture 6: Reading di erent data formats Di Cook (dicook@monash.edu, @visnut) Week 6 1 / 16 Overview SPSS format (PISA data) read_csv vs read.csv Handling large data

More information

The Art of Defensive Programming: Coping with Unseen Data

The Art of Defensive Programming: Coping with Unseen Data INTRODUCTION Paper 1791-2018 The Art of Defensive Programming: Coping with Unseen Data Philip R Holland, Holland Numerics Limited, United Kingdom This paper discusses how you cope with the following data

More information

CS106X Handout 04 Autumn 2009 September 25 th, 2009 C++ Strings

CS106X Handout 04 Autumn 2009 September 25 th, 2009 C++ Strings CS106X Handout 04 Autumn 2009 September 25 th, 2009 C++ Strings C++ Strings Original handout written by Neal Kanodia, with help from Steve Jacobson. One of the most useful data types supplied in the C++

More information

USING SAS SOFTWARE TO COMPARE STRINGS OF VOLSERS IN A JCL JOB AND A TSO CLIST

USING SAS SOFTWARE TO COMPARE STRINGS OF VOLSERS IN A JCL JOB AND A TSO CLIST USING SAS SOFTWARE TO COMPARE STRINGS OF VOLSERS IN A JCL JOB AND A TSO CLIST RANDALL M NICHOLS, Mississippi Dept of ITS, Jackson, MS ABSTRACT The TRANSLATE function of SAS can be used to strip out punctuation

More information

My Journey with DataFlux - Garry D Lima Business Solutions Administrator December 13, 2013

My Journey with DataFlux - Garry D Lima Business Solutions Administrator December 13, 2013 My Journey with DataFlux - Garry D Lima Business Solutions Administrator December 13, 2013 Content Introduction Objectives set by the management My Learning s Our Success Recommendations and Best Practices

More information

ShipRite s Account Receivable Instructions

ShipRite s Account Receivable Instructions ShipRite s Account Receivable Instructions Setting up a new account Click on the POS button Enter the existing customer s PHONE number here. If they are in the database, their information will appear at

More information

Welcome to NexTraq Connect

Welcome to NexTraq Connect Welcome to NexTraq Connect Overview NexTraq introduces NexTraq Connect, a mobile application for ios and Android smartphones and tablets. NexTraq Connect is a whole new way to interact with the NexTraq

More information