Browse for your favorite technical tips from SAS Tech Report, listed below by publication date. Or, visit the SAS Samples Home Page for access to other tips and samples.
How to Automatically Import Microsoft Excel Worksheets
This handy note points both to the download folder and to each of the necessary programs for auto-importing various projects.
How to Determine the kth Largest or Smallest Non-Missing Value
Functions LARGEST and SMALLEST, available in SAS®9 and beyond, will return the kth value for non-missing values. (Full code and sample output available.) Here’s an online list of additional functions and CALL routines, sorted by category.
Assigning Group Breaks to Stored Process Prompts in SAS® Web Report Studio
In SAS Web Report Studio, output from a stored process and results from an information map can be included in the same report section. In version 4.2, output from both data sources can now share the same grouping criteria. Look at this step-by-step example to learn to assign the group breaks in the report to the prompts in the stored process.
How to Select "All" When Using Parameters in SAS® Enterprise Guide®
When using parameters to filter data, you might want to see one or all values. For example, you might want to filter by Males, Females or both. Take a look at this sample to learn to filter for All.
Inserting a Blank Line After Every n Observations in PROC PRINT Output Using SAS® 9.2
A basic listing report in which a blank line is inserted after every n rows may be a bit easier to read, but it is particularly challenging to create. Learn to solve it the easy way using the new features of the Base SAS 9.2 PRINT procedure. This note is adapted from Don't Be a SAS Dinosaur: Modernize Your SAS Code.
Print All Data Sets That Exist in a Directory
Learn to write a macro that searches for and prints all data sets that exist in a directory that you specify. Full code and example are included.
Changing the Banner Title of the SAS® Logon Manager
Now here’s a cool feature. The default title for the SAS Logon Manager is SAS Log On. But, you can change the title to suit your organization with the Configuration Manager plug-in to SAS® Management Console.
Accessing a Microsoft SQL Server Database from SAS on Microsoft Windows
Follow this step-by-step code – complete with screen shots – to gain access to a Microsoft SQL Server database using one of two available options: SAS/ACCESS® Interface to ODBC or SAS/ACCESS® Interface to OLE DB.
Generating a Sound When Tasks Finish in SAS® Enterprise Guide®
Follow these easy steps and simple code to generate a series of sounds when a task is finished. You can even personalize the sound to the task.
Client Browser Language Determines Date Prompt Format
In SAS Web Report Studio, the client's browser language settings determine which date format occurs in date prompts. Follow these easy steps to change the settings.
Using the YRDIF Function to Calculate Age Can Give Incorrect Results
The YRDIF function was designed to calculate interest for fixed-income securities for the securities industry. This sample offers other, more accurate methods for calculating age.
Sorting Text Without Regard to Case in SAS 9.2
PROC SORT is a frequently used Base SAS procedure with simple syntax. Unfortunately, anomalies in the key variables, especially mixed case character values, can present special challenges. Sort them out with this tip.
Validation Tools for SAS® 9.2 Business Intelligence Installations
SAS provides tools to help you validate that SAS software is deployed correctly. SAS 9.2 has several new validation tools, and many existing tools have been enhanced. Learn about these tools and ways that you might use them.
SAS® Management Console: Adding an Excel Library
Step-by-step instructions – including screen shots – to guide you through the process of adding an Excel library to your SAS Management Console.
Create a Macro Variable Containing a List of All Variables Existing in a SAS® Data Set
This macro retrieves the number of variables in a SAS data set and then appends each variable name to a macro variable.
Using ODS HTML as an Alternative to the %DS2HTM Macro
Output Delivery System (ODS) provides SAS users with the ability to write output to other destinations (such as HTML, PDF and so on) in addition to the traditional output window.
Choosing Numeric Precision
Those who generate and use data can determine the exact degree of numeric precision that suits the organization’s needs. Everyone else is somewhat limited in the precision to which data can be calculated, compared and represented. This note will help you understand some of the causes and outline various options.
How to Select All When Using Parameters in SAS® Enterprise Guide®
Using a sample dataset, this example demonstrates how to set up a query whereby you can select all of the data or filter it to examine one value.
Modernizing Your SAS® Code: PROC FREQ Applications
This usage tip is adapted from Don't Be a SAS Dinosaur: Modernize Your SAS Code by Warren Repole, a Training Specialist at SAS .
JGroups Value for the SAS® Remote Services Application Does Not Match the JGroups Value for the Web Application Server
Learn the steps to take when a communication protocol error appears in the JBoss Server1.log file.
Installing SAS® Foundation 9.2 (TS2M0), SAS® Enterprise Guide® 4.2
If you have a planned-installation package and intend to install SAS Foundation 9.2 (TS2M0) and SAS Enterprise Guide 4.2 for local use only in a Windows environment, you’ll need to use one of the three methods included in this installation note.
Creating an Auto-Call Macro Library on a PC
This code allows you to create a library on your PC from which SAS can automatically invoke your non-compiled MACRO code.
Find the Schema Name for a Teradata Table
Teradata tables might not be listed in the SAS Explorer library even after a libref is successfully assigned. An example and full code are given to help resolve this problem.
Creating KPI Dashboards Using SAS® Enterprise Guide® 4.2
Beginning with SAS 9.2, using a new SAS/GRAPH® procedure called PROC GKPI, you can create key performance indicator (KPI) charts, which some consider more appropriate for building dashboards. This sample includes sample code, examples of the output and installation instructions.
Retrieve the Number of Words in a Macro Variable
This sample uses a macro to count the number of words contained in a macro variable. The macro is using a space as the delimiter.
New 'ANY' Functions in SAS® 9.0 and Above
This page contains a list of ‘ANY’ functions made available beginning in SAS 9.0 that provide additional capabilities for searching a string for various types of character data. Includes excellent links for bookmarking!
Convert Variable Types in SAS® Enterprise Guide®
You can create new variables (computed columns) by using the Advanced Expression builder within the Query Builder. This simple illustration uses the PUT and INPUT function.
Display Zeros for Missing Numeric Values in SAS® Information Map Studio
Modify a data item expression in an information map so that missing numeric values are displayed as zeros in query results.
Process to Request SAS® 9.2 Phase 2
Instructions to help your designated SAS Representative request your SAS 9.2 Phase 2.
Migrating SAS® BI Dashboard Content When Using a Restrictive Permission Policy
When migrating SAS BI Dashboard 3.1 content to SAS BI Dashboard 4.2 with a restrictive permission policy in place, one short string of code can help you avoid access permission errors.
Create Your First Information Map in SAS® Information Map Studio 4.2
SAS Information Maps let business analysts and information architects organize data for business users without exposing complex underlying data structures. This sample is appropriate for those new to information map creation and for existing users seeking familiarization with the latest version.
Pass Parameters to a SAS/AF® Application
This application allows you to pass parameters into user applications by using the AF command.
SAS® 9.2 Simplifies Process
Beginning in SAS 9.2, the INDSNAME= option placed on the SET statement simplifies the process of obtaining the name of a data set being read with SET statement.
Creating Dashboards in SAS® BI Dashboard 4.2
Create a new dashboard in SAS BI Dashboard and then display it in the SAS® Information Delivery Portal.
How SAS® Information Delivery Portal Pages and Portlets are Localized in a Multilingual Environment
This note simplifies work in a multilingual environment by providing a table that explains when portal pages and portlets are created and which locale setting is used to name the items.
Create a Prompt to Filter on Missing Numeric Values in SAS® Web Report Studio
By default, SAS Web Report Studio does not include missing values in filter selection lists. Now you can work around this by using a simple user-defined format.
Add Today's Date to a SAS® Web Report Studio Report Header
This sample explains how you can use SAS® Information Map Studio in order to create a measure data item that represents today's date.
Instantiate the SAS® Visual Data Explorer with an Information Map
Create a Visual Data Explorer project that connects to data via a Foundation Services connection.
Use 'Copy to SAS Server' to Write Back to Your Original Data in Microsoft Excel
The SAS Add-In for Microsoft Office doesn’t have the capability to write back to the original table after the data has been modified in the spreadsheet. However, you can use the Copy to SAS Server feature to write the modified data back to the original table.
SAS® Web Report Studio Uses the Aggregations Selected for a Measure in SAS® Information Map Studio
With these directions, you can choose from six select aggregation types for measure in SAS Web Report Studio.
Define a Custom Sort Order for Use in Tables in a SAS® Web Report Studio Report
Create a measure for a category data item with the order that you would like to use and then apply a custom format so the values can be displayed in your preferred sort order.
Create a List of SAS® Web Report Studio Reports Using the SAS® BI Lineage Plug-in
Administrators can use this method to see what folders and reports reside in the reporting structure, including personal user folders.
Do you have the latest SAS® Enterprise Guide® hot fix?
This note contains download URL, hot fix versions available and location on your machine.
SAS® 9.1.3 and SAS 9.2 Phase 1 Products Supported Under Vista
Included are a list of SAS 9.1.3 and SAS 9.2 Phase 1 products supported in Windows Vista, a few simple installation hints and reminders.
General Sign-On Steps for the SAS/CONNECT® TCP/IP Access Method
Detailed instructions for the three steps to sign on using SAS/CONNECT's TCP/IP access method.
Enabling the ARM Log in a SAS® OLAP Server
Step-by-step instructions for enabling ARM logging in the SAS OLAP Server.
Create Relative Time Calculations in SAS® Web Report Studio Reports
If your report is based on an OLAP data source that includes a Time dimension, you can create several custom calculations.
How to Hide Code Used in SAS® Stored Processes That Are Associated with SAS® Information Maps
Using a stored process in an information map is a great shortcut, but it may put sensitive information at risk. Convert the SAS code to a secure stored macro that can be executed within the stored process.
Installing the UNIX Spawner
Refer to this technical support document for complete instructions to install the Unix Spawner.
Installing SAS® Foundation 9.2 Phase 1 in z/OS Operating Environment
This paper describes the series of steps you’ll need to follow in order to install SAS Foundation 9.2 via the electronic software download or DVD installation.
SAS® Information Map: Dynamically Select Tables with SAS® Stored Process with Prompts
You might have many tables with the same data structure but different content, which may make it inefficient to join all of the tables together in an information map. This sample demonstrates how to create an information map that selects which table to use based on a parameter selected from a prompt.
How to Select "All" When Using Parameters in SAS Enterprise Guide
When using parameters to filter data, you might want to see a certain value, or you might want to see all of the values. This sample shows you how to get these results using SAS Enterprise Guide 4.1.
SAS® AppDev Studio™ Sample Update
The SAS AppDev Studio samples have been updated for use with version 3.3. This new SAS Note will get you started with links to samples for common tasks. To quickly locate all of the updated samples, go to Samples & SAS Notes and enter the following text into the Search field: product: "SAS AppDev Studio" contenttype:"Sample" or click here.
REPORT Procedure Basics
This paper introduces PROC REPORT syntax and functionality to audiences with little or no experience with PROC REPORT. It focuses on using PROC REPORT in a non-windowing environment.
Updates to SAS® 9.2 SAS/GRAPH®
This paper outlines the major new features and enhancements in SAS 9.2 SAS/GRAPH software, including enhancements to make your graphics output look better and make SAS/GRAPH easier to use.
Create a Prompt to Select from a List of Values in SAS® Enterprise Guide®
SAS Enterprise Guide can be used to create a prompt that enables users to select multiple values from a list.
SAS® Enterprise Guide® 2.05 and 2.1 Upcoming Expiration Dates
SAS Enterprise Guide has a built-in expiration date —generally five to six years after the release date. Contact SAS Technical Support if you receive an error message, have questions regarding expiration dates or want to request the latest version.
Optimizing the Performance of Queries
This SAS Usage Note teaches one way to optimize queries when using clients such as SAS® Web Report Studio, SAS® Information Delivery Portal or SAS® Information Map Studio.
How to Apply IF-THEN-ELSE Logic by Using SAS® Enterprise Guide
There are many ways to use CASE syntax in SAS Enterprise Guide®. Here are a few that require only basic knowledge of opening data and building queries.
SAS/CONNECT SIGNON Steps for Interfacing With a Remote Machine Running SSH
Click through to find three easy steps to a remote connection for machines running SSH.
Setting Group Breaks in SAS® Web Report Studio
Click here for detailed directions, complete with images, about the number of group breaks you can have and how to specify your group breaks.
Object Spawner and Workspace Server with Basic SAS®9 Foundation Install
Click here to get complete information to help you configure and test the SAS Object Spawner on a Windows or UNIX host.
Support and Installation of SAS® 9.1.3 SP4 on Microsoft Windows Vista
Installers' frequently asked questions.
Convert Values from Character to Numeric or Numeric to Character
Change variables to numbers or vice versa by using the INPUT or PUT function.
Using SAS to Determine Dates for US Holidays
Determine exact dates for some US holidays. You may modify this sample to suit your company's needs.
FAQs About SAS® 9.2 ESD
Open this Usage Note to find the answer to nine of the most frequently asked questions about electronic delivery of SAS 9.2.
Does SAS® run on Windows x64 or 64-bit systems?
Click here for the answer to this tickling puzzle. We've included a few helpful links to make this resource even more useful..
Creating a Risk Map
Use this sample and the BAND statement in PROC SGPLOT to create a risk map.
Nonparametric Comparison of Areas Under Correlated ROC Curves
This sample provides point and confidence interval estimates of each curve's area and of the pairwise differences among the areas.
Create Variable Labels from Data Set Values
Dynamically create variable labels from data set values using %SYSFUNC and DATA step functions.
Support and Installation of SAS® 9.1.3 SP4 on Microsoft Windows Vista
Installers' frequently asked questions.
Visual Studio 2005 Visual Basic Code Snippets
IntelliSense Code Snippets speed development by allowing you to insert ready-made snippets of code into your projects.
Silently Install Hot Fixes for SAS® 9.1.3 Foundation SAS®, SAS® Enterprise Guide® and SAS® Add-In for Microsoft Office
Follow these steps to silently install hot fixes for Foundation SAS, SAS Enterprise Guide, and SAS Add-In for Microsoft Office.
Place Symbols at ZIP Code Locations on a US Map
This sample uses the Annotate facility to place symbols at ZIP code locations on a map.
Creating a Needle Plot with PROC SGPLOT
Produce a needle plot with overlaid plot lines using PROC SGPLOT.
FASTats: Frequently Asked-For Statistics
Bookmark this statistics resource so that you'll easily locate it the next time you're in a quandary.
Jackknife and Bootstrap Analyses
The %JACK and %BOOT macros do jackknife and bootstrap analyses for simple random samples, computing approximate standard errors, bias-corrected estimates and confidence intervals assuming a normal sampling distribution.
When do I use a WHERE statement vs. an IF statement to subset a data set?
This tip shows you how and when to apply the WHERE and IF statements to get correct and reliable results.
Create a new data set for each BY-Group in a data set
This sample uses macro logic to determine the number of unique values of a variable (the BY variable) and creates a new data set for each.
Getting SAS to Play Nice With Others: Connecting SAS to Microsoft SQL Server Using an ODBC Connection (PDF)
Candice Riley shows how to use SAS/ACCESS, an ODBC connection and a couple of third-party tools to connect a Microsoft SQL Server.
Picture Perfect: Centering Frames in SAS/AF (PDF)
Greg McLean's paper illustrates his simple method for centering GUI frames to improve user productivity, acceptability and ease of use.
Outputting the largest value in a BY-Group in SAS Enterprise Guide
This sample demonstrates how to use SAS Enterprise Guide can be used to output the largest value in a BY group.
How to Create a SAS Information Map That Filters Using Identity-Driven, Row-Level Permissions
This sample shows you how to define a simple identity-driven, row-level permission filter in SAS Information Map Studio. As the input table for the information map, this sample uses the SASHELP.CLASS table.
Sorting Text Without Regard to Case in SAS 9.2
This note reviews a seemingly simple problem that gets substantially easier to solve using new features of the Base SAS 9.2 SORT procedure.
Inserting a Blank Line After Every N Observations in PROC PRINT Output Using SAS 9.2
Learn a simple way to insert blank lines in SAS 9.2.
How to Add a Little Spice to Your PDF Output (PDF)
The ODS PRINTER statement (which includes the Printer, PCL, PostScript, and PDF destinations) is always trying to stay on top of changes and requests that users want. By staying on top, ODS can provide you the best possible output.
Viewing Current Style Settings for ODS HTML Output
To see the style definitions for your ODS HTML output, use the ODS MARKUP statement together with one of the utility tagsets described in this note.
The Output Delivery System (ODS) from Scratch (PDF)
In the paper, you'll learn how to generate multiple output formats, simultaneously; how to change the look of your report using styles; how to add text passages; and other “neat” tips (that is, helpful information).
Modernizing Your SAS Code: PROC FREQ Applications
Most SAS programmers have used the FREQ procedure, perhaps to evaluate basic data quality, but many valuable features of PROC FREQ are underutilized, even by experienced SAS users who turn to potentially complex routines when similar results could be produced with a simpler approach.
Customizing page numbers in the RTF destination
Beginning with SAS 9.1, page numbers can be customized in the RTF destination by using a variety of functions.
Scalability Solution for
SAS Dynamic Cluster Tables (PDF)
This paper provides an overview of dynamic cluster tables in SAS Scalable Performance Data Server 4.3 as well as enhancements that have been included in later releases.
A SAS Macro to Wrap Text
Sometimes it is desirable or even necessary to reformat long lines of text or code into fewer columns than the original document or program contained.
Turbo-Charging Spreadsheets (PDF)
This technical white paper shows how SAS Forecast Server can be accessed from Microsoft Excel using three new forecasting wizards in SAS Add-In for Microsoft Office.
Creating a Data Grid Like VB.NET
Tableeditor.tpl is a custom tagset that is created by the TEMPLATE procedure. The tableeditor tagset enables you to create HTML output with the same kind of functionality that you would get from Visual Basic .NET (VB.NET). You can easily export the output to Excel or other file types.
Avoid Entropy with the Ordered List Using SAS Enterprise Guide
SAS Enterprise Guide has a hidden gem of a feature ordered lists which lets you build simple lists of tasks from your project that you want to run in a prescribed sequence.
Manipulating Data with PROC SQL
This SQL Procedure tip illustrates how columns based on the numeric and character data types are defined; and how string functions, pattern matching, phonetic matching techniques, and a variety of other techniques are used with numeric and character data.
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.
What SAS Administrators Should Know about Libraries, Metadata, and SAS Enterprise Guide 4.1
This document provides details about changes and behaviors in SAS Enterprise Guide 4.1, and provides guidance to SAS administrators who would like to see the libraries behave in a certain way.
What Happened to My Data?
This paper helps you understand how results are affected when formatting is applied to classification variables.
Delivering SAS Graphs via SAS E-mail to a BlackBerry
SAS customer Dr. LeRoy Bessler shows you how to format a readable graph for a BlackBerry or any other small-screen device.
Moving Data from Here to There
Chris Hemedinger, co-author of the popular SAS for Dummies, offers an easy way to copy data from one SAS server to another, using SAS Enterprise Guide.
How Can I Get the Desired Ordering of My Data?
When ORDER=DATA is specified, PROC REPORT orders the GROUP/ORDER/ACROSS variable in order of appearance across all observations in the data set, not per grouping.
Troubleshooting an Installation of Platform Product Suite for SAS
This paper is intended to help you determine what has gone wrong during an installation of the Platform Product Suite for SAS.
Beyond the Basics: Advanced PROC REPORT Tips and Tricks
The paper 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.
Microsoft Visual Studio 2005 C# Code Snippets
These IntelliSense Code Snippets integrate into Microsoft Visual Studio 2005 to enable users to easily add common code for SAS Integration Technologies Windows Client to their projects.
Quarterly Updates of ZIP Code Data Set 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.
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.
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.
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.
Defining an OLEDB Library in SAS Management Console Using Windows Authentication
This document explains how to define an OLEDB library in SAS Management Console in order to access the Microsoft SQL Server using Windows authentication.
Implementing a SAS Metadata Server Configuration for Use with SAS Enterprise Guide
This document explains how to install a server administered by a SAS Metadata Repository as a back-end server for your SAS Enterprise Guide client machines.
What is the Application Response Measurement (ARM)?
This FAQ provides a high-level description of the ARM standard, which is vendor-neutral and is targeted toward managing the performance of distributed applications.
How do I take advantage of the Application Response Measurement (ARM)?
This FAQ addresses using the ARM standard within SAS.
How do I use the SAS ARM macros?
This FAQ directs you to all of the information that you need to utilize the SAS ARM macros.
Opening a SAS SQL Server Database from SAS Enterprise Guide
This FAQ addresses problems with opening a SAS SQL database from SAS Enterprise Guide.
ETL Performance Tuning Tips (PDF)
This paper provides important ETL (extract, transform and load) performance, tuning and capacity information for SAS®9 and SAS Data Integration Studio. The report introduces ETL concepts and covers ETL performance topics in depth, using examples as needed.
Effect of Changes to Daylight Saving Time on SAS Software
Beginning in 2007, Daylight Saving Time will take effect on the second Sunday in March. Read this note to help determine if any of your SAS programs need modifications to accommodate this change. Foundation SAS uses the SAS private Java Runtime Environment (JRE). Don't miss the information about recommended updates for JREs, including the SAS private JRE.
Using MPRINT and MFILE Options to Expand Macros in SAS Code for Easier Debugging
You can use the MFILE and MPRINT options together to expand macros in SAS code and output the generated SAS code to an external text file.
SAS/GRAPH Dashboard Indicators
Explore this set of 10 downloadable samples for information about how to programmatically create dashboard indicators using the SAS language for display in SAS BI products.
Define an Oracle Library in SAS Management Console
This paper describes how to define an Oracle library in SAS Management Console and how to access the Oracle library from SAS Business Intelligence (BI) clients.
Best Practices for SAS®9 Metadata Server Change Control (PDF)
This paper identifies some best practices for implementing processes around the use of metadata promotion tools.
Backing Up SAS Content in Your SAS Enterprise Intelligence Platform (PDF)
This paper presents considerations for developing a content backup strategy for SAS Enterprise Intelligence Platform.
Partitioning of SAS Scalable Performance Data Server Tables (PDF)
The paper discusses partitioning standard SAS Scalable Performance Data Server tables and then uses the discussion as a basis to develop an understanding of how to partition dynamic cluster tables.
Using Temporary Tables to Upload and Join in a Database
This topic describes how to use the DBMSTEMP libname option to allow two libname statements to share a single connection to a database.
Securing SAS®9 Business Intelligence Content Managed in
This document describes how to set metadata permissions to manage and secure business intelligence content items such as stored processes, information maps, data explorations, Web reports and publication channels.
Installing and Starting a PC Spawner on Windows Operating Systems (PDF)
This document 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.
The ExcelXP Tagset and Microsoft Excel
This topic provides example code that uses the ExcelXP tagset to generate XML output.
Metadata Security and the DefaultACT in SAS®9
Read how SAS provided a flexible architecture that is not tied to a hierarchical structure.
Calculating Group Totals and the Counts Within Each Group This sample uses the SUM() function to sum the AMOUNT column, creating a new column named GRPTOTAL with a COMMA10. format.
Enhanced Printing Capability for SAS/IML with the %PRINTIML Macro SAS/IML is an integral component of the SAS Intelligence Platform in that SAS/IML can read and write SAS data sets, just like the SAS DATA step.
What is the best way to protect the script file after I have added my user ID and password? To protect the script file when hardcoding the user ID and password within the file, use the access controls that are provided by your client operating system.
List all files that are located in a specific directory This macro will allow you to print all files or certain files with a particular extension.
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.
Creating a JSP TreeView This sample shows how to create and render a simple JSP TreeView using SAS AppDev Studio Java components.
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.
How can I use PROC REPORT to link from one page in my PDF file to another? You can use PROC REPORT with CALL DEFINE to automate the process of linking to the anchored pages.
Overlay a plot line on a vertical bar chart Use the GBARLINE procedure to create bar line charts, which are vertical bar charts with a plot overlay.
Building a WHERE clause with multiple values selected from a List Box Control This sample demonstrates how to populate a list of values for the IN operator in a WHERE clause with multiple values selected from a List Box Control within a SAS/AF FRAME entry.
Change a character date value into a SAS date value Use SAS Enterprise Guide to convert a column from character to a SAS date.
How Can I Use PROC TRANSPOSE to Get One Record per BY Group? Because of the structure of a data set, using the BY statement does not always guarantee that PROC TRANSPOSE will create an output data set with one record per BY group.
Printing Text at the End of Every Page but the Last One in PROC REPORT A COMPUTE AFTER block is processed before the COMPUTE AFTER_PAGE_ on the last page.
Drop Variables from a SAS Data Set When All Its Values are Missing Use arrays and iterative DO loops to determine whether a variable's values are all missing.
Perform a Fuzzy Merge Within a Range Using DATA Step Component Objects Use the hash iterator to search a hash object for a value that is within a range from a second data set.
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.
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.
New Argument for Use with the COMPRESS Function The COMPRESS function allows you to remove selected characters from a character value.
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.
How Can I Use PROC REPORT to Link from One Page in my PDF File to Another? Starting with SAS®9, 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.
List All .SAS Files that are Located in a Specific Directory This macro will allow you to print all files or certain files with a particular extension. The macro accepts 2 parameters.
A Simple Server Monitoring Technique This tip 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.
DATA Step vs. PROC SQL: Issues with common variables when combining data sets (PDF) This paper 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.
Examining the Value of the YEARCUTOFF= System Option with GETOPTION This example demonstrates how to obtain information about a system option with the SAS function GETOPTION and how to use that information to control the processing of a program.
SAS Enterprise Guide Add-In task for creating a CSF graph The goal of this sample is to provide the files and steps required for adding an Enterprise Guide Add-In task which can be used to create a Critical Success Factor graph.
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.
Performing a Table Lookup with Large Nonindexed Data Sets Find out how to efficiently combine two data sets when one is a large data set whose retrieved values remain fairly constant.
PROC SQL Summary Functions PROC SQL is a wonderful tool for summarizing data. It provides a number of useful summary functions to help perform calculations, descriptive statistics, and other aggregating operations in a SELECT statement or HAVING clause.
Metadata Repositories Should be Backed up Correctly and Often Partial or incomplete backups of the Metadata Repository may result in the inability to restore the repository. Restoration may be required in the event of a corrupt repository. To successfully backup the Metadata Server, the server must be stopped or paused.
In ODS HTML, how can I freeze my table headers while I scroll the page? This FAQ provides numerous examples, organized into three sections: DATA step examples, ODS markup examples and Cascading Style Sheet (CSS) examples.
Can I remove the equal sign from the BY value in the table of contents for ODS output? The equal sign can be removed from the BY value in the table of contents by using the ODS MARKUP destination. The MARKUP destination gives you access to each piece of output. Therefore you can substring this value from the BY value using DATA step functions in SAS 9.1.
How to batch process Enterprise Guide 3.0 projects that will save results as HTML, MS Excel, and SAS tables (updated) The built-in scheduler in SAS Enterprise Guide 3.0 works nicely for automating a project to execute all its tasks; however, to take full advantage of the OLE Automation capabilities in SAS Enterprise Guide, a scripting language such as VBScript is required.
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.
Documenting the SAS Run Using SAShelp Tables David Cross, associate senior pharmacokinesticist at Eli Lilly, writes a lot of macros that input and output files based on parameters given to the high-order program. Take a look at his tech tip using SAShelp tables.
When do I use a WHERE statement vs. an IF statement to subset a data set? This tip shows you how and when to apply the WHERE and IF statements to get correct and reliable results.
Using a Single Macro Variable as a Macro Array The SAS macro language does not officially support the concept of an array. However, there is a simple technique that can be used to provide this functionality.
Customize the data set browser for the SAS Explorer window This sample explains how to customize the VIEWTABLE window such that the data set is opened in edit mode by default.
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.
Combining SAS generation data sets into one SAS data set This sample describes how to obtain the information on how many generations exist and the maximum number of generations that can exist.
Registering a SAS MDDB in Batch This sample describes how to obtain the information on how many generations exist and the maximum number of generations that can exist.
Automating a SAS Enterprise Guide 3.0 project to direct results to an HTML file This technical tip will step you through automatically directing project item results to one or more HTML files using a VBScript file.
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.
Automated Storage Monitoring Routine for UNIX/Solaris Servers Let Bryan Beverly show you how to use SAS and a CRON scheduler to monitor file system storage.
Manipulating Data with PROC SQL This tip, provided by Kirk Paul Lafler of Software Intelligence Corporation, provides concatenation, character alignment, and phonetic and pattern matching character-string operations for manipulating data.
Adding Custom Content to the SAS Help and Documentation System "Adding custom help files is as easy as simply creating the help files (using a tool such as FrontPage or HomeSite), then referencing these files in the HELPREGISTER system option," explains BBU author Jodie Gilmore.
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."
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.