Home of the SAS editor
SAS editing tool
Support for your SAS toolkit
Tools for SAS programming
SAS editor for the new millenium SAS tool, toolkit or IDE buy it today

Power tools for SAS Programmers

Menu Items
Selected text
Cusrsor |

A collection of programming tools that provide help with parameter order or complex option sets.

Also: Language Templates, we have over 300 Run SAS from editor, see results in editor Syntax coloring, smart indenting

Find a page Fast

Smart Templates

One of the more powerfull programming tools is Smart Templates. These are templates for some of the more complex and option ridden procs or standard option lists. The invocation of these type of templates differs little from the standard procs, except that you follow the procs name with a *. So if you wanted the smart template for proc compare you would type compare* , followed by a space. When you do this you are presented with a series of checkbox dialogs that allow you to select the options, statements, and statement options that you require. The expansion into a proc statement will include the items you selected and any needed parameters. Parameters are represented as field strings.

The following procs are implemented as smart templates.
  • Compare
  • Datasets
  • Tabulate
  • Means
  • Summary
  • Format
  • Informat
  • Sql
Other common options.
  • Standard Data set Options (options)
  • Sql Query Statement (select)

Back to top

Function Cascade

Another SAS programming tool is Function Cascade. This is a template invoked, menu driven method to invoke a function template by picking it from a list. You start the process by typing f() preceded and followed by a blank at the place where you want the function call to appear. You will be presented with a popup menu. This menu presents a list of major groups of functions. As you make selections the last popup disappears and a new one appears in its place listing a subset of groups or actual function names. You may select the "Forget it" entry at any time to abort the process. The initial menu breaks all the functions into the following groups.

Menu Selection Description

Date Time

date time functions

System, Error

system functions and functions to handle errors


functions used within macro definitions

Data set Info, Variables

functions that provide information about datasets, and variables, and do variable manipulation


functions to work with zip and postal codes

Input, Output

function to control I/O to files and datasets


functions that manipulate strings


Functions to perform math operations

The entries, I/O, Strings and Math in the first menu have sub menus with sub groups listed. The sub menus and their descriptions are listed below.

Input, Output

File I/O

functions to do I/O on non SAS files

Data Set I/O

functions to work with SAS datasets


the input, put and libname functions



functions to change values to strings and back

Add, Remove, Index

functions to add or remove characters from a string or get sub strings

Search, Properties

functions to search a string or find out its properties



probability functions


trigonometric functions


functions to round or convert


statistical functions


functions to manipulate of get information about arrays


functions to do binary operations


financial and depreciation functions

Random Numbers

random number functions

Basic Math

basic math functions exp, log, etc

Advanced Math

advanced math functions bessil, gamma etc.

Back to top


Make Macro

The makemac macro creates a separate file and wraps the opening and closing code (%macro, %mend ) around the selected text in the current file. The macro prompts you for a name for the SAS macro. The macro's name is used to create the file name for the new file. The current file's path is used to determine where to place the new file. The extension ".sas" is used for the new file. A new edit window opens, containing the macro file. You can invoke this macro through the Macro-Run menu, or select Make Macro in the Tools submenu of the context sensitive menu, or by pressing the M lightning button on the SAS toolbar.

If you had selected the following text and entered "flop" when prompted for a macro name.
proc sort data=indata.mystuff;
 by var1;
You would have the following in the file "flop.sas" created in the same directory as the file that contained the selected text. The file flop.sas is opened for editing
%MACRO flop (`parms`) ;
proc sort data=indata.mystuff;
 by var1;
%MEND; /* flop */

Note the use of `parms` on the first line. You can use Cntl-i to jump to the field string ( `parms` ) with it selected (for over typing) just as you might do when expanding a template.


Back to top


Jump to: Editing features, Templates, SAS Integration and Debugging and Smart Code. Or, look at the EZRTools;) manual.


Download a trial copy of EZRTools;)

Download a trial version of Multi-Edit.

Home : About Us | Links | Site Map | News Releases | Contact Us
Support : Tips and Hints | Downloads and Patches | Manual | FAQs | Newsletters | Bug Reports | Suggestions
Products : Overview of Features | Features | Screen Shots | Free Trial | Purchase | Lite Version

EZRTools created by Clay Martin Works

50 Myrtle Street, Susquehanna, PA 18847 570-396-3121

Copyright © 2000-, Clay Martin Works , Text, graphics, and HTML code are protected by US and International Copyright Laws, and may not be copied, reprinted, published, translated, hosted, or otherwise distributed by any means without explicit permission. SAS® is a registered trademark of SAS Institute, Inc. in Cary, NC. Multi-Edit® is a trademark of Multi-Edit Software Inc. All other logos and trademarks in this site are property of their respective owners.