Professional SAS Programming Shortcuts: Over 1,000 Ways to Improve Your SAS Programs

Professional SAS Programming Shortcuts: Over 1,000 Ways to Improve Your SAS Programs

by Rick Aster

Paperback

$45.00 View All Available Formats & Editions

Temporarily Out of Stock Online

Eligible for FREE SHIPPING

Overview

Professional SAS Programming Shortcuts: Over 1,000 Ways to Improve Your SAS Programs by Rick Aster

This guide to programming with SAS offers detailed instruction on programming with strings, codes, numbers, and dates; identifying bugs; processing and analyzing text values and documents; and creating interactive applications. The most common programming problems are highlighted, and solutions for them are provided. The second edition covers SAS 9, particularly addressing changes in text processing. Annotation ©2004 Book News, Inc., Portland, OR

Product Details

ISBN-13: 9781891957192
Publisher: Breakfast Communications Corporation
Publication date: 08/21/2012
Pages: 400

Table of Contents

Lists12
Introduction13
1The Log15
Running a SAS Program
Messages and Debugging
2Program Files23
3Startup27
Batch Mode
Interactive Mode
Special Modes
SAS Processes
4System Options33
Setting System Options
Obtaining Values of System Options
5Libraries45
6Dataset Options49
Selecting Data
Other Uses for Dataset Options
Errors
7Indexes53
8Actions on SAS Datasets57
Creating
Describing
Changing
Copying
Deleting
9Data Type and Length67
Data Type
Length
Setting Data Type and Length
Using Data Types
Determining Lengths for Variables
10Text Data Files73
Filerefs
Input Text Data
Output Text Data
11Data Fields79
Scientific Notation
Signed Numerals
Implied Decimal Points
Measured Strings
Variable Number of Fields
Continuation Character
12Delimited Files87
13Hierarchical Files93
Input
Output
14Binary Files99
Binary Files
Binary Fields
Binhex
15Value Formats105
16Value Informats109
17Picture Formats for Numbers113
18Format Catalogs and Control Datasets117
Format Catalogs
Control Datasets
19Time127
20Informats and Formats for Time133
21International Data Formats137
22Picture Formats for Time139
23Validation143
Informats and Error Controls
Validation Logic and Exception Reporting
Integrity Constraints
24Strings153
Testing Strings
String Transformations
Substrings
Translation and Encoding
Measuring Strings
Advanced String Processing
25Parsing167
26Variable-Length Strings171
Terminated Strings
Measured Strings
Pascal Strings
27Foreign Data Types175
Binary Integers
Union
Structure
Pseudo-Array
Set of Characters
28Codes183
Code I/O
Digit Strings as Packed Hexadecimal
Punctuation
Parts of Codes
Conversions
Serial Numbers
Check Digits
29Text Encryption193
Character Substitution
Transposition
30Discrete Binary Encoding197
31Bitfields203
Bit Testing
Numeric Bitfields
Numeric Bit Testing
Bitwise Functions
32Numeric Effects209
Rounding
Range Effects
Percents
Testing Numbers
33Missing Values215
34Boolean Values221
35Financial Calculations229
36Time Conversions235
Points in Time
Duration
Clock Issues
Spherical Coordinates
37Time Arithmetic245
38Extending the Observation Loop253
Comparisons
Rounding
Time Loops
Time Interval Arithmetic
Age
39Loops257
40Character Loops263
41Subsetting and Sampling269
Subsetting
Sampling
42SQL277
43Sorting281
44Groups289
BY Groups in Proc Steps
Formatted Grouping
Class Groups
Processing Groups in a Data Step
45Incomplete Data297
Key Combinations and Sequences
Interpolation
46Transposing303
Transposing in a Data Step
The TRANSPOSE Proc
47Frequency Tables311
48Descriptive Statistics321
Creating Summary Data
Degrees of Freedom, Weights, and the Variance Divisor
49Summary Statistics in Computations329
50Type Conversion333
Automatic Type Conversion
Functions for Type Conversion
Changing the Data Type of a Variable
51Combining Data337
52Table Lookup343
Boolean Lookup
Comparison Lookup
Lookup Based on Index Value
Lookup Functions
53Table Lookup From SAS Data Files349
Indexed Lookup
Lookup Based on Observation Numbers
Sort-Merge
Other Lookup Techniques
54Value Formats for Table Lookup357
Validation
Control Dataset
Multiple Variables
55Calendars363
56Multiple Text Files373
Input
Output
Single-Step Techniques for Input
57Print Files381
Print Files in the SAS Environment
Title and Footnote Lines
Print Output in Data Steps
Print Output in Proc Steps
58Table Reports391
59Data Step Report Programming401
60Data Step Views411
61Macro Variables415
Assigning Values
Obtaining Values
62Macros421
Parameters
Macro Control Flow
Managing Macros
63Macro Programming431
Macro Expressions
Macro Functions
Macro Statements
Avoiding Errors in Macro Programming
64Program Parameters437
65Generating Program Statements441
66Control Reports447
67Cleaning Up a Program451
68Macro Cleanup459
69Efficiency463
Priorities
Run Time
Memory
Sorting
70Saving Storage Space477
Observation Length
Number of Observations
Saving and Deleting Data
71Compression485
72Porting Files and Data489
73Porting SAS Programs495
Dependencies
Isolating Nonportable Code
74Translating Programs501
Translating to C
Translating From Other Languages to SAS
75Style509
76Data Step Windows513
Defining a Window
Displaying a Window
Fields
Interaction
Data Entry and Editing
Status Dialog
Animated Progress Bar
77Macro Windows525
78Interactive Line Mode529
79Menu Bars531
80Command Processing539
81Text Processing541
Text Expressions
Names and Alphabetic Keys
Words
Name Matching
82Text Analysis553
83Random Numbers559
Random Number Generators, Streams, and Seeds
Random Number Functions and CALL Routine
Distributions for Random Numbers
84Simulations563
85Legacy Systems569
Data Center Files
Y2K
Other SAS Versions
86Database Applications575
Database Design
Database Programming
Metadata
87Client-Server Design579
SAS/Connect
Control Level
88Classic Problems583
Prime Number Sieve
Life
Global Distances
Afterword591
Index593

Customer Reviews

Most Helpful Customer Reviews

See All Customer Reviews