SAS Options – Versatile Players in the Game of SAS Denise Poll, SAS Institute Inc.

Slides:



Advertisements
Similar presentations
B2PDF b2pdf is the new and innovative release of our powerful command line tool for PDF customization b2pdf is a robust stand alone PDF file generation.
Advertisements

Introducing JavaScript
CPIT 102 CPIT 102 CHAPTER 1 COLLABORATING on DOCUMENTS.
Tutorial 8: Developing an Excel Application
Tutorial 12: Enhancing Excel with Visual Basic for Applications
1 Configuring Internet- related services (April 22, 2015) © Abdou Illia, Spring 2015.
1 Appendix A: Writing and Submitting SAS ® Programs A.1 Writing and Submitting SAS Programs.
 2005 Pearson Education, Inc. All rights reserved Introduction.
By Hrishikesh Gadre Session II Department of Mechanical Engineering Louisiana State University Engineering Equation Solver Tutorials.
XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Analyzing Data For Effective Decision Making.
Working with JavaScript. 2 Objectives Introducing JavaScript Inserting JavaScript into a Web Page File Writing Output to the Web Page Working with Variables.
Basic And Advanced SAS Programming
XP Tutorial 1 New Perspectives on JavaScript, Comprehensive1 Introducing JavaScript Hiding Addresses from Spammers.
Chapter 7 Managing Data Sources. ASP.NET 2.0, Third Edition2.
Form Handling, Validation and Functions. Form Handling Forms are a graphical user interfaces (GUIs) that enables the interaction between users and servers.
1 Chapter 3: Macro Definitions 3.1 Defining and Calling a Macro 3.2 Macro Parameters 3.3 Macro Storage (Self-Study)
1 CIS336 Website design, implementation and management (also Semester 2 of CIS219, CIS221 and IT226) Lecture 9 JavaServer Pages (JSP) (Based on Møller.
Chapter 2: Working with Data in a Project
JavaScript, Fifth Edition Chapter 1 Introduction to JavaScript.
4-1 INTERNET DATABASE CONNECTOR Colorado Technical University IT420 Tim Peterson.
EBSCOadmin. Select Change Password Select EBSCOadmin Security.
Chapter 9 Producing Descriptive Statistics PROC MEANS; Summarize descriptive statistics for continuous numeric variables. PROC FREQ; Summarize frequency.
Java Programming, 3e Concepts and Techniques Chapter 2 - Part 2 Creating a Java Application and Applet.
Introduction to SAS Essentials Mastering SAS for Data Analytics Alan Elliott and Wayne Woodward SAS ESSENTIALS -- Elliott & Woodward1.
JavaScript, Fourth Edition
Lesson 1 Review Q and A’s.
Handling Lists F. Duveau 16/12/11 Chapter 9.2. Objectives of the session: Tools: Everything will be done with the Python interpreter in the Terminal Learning.
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. Office Access 2003 Lab 3 Analyzing Data and Creating Reports.
Analyzing Data For Effective Decision Making Chapter 3.
Using the selection structure (Unit 7) Visual Basic for Applications.
My ODS: Real-World Uses of Modifying Table Templates Steve James Centers for Disease Control and Prevention Atlanta, Ga.
Chapter 6 SAS ® OLAP Cube Studio. Section 6.1 SAS OLAP Cube Studio Architecture.
Chapter 8 Cookies And Security JavaScript, Third Edition.
SAS Efficiency Techniques and Methods By Kelley Weston Sr. Statistical Programmer Quintiles.
UNIX and Shell Programming (06CS36) Unit 1 Continued… Shrinivas R. Mangalwede Department of Computer Science and Engineering K.L.S. Gogte Institute of.
1 JavaScript in Context. Server-Side Programming.
Copyright © 2006, SAS Institute Inc. All rights reserved. SAS Enterprise Guide Old Proc – New Tricks? Tim Trussell Academic Program, SAS Canada world diabetes.
1 Lab 2 and Merging Data (with SQL) HRP223 – 2009 October 19, 2009 Copyright © Leland Stanford Junior University. All rights reserved. Warning:
Variables and ConstantstMyn1 Variables and Constants PHP stands for: ”PHP: Hypertext Preprocessor”, and it is a server-side programming language. Special.
SQL Chapter Two. Overview Basic Structure Verifying Statements Specifying Columns Specifying Rows.
Introduction to Enterprise Guide Jennifer Schmidt Rhonda Ellis Cassandra Hall.
A Simple Guide to Using SPSS ( Statistical Package for the Social Sciences) for Windows.
Priya Ramaswami Janssen R&D US. Advantages of PROC REPORT -Very powerful -Perform lists, subsets, statistics, computations, formatting within one procedure.
Chapter 5 Reading and Manipulating SAS ® Data Sets and Creating Detailed Reports Xiaogang Su Department of Statistics University of Central Florida.
BMTRY 789 Lecture 11: Debugging Readings – Chapter 10 (3 rd Ed) from “The Little SAS Book” Lab Problems – None Homework Due – None Final Project Presentations.
XP Tutorial 8 Adding Interactivity with ActionScript.
Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Search Overview Search Features: WSS and Office Search Architecture Content Sources and.
Chapter 4 concerns various SAS procedures (PROCs). Every PROC operates on: –the most recently created dataset –all the observations –all the appropriate.
Chapter 17: Formatting Data 1 STAT 541 ©Spring 2012 Imelda Go, John Grego, Jennifer Lasecki and the University of South Carolina.
1 Chapter 7: Customizing and Organizing Project Results 7.1 Combining Results 7.2 Updating Results 7.3 Customizing the Output Style (Self-Study)
1 Chapter 3: Getting Started with Tasks 3.1 Introduction to Task Dialogs 3.2 Creating a Listing Report 3.3 Creating a Frequency Report 3.4 Creating a Two-Way.
B Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Working with PDF and eText Templates.
Chapter 6: Modifying and Combining Data Sets  The SET statement is a powerful statement in the DATA step DATA newdatasetname; SET olddatasetname;.. run;
Based on Learning SAS by Example: A Programmer’s Guide Chapters 1 & 2
 CONACT UC:  Magnific training   
Munis Version 9.1 & 8.3 Sneak Peek System Administration.
1 PSI/PhUSE Single Day Event – SAS Applications – June 11, 2009 SAS Drug Development from the Inside Magnus Mengelbier Director.
Using Ant in Eclipse Dwight Deugo Nesa Matic
Copyright 2009 The Little Engine That Could: Using EXCEL LIBNAME Engine Options to Enhance Data Transfers between SAS® and Microsoft® Excel Files William.
SAS ® 101 Based on Learning SAS by Example: A Programmer’s Guide Chapters 14 & 19 By Tasha Chapman, Oregon Health Authority.
COMPREHENSIVE Excel Tutorial 12 Expanding Excel with Visual Basic for Applications.
SAS ® 101 Based on Learning SAS by Example: A Programmer’s Guide Chapters 5 & 6 By Ravi Mandal.
Applied Business Forecasting and Regression Analysis
SQL and SQL*Plus Interaction
Using SQL*Plus.
Using SQL*Plus.
Instructor: Raul Cruz-Cano
CIS16 Application Programming with Visual Basic
PHP.
Presentation transcript:

SAS Options – Versatile Players in the Game of SAS Denise Poll, SAS Institute Inc.

Back in the “Day”

Today SAS System Options What kinda “stuff” gets customized?  Appearance of SAS output – PDF* options  Handling of files – ENGINE=V9  Performance related – SORTSIZE=  Security – PDFSECURITY=  Macro - MACRO

Game Plan  Basics  Interfaces  Tricks of the game  Acknowledgements and Questions

Basics of Syntax  Syntactically speaking --- Name and Value combination »Option METAPORT = 8561 ; /* Numeric */ »Option NOFMTERR; /* Boolean */ »Option CMPLIB = sasuser.funcs; /* Character */

Comparisons - System Options  System options – Remain in effect for all DATA and PROC steps unless re-specified  Specify using:  Options statement »Options DATASTMTCHK = ALLKEYWORDS;  Command line and configuration files »-DATASTMTCHK ALLKEYWORDS  Options Window

Comparisons - Data Set  Data set options – apply to the processing of the SAS data set with which they appear. Some data set options are also SAS System options.  Specify using  Data new ; /* Usage of FIRSTOBS overrules any previous setting */ set study ( FIRSTOBS = 5);

Comparisons Statement  Statement options – control the action of the statement in which they appear  Specify using  Proc Print data=study (FIRSTOBS = 20);

Forest For The Trees  If there are over SAS System options how do I find the one that I need?  Documentation is always helpful  Proc Options LISTGROUPS; Proc Options;

Logical Groups Proc Options Group=(SORT PERFORMANCE) ; Group=SORT ….. SORTSIZE=0 Size parameter for sort Group=PERFORMANCE …… BUFNO=1 Number of buffers for each SAS data set

DMS Options Window – RMButton to Find by Name

SAS Enterprise Guide Tooltip Meaning and Value Completion

SAS System Options Interfaces  GETOPTION function  Proc Options  Command line  Configuration files – Verbose and restricted option files  Options statement  Options window  Procs Optsave and Optload  DMOPTSAVE and DMOPTLOAD  SQL usage

Getoption Function Keywords “ Good Golly Miss Molly”  Subset of Return Value Options  DEFAULTVALUE - returns the default option value  STARTUPVALUE- returns value from SAS startup  HOWSET – returns a character string indicating setting interface  Subset of Return Value Formatting Options  EXPAND - WIN and UNIX, expand Environment Variables  KEYWORD - Option Name = Value  LOGNUMBERFORMAT – Numeric option value with “,”s

Getoption - Default and Startup Values SAS -YEARCUTOFF Options YEARCUTOFF = 1950; 2%put Returns Just the Option Value: %sysfunc(Getoption(YEARCUTOFF)) ; Returns Just the Option Value: %put Returns Name and Default Value: %sysfunc(Getoption(YEARCUTOFF, KEYWORD, DEFAULTVALUE)) ; Returns Name and Default Value: YEARCUTOFF= %put Returns Name and Startup Value: 2%sysfunc(Getoption(YEARCUTOFF, KEYWORD, STARTUPVALUE)) ; Returns Name and Startup Value: YEARCUTOFF=1999

Getoption - Tattle Tail Feature 7 %put Identifies current value setting interface: 8%sysfunc(Getoption(YEARCUTOFF, HOWSET)) ; Identifies current value setting interface: SAS Session Startup Command Line

GETOPTION Function – Programmatic Use! Sas –orientation portrait Options Orientation = LANDSCAPE ; %let setopt = %sysfunc(GETOPTION (Orientation, KEYWORD, STARTUPVALUE)); Options &setopt; /* Orientation=PORTRAIT */

Getoption Formatting Options 15 %put Option Value: %sysfunc(Getoption(SASAUTOS)); Option Value: ( "!sasroot\.....\auto\en" "!sasroot\....\testauto" ) 16 %put Expand Environment Variables in Option Value: 17%sysfunc(Getoption(SASAUTOS, EXPAND)) ; Expand Environment Variables in Option Value: ( "C:\SASv9\....auto\en" "C:\SASv9\....testauto" ) 18 %put Option Value: %sysfunc(Getoption(OBS)); Option Value: %put Return numeric value with commas: 20 %sysfunc(Getoption(OBS, LOGNUMBERFORMAT)) ; Return numeric value with commas: 9,223,372,036,854,775,807

A True Classic - Proc Options  OPTION and GROUP  LOGNUMERFORMAT  LISTGROUPS - displays options in each group  DEFINE  VALUE  INSERT, APPEND, LISTINSERTANDAPPEND  EXPAND  RESTRICT – are restricted  LISTRESTRICT – can restrict

Proc Options - Display Option Values  Proc Options Option=(OBS ORIENTATION) >1 specified LOGNUMBERFORMAT; OBS=9,223,372,036,854,775,807 Number of the last observation to process ORIENTATION=PORTRAIT Orientation to use when printing

Again -- Logical Groups Proc Options Group=(SORT PERFORMANCE) ; Group=SORT ….. SORTSIZE=0 Size parameter for sort Group=PERFORMANCE …… BUFNO=1 Number of buffers for each SAS data set

Option Properties  Proc Options Option=AUTOEXEC DEFINE ; Group= ENVFILES Group Description: SAS library and file location information Type: The option value is of type CHARACTER Maximum Number of Characters: 1024

More Information – Option DEFINE When Can Set: Environment Startup or Session Startup only Casing: The option value is retained with original casing Quotes: If present during "set", start and end quotes are removed Restricted: Your Site Administrator cannot restrict modification of this option Optsave: Proc Optsave or command Dmoptsave will not save this option

Proc Options Define For A Numeric Option Proc Options Option=OBS Define ; run; … Range of Values: The minimum is 0 and the maximum is Valid Syntax(any casing): MIN|MAX|n|nK|nM|nG|nT|hexadecimal Numeric Format: Usage of LOGNUMBERFORMAT impacts the value format <<<Adds commas

Tattle Tail Feature – Value Keyword The GETOPTION function has the HOWSET keyword Proc Options uses the “VALUE” keyword to identify what interfaces set the option value  Some interfaces are: »command line, Config file(s), Options statement…..  Options that can “add to” an option value »INSERT= and APPEND= Options

Proc Options Simple Usage – Value Keyword Proc Options option=sasautos VALUE ; run; Option Value Information For SAS Option SASAUTOS Value: ( "!sasroot\.... " "!sasroot\....\testauto“ ) How option value set: Config File Config file name: C:\SASv9\tmp\SASv cfg << Version 9.3

INSERT and APPEND SAS Options  Some options support adding to the option value using INSERT and APPEND Example: Config File contains: -Append AUTOEXEC myconfigAUTO.sas Command line contains: -Append AUTOEXEC mycmdAUTO.sas Result: myconfigAuto.sas mycmdAUTO.sas

Insert and Append Options Proc Options LISTINSERTAPPEND; run; Core options: INSERT and APPEND AUTOEXEC Identifies AUTOEXEC… CMPLIB Identify previously… FMTSEARCH List of catalogs to… MAPS Location of maps for… SASAUTOS Search list for autocall… SASHELP Location of the…

Proc Options – Value Keyword Proc Options Option=AUTOEXEC VALUE; Value ('!mydir\twoAuto.sas‘ '!mydir\twoAuto.sas‘) How option value set: Config File Value Inserted: '!mydir\twoAuto.sas' Config file name: U:\config2.cfg How option value set: Config File Value Inserted: '!mydir\oneAuto.sas' Config file name: C:\MySAS\ConfigDNT.cfg

Expand Environment Variables Expansion of environment variables in the physical name …same support that we saw earlier with the GETOPTION function Proc Options Option=SASHELP EXPAND ; Without Expand: myval = ("!sasroot\sas… With Expand: myval = ("C:\SASv9\sas….

Restricted Options  Proc Options LISTRESTRICT; /* CAN restrict */  Proc Options RESTRICT; /* IS restricted */ 3 Configuration File Configuration File 2 SAS Command 1 Site Restricted

Restricted Options Output Proc Options LISTRESTRICT; run; Your Site Administrator can restrict the ability to modify the following Portable Options: APPLETLOC Location of Java applets... BUFNO Number of buffers for each SAS data set BUFSIZE Size of buffer for page of SAS data set... CGOPTIMIZE Control code generation optimization... COMAMID Specifies the communication access….

Saving and Loading Option Values  Procedures OptSave and OptLoad  What options cannot be saved?  Session startup options  Password options Proc Optsave Data=WORK.saveopts; NOTE: The data set …. has 262 observations and 2 variables. Proc Optload Data=WORK.saveopts;

Verbose Option – Old Style sas -verbose ==== Processed Configuration File(s) ==== C:\SASv9\tmp\SASv cfg ==== Environment Variable Options ==== Option Value ====== ===== MAPS "!sasroot\sasgen\....en\maps" SASAUTOS "!sasroot\sas\.....\auto\en"

Verbose Option – New for 9.3 sas -verbose Options specified on the command line: SASHOST = C:\....dll DMS… Options specified in the config file C:\SASv9\… SASAUTOS = ( !sasroot\....) SASHELP= ( !sasroot\....)

Acknowledge and Question Bravo to my fellow portable and host developers, testers and writers who collaborate to bring SAS system options to customers. Questions?

SAS Options – Versatile Players in the Game of SAS