Exampler.org SAS PYTHON HTML
SAS Introduction
SAS Abs
SAS Anydigit
SAS ASC
SAS Case Stmnt.
SAS Ceiling
SAS Change type
SAS Char
SAS CMISS
SAS Coalesc
SAS Coalescec
SAS Concatenate
SAS Constant
SAS Create Table
SAS DateTime
SAS Day
SAS Find
SAS Floor
SAS HMS
SAS Holiday
SAS HOUR
SAS Import
SAS Informats
SAS Inobs
SAS Input Stmt.
SAS Int
SAS INTNX
SAS Length
SAS Libname
SAS Loops
SAS Minute
SAS Month
SAS MDY
SAS NMISS
SAS Notdigit
SAS Lowercase
SAS Outobs
SAS Put Stmt.
SAS Rename
SAS Round
SAS Scan
SAS Substr
SAS Sum
SAS STNAME
SAS STNAMEL
SAS Time
SAS Trunc
SAS Uppercase
SAS Week
SAS Year
SAS Financial Functions
SAS Compound

Welcome to Exampler;

What is it?

Syntax:

  • Explain(This is where I provide the syntax of a SAS Function);

Exampler Statement:


 Layout of a Typical Example :




Data work.my_data_file;

    Variable_Name_1 = name_of_function(Parameters);
    Variable_Name_2 = name_of_function(Parameters);

Run;





What's happening in the script above?

  • This section is where I provide an extra instruction on what's happening in the script above
  • For Example, Line 1 is telling SAS we would like to create a temporary table for a DATA Step called work.my_data_file
  • Line 2 and 3 are assigning "Variable_Name_1" and "Variable_Name_2" values once they've been computed by the "name_of_function" function.
  • Line 4 is the run command;
  • The entire layout loosely resembles a SQL code block or in SAS's case a Proc SQL code block (more on this later)
  • Below is where I show the example results


Example Output:

Variable Input Output Description
Variable_Name_1 name_of_function(Parameters); the value of Variable_Name_1 after the function ran A breif description
Variable_Name_2 name_of_function(Parameters); the value of Variable_Name_2 after the function run see above

See also; PUT Function

See also; TODAY Function

See also; Hour Function



Connect via LinkedIn

Kevin Regan

Have an article, idea, found a typo, want to contribute? Shoot me an email Here


Below are links to some Udemy Data Science Courses. I've been using Udemy for a number of years now, and I've found their courses super helpful, maybe you will also.