Copyright © 2006, SAS Institute Inc. All rights reserved. A Sampler of What's New in Base SAS 9.2

Slides:



Advertisements
Similar presentations
2000 Prentice Hall, Inc. All rights reserved. 1 Capitolo 4 - Arrays Outline 4.1Introduction 4.2Arrays 4.3Declaring Arrays 4.4Examples Using Arrays 4.5Passing.
Advertisements

Haas MFE SAS Workshop Lecture 3:
David Luebke 1 6/7/2014 CS 332: Algorithms Skip Lists Introduction to Hashing.
Copyright © 2006, SAS Institute Inc. All rights reserved. Think FAST! Use Memory Tables (Hashing) for Faster Merging Gregg P. Snell Data Savant Consulting.
Copyright © 2006, SAS Institute Inc. All rights reserved. Proc FCMP – Data Step Functions
Slide C.1 SAS MathematicalMarketing Appendix C: SAS Software Uses of SAS  CRM  datamining  data warehousing  linear programming  forecasting  econometrics.
Chapter 9: Introducing Macro Variables 1 © Spring 2012 Imelda Go, John Grego, Jennifer Lasecki and the University of South Carolina.
Outline Proc Report Tricks Kelley Weston. Outline Examples 1.Text that spans columnsText that spans columns 2.Patient-level detail in the titlesPatient-level.
FROM THE TESTING TRENCHES COMMON LOGIC LAPSES AND HOW TO AVOID THEM.
1 Combining (with SQL) HRP223 – 2010 October 27, 2009 Copyright © Leland Stanford Junior University. All rights reserved. Warning: This presentation.
Arrays  Writing a program that uses a large amount of information.  Such as a list of 100 elements.  It is not practical to declare.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Chapter 6 - Arrays Outline 6.1Introduction 6.2Arrays.
LCT2506 Internet 2 Further SQL Stored Procedures.
Basic And Advanced SAS Programming
 2007 Pearson Education, Inc. All rights reserved C Arrays.
