
SAS Coding Tips and Techniques
You are Visitor # 
Receive an email when this page
( sastip.htm ) changes
| |
|
| |
Now Sorted in Descending Order - Most current tip listed first (except for Fuzzy Merge -
sorry ;-) )
"Each tip included here addresses a problem, and presents a use of one or more SAS concepts.
Use it to stimulate your thinking and help you on your way to solving your own problem.
Some tips may or may not work in your environment or with your version of the SAS Software,
and you should use these tips with this in mind. Neither SCONSIG or contributing
Author(s) should be held responsible for any direct and/or indirect damage to you or your
applications by using these free tips."
In case you would like to use a search function, trying using the "EDIT" utility in your browser, and
perform a "Find in Frame" or "Find (on this Page)" or "Find in Page" depending on browser product
for a string of characters that you think might help you locate the appropriate tip.
Some tips have been removed due to possible infringements on Intellectual Property Rights, and thus
the numbering of tips will have gaps, and not be 100% sequential.
http://ftp.census.gov/geo/www/gazetteer/places.html
U.S. Census Bureau Gazetteer Place and Zipcode Files
FAQ, Sample Programs and Information Warehouse Mail Server (IW Mail Server) at SAS Institute Inc's web site
SAS FAQ's
SAS Sample Code Library
Using SAS Institute Technical Support Division's Information Warehouse Mail Server (IW Mail Server)
SAS OnlineDoc available on external web site at
http://www.sas.com/service/techsup/unotes/SN/003/003170.html
TIP00000 - Electronic Fuzzy Merge Application - Over 70K of code and narrative
SAS Observation On-Line Version of Fuzzy Merge Application and its documentation
Fuzzy Match/Merge paper
TIP00417 - This macro will take 2 SAS datasets, and run a ONE-WAY Frequency on a list of vars which are common to both datasets,
and then compare the differences in the frequencies of these variables, and produce a proc print of the distributions
with their differences by Charles Patridge
TIP00416 - Easter Calculation by Chris Jones
EnterPrise Miner Info & Data Mining Links at http://www.sasenterpriseminer.com/data_mining_links.htm
TIP00415 - A macro to take LONG CHARACTER Variables and parse them so that they are more easily
read on the screen without having to scroll left and right by Charles Patridge
Updating ZIP Code Data Sets
Did you know that you can download quarterly updates of the
ZIP code data set? These updates are available from SAS Maps
Online. Now it's easier than ever to enhance your company's
marketing strategy with up-to-date ZIP code data.
Read More at:
http://sems.sas.com/bess4/get?id=6603.1:-22toh0w:e422w&RZNVY=puneyrf_f_cngevqtr@cebqvtl.arg&nccvq=8563
Beyond the Basics: Advanced PROC REPORT Tips and Tricks
This paper is a compilation of tips and tricks for producing
PROC REPORT output. The three sections cover topics that can
be used with listing output and with the Output Delivery
System (ODS); can be used only with an ODS destination; and
highlight new features and changes for PROC REPORT in SAS
9.2.
Read More at:
http://sems.sas.com/bess4/get?id=6604.1:-22toh0w:e422w&RZNVY=puneyrf_f_cngevqtr@cebqvtl.arg&nccvq=8563
SAS® for Dummies
This introductory title in the fun and easy Dummies format
will get you up and running using SAS®9, SAS' statistical
and data analysis software. The book will introduce you to
the commonly used features of the software, and then jump
right into the practical aspects.
Read More at:
http://sems.sas.com/bess4/get?id=6607.1:-22toh0w:e422w&RZNVY=puneyrf_f_cngevqtr@cebqvtl.arg&nccvq=8563
Create Variable Labels from Data Set Values
Dynamically create variable labels from data set values and
apply them using PROC DATASETS. This technique can also be
used when reading flat files that contain a record you want
to use for variable labels.
Read More at:
http://sems.sas.com/bess4/get?id=5843.1:-1y82ges:e46cs&RZNVY=puneyrf_f_cngevqtr@cebqvtl.arg&nccvq=6725
Create a New Data Set for Each BY-Group in a Data Set
Create multiple SAS data sets from one SAS data set based
upon the value of the BY variable.
Read More at:
http://sems.sas.com/bess4/get?id=5846.1:-1y82ges:e46cs&RZNVY=puneyrf_f_cngevqtr@cebqvtl.arg&nccvq=6725
Dynamically Determine the Creation Date and Last Modified Date for an External File
Use the DIR command and FILENAME PIPE to dynamically
determine the creation and last modified dates of an
external file on Windows.
Read More at:
http://sems.sas.com/bess4/get?id=5842.1:-1y82ges:e46cs&RZNVY=puneyrf_f_cngevqtr@cebqvtl.arg&nccvq=6725
Creating Subfolders Using Hash Tables
This sample, provided by SAS user Richard Wright, will create subdirectories on the fly by walking down the
hierarchy and creating the subdirectory if it doesn't exist.
Read More at:
http://sems.sas.com/bess4/get?id=8981.1:-2gnp1ic:e44oc&RZNVY=puneyrf_f_cngevqtr@cebqvtl.arg&nccvq=6818
Professional Development Series for Budding SAS Professionals - By Bryan Beverly
http://support.sas.com/news/users/bbeverly_feb06.html?ETS=4716&PID=11293
http://support.sas.com/news/users/bbeverly_FS2Q06.html
Create Variable Labels from Data Set Values
Dynamically create variable labels from data set values and
apply them using PROC DATASETS. This technique can also be
used when reading flat files that contain a record you want
to use for variable labels.
Read More at:
http://sems.sas.com/bess4/get?id=5843.1:-1y82ges:e46cs&RZNVY=puneyrf_f_cngevqtr@cebqvtl.arg&nccvq=6725
Create a New Data Set for Each BY-Group in a Data Set
Create multiple SAS data sets from one SAS data set based
upon the value of the BY variable.
Read More at:
http://sems.sas.com/bess4/get?id=5846.1:-1y82ges:e46cs&RZNVY=puneyrf_f_cngevqtr@cebqvtl.arg&nccvq=6725
Dynamically Determine the Creation Date and Last Modified Date for an External File
Use the DIR command and FILENAME PIPE to dynamically
determine the creation and last modified dates of an
external file on Windows.
Read More at:
http://sems.sas.com/bess4/get?id=5842.1:-1y82ges:e46cs&RZNVY=puneyrf_f_cngevqtr@cebqvtl.arg&nccvq=6725
-- Using Temporary Tables to Upload and Join in a Database
This SAS Note describes how to use the DBMSTEMP libname
option to allow two libname statements to share a single
connection to a database, which is required for performing
joins of a temporary database table with a permanent
database table.
Read More at:
http://support.sas.com/techsup/unotes/SN/018/018714.html?ETS=4763&PID=44951
-- Installing and Starting a PC Spawner on Windows Operating Systems
A Windows spawner program enables a local host to connect to
a remote host. This PDF article explains how to set user
rights (which are required to start or install the program);
install the spawner as a Windows service or by running it
manually; and delete a spawner, as needed.
Read More at:
http://support.sas.com/techsup/technote/ts638/ts638.pdf?ETS=4763&PID=44951
-- SAS® Learning Edition 4.1
This publication provides you with a unique opportunity to
gain SAS software experience and propel your career in new
and exciting directions. SAS users at all levels, from
novice to advanced, will appreciate this innovative and
comprehensive personal learning version of SAS. Maximize
your learning experience with SAS Enterprise Guide®, which
gives you point-and-click access to the power of SAS. Or
write and modify SAS code using the SAS Program Editor - all
on low-cost, self-install CD-ROMs.
Read More at:
http://www.sas.com/apps/pubscat/bookdetails.jsp?pc=61043&promo=EN&ETS=4763&PID=44951
Creating AND Importing Multi-Sheet Excel Workbooks the Easy Way with SAS
This paper discusses how you can take advantage of the XML
support in Base SAS 9.1 and Microsoft Excel 2002 (Excel XP)
or later. Written by Vince DelGobbo, Software Developer at
SAS, this paper was well-received at SUGI 31.
Read More at:
http://support.sas.com/news/feature/2006/workbooks.html?ETS=4759&PID=44951
Reading Multiple Files with PROC IMPORT
Read multiple files using PROC IMPORT without having to run
the code manually for each file.
Read More at:
http://support.sas.com/ctx/samples/index.jsp?sid=157&tab=code&ETS=4759&PID=44951
QUICK TIP - by Systems Seminar Consultants - www.sys-seminar.com
To enclose code or text within a block comment,
highlight the selected code and press Ctrl+/
To remove a block comment,
highlight the selected code and press Ctrl+Shift+/
This works in the SAS enhanced editor.
More tips at http://www.sys-seminar.com/publications_tms.php
Fun with PROC SQL Summary Functions by Kirk Lafler
Double Metaphone algorithm by Andre Wajda at
http://members.shaw.ca/andre.wajda/dmetaphone.sas
How to Set a User or System Environment Variable Outside
Command Context Created Within Windows
Environment variables created by a set command within a
Command or CMD session are not available as user or system-
level environment variables outside the scope of the session
in which they are created.
Read More at:
"http://support.sas.com/techsup/unotes/SN/017/017298.html?ETS=4751&PID=44951"
Using Perl Regular Expressions
Regular expressions, or regexp, are used to search text.
Regexp may seem foreign if you have not used them before.
But, you may have encountered them without realizing it.
Think about how you might list items in a directory. Often
the ? and * characters are used to match one character or
zero or more characters.
Read More at:
http://support.sas.com/rnd/base/topics/datastep/perl_regexp/regexp.motivation.html?ETS=4751&PID=44951
Read zipped files into a SAS® data set
Use the Winzip Command Line Support Add-on and a FILENAME statement to read zipped files into a SAS data set.
Read More at:
http://support.sas.com/ctx/samples/index.jsp?sid=1584&ETS=4745&PID=44951
Tight Looping With Macro Arrays (SUGI 31 paper and code - ZIPPED) -- by Ted Clay
Parsing a Macro Variable String -- Rob Krajcik
Using the Proc SQL Method Option by Kirk Lafler
TIP00414 -What happens when you try to pass Macro special symbols such as % and & inside the values of macro
variables when you want to treat them as normal alpha characters by Charles Patridge
-- FAQ: How Can I Create an Autocall Macro Library on the PC?
An autocall library on the PC is simply a directory that
contains noncompiled macro code.
Read More at:
http://support.sas.com/faq/044/FAQ04465.html?ETS=4725&PID=44951
-- Finding an Error in Macro Variable Resolution in Open Code by Using the %PUT Statement
This example shows how to use %PUT statements to display
macro variable values and messages in the SAS log. These
statements help identify problems in creating a macro
variable.
Read More at:
http://support.sas.com/ctx/samples/index.jsp?sid=777&ETS=4725&PID=44951
-- New Argument for Use with the COMPRESS Function
The COMPRESS function allows you to remove selected
characters from a character value.
Read More at:
http://support.sas.com/ctx/samples/index.jsp?sid=823&ETS=4725&PID=44951
-- FAQ: How Can I Download an Excel File from an ODS HTML Web Page?
You can place a download button on the HTML page that
enables the reader to save the page as an Excel file.
Read More at:
http://support.sas.com/faq/036/FAQ03644.html?ETS=4725&PID=44951
-- FAQ: How Can I Use PROC REPORT to Link from One Page in my PDF File to Another?
In SAS®9 and later, the ANCHOR= statement inserts anchors
into an ODS PDF output file. You can use PROC REPORT with
CALL DEFINE to automate the process of linking to the
anchored pages.
Read More at:
http://support.sas.com/faq/044/FAQ04473.html?ETS=4725&PID=44951
-- List All .SAS Files that are Located in a Specific Directory
Read on for the code from this highly popular SAS tip.
Read More at:
http://support.sas.com/ctx/samples/index.jsp?sid=588&ETS=4725&PID=44951
TIP00413 -Adapted the List ALL .SAS files (above) so the list is saved in a SAS Dataset for processing
instead of just putting them to the log by Charles Patridge
Reading Messy Raw Data - By Lora Delwiche (University of California, Davis) and Susan Slaughter (Avocet Solutions)
http://support.sas.com/publishing/bbu_tip/delwiche_reading_messy_data.html
Adding Custom Content to the SAS Help and Documentation System - By Jodie Gilmore
http://support.sas.com/publishing/bbu_tip/gilmore_custom_help.html
Using the MISSING function from SAS Functions by Example - By Ron Cody
http://support.sas.com/publishing/bbu_tip/cody_missingFunction.html
Customize the data set browser for the SAS Explorer window -By Lynn Curley
http://support.sas.com/sassamples/quicktips/05mar/viewtable.html
When do I use a WHERE statement vs. an IF statement to subset a data set?
http://support.sas.com/faq/042/FAQ04278.html
Manipulating Data with PROC SQL
http://support.sas.com/ctx/samples/index.jsp?sid=551
PROC SQL Summary Functions
http://support.sas.com/ctx/samples/index.jsp?sr=+&sid=820&os=+&summary=Y&srch=y&product=+&PROCS=+&text=
DATA Step vs. PROC SQL - By Curt Edmonds, Simulstat Incorporated, and Sunil Gupta, Gupta Programming
http://support.sas.com/documentation/whitepaper/technical/datastep_sunil.pdf
SAS9 Perl Regular Expressions Tip Sheet -
http://support.sas.com/rnd/base/topics/datastep/perl_regexp/regexp-tip-sheet.pdf
SAS9 Hash Object Tip Sheet -
http://support.sas.com/rnd/base/topics/datastep/dot/hash-tip-sheet.pdf
TIP00412 - Create Sample Transaction Dataset of a Master Transaction Dataset
of the Top X and Bottom Y Records based upon frequency (top most occurrences or least occurrences) of a Key variable by Charles Patridge
-- Quick Tip: A Simple Server Monitoring Technique
This coding approach by Bryan Beverly of BAE Systems
Information Technology demonstrates how to use SAS to detect
UNIX and Windows server response anomalies, and then notify
key personnel by e-mail or cell phone text messages. The
crux of this approach is the PING command.
Read More at:
http://support.sas.com/ctx/samples/index.jsp?sid=1556&ETS=2809&PID=44951
-- Quick Tip: DATA Step vs. PROC SQL
This tech tip by Curt Edmonds of Simulstat Inc., and Sunil
Gupta of Gupta Programming, covers the issues with common
variables when combining data sets. It offers general rules
on how attributes and data values from two data sets are
assigned for both the DATA Step and PROC SQL when you have
common non-BY variables in both data sets.
Read More at:
http://support.sas.com/documentation/whitepaper/technical/datastep_sunil.pdf?ETS=2809&PID=44951
Exploring the World of Indexes by Kirk Lafler
TIP00411 - Get the full file path name within a UNIX environment by Charles Patridge
TIP00410 - A macro to determine the Attribute Type of any SAS Variable within a SAS Dataset
by Charles Patridge
TIP00409 - create a macro variable that contains the list of variables within a given sas dataset
which are only C=Character or N=Numeric variables by Charles Patridge
Experimental GLMSELECT Procedure
The newest addition to SAS/STAT software is an experimental
procedure that performs model selection. The new procedure
is available, by download only, for the Windows platform and
works with the SAS 9.1 release. The GLMSELECT procedure
performs effect selection in the framework of general linear
models.
Read More at:
http://support.sas.com/rnd/app/da/glmselect.html?ETS=2805&PID=44951
SAS Raises Bar on Data Mining and Text Mining
SAS will ship enhancements to our award-winning data mining
and text mining software this fall. SAS' integrated data
mining and text mining capabilities uncover insights quickly
from information contained in structured data, as well as
unstructured data, in large document collections.
Read More at:
http://www.sas.com/news/feature/18aug05/data.html?ETS=2805&PID=44951
SAS/ACCESS® 9.1x Interface to DB2 on the Mainframe Using the LIBNAME Engine
This white paper provides an overview of the most important
features and capabilities of the SAS/ACCESS Interface to
DB2. General and technical product information is given for
SAS/ACCESS and DB2 RDBMS users.
Read More at:
http://support.sas.com/documentation/whitepaper/technical/accessdb2.pdf?ETS=2805&PID=44951
Quick Tip: Using the ERROR Statement to Identify a Data Error
This example shows how you can code an ERROR statement to
customize error information written to the SAS log.
Read More at:
http://support.sas.com/ctx/samples/index.jsp?sid=824&ETS=2805&PID=44951
Quick Tip: Manipulating Data with PROC SQL
PROC SQL users have a number of ways available to accomplish
their objectives, particularly when the goal is to
manipulate data. Kirk Paul Lafler explains just a few of
them in this tech tip.
Read More at:
support.sas.com/ctx/samples/index.jsp?sid=551&ETS=2801&PID=44951
Categories and Descriptions of SAS Functions and
CALL Routines
Identifying which SAS System Options are in Effect by Kirk
Lafler
Quick Tip: Reading and Writing in Rich Text Format
This sample program demonstrates how to read from and write
to Rich Text Format (RTF) files. Using this program, you can
place SAS data set values into RTF documents without using
"middle-ware" such as DDE, ODS or other SAS®9 tools.
Read More at:
support.sas.com/ctx/samples/index.jsp?sid=1183&tab=&_mode=preview&_subdir=sashrs&ETS=2799&PID=44951
FAQ: When do I use a WHERE statement versus an IF statement to subset a data set?
When programming in SAS, there is almost always more than
one way to accomplish a task. Beginning programmers may
think that there is no difference between using the WHERE
statement and the IF statement to subset your data set.
Knowledgeable programmers know that, depending on the
situation, subsetting your data set using the IF statement
is more appropriate than using the WHERE statement.
Read More at:
support.sas.com/faq/042/FAQ04278.html?ETS=2799&PID=44951
SN-006814 -Example of SYSTASK COMMAND statement to start a SAS batch job within a SAS program
http://support.sas.com/techsup/unotes/SN/006/006814.html
Customize the data set browser for the SAS® Explorer window
Lynn Curley, senior technical support analyst at SAS,
explains how to customize the VIEWTABLE window such that the
data set is opened in edit mode by default.
Read More at:
http://support.sas.com/sassamples/quicktips/05mar/viewtable.html?ETS=2795&PID=44951
Resolving a macro variable within single quotes
"Macro variables can be resolved between single quotes using
%STR inside a %UNQUOTE function," explains SAS senior
technical support analyst Russ Tyndall.
Read More at:
http://support.sas.com/sassamples/quicktips/05mar/singlequote.html?ETS=2795&PID=44951
Combining SAS® generation data sets into one SAS® data set
Amber Elam, SAS technical support analyst, describes how to
obtain the information on how many generations exist and the
maximum number of generations that can exist.
Read More at:
http://support.sas.com/ctx/samples/index.jsp?sid=814&ETS=2795&PID=44951
Destiny's tip on migrating from V8 to V9
Quick Tip: Using the MISSING Function
Ever need to check for a missing value, but not sure if the
variable is character or numeric? It's not a problem when
using the MISSING function, explains BBU author Ron Cody.
Read More at:
http://support.sas.com/publishing/bbu_tip/cody_missingFunction.html?ETS=2793&PID=44951
Free Tutorial: Getting Started with SAS® ETL Studio
This free tutorial provides step-by-step instructions and
sample data for practicing common tasks using SAS ETL
Studio. It also guides you through the process of building a
sample data warehouse. Try it today!
Read More at:
http://www.sas.com/apps/elearning/elearning_details.jsp?pubcode=59274&ETS=2793&PID=44951
Explore SAS Communities
SAS communities are here to address your needs as a SAS user
and offer you an intimate look at new and existing SAS
products and solutions. The resources available from each
community are provided to enhance your productivity and
improve your SAS software experience. Choose from base SAS,
data visualization, enterprise intelligence, learning
edition, migration, scalability and performance, statistics
and operations research, and Web technologies.
Read More at:
http://support.sas.com/rnd/intro.html?ETS=2793&PID=44951
Quick Tip: Automated Storage Monitoring Routine for UNIX/Solaris Servers
Bryan Beverly, software architect and team leader with BAE
Systems Information Technology, explains how to monitor file
system storage for UNIX/Solaris servers. This two-part tip
shows how to detect and report space problems, and how to
prevent other production jobs from executing by "tripping a
circuit breaker."
Read More at:
http://support.sas.com/sassamples/quicktips/05feb/monitorunix.html?ETS=2793&PID=44951
Quick Reference Guide to SAS Functions and Formats - TS486 (Dated 2/24/2000) -
Thanks to Peter Crawford
Peaceful Coexistence: The Transition from SAS® 8.2 to SAS®9
Moving from one release of SAS to another requires planning
and testing. As you expand your SAS environment to include
SAS®9, you must test the new environment and compare results
with your existing one. Your testing and migration phase can
stretch over several months; therefore, we have developed
guidelines to help you through this transition. Note: Many
SAS®9 and SAS 8.2 products are extremely compatible, making
the transition smooth and straightforward.
Read More at:
http://support.sas.com/rnd/migration/resources/peaceful.html?ETS=2791&PID=44951
The Relationship Between SAS/CONNECT® and the MACRO Facility
Many times when working with MACRO and SAS/CONNECT, the
results you see are not what you expected. It's important
when using RSUBMIT within the MACRO facility to have an
understanding of what happens at compile time versus what
happens at execution time. Knowing the behavior of this
interaction will help you in using MACRO and SAS/CONNECT
together. This article details how compiled code and text
affect remote submitting code within a MACRO, as well as
options and functions that can help in debugging. Techniques
for creating MACRO variables on the local and remote host
are also discussed.
Read More at:
http://support.sas.com/techsup/technote/ts697.pdf?ETS=2791&PID=44951
TIP00408 - Macro to return an expanded list of variables based on a SAS dataset
by Ian Whitlock (Multiple Solutions)
Quick Tip: Clean Up Your Messy Raw Data
Sometimes you need to read data that just doesn't line up in nice columns or have predictable lengths. When you have
these types of messy files, ordinary list, column or formatted input simply isn't enough. You need more tools in
your bag - tools like the @'character' column pointer and the colon modifier. Find out more from BBU authors Lora D.
Delwiche and Susan J. Slaughter.
Read More at:
http://support.sas.com/publishing/bbu_tip/delwiche_reading_messy_data.html?ETS=2789&PID=44951
Quick Tip: Concurrent Access to SAS/SHARE® with an Exponential Backoff
Phil Busby, a computer science major at North Carolina State University, submits the following tip to handle collision of
packets: "Frequently, if one SAS process tries to access data in a table locked by another SAS process, it will come
back to the user with an error, but continue executing the job. This can be trapped by checking &syserr." Get the
complete tip from Phil.
Read More at:
http://support.sas.com/sassamples/quicktips/05jan/syserr.html?ETS=2789&PID=44951
TIP00407 - A Macro to apply the same function for a list of sas variables where a
function requires only a single variable as an argument by Charles Patridge and Peter Crawford (Mutliple Solutions)
Manipulating Data with PROC SQL by Kirk Paul Lafler
TIP00406 - Find and delete records that offset (net zero) each other but only
when the absolute values are equal by Charles Patridge
Scrollable Tables
A common problem with viewing large tables in a Web browser
is that the column headers only occur at the very top of the
table. After you've scrolled down several rows, you can no
longer see the column headers. Learn how Kevin Smith, a
systems developer at SAS, has solved this problem.
Read More at:
support.sas.com/rnd/base/topics/scrolling-table/?ETS=1803&PID=44951
Using the SCAN Function
Suppose you want to produce an alphabetical list by name,
but your NAME variable contains FIRST, possibly a middle
initial and LAST name. The SCAN function makes quick work of
this. In his book, "SAS Functions by Example," BBU author
Ron Cody explains how.
Read More at:
support.sas.com/publishing/bbu_tip/cody_scanFunction.html?ETS=1803&PID=44951
Tipped Off! - Customizing Titles and Footnotes
By Lora D. Delwiche (University of California, Davis) and Susan J. Slaughter (Avocet Solutions)
When you send output to the Listing destination, you have little control over how titles and footnotes look.
That's because the Listing destination uses only one font (SAS Monospace) and one color (black).
Other destinations, such as HTML, RTF, PDF, and PostScript, give you more options.
For these destinations, if you don't like the default appearance of titles or footnotes, you could use
PROC TEMPLATE to define a custom style template. However, you can also change the appearance of titles
and footnotes by inserting a few simple options directly in your TITLE and FOOTNOTE statements.
To learn how to do this, please visit
support.sas.com/publishing/tip.html.
TIP00405 - Macro to calculate deciles of a list of sas variables from a single sas dataset, and merge
all the deciles onto a single record into an output sas dataset using Proc Univariate by Charles Patridge
TIP00404 - A little example of what SAS Dictionary Tables can provide by Charles Patridge
TIP00403 - Check for SAS Variable Consistency (type and length) across multiple Datasets within a SAS Library
- Using SASHELP.VCOLUMN (dictionary view) by Charles Patridge
TIP00402 - Doing a Simple HASH Total for Quality Control on a Character Field by Charles Patridge
Quick Tip: Using the PROPCASE Function
In his book, SAS Functions by Example, BBU author Ron Cody explains how to capitalize the first letters of words using
the PROPCASE function in SAS 9.1.
Read More at:
http://support.sas.com/publishing/bbu_tip/cody_propcaseFunction.html?ETS=1799&PID=44951
Data Storage Performance Tuning Techniques
by Kirk Paul Lafler
TIP00128F - Another Data Scrubbing Routine - Similiar to TIP 00128a but Much Faster -
using Formats as a technique by Charles Patridge
SN-004115
How to retrieve the contents of the Program Editor and the Enhanced Editor if SAS ends unexpectedly
http://support.sas.com/techsup/unotes/SN/004/004115.html
Creating links to other pages from within a PDF file created by ODS
http://support.sas.com/techsup/unotes/SN/012/012660.html
PROC FORMAT with PICTURE statement gives flexibility for date, time, and datetime formats
http://support.sas.com/techsup/unotes/SN/008/008510.html
Quick Tip: Exporting Comma Delimited Files for Use in MS Access or Excel
If you ever need to write data out to comma delimited files
for importing into MS Access or Excel, Nina Werner, a SAS
user at Dean Health Plan, provides a helpful routine. Her
tech tip checks every non-numeric field for commas and
substitutes blank spaces by using the TRANSLATE function.
Read More at:
http://support.sas.com/sassamples/quicktips/04jul/commadelimited.html?ETS=1792&PID=44951
IO Performance Tuning Techniques by Kirk Paul Lafler
Creating a Directory Listing Using SAS for Windows: It's Not a Pipe Dream
By Ross Bettinger, SAS
http://support.sas.com/sassamples/quicktips/04may/listings.html
Here's the link to a SAS program that calculates the dates for Federal holidays
and daylight saving time submitted by Glenn Heagerty
http://support.sas.com/faq/018/FAQ01802.html
Can't make it to Montréal? SAS has the next best thing: Experience the 29th annual SAS Users Group
International (SUGI) conference on your desktop with our live Webcast reports!
Read More at:
http://www.sas.com/news/feature/26apr04/sugiwebcast.html?ETS=1776&PID=44951
Quick Tip: Plotting Variables with SAS/GRAPH
Leif Kirschenbaum, a SAS user at IBM, optimized SAS code to
generate an XY plot where the many graph features are
controlled by macro variables. "Setting the macro variables
for axis low, high, interval and format is tiresome," he
explains. "So I devised a macro variable to plot where each
variable contains the axis limits, interval, format and
color for each variable to be plotted."
Read More at:
http://support.sas.com/sassamples/quicktips/04mar/plotting.html?ETS=1786&PID=44951
TIP00401 - A kind of Reverse Proc Contents - load attributes of variables into the metadata of a sas dataset by
Ian Whitlock
TIP00400 - Match String Patternss by David Cassell
CPU Performance Tuning Techniques by Kirk Paul Lafler
TIP00399 - Proc Sort with NODUP & Many Variables by Paul Dorfman
SAS® 9.1: Oh the Things You Can Do!
Melinda Theilbar, author of Bits & Bytes, offers this
"Insiders" look at SAS 9.1. She writes, “This new version is
going to work for you much like your old version did. You'll
have new functions and procedures that will open up new ways
to use SAS or will make old programming tasks easier. There
will be some new buttons to play with, maybe even a new
interface, but SAS will do everything it did before, just
better.”
Read More at:
http://support.sas.com/news/insider/mt_91tasks.html?ETS=1784&PID=44951
Looking Inside SAS®9
SAS®9 includes a new suite of Java interfaces designed to
manage and deliver intelligence to users throughout the
organization. Underneath all of the Java interfaces, the
core of the SAS system has taken a quantum leap forward in
terms of power and efficiency. "Insider" Bob Louder,
solutions architect at SAS, offers this look at the specific
enhancements and additions to SAS®9.
Read More at:
http://support.sas.com/news/insider/bl_91hilites.html?ETS=1784&PID=44951
New ODS PRINTER features for SAS 9.1
Justified page numbers and dates
Page i of n support
Improved Table of Contents options
Ability to generate contents list
http://support.sas.com/rnd/base/topics/odsprinter/new91.html
009869 How to print the current date and time in the SAS Output window instead
of the date and time that the SAS session was started
Component: Display manager (OS)
Release(s) Reported: 8.2
Release(s) Fixed:
Date Created: 23APR2003
Date Last Updated: 17MAR2004
SN
http://support.sas.com/techsup/unotes/SN/009/009869.html
product = SAS/FSP
000302 Information on when SAS/FSP is needed
Component: General FSP applications
Release(s) Reported: 7,8
Release(s) Fixed:
Date Created: 13JAN1999
Date Last Updated: 17MAR2004
SN
http://support.sas.com/techsup/unotes/SN/000/000302.html
Quick Tip: Using CARDS/DATALINES in Place of an INFILE Statement
This short tip by Andrew Cartwright, statistical consultant
at JCPenney, explains how to replace the name of a file with
either CARDS or DATALINES.
Read More at:
http://support.sas.com/sassamples/quicktips/04feb/inputfile.html?ETS=1731&PID=44951
Quick Tip Extra: PROC Output in Excel Using ODS
Unwanted formatting can be fixed with what you learn about
ODS templates. Brian Watts, SAS senior technical specialist
in Sydney, Australia, shows you how to get very clean PROC
output into Excel using ODS.
Read More at:
http://support.sas.com/sassamples/quicktips/04feb/ods-excel.html?ETS=1731&PID=44951
Scheduling the Enterprize Guide
Running EG projects unattended
Each generation of SAS software brings increased ease-of-use. The introduction of
Enterprise Guide (EG) brought such a degree of ease-of-use that SAS was opened-up to
a much larger audience. But interactive use is only part of the picture of a typical
commercial environment: there is a strong need to run processes on a regular, scheduled
basis.
We have found more than one of our clients to be labouring under the false impression
that EG projects cannot be used in a scheduled fashion. In fact, you can use a wide
range of scripting languages to launch/run chosen EG projects. SAS Note #2696
(
http://support.sas.com/techsup/unotes/SN/002/002696.html) has the
detailed low-down on how to do this with VBscript. Using the steps described in the
Note you can run one or more EG projects on a regular basis.
Quick Tip: Traffic Lighting with SAS
With ODS HTML, you can easily color a table cell based on
the value of the cell. This is called traffic lighting
because it highlights any value in your output that is
greater than, less than, or equal to a given value.
Read More at:
http://support.sas.com/rnd/base/topics/templateFAQ/Template_special.html#s30
Quick Tip: %SQUEEZE-ing Before Compressing Data
Ross Bettinger, a SAS analytical consultant, provides this
tip to optimize the space required to store numeric and
character variables in a SAS dataset.
Read More at:
http://support.sas.com/sassamples/quicktips/03dec/squeeze2.html?ETS=1727&PID=44951
TIP00398 - Dump a SAS Dataset to a Flat File (%FLATFILE) by Ian Whitlock
SAS Currency Formats Going International
The ways to denote decimal conventions and monetary values
are locale-dependent. This paper, written by Manfred Kiefer,
a SAS localization manager, examines provisions in the SAS
System for accommodating these differences.
Read More at:
http://support.sas.com/sassamples/quicktips/03dec/currency9.pdf?ETS=1719&PID=44951
Accessing DB2 Data with SAS 9
This white paper explores the impact of SAS and DB2
configuration options by outlining different methods of
accessing your DB2 database with a focus on performance.
Examples are given to highlight the performance trade-offs
of choosing different access methods, SAS 9 application
parameters and DB2 8.1 configuration options.
Read More at:
http://www.sas.com/apps/whitepapers/whitepaper.jsp?code=ACC1&ETS=1719&PID=44951
Quick Tip: Smoothly Canceling Processes at Will
SAS provides the ability to stop a single datastep via the
stop or abort statement, or to cancel the whole sas session
generating errors if the erroraben option is set. This tip
by Christian Graffeuille, a programmer and consultant with
more than 13 years of SAS software experience, explores the
recurring issue of cleanly canceling SAS processes when
conditions are met.
Read More at:
http://support.sas.com/sassamples/quicktips/03dec/cancelprocess.html?ETS=1719&PID=44951
How do you open the Enhanced Editor window at the command line and how
can you tell if using the Enhanced Editor versus the Program Editor?
support.sas.com/techsup/unotes/SN/003/003929.html
010984 How to highlight columns of text in the SAS Program Editor, Output, or Log windows
SN
http://support.sas.com/techsup/unotes/SN/010/010984.html
011034 How credentials specified on a URL filename statement are honored
SN
http://support.sas.com/techsup/unotes/SN/011/011034.html
TIP00397 - Insert SAS/Graph in Excel by Nitin Chandak
TIP00396 - An example of using %WINDOW to collect User Input by Charles Patridge
TIP00395 - How to determine what States are adjacent to each other for all states
by Michael Zdeb
TIP00394 - How to read multiple text files and start reading data on the
2nd record for each file read by Harry Droogendyk and Ian Whitlock
TIP00393 - An example of using the WINDOW STATEMENT within a DATA Step to collect
User Input by Charles Patridge
A Beginner's Guide to Incorporating SAS Output in Microsoft
Office Applications
Written for the beginner and intermediate SAS user, this
paper by Vincent DelGobbo, systems developer at SAS, covers
basic and advanced topics for incorporating SAS output in
Word and Excel from any platform where SAS is licensed. It
also explains how to create dynamic output into Excel and
Word using SAS server technology. DelGobbo has presented
this paper at SUGI 28 and at many local and regional users
group meetings. It has been well received because it
addresses a common problem for SAS users.
Read More at:
http://support.sas.com/news/feature/03nov/vince.html?ETS=1715&PID=44951
Quick Tip: Controlling Fonts in Your ODS Output
This tip, provided by Bernadette Johnson, president and CEO
of The Blaze Group, provides an overview on the font
attributes and their associated report elements. It also
reviews the default settings for RTF and includes a program
example to use a custom style template to set new font
settings. In addition, it provides a before-and-after output
sample using the default template and a new customized
template.
Read More at:
http://support.sas.com/sassamples/quicktips/03oct/odsfont.pdf?ETS=1715&PID=44951
TIP00392 - A simple fictitious example of Using SPEDIS and SOUNDEX functions in
a Fuzzy Logic Application using Imperfect SSNs by Charles Patridge and Sigurd Hermansen
TIP00391 - A SAS macro (myexcel) to dump a SAS Dataset to a CSV file (excel) with any stored SAS numeric formats
by Charles Patridge and Lars L Jacobsen
TIP00390 - parsing/extracting multiple email addresses from a text field by Harry Droogendyk and Howard Schreier
url for converting between SAS and other stat packages (Stata and SPSS)
http://www.ats.ucla.edu/stat/stata/faq/convert_pkg.htm
TIP00388 - An exercise to create 3 separate unique summaries on previous time periods by
Jack Hamilton, Paul Dorfman, Howard Schreier and Charles Patridge - each with a different method
COB2SAS is a tool that can be used to convert a COBOL FILE DESCRIPTOR SECTION
into a SAS INPUT and LABEL statement. It reads as it's input your COBOL COPYBOOK - for more info -
http://ftp.sas.com/techsup/download/technote/ts620.html
010385 Special command used for setting Enhanced Editor tools
SN -
http://support.sas.com/techsup/unotes/SN/010/010385.html
Quick Tip: Automatic Formatting for a Numeric Variable
Whenever you use numeric data it may be useful to quickly
obtain a SAS format such as a decile, duo-decile or any
equally sized grouping. Having a tool to automatically
create a format and output it to the work library may be
useful and could also save time. Ken Moore, a SAS user from
George Washington University, explains how to do a
preliminary univariate analysis or even finalize deciles or
groupings in a report in this macro program.
Read More at:
http://support.sas.com/sassamples/quicktips/03sep/noformat.html?ETS=1341&PID=44951
TIP00387 - A simple Macro application to help troubleshoot a SAS Financial Application by
tracing the values of any SAS variable throughout the application by Charles Patridge
TIP00386 - How to determine if an external file is empty or not by Charles Patridge and
Paul Dorfman
TIP00385 - An example of separating medication and dosage info from a single character variable by
Jack Hamilton, Arthur Tabachneck, Ron Fehd and Ian Whitlock
TIP00384 - Calculate the last payday of the month by Lars L Jacobsen
(also see tip00042)
TIP00383 - An example of how to sort a group of records that span multiple lines and still keep them adjacent as a group
by Charles Patridge
TIP00382 - A Bizarre Use / Example of a Comma Informat by Roland Rashleigh-Berry, Don Stanley and Paul Dorfman
TIP00381 - Extract a single variable from 500 plus datasets and put into 1 SAS Dataset by Gerhard Hellriegel, Richard A. DeVenezia and Harry Droogendyk
Quick Tip: BBU Author Provides Tip on GETOPTION
How do you obtain information about a system option with the SAS
function GETOPTION, and how do you use that information to control the
processing of a program? Read this tip from BBU author Michele Burlew's book
"Debugging SAS Programs: A Handbook of Tools and Techniques" to show you how!
Read more at
http://support.sas.com/publishing/tip.html
Quick Tip: FAQ Library
Did you know SAS Technical Support has an online FAQ library? The
library is a collection of the questions most frequently asked of our Technical
Support staff. Use this tool to find out more about Base SAS, data
warehousing, SAS Information Delivery Portal, SAS Integration Technologies and
SAS/IntrNet.
Read more at http://support.sas.com/techsup/faq
SN-008447 - Naming datasets DATAx may cause error
http://support.sas.com/techsup/unotes/SN/008/008447.html
TIP00380 - Finding repeating characters by Harry Droogendyk, Ya Huang and Ron Fehd
TIP00379 - Setting variable value based on value of another variable by Harry Droogendyk
TIP00378 - Quick data-completion check routine by Paul Dorfman and Stig Eide
TIP00377 - Ways to capture User Input using Base Sas or VB without having SAS AF/FSP by
Mark Terjeson, Arto Raiskio, Nathaniel Wooding, Stig Eide, Michael Bramley and Lex Jansen
Copying SAS Datasets and Indexes by Kirk Lafler (PDF document)
Bits & Bytes: Point-and-Click for Programmers
In this article, Melinda Thielbar, technical training specialist at
SAS, demonstrates the features of SAS Enterprise Guide that can make your
programming tasks easier. She also shows you how to use the
point-and-click features to start building code and then embellish it with your own
options and statements.
Read more at
http://support.sas.com/sassamples/bitsandbytes/03jul/usingeg1.html
TIP00376 - Ways to use the PUT statement by Phil Mason
SN-008395 How to reorder variables in a SAS data set -
http://support.sas.com/techsup/unotes/SN/008/008395.html
SN-008510
PROC FORMAT with PICTURE statement gives flexibility for date, time,
and datetime formats
http://support.sas.com/techsup/unotes/SN/008/008510.html
Creating New Data Sets with a Subset
by Kirk Lafler (PDF document)
TIP00375 - Repeating consonants and vowels by Puddin' Man and Thomasset Pierre
Concatenating SAS Data sets with the APPEND Procedure
by Kirk Lafler (PDF document)
www.woodstreet.org.uk - Phil Mason's web site
TIP00374 - How to make View Tables use Column Names versus Labels by Richard DeVenezia
TIP00373 - How to compare 2 SAS datasets on different platforms by Harry Droogendyk,
Jack Hamilton and Sigurd Hermansen
TIP00372 - 12 Ways to get data from SAS to Excel by Jack Hamilton & Dale McLerran
What's new in SAS 9 - http://support.sas.com/software/9/toc.htm
ReCap of Sugi 28 -
http://support.sas.com/news/feature/03apr/sugi_general.html
The DATA Step in SAS 9: What's New
New SAS technologies are always a hot topic at SUGI. This paper by SAS'
Jason Secosky covers some sure-to-be popular DATA step enhancements for SAS 9,
including Perl regular expressions for easy text search and replace, hash
tables and new functions and CALL routines. (.pdf)
Read more at
http://support.sas.com/rnd/base/topics/datastep/dsv9-sugi-v2.pdf
Quick Tip: Automatic Local Reference to Remote WORK Library
If you are using SAS/CONNECT software and need a quick way to review the
SAS WORK library on a remote session, check out this tip by SAS consultant
Brian Varney and SAS R&D Director Cheryl Doninger.
Read more at
http://support.sas.com/sassamples/quicktips/0304remoteservices.html
TIP00371 - Where on the web can one find tutorials about using ARRAYS Submitted by
Richard Read Allen, Carey Smoak and Lex Jansen
TIP00370 - Conditional Formatting (Traffic Lighting...) by Ya Huang and Jack Hamilton
TIP00369 - Launch SAS program from email - Microsoft OUTLOOK submitted by Thomas Sarosky
sugi 28 proceedings - http://www2.sas.com/proceedings/sugi28/Proceed.pdf
Migration Community Helps Lead the Way to New Releases
If you are a SAS specialist or IT professional, our new online
Migration Community is your field guide for successfully moving
your organization from SAS 6.12 or later to SAS 9.1. While this
information addresses migrating a site to SAS 9, the information
can be useful in other migrations as well (for example, from
Release 6.12 to Release 8.2, or to a different platform or operating
system). Explore this great new resource!
Read more at
http://support.sas.com/rnd/migration/index.html
Quick Tip: Creating Code Templates in the SAS Enhanced Editor
Former SAS customer, now SAS employee Paul Grant shows how to create a
code template in the SAS Enhanced Editor. If you are coding and can't
remember the exact syntax, you can just type the name of the procedure
you need and a prompt appears that provides the statements and options
you use frequently along with a highlighted area where parameters are
needed. (.pdf)
Read more at
http://support.sas.com/sassamples/papers/0303_saseditor.pdf
TIP00368 - How to modify (add) to the search path of SASAUTOS by Brad Goldman, Michael Eckhardt,
Roland Rashleigh-Berry and Richard A. DeVenezia
TIP00367 - How identify and separate duplicate observations in to a dataset by Jim Groeneveld
TIP00366 - a macro to identify records in a data set that have the same key variables by John Iwaniszek
TIP00365 - Way to extract unknown number of tables (table name starting with CH_) from an SQL Server database
by Ron Fehd
Quick Online Tutorial for Accessing DBMS Data
Don't forget about this little online tutorial that illustrates the
basics of using SAS/ACCESS software to read, write and update data in third-party
database management systems. You'll learn how to reference a Database
Management System (DBMS) as a SAS library, use DBMS objects (such as
tables) as data sets in your SAS programs, and send DBMS-specific SQL statements
directly to a DBMS to save processing time. It's free, it's fun, try it out!
Read more at http://support.sas.com/training/elearn/tutorials/v8/access/
SAS Bits & Bytes: No Reason to Do It Twice
Wouldn't it be great if you could tell SAS to load the data set into
memory once, and hold it there until you were done with it? This month, guest
columnists Bill Brideson and Gary Franklin show you how to save time
and resources using the SASFILE statement (Release 8.1 and later).
Read more at http://support.sas.com/sassamples/bitsandbytes/03mar_sasfile.html
TIP00364 - Reading a Group of Multiple Records that represent 1 OBS by Charles Patridge
Quick Tip: Using a Colon Modifier to Select Observations
If you need a quick way to subset observations that begin with a specific character, consider using a colon modifier.
In this Quick Tip, SAS consultant Kirk Lafler explains that by using a colon (:) modifier after a comparison operator
in a DATA step, you can easily compare a specific prefix to a character string. This approach makes it easy to
perform comparisons by truncating the longer value to the length of the shorter value.
Read more at
http://support.sas.com/sassamples/quicktips/0302colonmodifier.html
Proactive Information Delivery via the SAS Publishing Framework
This detailed SAS white paper provides an overview of the SAS Publishing
Framework with plenty of practical code examples that show how your organization
can deliver information to a targeted audience and also enable employees to
filter out information that is of no interest to them. We use the publishing
framework and SAS Integration Technologies to deliver this e-newsletter.
See how we do it!
Read more at
http://www.sas.com/apps/whitepapers/whitepaper.jsp?code=PUB1
Tracing Your Data's Genealogy
Generation Data Sets and The COMPARE Procedure
Click here to read more at http://support.sas.com/sassamples/bitsandbytes/0211_tracing.html
TIP00363 - Comparing SAS Variables between like Datasets by Glenn Heagerty,
Curt Seeliger and Venky Chakravarthy
Additional resources and documentation are available at:
SAS online library http://support.sas.com/documentation
Books By Users (BBU) library http://www.sas.com/apps/pubscat/bbu.jsp
SAS Publishing http://support.sas.com/pubs
SN-009256: Example of using X and SYSEXEC to open an application
SAS is often used as a means for invoking another application. This task can be achieved by the X or
SYSEXEC statements. With the introduction of directories containing spaces, the syntax for this command
is often difficult to master.
http://support.sas.com/techsup/unotes/SN/009/009256.html
SN-002555 Short filename extensions versus long filename extensions
The SAS System Version 8 produces two different filename
extensions. The reason two different filename extensions are generated
is dependent on the different types of file systems. NTFS allows long
filename extensions, while FAT and older Novell drives do not.
http://support.sas.com/techsup/unotes/SN/002/002555.html
TIP00362 - Using the SQL procedure to summarize data by Kirk Paul Lafler
TIP00361 - Reading a SAS data set into real memory by Kirk Paul Lafler
TIP00360 - Comma Delimited Field Parsing on a SAS Variable by Peter Crawford and Michael Zdeb
TIP00359 - Using a Colon (:) Modifier to Select Observations with Values Beginning with a Specific Character by Kirk Paul Lafler
SAS Tip: Debugging 101 by Peter Knapp
Peter Knapp, a SAS user at the U.S. Department of Commerce, wrote this paper especially for new SAS users who are learning to
debug SAS programs. It offers tips for finding syntax and execution-time errors and diagnosing sometimes tricky logic
errors. (.pdf)
Read more at
http://support.sas.com/sassamples/papers/debug101_03jan.pdf
SAS FAQ: How can I transpose all of the variables in my data set, both numeric and character?
Without a VAR statement, the TRANSPOSE procedure transposes all numeric variables in the input data set that are not
listed in another statement. However, character variables to be transposed must be listed in a VAR statement. This can be
promblematic if you have many character variables (or even one character variable along with numerous numeric variables)
that you need to transpose, and you don't want to type out what could become a lengthy VAR statement. A macro from S
AS Technical Support can help.
Read more at
http://support.sas.com/faq/020/FAQ02055.html
TIP00358 - How to automatically include SAS source code in your output by Ed Heaton
New Technical Support Document: PC Performance and the SAS System
Casey Thompson in SAS Technical Support says that one of the most common questions the PC Systems team
receives is how to optimize SAS performance on Windows operating systems. This new paper explores a broad
overview of hardware tuning, operating system modifications, SAS System performance enhancements and methods
of efficient programming for achieving optimal performance on your Windows operating system.
Read more at
http://ftp.sas.com/techsup/download/technote/ts684/ts684.html
Quick Tip: Changing the Numeric Format of PROC FREQ Output
Thanks to Mike Rhoads, an experienced SAS user at the Westat organization for this Quick Tip!
He says though PROC TABULATE may offer more flexibility, some folks still like to use PROC FREQ
for table production. By default, PROC FREQ output uses no decimal places or commas for counts, and
two decimal places for percents. This tip shows how to change the defaults for the three main types of
PROC FREQ output: one-way tables, multiway tables in list format, and multiway tables presented as crosstabulations.
Read more at
http://support.sas.com/sassamples/quicktips/0301freq.html
TIP00357 - How to find 1st, 2nd, 3rd, 4th and 5th Wednesday of a month by Charles Patridge and Brad Goldman
TIP00356 - How to Search for a specific record using SAS LIKE and CONTAIN operators -
by John J Genzano, III ; Sigurd Hermansen and Charles Patridge
The Dirty Dozen: Twelve Common Programming Mistakes
Robert Virgile, a seasoned SAS user since 1981, is a SAS trainer,
consultant and author. With two books published in the SAS Books by Users program,
he has also authored countless papers and presentations on various aspects of
using SAS. In this paper (from the Washington DC SAS Users Group Web site),
he offers tips for avoiding some of the most typical programming errors made at
an introductory level. (.pdf)
Read more at http://www.dc-sug.org/dirtydoz.pdf
SAS© V9 Templates by Ronald J. Fehd
Bits & Bytes: Tracing Your Data's Genealogy with Generation Data Sets and PROC
COMPARE
In previous columns, Melinda Thielbar has looked at preserving data quality
using integrity constraints and tracking changes in your data using audit
trails. These techniques only work, however, when someone is updating the data
set, not re-building it. If the data set is rebuilt, existing integrity
constraints or audit trails are deleted. So, what to do if you're re-creating
the data set often but still need to track the changes? This is a call for
generation data sets.
Read more at
http://www.sas.com/service/techtips/bitsandbytes/0211_tracing.html
TIP00355 - How can I determine the number of variables in a data set? by SAS Institute Technical Support
TIP00354 - SASTip: Exporting data to EXCEL by Philip Mason
TIP00353 - How can I find out, which datasets in a library have 0 Obs and delete them...?
by Gerhard Hellriegel
New Sample: Transferring Data Between SAS and Microsoft Products
This new sample in our Enterprise Integration Community demonstrates how
to use Visual Basic Script and the SAS Integrated Object Model (IOM) OLE DB
Data Provider to import and export data between a SAS data set and Microsoft
Access and Excel.
Read more at http://www.sas.com/rnd/eai/samples/VBoffice/
TIP00352 - simple character string parsing problem - manipulating END of string -
Multiple Solutions by Roger Lustig, Venky Chakravarthy and Ed Heaton
TIP00351 - Obtaining the various parts of Date and Time by Ron Fehd
TIP00350 - SAS Problem simulates Deal of 52 Playing Cards by Richard A. DeVenezia
A Practical Approach to Improving System Performance
Many factors contribute to the performance of your SAS applications, including
the code, data models, process design, and hardware and network architectures
and configurations. How do you diagnose performance problems and determine
effective solutions? This paper, by SAS' Tony Brown, suggests a step-by-step
method that uses measurement tools for diagnosing problems and improving
system performance.
Read more at
http://www.sas.com/rnd/scalability/papers/solve_perf.pdf
Extensive FAQ for the Base SAS TEMPLATE Procedure
Whether it is changing the colors, fonts, margins, or other elements, there
will come a time when you will want to alter the appearance of the HTML output
you produce with the Output Delivery System. The TEMPLATE procedure can help.
This extensive FAQ provides an overview of PROC TEMPLATE and what it can help
you accomplish.
Read more at
http://www.sas.com/rnd/base/topics/templateFAQ/Template.html
How to run SAS in batch on PC systems with complex directory structures
Files might not be found and "Not a valid option" and other error
messages might appear when you run SAS in a batch environment or when
you use the task scheduler and other tools.
The problem occurs when directory structures have spaces in them.
Directory paths with spaces must be enclosed in double quotation
marks, as follows:
'c:\"program files"\"sas institute"\sas\v8\sas.exe' -sysin 'c:\"my files"\"my sas data"'
If you want to run jobs sequentially, use the following syntax
start/w " " 'c:\"program files"\"sas institute"\sas\v8\sas.exe'
-sysin 'c:\"my files"\"my sas data"'
http://www.sas.com/service/techsup/unotes/SN/008/008706.html
TIP00349 - Figuring nearness between points on an ongoing basis by Michael Zdeb
TIP00348 - How to determine the Last Friday of a Month by Roland Rashleigh-Berry
SAS Q&A: How can I dynamically e-mail HTML output from ODS in a SAS program?
To dynamically e-mail output from ODS in a SAS program, specify the
EMAIL device on the FILENAME statement along with the e-mail address and any
other e-mail options you like. But as SAS Technical Support Analyst Chevell
Parker explains, if you don't change the TYPE= option on the FILENAME statement
your output will display as a text file with the HTML tags as text. This Q&A
includes sample code for changing the content to HTML, and also shows
how to send the HTML output as an attachment.
Read more at
http://www.sas.com/service/techtips/ts_qa/0210_htmloutput.html
SAS Q&A: Why do I keep getting missing variables?
This Q&A comes to us compliments of the Research Triangle Park SAS Users
Group listserv. Keith Brown from the University of North Carolina at Chapel
Hill offered some helpful hints on using the TRUNCOVER option instead of
MISSOVER. As he says, "If you are dealing with variable length data lines,
TRUNCOVER can save you a lot of hair pulling."
Read more at
http://www.sas.com/service/techtips/ts_qa/0210_missvariable.html
TIP00347 - Creating a Calendar using Proc Report by Richard A. DeVenezia
SAS Q&A: Is there an easy way to create maps with tool tips using the GIF device driver?
This short sample code uses the HTMLVAR= option on the CHORO statement in the
SAS/GRAPH GMAP procedure to create a graph with tool tips and drill-down
capabilities using the GIF device driver. All you have to do is modify the FILENAME statement.
Read more at
http://www.sas.com/service/techtips/ts_qa/0210_maptips.html
List of SAS Auto Extensions (Macros) - SAS Clinical Macros
by Roland Rashleigh-Berry or get his zipped file here at Click Here
TIP00346 - Counting number of characters (numbers) in a character string
by Venky Chakravarthy and Jim Groeneveld
TIP00345 - A Simple Example to search a Char SAS Variable to see if it contains several different strings/phrases by Charles Patridge
TIP00344 - A Simple Macro (emptyyn) to get Number of Records (OBS) in a SAS Dataset by Charles Patridge
or, Instead of getting the number of records by Peter Crawford
SAS FAQ: Some procedure results are arranged or formatted differently than the
documentation or than they used to be. How can I fix that?
This may be happening because the procedure is using a modified template to
display its results. A template is part of the Output Delivery System (ODS) and
it defines the appearance of tables in the procedure's results.
Read more at
http://www.sas.com/service/techsup/faq/gen_sas/gen_sas2003.html
TIP00343 - A Simple Macro Example to generate any number of SAS variables on a single GPLOT Line Graph by Charles Patridge
Access and Manipulate SAS Data from Other Programs Using ADO Objects
This sample from our Enterprise Integration Community provides the code
and step-by-step instructions for using ADO objects to communicate with a
SAS IOM Server. It illustrates how a program that is not a SAS application can
access and manipulate data on a local SAS server.
This sample uses ADO object to communicate with a SAS IOM Server. It illustrates
how a program that is not a SAS application can access and manipulate data on a
local SAS server. The program creates a SAS workspace (session) and then submits
a SAS DATA step to create a SAS data set. The program then modifies the data using
an ADO Recordset. The resulting data set displays in a MSFlexGrid control
Read more at http://www.sas.com/rnd/eai/samples/adoiom/index.html
Bits & Bytes: Hey, Who Changed My Data? Audit Trails in SAS
With Version 8, SAS added integrity constraints and audit trails. While
integrity constraints are useful for reducing invalid data, audit trails
allow you to see what changes your users are making (or attempting to make)
to data.
They can also prevent you from losing valuable information when
observations are deleted or updated. Columnist Melinda Thielbar demonstrates the
features of SAS audit trails with examples of how to use them for data
exploration and reporting.
Read more at
http://www.sas.com/service/techtips/bitsandbytes/0208_audit.html
TIP00342 Vehicle Identification Number (VIN) - Meaning/Intrepretation - Web Resources by William W. Viergever
TIP00341 - SAS V8 Treasures - An Example of using Multilabel Option in Proc Format SAS V8.2 to
generate multi-level summaries/statistics
- by Charles Patridge (HASUG 8/15/2002)
TIP00340 - SAS V8 Sunken Treasure (GOTCHAs) - MERGE, SET, UPDATE, RETAIN
- by Charles Patridge (HASUG 8/15/2002)
TIP00339 - SAS V8 Sunken Treasure (GOTCHAs) - Proc Transpose or Proc Contents
- by Charles Patridge (HASUG 8/15/2002)
TIP00338 - SAS V8 Sunken Treasure (GOTCHAs) - Using AutoCall Macro Libraries and changing Paths
- by Charles Patridge (HASUG 8/15/2002)
TIP00337 - SAS V8 Sunken Treasure (GOTCHAs) - SAS V8 changes how data is Stored in Datasets
- by Charles Patridge (HASUG 8/15/2002)
SN-007990
DOS find command might not work as an X command or %sysexec call
http://www.sas.com/service/techsup/unotes/SN/007/007990.html
SN-001373
SAS/Access Version 6 incompatibility issues (RANDOM access)
with SAS V7 and V8
http://www.sas.com/service/techsup/unotes/SN/001/001373.html
SN-004021 TRANSPOSE fails when output data set becomes too wide
When PROC TRANSPOSE is used on a SAS data set whose transposition would
result in an output data set greater than 32,767 variables, the
following error occurs.
ERROR: A bug in SAS has been encountered. Please call your SAS
representative and report the following message:
ZVMPINI: couldn't allocate -xxx (xmsize)
(where xxx is a number)
Since SAS data sets cannot contain more than 32,767 variables, the data
set being transposed needs to be limited with OBS or WHERE processing or
the code logic needs to be reconsidered.
Quick Tip: Avoiding Problems Related to Sorting
By Kirk Paul Lafler, Software Intelligence Corporation
http://support.sas.com/sassamples/quicktips/0207sort.html
Quick Tip: Using ODS Output Data Sets instead of CONTENTS OUT=
By SAS Institute
http://support.sas.com/sassamples/quicktips/0206contents.html
TIP00336 - How to close the Output window by using a display manager (dm) command by SAS Institute
TIP00335 - Tutorial: Using DDE to collate a number of RTF-files and/or Word documents
by Kilo Volt
A Sorting Tip by Kirk Lafler
Building Drill-down SAS Applications by Kirk Lafler
Andy Ratcliffe publishes an email newsletter for SAS(r) practitioners. It is called NOTE:, and it contains hints, tips,
and experience that are of interest to a wide range of SAS practitioners. NOTE: is published on an irregular basis
and is free. Note: can be read at
http://www.ratcliffe.co.uk/note_colon
TIP00334 - Automate Running of a SAS Program on Windows NT by Richard Simhon
SN-006850
DEBUG=DBMS_SELECT returns the SELECT clause passed to a relational DBMS
http://www.sas.com/service/techsup/unotes/SN/006/006850.html
SN-007384 Using a colon (:) with comparison operators
http://www.sas.com/service/techsup/unotes/SN/007/007384.html
SN-007640 - How to determine which SAS products are installed on a Windows system
http://www.sas.com/service/techsup/unotes/SN/007/007640.html
An Introduction to Exporting SAS/GRAPH Output to Microsoft Office
This SAS Technical Support document includes in-depth information about
the different graphics formats and destinations you can use to export
Release 8.2 SAS/GRAPH output to Microsoft Office 97, 2000 and XP. General topics
are discussed, and each available format is examined individually. Several
examples show how to generate the output.
Read more at
http://ftp.sas.com/techsup/download/technote/ts674/ts674.html
SAS Q&A: Why do some of my values get truncated when I read in a delimited file?
In Versions 7 and 8 of the SAS System, by default the Import Wizard, the IMPORT procedure
and the External File Interface (EFI) scan 20 records to determine variable attributes. If you have
a value that is longer than those found in the first 20 records of your file, that value will be truncated.
Follow these steps from SAS Technical Support to change the default behavior.
Read more at
http://www.sas.com/service/techsup/faq/data_step/readwrit1819.html
SN-007347 - How to programmatically open a file in a new Enhanced Editor
http://www.sas.com/service/techsup/unotes/SN/007/007347.html
Tipped Off: Bookmarks in Your PDF File
With ODS HTML output, you can generate a table of contents to help you locate
the results you're looking for in a lengthy report. With ODS PDF output, you
also get a table of contents. The PDF format supports the creation of
bookmarks, which are displayed in a window to the left of the main PDF file. By
clicking on a bookmark, you can jump directly to the correct output page. This
little ditty from Lauren Haworth's book, "Output Delivery System: The Basics,"
demonstrates how easy it is. (.pdf)
Read more at
http://www.sas.com/service/doc/pdf/58087_pg80.pdf
SAS Bits & Bytes: Practicing Good Data Hygiene
Manually entering or editing data without using audit checks is certain to
introduce data errors. In this Bits & Bytes column, Melinda Thielbar discusses
adding integrity constraints that allow you to set rules about what values are
entered in a field and what conditions an observation must meet to be added to
a data set.
Read more at
http://www.sas.com/service/techtips/bitsandbytes/datahygiene.html
SAS/IntrNet Software: A Roadmap
SAS/IntrNet software lets you quickly and easily build dynamic Web applications
and distribute them worldwide. This white paper provides an overview of
SAS/IntrNet with guidelines for choosing the best combination of components
for your applications. Access this paper from our White Paper download area.
(.pdf)
Read more at
http://www.sas.com/apps/whitepapers/whitepaper.jsp
Is there a way to create a separate macro variable for each value of a string?
http://www.sas.com/service/techsup/faq/macro/macro1812.html
Quick Tip: Building Drill-Down SAS Applications
By Kirk Paul Lafler & Charles Edwin Shipp
http://support.sas.com/sassamples/quicktips/drilldown.html
SN-006806 - How to submit multiple SAS programs, in batch or interactively by SAS Institute
http://www.sas.com/service/techsup/unotes/SN/006/006806.html
TIP00333 - Proc Access (Full Screen Product) - Convert V6.12 Oracle Views to V8.2 Oracle
Views with minimum effort in OpenVMS environment by Charles Patridge
TIP00332 - Scanning and Counting Words in a String by Ian Whitlock
and Charles Patridge
Tipped Off: Selecting Output for Multiple Procedures
If you are running a series of models or tables, keeping the output from
all your procedures can become an unwieldy task. This brief selection from
Lauren Haworth's popular book, "Output Delivery System: The Basics," shows how
to use SELECT or EXCLUDE within ODS to build concise summary reports from your
output results. (.pdf)
Read more at
http://www.sas.com/service/doc/pdf/58087_pg128.pdf
Quick Tip: Calculating Age in Years and Days
We recently ran a tip titled, "Two New SAS Data Functions for Version 8"
that explained how to find the number of years between two dates using the
YRDIF function. The following tip from Venky Chakravarthy, a frequent
contributor to the SAS-L listserv, builds on that idea and explains how to calculate
the number of years and days between any two dates using the DATDIF
function.
Read more at
http://support.sas.com/sassamples/quicktips/age_0302.html
TIP00331 - Scan function and delimiter issues by Paul Dorfman and Peter Crawford
TIP00330 - Significant Digits, Numeric 101 by SAS Institute
TIP00329 - Issues and comments about moving SAS production code from V6 to V8 by
Quentin McMullen, Arthur Tabachneck, F.J. Kelley, Venky, Dennis Diskin, Charles Patridge
Reading Delimited Text Files into SAS
Delimited files are raw data files that use characters such as commas,
vertical pipes and semi-colons to separate data values. This note from
SAS Technical Support explains some of the newer options available for
reading these files into SAS, as well as demonstrating the use of older
options that are still helpful.
Read more at
http://ftp.sas.com/techsup/download/technote/ts673.html
SAS Q&A: How Can I Determine if a Variable is Present Within a Data Set?
There are several DATA step functions that can be used in conjunction
with the %SYSFUNC macro function to determine if a variable exists in a SAS dataset.
Read more at
http://www.sas.com/service/techsup/faq/macro/macro1806.html
006964 How to print line numbers with your SAS program
SN
http://www.sas.com/service/techsup/unotes/SN/006/006964.html
000721 How to run SAS V7 and V8 with DMS mode (V6 style) in the windows environment
SN
http://www.sas.com/service/techsup/unotes/SN/000/000721.html
TIP00328 - Equally and unequally spaced Orthogonal polynomial contrasts using PROC REG of SAS/STAT by Winston Groenewald
David Ward posted this most excellent method to generate .csv files from a SAS dataset:
dm "dexport library.dataset 'c:path-to-my-file.csv' replace";
SAS Version 8 Technical Note: Short filename extensions versus long filename extensions
http://www.sas.com/service/techsup/unotes/SN/002/002555.html
How do I make the SAS Explorer window look like the Windows Explorer window?
Read SI's technical note on how to do this
http://www.sas.com/service/techsup/unotes/SN/006/006939.html
TIP00327 - How to replace a string in a file using SAS code by Don Stanley
TIP00326 - How to convert a Vsam file to a SAS dataset by Michael A. Raithel
TIP00325 - Example of using ODS MARKUP and TAGSET (release 8.2 is required) by Victor Bos
TIP00324 - Convert a Macro Parameter List into Observations by Paul Dorfman, Pete Lund and
Charles Patridge
SAS Q&A: Using ODS to Produce HTML Pages that Support 508 Accessibility Requirements
The U.S. Federal Workforce Investment Act of 1998 amended Section 508 of
the Rehabilitation Act of 1973 to ensure that federal employees with
disabilities have access to and use of information and data that is comparable to
the access and use of information by other federal employees. Here are some tips for
using SAS Output Delivery System (ODS) to produce more accessible HTML pages that
support Section 508 compliance.
Read more at
http://www.sas.com/service/techtips/ts_qa/ods508.html
Quick Tip: Executing Your Stored Formats at Start-Up
Independent SAS Consultant Peter Crawford from the UK recently sent this
tip for using base SAS: "It is a convenience I use in my SAS autoexec(s) and application
startup routines when I have formats in a permanent
catalog."
Read more at
http://support.sas.com/sassamples/quicktips/startup.html
TIP00323 - How to find out how many title lines are printed by Ron Fehd
TIP00322 - How to read all datasets in a library by using a wildcard by Jack Hamilton
TIP00321 - Retrieve the Path Name of the Last Fileref Opened under SAS Version 8.x by: Rob Krajcik
SAS Q&A: How Can I Permanently Store and Use Formats That I Have Created?
SAS formats and informats are powerful tools for transforming data values. For
example, the WORDS22. format converts numeric values to the word equivalent -
writing the numeric value 692 as six hundred ninety-two. SAS provides a wide
variety of informats and formats, and of course you can also define your own.
This quick tip from SAS Technical Support shows how to permanently store and
use the formats you create.
Read more at http://www.sas.com/service/techsup/faq/base/format1816.html
TIP00320 - SAS Efficiencies by Nick Warman, Ian Whitlock, Charles Patridge, Heide Tribius,
Larry Bertolini and Paul M. Dorfman
TIP00319 - Combining Input Records by Charles Patridge
I have a raw data file like (see sample below).
The records are variable length. I want to
join records 1 and 2, 3 and 4, 5 & 6 etc. to
give me a record with both the start and end times in it.
2000/04/01 22:51:00 - gi37pd20.8775: STARTING
2000/04/02 01:23:12 - gi37pd20.8775: ABENDED!!
2000/04/03 23:03:45 - gi37pd20.7832: STARTING
2000/04/04 01:59:33 - gi37pd20.7832: ENDED OK.
2000/04/04 22:54:36 - gi37pd20.27211: STARTING
2000/04/05 00:17:06 - gi37pd20.27211: ENDED OK.
2000/04/05 22:52:29 - gi37pd20.7224: STARTING
2000/04/05 23:23:21 - gi37pd20.7224: ENDED OK.
SN-006575
How to read HTML tables into the SAS System
The following code can be used to import HTML tables into the SAS system. It uses DDE and the IMPORT procedure to read the HTML table and is limited to 65,000 rows.
http://www.sas.com/service/techsup/unotes/SN/006/006575.html
Technical Tip: SAS Dates, Times and Interval Functions
One of the questions most frequently asked of SAS Technical Support
regards counting weekdays within a period of time. This SAS Technical
Support Note discusses how SAS measures and uses time and time intervals.
For instance, finding the last day of a particular month can seem troublesome,
but really it is not difficult to do. The note shows how to answer this and
other date and time interval questions.
Read more at
http://ftp.sas.com/techsup/download/technote/ts668.html
SAS Technical Support Sample
Got capital letters where you need word spaces - LikeThisText? This
sample shows how to use the RXPARSE function and the RXCHANGE call routine to
insert word spaces and specify how many replacements to make. As this sample
notes, overestimating the number of replacements needed can result in decreased
performance.
Read more at
http://ftp.sas.com/techsup/download/sample/datastep/insert.html
New Free Online Tutorial for SAS/ACCESS Software
A new online tutorial illustrates the basics of using SAS/ACCESS
interfaces to read, write and update data in third-party database management systems.
In about an hour, you learn how to reference a DBMS as a SAS library, use
DBMS objects (such as tables) as data sets in your SAS programs, and use the
SQL Procedure Pass-Through Facility to send DBMS-specific SQL statements
directly to a DBMS to save processing time.
Read more at
http://www.sas.com/software/tutorialsv8/access/m0_1.htm
TIP00318 - Internet and E-mail Abbreviations by William W. Viergever
TIP00317 - How to code such a statement as If var starts with ('Mc' 'Mac') then ... by
Greg M. Woolridge, Curt Seeliger, Gregg P. Snell & Jack Hamilton
TIP00316 - an easy way to determine whether a variable already formatted as Time8. (14:30:10) is in the AM or PM?
by Peter Crawford and Dennis Diskin
TIP00315 - Parse Date/Time Text Field by Venky Chakravarthy
SAS Q&A: Creating and Referencing Arrays with More Than Two Dimensions
In DATA step programming, you often need to perform the same action on more
than one variable. And although variables can be processed individually, it is
easier to handle them as a group. You can do this using array processing. This
short Q&A from SAS Technical Support addresses how to create and reference
arrays with more than two dimensions.
Read more at http://www.sas.com/service/techtips/ts_qa/arrays_dec01.html
TIP00314 - Simple program scheduler using a SAS macro by Philip Mason
TIP00313 - The EUROCURR function converts one European currency
to another and returns a value - Mostly cut & pasted from SASDoc by Philip Mason
Quick Tip: %SQUEEZE-ing Before Compressing Data
SAS data compression techniques can optimize the space required to contain a
SAS data set. Minimizing the length of integer numeric variables in a data set
can save additional space. This tip discusses some appropriate uses of
compression and length reduction, and describes the use of the %SQUEEZE macro
to find minimum variable lengths.
Read more at
http://support.sas.com/sassamples/quicktips/squeeze.html
TIP00312 - Using the PIPE Engine, an example of getting a list of file names from your PC directory
saved to a SAS Dataset by Charles Patridge and Peter Crawford and 2nd solution by Michael A. Raithel
TIP00311 - Convert Phone Numbers to Corresponding Combinations of Letters by Ya Huang and Paul Dorfman
TIP00311b
/*********************************************************/
/*** TIP 00311b ***/
/*** Using Tip00128a ,Proc Spell, find all combination***/
/*** of letters that compose a valid word composed ***/
/*** of 3 or 4 letters from a phone number. ***/
/*** ***/
/*** This is a FUN exercise not a real application ***/
/*********************************************************/
Bits and Bytes: Transposing a Data Set
There are two ways to transpose a data set. You can use a DATA step, or you can
use the TRANSPOSE procedure. The DATA step gives you more control and
flexibility. The code for PROC TRANSPOSE is easier to write. You should choose
your method based on your SAS skills, the data you're working with, and your
desired output. In this Bits and Bytes column, author and SAS instructor
Melinda Thielbar provides a detailed description and comparison of both methods
so you can decide which one best suits your needs.
Read more at
http://www.sas.com/service/techtips/bitsandbytes/transpose.html
SAS Q&A: Creating Multiple Output Files in the Same ODS Destination
This coding tidbit shows how easy it is to concurrently open multiple files in
the same Output Delivery System (ODS) destination simply by assigning an ID to
the ODS destination.
Read more at
http://www.sas.com/service/techtips/ts_qa/multifiles.html
TIP00310 - A way to COMPRESS Special Characters Out of a Character Variable by Paul Dorfman
TIP00128a - Cleansing Macro, Data Scrubbing routine (see tip 00128 for more), just one schema technique by Charles Patridge
TIP00309 - Some new Features in SAS V8.2 for Proc Format, Means/Summary by Charles Patridge
TIP00308 - Building a Custom Date Time User Defined Format with SAS V8 by Peter Crawford
TIP00307 - Change in Macro Variable Scoping in V8 by Don Stanley and Ian Whitlock
SAS Version 8
How do you open the Results window?
How do you clear the Results window?
How do you close the Results window?
Click to find out
http://www.sas.com/service/techsup/unotes/SN/004/004159.html
TIP00306 - Using SAS Institute Technical Support Division's Information Warehouse Mail Server (IW Mail Server) by Peter Crawford
TIP00305 - SAS, Music and HTML - build a hyperlink web page for listing files in a directory by Charles Patridge
TIP00304 - Reading a csv file with commas in fields by Charles Patridge and Peter Crawford
Most SAS programmers have their favorite little macros. Here are a couple from
Peter Crawford and Andrew Ratcliffe, independent SAS consultants in the UK.
Crawford creates a current time stamp, and Ratcliffe uses Display Manager
commands to copy text files.
Read more at http://support.sas.com/sassamples/quicktips/ukmacros.html
TIP00303 - OpenVMS, SAS, File Version Maximum and Lock File by Charles Patridge
TIP00302 - Techniques to Breakup, Subset or Divide a Larger SAS Dataset into smaller SAS
datasets by the values of a SAS variable by Dennis Diskin, Rob Workman and Charles Patridge
Do you know how to use value ranges to develop SAS/GRAPH charts?
Take a look at author Thomas Miron's solution from "The How-To Book for SAS/GRAPH Software."
Read more at
http://www.sas.com/service/doc/pdf/55203_ch16pg95.pdf
"SAS Programming by Example," Ron Cody and Ray Pass explain
why using the LENGTH statement with the SUBSTR function is a good idea.
Read more at
http://www.sas.com/service/doc/pdf/55126_ch5ex8.pdf
http://www.twinsun.com/tz/tz-link.htmTime Zone Information submitted by David Ward
TIP00301 - A technique to Extract, Subdivide, Subset or breakup a Large SAS Dataset
into smaller evenly divided SAS datasets by David Ward and Bill Österlund
TIP00300 - Finding the LAST Occurence of a Character in a Character String by David Ward
TIP00299 - Condensing/Collapsing/Mapping Data from a specific value to a range of values by Ya Huang and Paul Dorfman
TIP00298 - Check Digits SAS Routine by Ron Fehd
TIP00297 - How to check to see if a specific SAS variable has
consistent attributes across all SAS datasets within a SAS library using SASHELP.VCOLUMN
by Charles Patridge
TIP00296 - How to read Multiple Data Lines for 1 Record (OBS)
by Paul Dorfman and B. Rogers
Quick Tip: SAS Reports in Your PC Worksheet EASY AS PIE!
By David Beam, Steve First and Katie Minton-Ronk, Systems Seminar Consultants
http://support.sas.com/sassamples/quicktips/pcwrksheet.html
Sample of how to do a VENN Diagram in SAS Graph (submitted by Ya Huang - ya.huang@agouron.com)
http://ftp.sas.com/techsup/download/sample/graph/other-venn.html
Delete User-Defined Macro Variables from Your Global Symbol Table
When a macro variable is created, it is added to a macro symbol table. A new
SAS 8.2 macro function lets you easily delete user-defined macro variables from
your Global Symbol Table.
Read more at http://www.sas.com/service/techtips/ts_qa/globalsymbol.html
TIP00295 - How to write Excel functions using SAS code by Koen Vyverman
TIP00294 - here are 3 examples of how to quickly access Oracle tables from SAS version 8 by Travis Jarrell
TIP00293 - Need varying number of macro arguments? by Mark Terjeson
TIP00292 - How to write a trademark sign using SAS?
Or, how to determine the Character Set on a specific Platform by Jeff Voeller
Interpreting DATA Step Messages for Raw Data Files
Our July 10 Technical Tip covered some of the intricacies of using the INFILE
and INPUT statements with the DATA step to read raw data into SAS. The
flexibility of the INPUT statement can, however, make it tricky to debug. This
week, Bits and Bytes columnist Melinda Thielbar focuses further on how SAS
reads raw data. She discusses some common symptoms of logic errors on the
INPUT statement and how you can deal with them.
Read more at
http://www.sas.com/service/techtips/bitsandbytes/bbinfile.html
Numeric Precision 101
This paper from SAS Technical Support is intended as a basic introduction to
numeric precision. Maybe you're just beginning to program with SAS or maybe
it's been a long time since you studied number theory. This paper provides an
overview of numeric precision and representation issues within SAS applications.
Read more at
http://ftp.sas.com/techsup/download/technote/ts654.html
TIP00291 - Get Zipcode from State Code by Charles Patridge
TIP00290 - HTML Email in SAS V 8.2 by Simon Pickles
TIP00288 - Character Pattern Matching by Greg Snell, Dennis Diskin and Richard DeVenezia
TIP00287 - Writing Catalog Content to an External File with PROC BUILD By SAS Institute Inc
TIP00286 - Quick Tip: Making Sense of the INFILE and INPUT Statements or MISSOVER, TRUNCOVER, and PAD, OH MY! By Randall Cates, SAS Technical Training Specialist
TIP00285 - How to Read A Report File as Input to a SAS Program by Bob Burnham
TIP00284 - N% (N Percent) Sample Size of a SQl SubQuery by Mark Terjeson
TIP00283 - Count # of occurrences of a character string within a character string by
Heide Tribius and Paul Dorfman
TIP00282 - Some information about Social Security Numbers (SSN) by Mark Terjeson
TIP00281 - How can I change a specific part of a string which contain the same words more than once by Charles Patridge
TIP00280 - How can I pass a value to a macro variable at execution time by Etienne Marot, Richard DeVenezia and Jack Shoemaker
TIP00279 - Print 1, a couple, or a hold directory of SAS programs by Jules Bosch, alternate solution for Alpha OpenVMS platform by Charles Patridge
TIP00278 - Good Notes and Bad Notes: Interpreting SAS Log Messages by Bits & Bytes columnist Melinda Thielbar of SAS Institute Inc.
TIP00277 - Parsing First Name, Middle Initial, Last Name and Suffix from a Character String by Jim Brittain
TIP00276 - Illustrate fuzzy linkage/matching using a highly simplified scoring method by Sigurd Hermansen
TIP00275 - Count number of items in the value of a macro variable by Paul Dorfman
TIP00274 - How to read a CSV with variable number of columns (fields) by Charles Patridge and Ian Whitlock
TIP00273 - SAS macros as an aid to predictive modelling / datamining by Clemens van Brunschot
TIP00271 - Attaching Meaningful Labels to Transposed Data by Neale Parsons
TIP00270 - Compress Function Routine for Macro Variables by Peter Crawford
TIP00269 - The first new Census data in 10 years is now available submitted by Jay Wolfkind
TIP00267 - Sample of the SAS CONSIG Salary/Rate Survey data by Charles Patridge
TIP00266 - How to force a Page Break within an HTML document by Darryl Lawrence
TIP00264 - How to Parameterize Your SAS Program presented at DCSUG June 13, 2000 (WORD Document)
TIP00261 - This macro converts any numeric SAS variable that has a missing value to a ZERO
by Ian Whitlock
TIP00260 - On-Line SAS Video Training Tutorials by Charles Patridge
TIP00257 - How to calculate the number of days in a given month by Pete Lund and Mason Burley
TIP00256 - "fuzzy" matching for cases like this where
there are common fields, but not necessary exact matches within the field by Karsten Self
TIP00255 - Fuzzy / Linking Merge on SSN which may be incomplete contributed by Howard Schreier
TIP00254 - How to read a file where variables are split/wrap across records by David Ward
TIP00253 - SAS Tips, Papers, and Articles on David Johnson's Website
TIP00252 - Inspecting the values of a macro variable by David Johnson and Peter Crawford
TIP00251 - Add +/- (plus/minus) to output numbers by Don Henderson
TIP00250 - Fixing Title Case (Upcase and Lowcase) in Character Strings by SAS Training Specialist Melinda Thielbar
TIP00248 - SAS-L archives from February 2001 back to 1995 by David Ward (Thanks David)
TIP00246 - Finding a Numeric within a Character Variable by Dale McLerran
and Charles Patridge
TIP00245 - Some SAS Tips in French
TIP00243 - Calculating Percentages (getting totals for denominator) by Robert Abelson
TIP00242 - Find All OBS that are "closest" to a given OBS
by Andreas Grueninger and Paul Dorfman
TIP00241 - SAS can execute Excel macros using DDE by Brucken, Nancy
TIP00239 - These SAS macros were written locally and are maintained by Mayo Clinic Staff
TIP00238 - SUGI On-Line Proceedings by Curtis Smith
TIP00237 - Converting hundreds of directories from Version 6 to Version 8 submitted by
Meredith Clark
TIP00236 - Tips for OS/390 by SAS Institute Inc. Technical Support
TIP00235 - TS-644 Everything you want to know about MERGE but were afraid to ask by SAS Institute Inc. Technical Support
TIP00234 - HOW TO DIRECT/Create OUTPUT FILES BASED ON A VARIABLE IN DATASTEP? by Paul Dorfman
TIP00233 - Finding Lowest/Highest Scores Efficiently by Ludwig Boltzmann (also see tip00121)
TIP00232 - Setting the AutoScroll Value to Suppress Scrolling of Windows Makes your SAS jobs run faster in Display Manager by Jean-Louis Dubois, the Customer Support Manager in SAS' Belgium office
TIP00230 - Rounding Time to 15 minute intervals by Peter Lund
TIP00229 - Finding the number of matching IDs between multiple files -
two at a time (pair-wise) by Paul Dorfman and Shiling Zhang
TIP00228 - How to read a Flat File such as "TestData.txt" by Charles Patridge, Peter Crawford and Gunnar Keen
Contents of testdata.txt
q1=20&q2=100&q3=20
q1=50&q2=60&q3=45
q1=15&q2=6&q3=2
TIP00226 - merging two files and accumulate a numeric field at the same time by
Charles Patridge and Perry Bratis
TIP00225 - Date field formatted as DD-MON-YYYY (eg, 17-DEC-2000) in Version 8 posted by Paul Dorfman and authored by Mike Rhoads
TIP00224 - Some information about the SOUNDEX function and Algorithm by Charles Patridge
TIP00221 - SAS/Macro: adding quotes & commas to a passed list by Paul M. Dorfman and Charles Patridge
TIP00219 - Record Linkage Articles, Software and Related Information by Sigurd Hermansen and
Charles Patridge
TIP00218 - This page contains an index to the NBER collection of Census/BLS format
micro data files from the Current Population Survey by Jean Roth
TIP00204 - Extract City, State and Zipcode from a Character String by Charles Patridge, Ron Fehd, Ya Huang and Mike Zdeb
TIP00202 - Dynamic Table LookUp, Nested Formats, Linking, Binary / Indexed
/ Formatted Search by Paul Dorfman, Ian Whitlock,
Karsten Self, and Peter Crawford
Tip 00201 is similiar
TIP00201 - Linking, Hashing, Parent/Child, Genealogy type processing by
Paul Dorfman and Charles Patridge
Tip 00202 is similiar
TIP00197 - How to do sampling with Proc SQL by Anthony Kilili and Joe DeShon
TIP00196 - Ultra-Edit Tool Configuration for SAS by John Iwaniszek
TIP00187 - Macro to call Proc Freq once with numerous Table statements by Charles Patridge and Ron Fehd
TIP00171 - To put quote marks around elements of a list and separate them with a delimiter like a comma
by Roland Rashleigh-Berry and Paul Dorfman
TIP00163 - Checking for Valid Words in each OBS by Charles Patridge and Pete Lund
TIP00162 - Need to transfer hundreds of excel files to sas datasets. Is there any efficient way to do this instead
of one by one? (currently using dbmscopy) by Jack Hamilton, Steve Dubnoff, and Lynn Foster-Johnson
TIP00161 - Writing a flat file where the variable labels (if they exist) are
written as column headings. Otherwise the variable names are used. by Winston Groenewald
TIP00160 - Lagged Observations by Winston Groenewald
*| k |*;
*| Generating \- (n(i)*(n(i)-1) lagged observations from a SAS |*;
*| /- ______________ |*;
*| i=1 2 |*;
*| data set with n(i) observations in k by groups. |*;
*|--------------------------------------------------------------|*;
TIP00159 - List of SAS macros by Richard DeVenezia
TIP00158 - Finding character strings by Mark Terjeson, Ian Whitlock, and Jonathan Goldberg
TIP00157 - How to Reverse/Rename Variables by Harry Droogendyk and Peter Crawford
TIP00156 - Determine all zipcodes within (<=) X miles of a given zipcode and Distance is computed as 'spherical distance'
using the Haversine Formula by Richard A. DeVenezia (copyrighted)
TIP00155 - Manipulating Characters Strings - Reverse Words of a String by Charles Patridge and Laurie Fleming
TIP00154 - Quick Tip: Self Adjusting Date Formats by Marianne Whitlock
TIP00153 - ROUTINE FOR CRASHING A SAS JOB ONCE IT HAS STARTED by Neale Parsons
TIP00152 - Some web sites to help with international zip codes by Neale Parsons
TIP00151 - SAS Tips and AF Tools by Richard DeVenezia
TIP00150 - How to read a numeric field with a negative sign at the end of the number by Paul Dorfman and Louis Laproi
TIP00149 - Descriptions of probabilistic linking routines posted on SAS-L by Mike Zdeb
TIP00148 - Use the Metadata from 1 Dataset to populate the Metadata of another Dataset by Charles Patridge
TIP00147 - EXAMPLE OF A ROUTINE TO LIMIT A SAS PROGRAM RUN-TIME by NEALE PARSONS
TIP00146 - Dynamically Allocating SAS Datasets using Dynamic SAS Macro Variables by
Charles Patridge
TIP00145 - Convert External SAS programs to SOURCE entries into a SAS Catalog by
Charles Patridge
TIP00144 - Is there a way to make SAS print the current time and date
rather than the time and date when SAS was last started? by Robert Workman
TIP00143 - How to make all SAS variable labels equal to Blanks by Charles Patridge and
a more efficient solution by Robert Krajcik
TIP00142 - ROUTINE TO CALCULATE MEDIANS without Proc Univariate by Neale Parsons
TIP00141 - the time of sunrise and sunset and length of daylight printed for each day by William Kreuter and Patrice Bourdages
TIP00140 - CHECK to see if a Macro Var exists by Robert Krajcik
TIP00139 - Zip Code and County SAS Dataset Information by John Blodgett
TIP00138 - Getting First and Last Records of a SAS Dataset by Shiling Zhang
TIP00137 - Help! My NT Server is Too Slow by Wes Smith of SI
TIP00136 - I would like to generate nine variables from a nine length character string by
Fabrizio, Rob Workman and Paul Dorfman
TIP00134 -
Suppose I have the following dataset:
MyData:
ID Class grade
001 100 A
001 200 B
001 300 A
002 100 A
002 100 B
002 200 C
003 100 A
003 200 B
003 300 A
Right now, what I want to select is those who attended the
same class twice.Multiple Solutions by Mark Terjeson,
Sheryll Roberson, David Ward, and Dan Nordlund
TIP00133 - Convert V6 library to V8 by Robert P. Rohrbough
TIP00132 - Some nice tips and news letters from Systems SEMINAR CONSULTANTS, Inc.
TIP00131 - Read a SPEC file to read a flat file (working sample) by Charles Patridge
TIP00130 - A MACRO that can compute the exact number of YEARS, MONTHS & DAYS between two SAS-dates by
Jan Selchau-Hansen
TIP00129 - I would like to randomly select 600 obs from a dataset of 6000 obs by
Jan Selchau-Hansen, Shan, Lars Jacobsen
TIP00128 - Data Scrubbing Routines by Charles Patridge
TIP00127 - SAS to text macro - unique approach submitted by David Ward
TIP00126 - format for HTTP status codes by John Iwaniszek and David Ward
TIP00125 - I have the FIPS 5 character code, how do I get the county names? By John Blodgett and Phil Rack
TIP00124 - How do to a Many-to-Many Match Merge Using Proc SQL by Charles Patridge
and Multiple Solutions using Data Step by Paul Dorfman
TIP00123 - Where can I get the SAS Software and how much does it cost? by Charles Patridge
TIP00122 - Drop variables from a dataset where their values equals zero for all OBS
by Charles Patridge and Alternate Solution (better) by Shiling Zhang
TIP00121 - Sort and Rank an Array of Numeric Variables (lowest to highest) by Charles Patridge and Ron Fehd (also see tip00233)
TIP00120 - Extracting a numeric from within a character string by David Ward and Laurie Abell
TIP00119 - PURPOSE: A Macro to show current macro variables in use in a tabular report
by Arthur Asghar
TIP00118 - Can some one tell me how to subscribe SAS list server? By F.J. Kelley
TIP00117 - Convert 12345.78 to "twelve thousand three hundred forty-five and 78/100"
by Richard E. James
TIP00116 - How to get the first digit of the number by Charles Patridge
TIP00115 - Comparing two SAS data sets with many variables by Tim Liu
TIP00114 - Page N of N by SAS Institute Staff located in SAS Sample Code
Library
TIP00113 - by Asghar, Arthur
%CRINDEX - PURPOSE: creates index, simple or compound, if it does not exist
%DELNDX - PURPOSE: drop an existing index from a table
TIP00112 - Do you know an easy way to have the datasets of a library
put into a macro variable ? by Christoph Edel
TIP00111 - Calculating/Comparing Values Across Records (OBS) using the
LAG Function by Charles Patridge
TIP00110 - ROUTINE TO ASSIST IN PRODUCING TREND DATA by NEALE PARSONS
TIP00109 - Moving SAS macro variables across platforms by Tim Liu
Better than tip00107,
and additional tip by Lisa McGrath with assistance/help from Nancy Brucken and David Johnson.
TIP00108 - Use the Haversine formula to calculate distance between
two points on earth using Latitudes/Longitudes by David Ward
TIP00107 - A very SIMPLE example that allows passing a resolved
SAS macro variable from 1 platform to another remote SAS session on another platform
by Charles Patridge
see tip00109 for a more generic and flexible solution, and a
version 8 solution by Meredith Clark
TIP00106 - A simple example of how arrays and/or macros can save coding
and minimize maintenance by Charles Patridge
TIP00105 - Age Computation submitted by Peter Lund, Author is
Billy Kreuter
TIP00104 - what's the best way to pull out the records that have
multiple sessions (That is more than 1 unique value of a variable)? Solution by Rich DeVenezia
TIP00103 - Beginning and Ending Dates of a Week of the Year
Solutions by Pete Lund, Jack Hamilton and Mike Zdeb
TIP00102 - How to execute a SAS BATCH job from a Web Page without having the
SAS Intrnet Tools in a Windows NT Environment? solution by Droogendyk, Harry
TIP00101 - Searching for any one of a series of words by Paul M. Dorfman,
S. David Riba, Faith Sloan, Charles Patridge and R. Krajcik
TIP00100 - S. David Riba's web site filled with SAS articles
TIP00099 - Expanding a variable across records based upon conditional logic by
S David Riba
TIP00098 - Truncating Question with Proc Report by Wanda Upole
TIP00097 - A sas to excel macro using DDE by Hongjie Wang
TIP00096 - Number of words in a Character String by Robert Krajcik
TIP00095 - Generate the RGB color codes for HTML color attributes by Charles Patridge
and Ian Whitlock's alternate solution
TIP00094 - Example of using Nested Formats within a Format by Charles Patridge
TIP00093 - A GUIDE TO THE YEARCUTOFF= OPTION by SAS Institute, Inc.
TIP00092 - simple routine to produce results below by Charles Patridge - relates to linking, matching, child/parent relations, cross reference
/*** Ex: Input ***/
/*** 3209 APTY ***/
/*** 3210 APTY ***/
/*** 3212 APTY ***/
/*** 3213 ACOP ***/
/*** APTY AIMS ***/
/*** ARAF AIMS ***/
/*** ACOP QTIM ***/
/*** QTIM SIAM ***/
/*** ***/
/*** Ex: Desired Output ***/
/*** OBS VAR1 VAR2 VAR3 VAR4 VAR5 ***/
/*** 1 3209 APTY AIMS ***/
/*** 2 3210 APTY AIMS ***/
/*** 3 3212 APTY AIMS ***/
/*** 4 3213 ACOP QTIM SIAM ***/
/*** 5 APTY AIMS ***/
/*** 6 ARAF AIMS ***/
/*** 7 ACOP QTIM SIAM ***/
/*** 8 QTIM SIAM ***/
TIP00091 - Selectively Processing SAS Datasets - Technical Tip by Sunil
Kumar Gupta - see tip 00068 as an alternative
TIP00090 - Capture Options settings and set them back by Don Stanley
TIP00089 - I have 500 variables in my dataset. Is there any
efficient way to name all the variables into var1,var2,...,var500 ?
by F a b r i z i o
TIP00088 - Lookup Table Merge by Larry Kemp, Charles Patridge and
Jacksen Lou
TIP00087 - Is there a way to write dates in format DD-MMM-YY
(for example 08/27/99 = 8-AUG-99) in version 6.12? Multiple Solutions by Charles Patridge
and Chris Jones
TIP00086 - Temperature conversion by Fabrizio
TIP00085 - rewriting merge/data statement by Paul M. Dorfman
Problem:
Is there a more concise way to write the following ?:
DATA Z_BH_L;
MERGE BUY_L1 BUY_L2 BUY_L3 BUY_L4 BUY_L5
BUY_L6 BUY_L7 BUY_L8 BUY_L9 BUY_L10 BUY_L11
BUY_L12 BUY_L13 BUY_L14 BUY_L15 BUY_L16 BUY_L17
BUY_L18 BUY_L19 BUY_L20 BUY_L21 BUY_L22;
by sasyear; run;
TIP00084 -
Read a SAS Character Variable which contains a list of character words and convert to a macro
variable which takes these words and surrounds each one with quotes, in order to be used with
the "IN" operator as part of a where clause
Somewhat similiar to tip00032 but this deals with Macro Vars SAS MACRO variables can contain up
to 32K of data unlike a maximum of 200 characters for a SAS var By Charles Patridge and Ian
Whitlock
TIP00083 - Using an input statement, how do you read a fraction
and connvert it to a floating point numeric? by Andrew Cary
TIP00082 - Some uses (and handy abuses) of PROC TRANSPOSE by
Ralph W. Leighton of The Hartford
TIP00081 - I am an SPSS user and I am attempting to move data from
a SAS file into a file with ASCII data to be used with SPSS. How do I convert the SAS file so
that I may use SPSS? Solution by Glenn Curtiss
TIP00080 - Converting SPSS files to SAS Datasets by Chad Worthham,
Shulamit Edelstein, and Marc R. Feldesman
TIP00079 - Macro Looping within a DATA STEP - Reading numerous SAS
Data sets with minimimal code using Macro by Shiling Zhang
TIP00078 - I want to run several sas programs (via batch submit)
nested within a single 'master.sas' program. Multiple solutions by Lex Jansen and Earl
Westerlund.
TIP00077 - A MACRO TOOL TO SEARCH AND REPLACE PORTIONS OF TEXT by
Jennifer Lin
TIP00076 - How to clear Macro Variables - by Richard DeVenezia
TIP00075 - Produce Percents to Totals in by group processing using
PROC SQL by Herman Jacobs
TIP00074 - List of SAS Tips and Articles by Clarence Wm. Jackson
TIP00073 - Does anyone know of a way to change the position or order of
variables within a sas data set? by Charles Patridge, Ian Whitlock and Jack Shoemaker
TIP00072 - Using prompts in SAS by Victoria Wilkins
TIP00071 - I have a lot files under a library. And I want to SET
them (all) together, and their names do not have any sequence. Is there any command I can do
for it without typing all these names ? Solution by Shiling Zhang
TIP00070 - Since there is no LEAD function in SAS, here is a simple
method to simulate the effects of a LEAD function (a reverse of a LAG). A More elegant solution provided by Paul Dorfman, Mike Zdeb, Ian Whitlock, and Nigel Pain
TIP00069 - Simple Lag Problem without using the lag function an
answer given to SAS-L plea for a solution Alternate solutions by David Booth and Don Stanley
TIP00068 - This macro pulls off all of the data set names for a
particular libref. It will print off a sample of data or the entire data set for each member
of a catalog - by Janet Stuelpner. - see tip 00091 as an alternative
TIP00067 - How to read only the LAST Record of a SAS Dataset
without reading the WHOLE file by Don Stanley with Ian Whitlock's touch
TIP00066 - What do you do when you have over 750 external text
files to replace 1 character string with another character string?
TIP00065 - Determine the number of occurences a particular week day
has occurred since the beginning of the year by Andrew Cary
TIP00064 - How to use PUT "Alignment Option" by Andrew Ratcliffe
TIP00063 - ISO 8601 version of Weeknumber in SAS by Lars Jacobsen
TIP00062 - Reading DB2 Data and Formatting Reports Using SAS
Comparison with QMF/SQL By Diane Marie Goldschmidt
TIP00061 - Macro to Center, Left and Right Justify your Title and
Footnote Statements. Alternate solution provided by Ian Whitlock
TIP00060 - Reading a Web Page directly from a SAS Data Step by Paul
Odenkamp (SAS-L)
TIP00059 - A set of SAS macros which will read an Excel CSV file
and create a SAS Dataset Alternative solution by Ian Whitlock
TIP00058 - Removed Contiguous Multiple Repeated Characters from
Character Variable Ex: HHHAAAAPPYYYY TIIIMMMMES ARREE HHEERREE AAGGAIIN ! = HAPY TIMES ARE
HERE AGAIN !
TIP00057 - Amortizaton Routine - Use of the MORT FUNCTION in BASE
SAS
TIP00056 - Creating and Obtaining your own defined Percentiles
TIP00055 - If you are using Proc Transpose within a MACRO LOOP
TIP00054 - MACRO TO GET LIST OF EXTERNAL SAS PROGRAMS FROM A VMS
DIRECTORY AND TURN ALL PROGRAMS INTO UPPER CASE
TIP00053 - Using Proc Report, Calculate Record %'s to Report Totals
TIP00052 - Re-Shaping Your Data with Proc Transpose
TIP00051 - An Aid in Troubleshooting a SAS program by Al Lavoie
TIP00050 - Using Proc Calendar to generate a monthly and yearly
workday calendar
TIP00049 - Use of SAS Functions by Janet Stuelpner of ASG, Inc.
TIP00048 - SAS trick when reading CSV or PRN files where there are
mutliple occurrences of delimiters without text between them; for example:1,2,3,,,4,5,,6,,,,10
TIP00047 - A simple SAS program to calculate age and medicare age of
a person
TIP00046 - A simple SAS program to dump SAS reports to an HTML page.
TIP00045 - A simple SAS program to calculate Earned Premium as
define by most Insurance standards.
TIP00044 - Using SAS Share more Efficiently by Phillip Holland
TIP00043 - Joining codes from various records onto 1 record
TIP00042 - Determine Number of Workdays in a Month (also see tip00384)
TIP00041 - Simulation of a Customer Waiting in a Line (Queuing)
TIP00040 - Dealing with Percentages that do not add up 1.000
TIP00039 - February 29 and Leap Year Tip
TIP00038 - Stareograms by SAS
TIP00037 - Find Top 10% of the records of a SAS Dataset based upon
a selected SAS variable.
TIP00036 - Error Handling Macro for SAS Character Variables
TIP00035 - Macro to Determine LINESIZE during a SAS Session
Multiple Solutions by Charles Patridge and Fabrizio
TIP00034 - Tips and Techniques on SAS Character Functions
TIP00033 - Technique for Creating a Record where there is none and
you want one
TIP00032 - A Macro Take a character string of numbers which are
separated by /*blanks and create a new character string where each number is surrounded with
quotes and a comma is placed between each number. Original string: 01 02 03 04 05 06
Resultant string:'01','02','03','04,'05','06'
See TIP00084 which is similiar to this but deals with Macro Vars
TIP00031 - Finding Potentially Duplicate records within 1 file using
the SOUNDEX function
TIP00030 - Using a Text String as a Column Positioner for the Input
Statement
TIP00029 - Calculate Age of a Person as of Today
TIP00028 - Sort and Store SAS vars alphabetical within Dataset
Alternate Solution by Richard DeVenezia
TIP00027 - Create a Blank Page of Output
TIP00026 - Calculate Week of the Year Macro - Multiple Solutions are
Provided Updated February 26, 1997
TIP00025 - Audit trail of record when SAS variable is missing or
blank
TIP00024 - Transport ALPHA/VAX SAS Dataset to another environment
TIP00020 - Sample of using VMS logicals with SAS filename
TIP00019 - Sample of issuing a System command from within SAS
TIP00018 - Generate a list of macro vars
TIP00017 - Macro to generate a list of macro variables to be used
in another SAS statement.
TIP00016 - FSEDIT/SCL example to create edit which spans more than
1 record
TIP00015 - Routine to convert Upper Case Data to all but 1st
character of each word to lower case. Multiple Solutions by Charles Patridge, Fabrizio, and Lawrence H. ('Doc') Muhlbaier
TIP00014 - Amortization Routine
TIP00013 - Use System Function in AF/SCL
TIP00012 - Change all missing numeric data to 0's in a SAS Dataset
Alternative solution by Ian Whitlock and Jean-Louis Dubois
TIP00011 - Create Format to use Parenthesis for Negative #'s
TIP00010 - Center a Text String when doing Data _NULL_ Report Writing
TIP00009 - Create Comma delimited file from SAS Dataset
Another more efficient solution by David Mabey
Also see other similiar tips such 00127
TIP00008 - Moving SAS Datasets from Windows to Pathworks Environment
TIP00007 - Routine to Smooth Time Series Data
TIP00006 - Simple Example of using Display Manager as a System File Editor
TIP00005 - Current Quote String over 200 Characters Error MESSAGE
TIP00004 - Some unusual SASHELP facilities
TIP00003 - Date/Time code for AF/SCL applications
TIP00002 - Macro to dynamically allocate a TSO Dataset
TIP00001 - Macro to get # of OBS in SAS Dataset
END of WEB PAGE