In the Know...SAS Tips & Techniques From Around the Globe
Table of Contents
Acknowledgments ix
Introduction x
Sample tip xi
Where to find more tips xii
Chapter 1 A Collection of Useful Tips
- How to fix unbalanced quotes
- Using a wildcard in variable lists
- Using wildcards to read external files
- Commenting out code containing comments
- Sizing the screen space used by SAS applications
- Data encryption for the beginner
- Capturing screens under Windows
- Cautions in dealing with missing values
- Saving resources when the log is long
- Additional SAS documentation
Chapter 2 Resource Tips
- 22 ways to save disk space
- How to save space in SAS catalogs
- 10 ways to minimize I/O
- Implementing application data security
- Use indexes with WHERE clauses
- Use composite indexes with WHERE clauses
- SAS/GRAPH LINK TO attribute
- Useful options for tuning
- SAS dynamic link libraries under Windows & OS/2
- Additional SAS documentation
Chapter 3 Functions
- Incrementing and rounding by time intervals
- Various forms for functions argument lists
- Determining which SAS products you have
- Peculiarities of the LENGTH function
- Random numbers are not always random
- Minimum/Maximum arithmetic operators
- Getting the remainder of a division
- Additional SAS documentation
Chapter 4 DATA Step
- How to rearrange variables in a data set
- Using pattern matching in WHERE clauses
- Conditionally generating code with CALL EXECUTE
- DDE: writing data to Lotus 123
- DDE: writing to Microsoft Word
- DDE: operating other programs from SAS
- DDE: make sure numbers are numeric
- DDE: using more advanced commands
- Introduction to using arrays
- Adding variables with similar names
- Inputting data using text value positioning
- Reading unaligned data that require informats
- Do-it-yourself log messages
- Use_NULL_DATA steps when not creating data sets
- Determining the number of observations in a data set
- Creating views from a DATA step
- Use the DATA step debugger
- How to put variable labels into titles
- Simple ways to comment out code
- Altering processing within a DO loop, based on a condition
- Editing external files in place
- DATA of views canŐt change
- BY group processing different for PROC steps and DATA steps
- Result of merges differ if a BY statement is used
- Values are retained when doing indexed reads
- Views donŐt use indexes
- Bringing environment variables into macro variables
- Using stored compiled programs
- Logic variations using IF & WHERE
- Additional SAS documentation
Chapter 5 Macros
- Automatic macro variables
- Listing macro variables and their values
- Accessing all macro variable values
- Arithmetic calculations in macros
- Match quotes in macro comments
- Forcing SAS to store macro symbol tables on disk
- How to produce files for import Into other applications
- Useful merge macro
- Additional SAS documentation
Chapter 6 Assorted Procedure Tips
- Outputting multiple procedures to one page
- Printing graphs in landscape or portrait
- Putting BY variables into titles
- Multiple graphs on a page
- Inconsistent treatment of misspelled PROC names
- Additional SAS documentation
Chapter 7 Utility Procedure Tips
- More information on space used by catalog members
- 7 Ways to tune sorts in SAS
- Eliminating duplicates from a sort
- Copying a file and its indexes
- Additional SAS documentation
Chapter 8 Procedure Tips for Displaying
- Data
- Creating tab-separated output using PROC TABULATE
- Producing multi-panel reports with PROC REPORT
- Indenting output using PROC TABULATE
- Wrapping lines with PROC REPORT
- Saving space on the page with PROC TABULATE
- Defining denominator definitions in PROC TABULATE
- Additional SAS documentation
Chapter 9 Basic Statistical Procedure
- Tips
- FREQ/SUMMARY: frequency tables with long labels
- SUMMARY: CLASS Versus BY statements
- MEANS: specifying confidence limits to calculate
- UNIVARIATE: mode is the minimum when there are multiples
- UNIVARIATE/FASTCLUS: calculating weighted medians
- REG: determining whether to use intercepts
- Additional SAS documentation
Chapter 10 The PRINT Procedure
- A better looking report with BY groups
- Saving resources by specifying width
- Labels are always displayed in BY groups
- OBS= canŐt be used in conjunction with a WHERE clause
- Additional SAS documentation
Chapter 11 The FORMAT Procedure
- Nesting formats within other formats
- Modifying standard (in)formats with a custom (in)format
- Mixing character and numeric values in informats
- Automatically rounding numbers
- Using long values
- Using formats in a table lookup
- Additional SAS documentation
Chapter 12 SQL
- Be careful when using SQL
- Automatic data dictionary information
- Conditional arithmetic
- Providing values to use in place of missing values
- Using values just calculated
- Examining resource usage in SQL
- Generating statements to define data set/view structure
- Submit SQL works with TESTAF
- Additional SAS documentation
Chapter 13 SCL
- Making methods memory resident
- Variable names and list item names in SCL can be long
- Using environment lists to pass information
- Displaying a CATALOG selection list
- Determining or causing an END or CANCEL
- SCL function to calculate statistics from a data set
- Using macros in SCL
- Debugging SCL using environment-dependent macros
- Arrays can be passed by reference in Release 6.11
- Open data sets for sequential input to improve performance
- Delete lists to save memory
- How to test SUBMIT blocks in SAS/AF
- Replacing SCL variable values in SUBMIT blocks
- Use same case in SCL constants
- Remote command determines where SUBMIT blocks run
- Saving and retrieving parameters in PROGRAM entries
- Getting SCL help online in Windows
- Additional SAS documentation
Chapter 14 FRAME Entries
- Using Different cursor shapes for different objects
- Displaying a file selection list
- Programming a delay
- Automatically loading a default SCL template when creating a new FRAME entry
- Specifying automatic filter Lists for open and save as
- Tabbing to non-text fields in a frame on the Windows platform
- Formats are not always updated from a FRAME
- Automatic line insert when editing SCL
- Setting the window size of dialog frames
- Ensuring INSERT key is off at start of FRAME entries
- Refreshing the Build window
- Cleaning up in the terminate (TERM:) section
- Making a box look sunken
- Using hotspots on graphs
- Additional SAS documentation
Chapter 15 SAS/CONNECT Software
- Connecting SAS sessions between mainframes
- Using SAS/CONNECT in batch mode
- Additional SAS documentation
Chapter 16 MVS Tips
- Questions to always ask yourself
- Using the ISPF editor from the SAS system
- Listing tape labels from the SAS system
- Defining user-defined ISPF commands
- Useful ISPF editing functions
- Check JCL syntax prior to running
- Use QuickRef for online reference
- Free tapes after use
- Dispense with your LOG data set
- Use best block sizes
- Obtaining a big region size
- Use VIO for small temporary files
- Invoke user CLISTs with the 00000001refix
- Examine EXCP counts
- Use the appropriate batch job classes
- Use batch rather than online TSO
- Browse rather than edit
- Chaining ISPF commands
- Copying files
- Pre-processing ISPF panels
- Library concatenations
- Keep JCL and source separate
- Log off when youŐre finished
- Do not keep pressing Enter
- Additional SAS documentation
Index