sas options – versatile players in the game of sas denise poll, sas institute inc
TRANSCRIPT
![Page 1: SAS Options – Versatile Players in the Game of SAS Denise Poll, SAS Institute Inc](https://reader035.vdocuments.mx/reader035/viewer/2022062802/56649ea05503460f94ba2d43/html5/thumbnails/1.jpg)
SAS Options – Versatile Players in the Game of SASDenise Poll, SAS Institute Inc.
![Page 2: SAS Options – Versatile Players in the Game of SAS Denise Poll, SAS Institute Inc](https://reader035.vdocuments.mx/reader035/viewer/2022062802/56649ea05503460f94ba2d43/html5/thumbnails/2.jpg)
Back in the “Day”
![Page 3: SAS Options – Versatile Players in the Game of SAS Denise Poll, SAS Institute Inc](https://reader035.vdocuments.mx/reader035/viewer/2022062802/56649ea05503460f94ba2d43/html5/thumbnails/3.jpg)
Today ---1500+ 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
![Page 4: SAS Options – Versatile Players in the Game of SAS Denise Poll, SAS Institute Inc](https://reader035.vdocuments.mx/reader035/viewer/2022062802/56649ea05503460f94ba2d43/html5/thumbnails/4.jpg)
Game Plan Basics
Interfaces
Tricks of the game
Acknowledgements and Questions
![Page 5: SAS Options – Versatile Players in the Game of SAS Denise Poll, SAS Institute Inc](https://reader035.vdocuments.mx/reader035/viewer/2022062802/56649ea05503460f94ba2d43/html5/thumbnails/5.jpg)
Basics of Syntax
Syntactically speaking ---
Name and Value combination
» Option METAPORT = 8561 ; /* Numeric */
» Option NOFMTERR; /* Boolean */
» Option CMPLIB = sasuser.funcs; /* Character */
![Page 6: SAS Options – Versatile Players in the Game of SAS Denise Poll, SAS Institute Inc](https://reader035.vdocuments.mx/reader035/viewer/2022062802/56649ea05503460f94ba2d43/html5/thumbnails/6.jpg)
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
![Page 7: SAS Options – Versatile Players in the Game of SAS Denise Poll, SAS Institute Inc](https://reader035.vdocuments.mx/reader035/viewer/2022062802/56649ea05503460f94ba2d43/html5/thumbnails/7.jpg)
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);
![Page 8: SAS Options – Versatile Players in the Game of SAS Denise Poll, SAS Institute Inc](https://reader035.vdocuments.mx/reader035/viewer/2022062802/56649ea05503460f94ba2d43/html5/thumbnails/8.jpg)
Comparisons Statement
Statement options – control the action of the statement in which they appear
Specify using Proc Print data=study (FIRSTOBS = 20);
![Page 9: SAS Options – Versatile Players in the Game of SAS Denise Poll, SAS Institute Inc](https://reader035.vdocuments.mx/reader035/viewer/2022062802/56649ea05503460f94ba2d43/html5/thumbnails/9.jpg)
Forest For The Trees
If there are over 1500+ SAS System options how do I find the one that I need? Documentation is always helpful Proc Options LISTGROUPS; Proc Options;
![Page 10: SAS Options – Versatile Players in the Game of SAS Denise Poll, SAS Institute Inc](https://reader035.vdocuments.mx/reader035/viewer/2022062802/56649ea05503460f94ba2d43/html5/thumbnails/10.jpg)
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
![Page 11: SAS Options – Versatile Players in the Game of SAS Denise Poll, SAS Institute Inc](https://reader035.vdocuments.mx/reader035/viewer/2022062802/56649ea05503460f94ba2d43/html5/thumbnails/11.jpg)
DMS Options Window – RMButton to Find by Name
![Page 12: SAS Options – Versatile Players in the Game of SAS Denise Poll, SAS Institute Inc](https://reader035.vdocuments.mx/reader035/viewer/2022062802/56649ea05503460f94ba2d43/html5/thumbnails/12.jpg)
SAS Enterprise GuideTooltip Meaning and Value Completion
![Page 13: SAS Options – Versatile Players in the Game of SAS Denise Poll, SAS Institute Inc](https://reader035.vdocuments.mx/reader035/viewer/2022062802/56649ea05503460f94ba2d43/html5/thumbnails/13.jpg)
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
![Page 14: SAS Options – Versatile Players in the Game of SAS Denise Poll, SAS Institute Inc](https://reader035.vdocuments.mx/reader035/viewer/2022062802/56649ea05503460f94ba2d43/html5/thumbnails/14.jpg)
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
![Page 15: SAS Options – Versatile Players in the Game of SAS Denise Poll, SAS Institute Inc](https://reader035.vdocuments.mx/reader035/viewer/2022062802/56649ea05503460f94ba2d43/html5/thumbnails/15.jpg)
Getoption - Default and Startup ValuesSAS -YEARCUTOFF 19991 Options YEARCUTOFF = 1950;
2 %put Returns Just the Option Value: %sysfunc(Getoption(YEARCUTOFF)) ;
Returns Just the Option Value: 1950
9 %put Returns Name and Default Value: %sysfunc(Getoption(YEARCUTOFF, KEYWORD, DEFAULTVALUE)) ;
Returns Name and Default Value: YEARCUTOFF=1920
1 %put Returns Name and Startup Value:10 %sysfunc(Getoption(YEARCUTOFF, KEYWORD, STARTUPVALUE)) ;
Returns Name and Startup Value: YEARCUTOFF=1999
![Page 16: SAS Options – Versatile Players in the Game of SAS Denise Poll, SAS Institute Inc](https://reader035.vdocuments.mx/reader035/viewer/2022062802/56649ea05503460f94ba2d43/html5/thumbnails/16.jpg)
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
![Page 17: SAS Options – Versatile Players in the Game of SAS Denise Poll, SAS Institute Inc](https://reader035.vdocuments.mx/reader035/viewer/2022062802/56649ea05503460f94ba2d43/html5/thumbnails/17.jpg)
GETOPTION Function – Programmatic Use!Sas –orientation portrait
Options Orientation = LANDSCAPE ;
%let setopt = %sysfunc(GETOPTION
(Orientation, KEYWORD, STARTUPVALUE));
Options &setopt; /* Orientation=PORTRAIT */
![Page 18: SAS Options – Versatile Players in the Game of SAS Denise Poll, SAS Institute Inc](https://reader035.vdocuments.mx/reader035/viewer/2022062802/56649ea05503460f94ba2d43/html5/thumbnails/18.jpg)
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: 9223372036854775807
19 %put Return numeric value with commas:20 %sysfunc(Getoption(OBS, LOGNUMBERFORMAT)) ;Return numeric value with commas: 9,223,372,036,854,775,807
![Page 19: SAS Options – Versatile Players in the Game of SAS Denise Poll, SAS Institute Inc](https://reader035.vdocuments.mx/reader035/viewer/2022062802/56649ea05503460f94ba2d43/html5/thumbnails/19.jpg)
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
![Page 20: SAS Options – Versatile Players in the Game of SAS Denise Poll, SAS Institute Inc](https://reader035.vdocuments.mx/reader035/viewer/2022062802/56649ea05503460f94ba2d43/html5/thumbnails/20.jpg)
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
![Page 21: SAS Options – Versatile Players in the Game of SAS Denise Poll, SAS Institute Inc](https://reader035.vdocuments.mx/reader035/viewer/2022062802/56649ea05503460f94ba2d43/html5/thumbnails/21.jpg)
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
![Page 22: SAS Options – Versatile Players in the Game of SAS Denise Poll, SAS Institute Inc](https://reader035.vdocuments.mx/reader035/viewer/2022062802/56649ea05503460f94ba2d43/html5/thumbnails/22.jpg)
Option Properties
Proc Options Option=AUTOEXEC DEFINE ;
Group= ENVFILES
Group Description: SAS library and file location informationType: The option value is of type CHARACTERMaximum Number of Characters: 1024
![Page 23: SAS Options – Versatile Players in the Game of SAS Denise Poll, SAS Institute Inc](https://reader035.vdocuments.mx/reader035/viewer/2022062802/56649ea05503460f94ba2d43/html5/thumbnails/23.jpg)
More Information – Option DEFINEWhen Can Set: Environment Startup or Session Startup onlyCasing: The option value is retained with original casingQuotes: If present during "set", start and end quotes are removedRestricted: Your Site Administrator cannot restrict modification of this optionOptsave: Proc Optsave or command Dmoptsave will not save this option
![Page 24: SAS Options – Versatile Players in the Game of SAS Denise Poll, SAS Institute Inc](https://reader035.vdocuments.mx/reader035/viewer/2022062802/56649ea05503460f94ba2d43/html5/thumbnails/24.jpg)
Proc Options Define For A Numeric Option
Proc Options Option=OBS Define ; run;… Range of Values: The minimum is 0 and the maximum is 9223372036854775807 Valid Syntax(any casing): MIN|MAX|n|nK|nM|nG|nT|hexadecimal Numeric Format: Usage of LOGNUMBERFORMAT impacts the value format <<<Adds commas
![Page 25: SAS Options – Versatile Players in the Game of SAS Denise Poll, SAS Institute Inc](https://reader035.vdocuments.mx/reader035/viewer/2022062802/56649ea05503460f94ba2d43/html5/thumbnails/25.jpg)
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
![Page 26: SAS Options – Versatile Players in the Game of SAS Denise Poll, SAS Institute Inc](https://reader035.vdocuments.mx/reader035/viewer/2022062802/56649ea05503460f94ba2d43/html5/thumbnails/26.jpg)
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\SASv9-1068.cfg << Version 9.3
![Page 27: SAS Options – Versatile Players in the Game of SAS Denise Poll, SAS Institute Inc](https://reader035.vdocuments.mx/reader035/viewer/2022062802/56649ea05503460f94ba2d43/html5/thumbnails/27.jpg)
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
![Page 28: SAS Options – Versatile Players in the Game of SAS Denise Poll, SAS Institute Inc](https://reader035.vdocuments.mx/reader035/viewer/2022062802/56649ea05503460f94ba2d43/html5/thumbnails/28.jpg)
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…
![Page 29: SAS Options – Versatile Players in the Game of SAS Denise Poll, SAS Institute Inc](https://reader035.vdocuments.mx/reader035/viewer/2022062802/56649ea05503460f94ba2d43/html5/thumbnails/29.jpg)
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
![Page 30: SAS Options – Versatile Players in the Game of SAS Denise Poll, SAS Institute Inc](https://reader035.vdocuments.mx/reader035/viewer/2022062802/56649ea05503460f94ba2d43/html5/thumbnails/30.jpg)
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….
![Page 31: SAS Options – Versatile Players in the Game of SAS Denise Poll, SAS Institute Inc](https://reader035.vdocuments.mx/reader035/viewer/2022062802/56649ea05503460f94ba2d43/html5/thumbnails/31.jpg)
Restricted Options
Proc Options LISTRESTRICT; /* CAN restrict */
Proc Options RESTRICT; /* IS restricted */
3 Configuration
File
Configuration
File
2 SAS
Command
1 Site
Restricted
![Page 32: SAS Options – Versatile Players in the Game of SAS Denise Poll, SAS Institute Inc](https://reader035.vdocuments.mx/reader035/viewer/2022062802/56649ea05503460f94ba2d43/html5/thumbnails/32.jpg)
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….
![Page 33: SAS Options – Versatile Players in the Game of SAS Denise Poll, SAS Institute Inc](https://reader035.vdocuments.mx/reader035/viewer/2022062802/56649ea05503460f94ba2d43/html5/thumbnails/33.jpg)
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;
![Page 34: SAS Options – Versatile Players in the Game of SAS Denise Poll, SAS Institute Inc](https://reader035.vdocuments.mx/reader035/viewer/2022062802/56649ea05503460f94ba2d43/html5/thumbnails/34.jpg)
Verbose Option – Old Style
sas -verbose
==== Processed Configuration File(s) ====C:\SASv9\tmp\SASv9-5776.cfg==== Environment Variable Options ====<none>
Option Value====== =====MAPS "!sasroot\sasgen\....en\maps"
SASAUTOS "!sasroot\sas\.....\auto\en"
![Page 35: SAS Options – Versatile Players in the Game of SAS Denise Poll, SAS Institute Inc](https://reader035.vdocuments.mx/reader035/viewer/2022062802/56649ea05503460f94ba2d43/html5/thumbnails/35.jpg)
Verbose Option – New for 9.3
sas -verbose
---------------------------------------------------------------Options specified on the command line:---------------------------------------------------------------SASHOST = C:\....dllDMS…..---------------------------------------------------------------Options specified in the config file C:\SASv9\…---------------------------------------------------------------SASAUTOS = ( !sasroot\....)SASHELP= ( !sasroot\....)
![Page 36: SAS Options – Versatile Players in the Game of SAS Denise Poll, SAS Institute Inc](https://reader035.vdocuments.mx/reader035/viewer/2022062802/56649ea05503460f94ba2d43/html5/thumbnails/36.jpg)
Acknowledge and Question
Bravo to my fellow portable and host developers, testers and writers who collaborate to bring SAS system options to customers.
Questions?
![Page 37: SAS Options – Versatile Players in the Game of SAS Denise Poll, SAS Institute Inc](https://reader035.vdocuments.mx/reader035/viewer/2022062802/56649ea05503460f94ba2d43/html5/thumbnails/37.jpg)
SAS Options – Versatile Players in the Game of SAS