Let SAS Do the Coding for You! Robert Williams Business Info Analyst Sr. WellPoint Inc.
Transaction Processing Systems, & Management Information Systems.
Understanding SAS Data Step Processing Alan C. Elliott stattutorials.com.
Data Cleaning 101 Ron Cody, Ed.D Robert Wood Johnson Medical School Piscataway, NJ.
Welcome to SAS…Session..!. What is SAS..! A Complete programming language with report formatting with statistical and mathematical capabilities.
Computing for Research I Spring 2014 January 22, 2014.
SAS SQL SAS Seminar Series
Comp 249 Programming Methodology Chapter 15 Linked Data Structure - Part B Dr. Aiman Hanna Department of Computer Science & Software Engineering Concordia.
By: Blake Peters.  OODB- Object Oriented Database  An OODB is a database management system in which information is represented in the form of objects.
Copyright © 2005, SAS Institute Inc. All rights reserved. Improving Batch Application Service Through Tuning and Parallelism Dan Squillace Mainframe Support.
Lecture 5 Sorting, Printing, and Summarizing Your Data.
Computer Science Standard Level Mastery Aspects. Mastery Item Claimed JustificationWhere Listed Arrays Used to store the student data Lines P.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Chapter 6 - Arrays Outline 6.1Introduction 6.2Arrays.
1 Chapter 4: Introduction to Lookup Techniques 4.1 Introduction to Lookup Techniques 4.2 In-Memory Lookup Techniques 4.3 Disk Storage Techniques.
An Animated Guide©: Sending SAS files to Excel Concentrating on a D.D.E. Macro.
Introduction to PROC GMap Presentation by Andrea Boan BMTRY 789.
Multiple Uses for a Simple SQL Procedure Rebecca Larsen University of South Florida.
Copyright © 2008 SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks.
INTRODUCTION TO SAS MACRO PROCESSING James R. Bence, Ph.D., Co-Director Quantitative Fisheries Center Professor Department of Fisheries and Wildlife March.
SAS ® PROC SQL or Vanilla Flavor Cecilia Mauldin January
SAS Efficiency Techniques and Methods By Kelley Weston Sr. Statistical Programmer Quintiles.
Copyright © 2008, SAS Institute Inc. All rights reserved. Hash Objects – Why Use Them? Carolyn Cunnison SAS Technical Training Specialist.
Lesson 2 Topic - Reading in data Chapter 2 (Little SAS Book)
SQL Chapter Two. Overview Basic Structure Verifying Statements Specifying Columns Specifying Rows.
1 Efficient SAS Coding with Proc SQL When Proc SQL is Easier than Traditional SAS Approaches Mike Atkinson, May 4, 2005.
A SAS Macro to Calculate the C-statistic Bill O’Brien BCBSMA SAS Users Group March 10, 2015.
Jessica Bennett, Advance America Barbara Ross, Flexshopper LLC PharmaSUG 2015 Paper #QT06.
ITGS Databases.
Macro Variable Resolution Enio Presutto York University, Toronto, Canada.
Copyright © 2015, SAS Institute Inc. All rights reserved. THE ELEPHANT IN THE ROOM SAS & HADOOP.
FOR MONDAY: Be prepared to hand in a one-page summary of the data you are going to use for your project and your questions to be addressed in the project.
Time Series Data Processes by Tai Yu April 15, 2013.
SAUSAG 69 – 20 Feb 2014 Smarter Sorts Jerry Le Breton (Softscape Solutions) & Doug Lean (DHS) Beyond the Obvious.
Computing with SAS Software A SAS program consists of SAS statements. 1. The DATA step consists of SAS statements that define your data and create a SAS.
Copyright © 2004, SAS Institute Inc. All rights reserved. SASHELP Datasets A real life example Barb Crowther SAS Consultant October 22, 2004.
CC07 PhUSE 2011 Seven Sharp tips for Clinical Programmers David Garbutt Rohit Banga BIOP AG.
Lesson 2 Topic - Reading in data Programs 1 and 2 in course notes –Chapter 2 (Little SAS Book)
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Arrays Outline 6.1Introduction 6.2Arrays 6.3Declaring.
Thematic Mapping with Google Maps. "US-KS":{code:"US-KS", name:"Kansas", center:{lat: ,lng: },
Beginning Data Manipulation HRP Topic 4 Oct 14 th 2012 Copyright © Leland Stanford Junior University. All rights reserved. Warning: This.
Based on Learning SAS by Example: A Programmer’s Guide Chapters 1 & 2
Online Programming| Online Training| Real Time Projects | Certifications |Online Classes| Corporate Training |Jobs| CONTACT US: STANSYS SOFTWARE SOLUTIONS.
Click to edit Master text styles Stacks Data Structure.
Copyright 2009 The Little Engine That Could: Using EXCEL LIBNAME Engine Options to Enhance Data Transfers between SAS® and Microsoft® Excel Files William.
Copyright © SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks.
Using the Macro Facility to Create HTML, XML and RTF output Rick Langston, SAS Institute Inc.
Hints and Tips SAUSAG Q SORTING – NOUNIQUEKEY The NOUNIQUEKEY option on PROC SORT is a useful way in 9.3 to easily retain only those records with.
Tips for Mastering Relational Databases Using SAS/ACCESS®
Paul Jacobs The iSchool University of Maryland Thursday, Oct. 6, 2016
OASUS Spring or Fall YYYY
Combining (with SQL) HRP223 – 2013 October 30, 2013
Retrieving Macro Variables in the DATA Step
Implementing a Discrete Event Simulation Using the American Community Survey and SAS® University Edition by Michael C. Grierson Copyright © 2010,
Combining (with SQL) HRP223 – 2012 November 05, 2011
Section 10.5 The Dot Product
Presentation transcript:

Copyright © 2006, SAS Institute Inc. All rights reserved. A Sampler of What's New in Base SAS 9.2

Copyright © 2006, SAS Institute Inc. All rights reserved. Caramel, Nut, or Truffle?  DATA Step User-Written Functions Data Set Lists Current Input Data Set Name INPUT with String Delimiter  PROC SQL Un-PUT Faster DISTINCT  PROC SORT Linguistic Ordering  Encrypted Macro Storage

Copyright © 2006, SAS Institute Inc. All rights reserved. Caramel, Nut, or Truffle?  DATA Step User-Written Functions Data Set Lists Current Input Data Set Name INPUT with String Delimiter  PROC SQL Un-PUT Faster DISTINCT  PROC SORT Linguistic Ordering  Encrypted Macro Storage

Copyright © 2006, SAS Institute Inc. All rights reserved. Wrap in a Macro %macro study_day(start, event, study_day); n = &event - &start; if n >= 0 then &study_day = n + 1; else &study_day = n; %mend;

Copyright © 2006, SAS Institute Inc. All rights reserved. Bug in the Macro data results; set trial_data; n = sum(of visits_jan--visits_dec); %study_day(start, event, study_day) if n > 5 then...

Copyright © 2006, SAS Institute Inc. All rights reserved. Bug in the Macro data results; set trial_data; n = sum(of visits_jan--visits_dec); n = event – start; if n >= 0 then study_day = n + 1; else study_day = n; if n > 5 then...

Copyright © 2006, SAS Institute Inc. All rights reserved. Protected by a Function data results; set trial_data; n = sum(of visits_jan--visits_dec); study_day = study_day(start, event); if n > 5 then...

Copyright © 2006, SAS Institute Inc. All rights reserved. Study Day Function proc fcmp outlib=sasuser.funcs.trial; function study_day(start, event); n = event – start; if n >= 0 then return(n + 1); else return(n); endsub;

Copyright © 2006, SAS Institute Inc. All rights reserved.

Data Set Lists  #1 on 2006 SASware Ballot  Read Like-Named Data Sets  Syntax borrowed from DROP and KEEP

Copyright © 2006, SAS Institute Inc. All rights reserved. Read a Bunch of Data Sets data out; set a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 a17 a18 a19 a20 a21 a22 a23 a24 a25 a26 a27 a28 a29 a30 a31 a32 a33 a34 a35 a36 a37 a38 a39 a40 a41 a42 a43 a44 a45 a46 a47 a48 a49 a50; run;

Copyright © 2006, SAS Institute Inc. All rights reserved. Data Set Lists data out; set a1-a50(pw=pass123); run; data out; set sales.jan:; run;

Copyright © 2006, SAS Institute Inc. All rights reserved. String Delimiter  "Top 10" SASware Ballot Item  Difficult to parse multi-character delimiters  INFILE DLMSTR=  Works like DLM=

Copyright © 2006, SAS Institute Inc. All rights reserved. String Delimiter data bad_guys; length date time ip $ 16; infile datalines dlm=' ' dsd; input date time ip; datalines; "20APR2007" "12:56:46" " " run;

Copyright © 2006, SAS Institute Inc. All rights reserved. String Delimiter data bad_guys; length date time ip $ 16; infile datalines dlmstr=' ' dsd; input date time ip; datalines; "20APR2007" "12:56:46" " " run;

Copyright © 2006, SAS Institute Inc. All rights reserved. SET with INDSNAME=  "Top 10" SASware Ballot Item  Place current data set name into a variable  SET with INDSNAME = var

Copyright © 2006, SAS Institute Inc. All rights reserved. SET with INDSNAME= data results; set gas_price_option gas_rbid_option coal_price_forward coal_rbid_forward indsname = cur_dataset;... run;

Copyright © 2006, SAS Institute Inc. All rights reserved. DATA Step JavaObj  "Compute" methods written in Java  Call from DATA Step with JavaObj  Methods like Java Native Interface (JNI)  Uses dot syntax  Production in SAS 9.2  Experimental in SAS 9.1.3

Copyright © 2006, SAS Institute Inc. All rights reserved. data results; declare javaobj jo("myclass"); jo.callDoubleMethod("compute", x, y, z, res);... DATA Step JavaObj

Copyright © 2006, SAS Institute Inc. All rights reserved. DATA Step IN Operator  IN operator used simple array search  Now, IN searches a binary tree

Copyright © 2006, SAS Institute Inc. All rights reserved. data _null_; set customers; if state in ('NC', 'SC', 'GA', 'TN', 'FL'); run; DATA Step IN Operator

Copyright © 2006, SAS Institute Inc. All rights reserved. Proc SQL Today proc format; value udfmt 1-3='small' 4-6='medium' 7-9='large'; proc sql; select style as SmallStyles from oracle.clothes where put(size, udfmt.) = 'small';

Copyright © 2006, SAS Institute Inc. All rights reserved. DBMS Proc SQL Today SAS® Session select style as SmallStyles from oracle.clothes where put(size, udfmt.) = 'small'; SAS/Access Engine select style,size from clothes

Copyright © 2006, SAS Institute Inc. All rights reserved. DBMS Proc SQL Today SAS® Session select style as SmallStyles from oracle.clothes where put(size, udfmt.) = 'small'; SAS/Access Engine select style,size from clothes

Copyright © 2006, SAS Institute Inc. All rights reserved. SAS® Session select style as SmallStyles from oracle.clothes where put(size, udfmt.) = 'small'; DBMS Proc SQL Tomorrow SAS/Access Engine select style as SmallStyles from oracle.clothes where (1 <= size and size <= 3);

Copyright © 2006, SAS Institute Inc. All rights reserved. SAS® Session select style as SmallStyles from oracle.clothes where put(size, udfmt.) = 'small'; DBMS Proc SQL Tomorrow SAS/Access Engine select style as SmallStyles from oracle.clothes where (1 <= size and size <= 3);

Copyright © 2006, SAS Institute Inc. All rights reserved. Proc SQL Today proc sql; select name from oracle.employees where put(bday, date5.) = '31OCT';

Copyright © 2006, SAS Institute Inc. All rights reserved. Proc SQL Tomorrow proc sql; select name from oracle.employees where month(bday) = 10 and day(bday) = 31;

Copyright © 2006, SAS Institute Inc. All rights reserved. Proc SQL Today proc format; value nudfmt 0 = 'RED' 1 = 'NOTRED' 2 = 'GREEN' other = 'BLACK'; proc sql; select * from oracle.data where put(color, nudfmt.) contains "RED";

Copyright © 2006, SAS Institute Inc. All rights reserved. Proc SQL Tomorrow proc format; value nudfmt 0 = 'RED' 1 = 'NOTRED' 2 = 'GREEN' other = 'BLACK'; proc sql; select * from oracle.data where color in (0,1);

Copyright © 2006, SAS Institute Inc. All rights reserved. PROC SQL  Faster: SELECT DISTINCT  Faster: COUNT(DISTINCT var)  Hash Join Performance  Row Counts from DBMSes

Copyright © 2006, SAS Institute Inc. All rights reserved. SELECT DISTINCT proc sql; create table distinct_values as select distinct month, year from customer_info; quit;

Copyright © 2006, SAS Institute Inc. All rights reserved. COUNT DISTINCT proc sql; create table count_distinct as select count(distinct customerid) from customer_info; quit;

Copyright © 2006, SAS Institute Inc. All rights reserved. Linguistic Sorting ObsBinaryLowfirstLinguistic 1Aaronaardvark 2AztecazimuthAaron 3ZeusAaronazimuth 4aardvarkAztec 5azimuthzebra 6 Zeus

Copyright © 2006, SAS Institute Inc. All rights reserved. Linguistic Sorting proc sort data=names out=sorted sortseq=linguistic; by name; run;

Copyright © 2006, SAS Institute Inc. All rights reserved. Numeric_Collation=ON ObsBinaryLinguistic Main St. Apt #12123 Main St. Apt # Main St. Apt # Main St. Apt # Main St. Apt # Main St. Apt #2123 Main St. Apt # Main St. Apt #103

Copyright © 2006, SAS Institute Inc. All rights reserved. Encrypted Macro Storage %macro mymac(x, y) / store secure;... %mend;

Copyright © 2006, SAS Institute Inc. All rights reserved. More Details Search support.sas.com for: Papers: "User-Written DATA Step Functions" "Creating Order out of Character Chaos"