|
SAS Abbreviations
by
Ed Heaton, Westat, USA
M. Chris Moser, Contractor for DataMeans, USA
Russ Lavery, contractor for Numeric Resources, USA
PhUSE 2008
Many programming languages have context sensitive
help and this feature is especially useful when a programmer almost
knows the syntax of the function or procedure s/he is about to type
into code. SAS has had context sensitive help for many years, but
the user has had to create their own help via an editor function
called SAS Enhanced Editor Abbreviations. What is not commonly known
is that these abbreviations, once created, can be exported to a
file and then imported into SAS on another machine. The authors
have created abbreviation files for about 400 of the SAS v9 functions
and common base SAS procedures. The convenience of not having to
create abbreviations is the major deliverable of this paper. Hopefully,
the inclusion of hashing, binary searches and compressed indexes
will make those techniques a bit easier to learn.
Heaton, Moser and Lavery have created two abbreviation
files, containing abbreviations for approximately four hundred SAS
functions and procedures, and offer them to the SAS community. Users
should import ONE of the files. It is expected that the file Verbose_Helpful_abbreviations
_(revision date).kmf will be especially helpful to people new to
SAS and that the file called Sparse_examples_reminder_(revision
date).kmf will be of used by more experienced users.
The two abbreviation files differ in the amount of help they provide
when the abbreviation is pasted into your program. Verbose_Helpful
is very helpful, and appropriate for newer users of SAS. It often
has multiple examples (and often the examples can be run) to help
the new programmer see what the function or procedure does. If one
installs Helpful, expect to get a lot of help, but also expect to
do quite a bit of deleting of the “extra” examples.
The sample code in Helpful, that is useful in seeing what the function/proc
can do, will likely not be a logical addition to the program you
are trying to write. An abbreviation from sparse will be a bare
bones reminder of syntax. If you install sparse, you will not get
as much help, but you will do much less deleting.
There is not enough space in SAS for the abbreviations from both
files. You must import one of the other. However; if one downloads,
and saves both the files, it is easy for a user to sequentially
test both sets of abbreviations. The procedure would be to import
abbreviations from one file and use it for a while as a test. If
the user does not like the abbreviations s/he has imported, delete
them all and import the other file to see if that file is better
suited to the users needs. Deleting and importing take only seconds.
It is expected that, occasionally, the files will be updated and
latest versions of the files will be hosted at Datameans.com Please
download the paper, “Abbreviation Creation And Use: Loading
An Abbreviation file” which gives simple instructions and
a list of references. Papers in the reference section discuss details
of abbreviation creation and management for those who wish to create
their own abbreviations or to customize the files created by the
authors.
The SAS abbrev catalog only holds about 400 abbreviations and has
largely been filled up by this effort. Users will be able to add
a few abbreviations, but not many. If a user wishes to edit, modify
or delete the abbreviations provided by Heaton, Moser and Lavery,
they can easily do so after the abbrev file is installed into the
user’s version of SAS.
Downloads:
Right hand click at
links and choose "Save Target As...."
Abbreviation Creation And Use: Loading
An Abbreviation File. Instructions about how to import and use
the abbreviation files.
Download Verbose Helpful abbreviations
(Feb, 2010) . Abbrevs for new people.
Sparse_examples_reminder_nov16_2008.kmf.
Short Abbrevs for experience people.
|