Power tools for SAS Programmers
A collection of programming tools that provide help with parameter order or complex option sets.
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.
Other common options.
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.
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.
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 menu, or select in the submenu of the context sensitive menu, or by pressing the 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; run;
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; run; %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.
|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 Martin Works, Inc.
50 Myrtle Street, Susquehanna, PA 18847 570-396-3121