This page contains links to excerpts from a book by Warren Repole titled Don't Be a SAS® Dinosaur: Modernize Your SAS Code, ©2008. [See the SAS dinosaur scale below]
Warren was introduced to SAS software in 1979, began presenting papers at SAS users group conferences and meetings in the mid 1980's, and has taught SAS classes and seminars since the early 1990's.
Warren is a SAS Certified Professional, earning the SAS Certified Advanced Programmer for SAS9 credential in 2006.
Warren also maintains a sascommunity.org page.
Warren debuted portions of the book content at a SAS Global Forum 2007 Pre-Conference Seminar in April 2007 and presented an updated version of the seminar at SAS Global Forum 2008.
You can view the entire book in PDF form.
This page of excerpts was generated on Saturday, January 17, 2009.
Base SAS Procedures | |||
|---|---|---|---|
| BY Groups: Grouped but Unsorted Observations [notsorted] | Printable PDF Version | Comprehensive Viewable Version | |
| BY Groups: Sorting Without Regard to Case [linguistic] | Printable PDF Version | Comprehensive Viewable Version | |
| Data Comparison: Data Set Differences [compare] | Printable PDF Version | Comprehensive Viewable Version | |
| Duplicate Observations: Capture into a Data Set [dupout] | Printable PDF Version | Comprehensive Viewable Version | |
| Duplicate Observations: Remove Complete Duplicates [nodups] | Printable PDF Version | Comprehensive Viewable Version | |
| Frequency Reports: Number of Levels of a Variable [nlevels] | Printable PDF Version | Comprehensive Viewable Version | |
| Frequency Reports: Sequence by Number of Occurrences [freqorder] | Printable PDF Version | Comprehensive Viewable Version | |
| Listing Reports: Display Sequential Ranks [obslabel] | Printable PDF Version | Comprehensive Viewable Version | |
| Listing Reports: Filter Observations [whereproc] | Printable PDF Version | Comprehensive Viewable Version | |
| Listing Reports: Insert Blank Line After every n Observation [blankline] | Printable PDF Version | Comprehensive Viewable Version | |
| Summary Reports: Format Summary Statistics [meanstemplate] | Printable PDF Version | Comprehensive Viewable Version | |
| Summary Reports: Row and Column Percentages [tabulatepcts] | Printable PDF Version | Comprehensive Viewable Version | |
| Transpose Data: Convert Observations into Variables [long2wide] | Printable PDF Version | Comprehensive Viewable Version | |
Referencing Variables | |||
|---|---|---|---|
| Filter Data: Multiple Values for the Same Variable [multchoice] | Printable PDF Version | Comprehensive Viewable Version | |
| Variable Lists: Variables with Similar Names [colonabbrev] | Printable PDF Version | Comprehensive Viewable Version | |
| Variable Names: Rename a Numbered Range List [renamelist] | Printable PDF Version | Comprehensive Viewable Version | |
| Variable Order: Reorder Variables Prior to Exporting [reordervars] | Printable PDF Version | Comprehensive Viewable Version | |
DATA Step Processing | |||
|---|---|---|---|
| Arrays: Array Element Indices [arraybound] | Printable PDF Version | Comprehensive Viewable Version | |
| Arrays: Specify Array Dimensions [dim] | Printable PDF Version | Comprehensive Viewable Version | |
| Arrays: Temporary Elements [temparray] | Printable PDF Version | Comprehensive Viewable Version | |
| BY Groups: Define Groups based on Formatted Values [groupformat] | Printable PDF Version | Comprehensive Viewable Version | |
| Diagnostics: Write Messages to the SAS Log [putlog] | Printable PDF Version | Comprehensive Viewable Version | |
| Loops: Control Loop Iterations [continueleave] | Printable PDF Version | Comprehensive Viewable Version | |
| Multiple Input Data Sets: Identifying the Source Data Set [setname] | Printable PDF Version | Comprehensive Viewable Version | |
| Raw Data: Manipulate Input Data Lines [inputbuffer] | Printable PDF Version | Comprehensive Viewable Version | |
| Summarize Data: Find the Nth Highest or Lowest Value [smallest] | Printable PDF Version | Comprehensive Viewable Version | |
| Zero Observations: Process an Empty Data Set [nobsstop] | Printable PDF Version | Comprehensive Viewable Version | |
Reading and Writing Data | |||
|---|---|---|---|
| Combine Data: Data Sets with Different Match Variables [mergerename] | Printable PDF Version | Comprehensive Viewable Version | |
| Combine Data: Fuzzy Merges [fuzzymerge] | Printable PDF Version | Comprehensive Viewable Version | |
| Combine Data: Maintain a Cumulative Data Set [append] | Printable PDF Version | Comprehensive Viewable Version | |
| Combine Data: Many-to-Many Matches [many2many] | Printable PDF Version | Comprehensive Viewable Version | |
| Combine Data: Summary Results with Detail Data [remerge] | Printable PDF Version | Comprehensive Viewable Version | |
| Combine Data: Table Lookups from Unsorted Data [hashobject] | Printable PDF Version | Comprehensive Viewable Version | |
| Filter Data: Data-Driven Subsets from Unsorted Data [setkey] | Printable PDF Version | Comprehensive Viewable Version | |
| Filter Data: Missing Values [ismissing] | Printable PDF Version | Comprehensive Viewable Version | |
| Microsoft Access: Write Selected Variables to a Table [exportoptions] | Printable PDF Version | Comprehensive Viewable Version | |
| Microsoft Excel: Combine Excel Data with SAS Data [import] | Printable PDF Version | Comprehensive Viewable Version | |
| Raw Data: Hierarchical Data Records [hierarchical] | Printable PDF Version | Comprehensive Viewable Version | |
| Update Data: Update Selected Observations [modifyby] | Printable PDF Version | Comprehensive Viewable Version | |
Metadata of SAS Processing | |||
|---|---|---|---|
| SAS Library Information: Formats [dictcat] | Printable PDF Version | Comprehensive Viewable Version | |
| SAS Library Information: SAS Files [dictmems] | Printable PDF Version | Comprehensive Viewable Version | |
| SAS Library Information: Variables [dictcols] | Printable PDF Version | Comprehensive Viewable Version | |
| SAS Session Information: SAS System Options [dictopts] | Printable PDF Version | Comprehensive Viewable Version | |
| SAS Session Information: Titles [dicttitle] | Printable PDF Version | Comprehensive Viewable Version | |
| System Information: Files in a Folder [dirpipe] | Printable PDF Version | Comprehensive Viewable Version | |
Manipulating and Processing Dates | |||
|---|---|---|---|
| Date Formats: Control the Delimiter within a Date [datedelim] | Printable PDF Version | Comprehensive Viewable Version | |
| Date Formats: Define a Custom Date Format [datepicture] | Printable PDF Version | Comprehensive Viewable Version | |
| Date Informats: Read Inconsistent Date Forms [anydt] | Printable PDF Version | Comprehensive Viewable Version | |
| Date Manipulation: Create an Age Function [age] | Printable PDF Version | Comprehensive Viewable Version | |
| Date Manipulation: Derive Fiscal Year [fiscal] | Printable PDF Version | Comprehensive Viewable Version | |
| Date Manipulation: Derive Holiday Dates [holidays] | Printable PDF Version | Comprehensive Viewable Version | |
| Date Manipulation: Shift Dates based on Intervals [shiftdate] | Printable PDF Version | Comprehensive Viewable Version | |
| Date-Based Analysis: Group by Intervals [datesummary] | Printable PDF Version | Comprehensive Viewable Version | |
Character Functions | |||
|---|---|---|---|
| Concatenation: Character Strings with Delimiters [catx] | Printable PDF Version | Comprehensive Viewable Version | |
| Concatenation: Combine Strings without Delimiters [catt] | Printable PDF Version | Comprehensive Viewable Version | |
| Concatenation: Remove Leading and Trailing Blanks [strip] | Printable PDF Version | Comprehensive Viewable Version | |
| Investigation: Count Occurrences of a Character [count] | Printable PDF Version | Comprehensive Viewable Version | |
| Investigation: Count Words in a String [countw] | Printable PDF Version | Comprehensive Viewable Version | |
| Investigation: Locate Complex Text Patterns [prxmatch] | Printable PDF Version | Comprehensive Viewable Version | |
| Investigation: Locate Invalid Characters [notfunctions] | Printable PDF Version | Comprehensive Viewable Version | |
| Investigation: Locate Specific Types of Characters [anyfunctions] | Printable PDF Version | Comprehensive Viewable Version | |
| Investigation: Locate a Pattern (ignoring case) [find] | Printable PDF Version | Comprehensive Viewable Version | |
| Modification: Manipulate Complex Text Patterns [prxchange] | Printable PDF Version | Comprehensive Viewable Version | |
| Parsing: Find the Final Word [scanback] | Printable PDF Version | Comprehensive Viewable Version | |
| Parsing: Remove the Final Word from a String [callscan] | Printable PDF Version | Comprehensive Viewable Version | |
Formats and Informats | |||
|---|---|---|---|
| Numeric Formats: Display Percentages with % [percentfmt] | Printable PDF Version | Comprehensive Viewable Version | |
| Numeric Formats: Negative Values in Parentheses [negparen] | Printable PDF Version | Comprehensive Viewable Version | |
| Permanent Formats: Availability in a SAS Session [fmtsearch] | Printable PDF Version | Comprehensive Viewable Version | |
| Permanent Formats: Modify an Existing Format [cntlout] | Printable PDF Version | Comprehensive Viewable Version | |
| User-Defined Formats: Create a Format from a Data Set [cntlin] | Printable PDF Version | Comprehensive Viewable Version | |
| User-Defined Formats: Missing versus Non-Missing Values [missingfreq] | Printable PDF Version | Comprehensive Viewable Version | |
| User-Defined Formats: Nested Definitions [nestedfmts] | Printable PDF Version | Comprehensive Viewable Version | |
| User-Defined Informats: Recode Special Values to Missing [invalue] | Printable PDF Version | Comprehensive Viewable Version | |
Macro Processing | |||
|---|---|---|---|
| Code Generation: Display Data Set Attributes in Titles [attrn] | Printable PDF Version | Comprehensive Viewable Version | |
| Code Generation: PROC FORMAT Code from a Data Set [executecode] | Printable PDF Version | Comprehensive Viewable Version | |
| Code Generation: Print the Last Data Set Created [syslast] | Printable PDF Version | Comprehensive Viewable Version | |
| Diagnostics: Customize Messages in the SAS Log [puterror] | Printable PDF Version | Comprehensive Viewable Version | |
| Macro Calls: Control through Conditional Logic [executeif] | Printable PDF Version | Comprehensive Viewable Version | |
| Macro Calls: Data-Driven Calls to Data-Driven Macros [executesql] | Printable PDF Version | Comprehensive Viewable Version | |
| Macro Calls: Data-Driven Calls to Simple Macros [executedo] | Printable PDF Version | Comprehensive Viewable Version | |
| Macro Parameters: Validate based on Existing Data [separatedby] | Printable PDF Version | Comprehensive Viewable Version | |
| Macro Parameters: Verify Existence of Input Data [exist] | Printable PDF Version | Comprehensive Viewable Version | |
| Macro Variables: Format a Character Value [sysfuncputc] | Printable PDF Version | Comprehensive Viewable Version | |
| Macro Variables: Format a Numeric Value [sysfuncputn] | Printable PDF Version | Comprehensive Viewable Version | |
| Macro Variables: Obtain Values for Multiple Variables [dictmacs] | Printable PDF Version | Comprehensive Viewable Version | |
| Macro Variables: Store Today's Date (formatted) [sysfunctoday] | Printable PDF Version | Comprehensive Viewable Version | |
| Macro Variables: Store in Global Symbol Table [symputxglobal] | Printable PDF Version | Comprehensive Viewable Version | |
| Macro Variables: Store without Leading and Trailing Blanks [symputx] | Printable PDF Version | Comprehensive Viewable Version | |
| Macro Variables: Verify Existence [symexist] | Printable PDF Version | Comprehensive Viewable Version | |
SAS/GRAPH Applications | |||
|---|---|---|---|
| Axes: Specify Date-Based Plot Axes [dateaxis] | Printable PDF Version | Comprehensive Viewable Version | |
| Bar Charts: Display Long Labels in Group Charts [barlegend] | Printable PDF Version | Comprehensive Viewable Version | |
| Bar Charts: Label Horizontal Chart Statistics [hbarstatlabel] | Printable PDF Version | Comprehensive Viewable Version | |
| Bar Charts: Overlay a Line Plot [gbarline] | Printable PDF Version | Comprehensive Viewable Version | |
| Fill Patterns: Tiled Images [texture] | Printable PDF Version | Comprehensive Viewable Version | |
| Fonts: System and Hardware Fonts [truetype] | Printable PDF Version | Comprehensive Viewable Version | |
| Image Files: PNG Format [png] | Printable PDF Version | Comprehensive Viewable Version | |
| Plots: Label Points [pointlabel] | Printable PDF Version | Comprehensive Viewable Version | |
Key to the dinosaur ratings:
(generally based on the SAS software release in which a better technique became available)