Take that SAS option

0

Elizabeth is courageous. Scoliosis since birth, corrective spinal surgery replaced her spine with steel, tripping on stairs permanently broke her right ankle. Then she decided to come take yoga with me.

To help ease back pain & reduce hip stress, I offered options like bent legs not cross.

In class today, a student’s question on options to customize their SAS session, reminded me of Elizabeth. This student felt frustrated when they saw an error message repeat itself in the log 20 times and wanted to know how to reduce that number.

Here’s how I showed the class how to customize a SAS session to their own needs.

1. First find the many options available with this simple PROC code.
The log will list the current setting of SAS system options.

proc options;
run;

2.  After locating the option you are interested in from results above, display the setting for a single option by submitting this code.
    Bonus -  You will see additional information about this option in the log.

proc options option=errors define value;
run;
 
    SAS (r) Proprietary Software Release 9.4  TS1M3
Option Value Information For SAS Option ERRORS
    Value: 20
    Scope: Default
    How option value set: Shipped Default
 
Option Definition Information for SAS Option ERRORS
    Group= ERRORHANDLING
    Group Description: Error messages and error conditions settings
    Group= LOGCONTROL
    Group Description: LOGCONTROL
    Description: Specifies the maximum number of observations for which SAS issues complete error messages.
    Type: The option value is of type LONG
          Range of Values: The minimum is 0 and the maximum is 2147483647
          Valid Syntax(any casing): MIN|MAX|n|nK|nM|nG|nT|hexadecimal
    Numeric Format: Usage of LOGNUMBERFORMAT impacts the value format
    When Can Set: Startup or anytime during the SAS Session
    Restricted: Your Site Administrator can restrict modification of this option
    Optsave: PROC Optsave or command Dmoptsave will save this option
NOTE: PROCEDURE OPTIONS used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds

 

3.  Set the option to a preferred value with this code
This sets the number of observations for which SAS issues error messages. Now a user can see error errors for 10 observations instead of 20.

proc options option=errors;
option errors=10; run;
    SAS (r) Proprietary Software Release 9.4  TS1M3
 
 ERRORS=10         Specifies the maximum number of observations for which SAS issues complete
                   error messages.
NOTE: PROCEDURE OPTIONS used (Total process time):
      real time           0.11 seconds
      cpu time            0.12 seconds

Here is Elizabeth again in a supported shoulder stand giving her back much needed support. Don't you love that smile?

And doesn’t this picture of Elizabeth inspire you? It sure does me, and makes me want to share even more options with you. So, here are a couple more of my favorite options:

fmtsearch specifies order in which format catalogs are searched.
sasintialfolder changes the working folder and the default folders for the Open and Save As dialog boxes.

I hope you tried this simple and powerful tip to set options to your liking?

Remember just like Elizabeth's use of options to customize her yoga session, you too can customize your SAS session in your own way. Pop me a note in the comments section to share your favorite option. I'd love to hear & learn from you.

Share

About Author

Charu Shankar

Technical Training Specialist

Charu Shankar has been a Technical Training Specialist with SAS since 2007. She started as a programmer, and has taught computer languages, business and English Language skills. At SAS, Charu teaches the SAS language, SQL, SAS Enterprise guide and Business Intelligence. She interviews clients to recommend the right SAS training to help them meet their needs. She is helping build a center for special needs kids in this project. http://www.handicareintl.org/pankaja/pankaja.swf

Related Posts

Comments are closed.

Back to Top