Example: biology

SAS 9.3 Language Reference

SAS LanguageReferenceConceptsSecond EditionSAS DocumentationThe correct bibliographic citation for this manual is as follows: SAS Institute Inc. 2012. SAS Language Reference : Concepts, second , NC: SAS Institute Language Reference : Concepts, second EditionCopyright 2012, SAS Institute Inc., Cary, NC, USAISBN 978-1-61290-232-6 All rights reserved. Produced in the United States of a hardcopy book: No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means,electronic, mechanical, photocopying, or otherwise, without the prior written permission of the publisher, SAS Institute a Web download or e-book:Your use of this publication shall be governed by the terms established by the vendor at the time you acquire scanning, uploading, and distribution of this book via the Internet or any other means without the permission of the publisher is illegal andpunishable by law.

The correct bibliographic citation for this manual is as follows: SAS Institute Inc. 2012. SAS® 9.3 Language Reference: Concepts, Second Edition. Cary, NC: SAS ...

Tags:

  Language, Reference, Second, Sas 9, 3 language reference

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Advertisement

Transcription of SAS 9.3 Language Reference

1 SAS LanguageReferenceConceptsSecond EditionSAS DocumentationThe correct bibliographic citation for this manual is as follows: SAS Institute Inc. 2012. SAS Language Reference : Concepts, second , NC: SAS Institute Language Reference : Concepts, second EditionCopyright 2012, SAS Institute Inc., Cary, NC, USAISBN 978-1-61290-232-6 All rights reserved. Produced in the United States of a hardcopy book: No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means,electronic, mechanical, photocopying, or otherwise, without the prior written permission of the publisher, SAS Institute a Web download or e-book:Your use of this publication shall be governed by the terms established by the vendor at the time you acquire scanning, uploading, and distribution of this book via the Internet or any other means without the permission of the publisher is illegal andpunishable by law.

2 Please purchase only authorized electronic editions and do not participate in or encourage electronic piracy of copyrightedmaterials. Your support of others' rights is Government Restricted Rights Notice: Use, duplication, or disclosure of this software and related documentation by the government issubject to the Agreement with SAS Institute and the restrictions set forth in FAR 19 Commercial Computer Software-Restricted Rights(June 1987).SAS Institute Inc., SAS Campus Drive, Cary, North Carolina printing, August 20122nd printing, October 2014 SAS Publishing provides a complete selection of books and electronic products to help customers use SAS software to its fullest potential. Formore information about our e-books, e-learning products, CDs, and hard-copy books, visit the SAS Publishing Web site or call and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc.

3 In the USA and othercountries. indicates USA brand and product names are registered trademarks or trademarks of their respective 's New in the Base SAS Language Reference : Concepts .. ixRecommended Reading .. xiiiPART 1 SAS System Concepts1 Chapter 1 Essential Concepts of Base SAS Software .. 3 What Is SAS? .. 3 Overview of Base SAS Software .. 4 Components of the SAS Language .. 4 Ways to Run Your SAS Session .. 7 Customizing Your SAS Session .. 9 Conceptual Information about Base SAS Software .. 10 Chapter 2 SAS Processing .. 13 Definition of SAS Processing .. 13 Types of Input to a SAS Program .. 14 The DATA Step .. 16 The PROC Step .. 17 Chapter 3 Rules for Words and Names in the SAS Language .. 19 Words in the SAS Language .. 19 Names in the SAS Language .. 22 Chapter 4 SAS Variables .. 31 Definition of SAS Variables .. 31 SAS Variable Attributes .. 32 Ways to Create Variables .. 35 Variable Type Conversions.

4 38 Aligning Variable Values .. 39 Automatic Variables .. 40 SAS Variable Lists .. 41 Dropping, Keeping, and Renaming Variables .. 43 Numeric Precision in SAS Software .. 45 Chapter 5 Missing Values .. 55 Definition of Missing Values .. 55 Creating Special Missing Values .. 56 Order of Missing Values .. 57 When Variable Values Are Automatically Set to Missing by SAS .. 58 When Missing Values Are Generated by SAS .. 59 Working with Missing Values .. 61 Chapter 6 Expressions .. 63 Definitions for SAS Expressions .. 64 Examples of SAS Expressions .. 64 SAS Constants in Expressions .. 65 SAS Variables in Expressions .. 70 SAS Functions in Expressions .. 71 SAS Operators in Expressions .. 71 Chapter 7 Dates, Times, and Intervals .. 83 About SAS Date, Time, and Datetime Values .. 83 About Date and Time Intervals .. 95 Chapter 8 Error Processing and Debugging .. 105 Types of Errors in SAS .. 105 Error Processing in SAS.

5 114 Debugging Logic Errors in the DATA Step .. 123 Chapter 9 SAS Output .. 125 Definitions for SAS Output .. 125 Routing and Customizing SAS Output .. 127 Sample SAS Output .. 132 The SAS Log .. 134 Chapter 10 By-Group Processing in SAS Programs .. 145 Definition of BY-Group Processing .. 145 References for BY-Group Processing .. 145 Chapter 11 WHERE-Expression Processing .. 147 Definition of WHERE-Expression Processing .. 147 Where to Use a WHERE Expression .. 148 Syntax of WHERE Expression .. 149 Combining Expressions by Using Logical Operators .. 158 Improving Performance of WHERE Processing .. 159 Processing a Segment of Data That Is Conditionally Selected .. 160 Deciding Whether to Use a WHERE Expression or a Subsetting IF Statement .. 162 Chapter 12 Optimizing System Performance .. 165 Definitions for Optimizing System Performance .. 165 Collecting and Interpreting Performance Statistics.

6 166 Techniques for Optimizing I/O .. 167 Techniques for Optimizing Memory Usage .. 172 Techniques for Optimizing CPU Performance .. 172 Calculating Data Set Size .. 174 Chapter 13 Support for Parallel Processing .. 175 Definition of Parallel Processing .. 175 Threaded I/O .. 175 Threaded Application Processing .. 176 Chapter 14 The SAS Registry .. 177 Introduction to the SAS Registry .. 177 Managing the SAS Registry .. 180 Configuring Your Registry .. 188 Chapter 15 Printing with SAS .. 193 Universal Printing .. 194 Configuring Universal Printing Using the Windowing Environment .. 209 System Options That Control Universal Printing .. 228 Managing Universal Printers Using the PRTDEF Procedure .. 230 Forms Printing .. 236 Using Fonts with Universal Printers and SAS/GRAPH Devices .. 237ivContentsCreating EMF (Enhanced Metafile Format) Graphics Using Universal Printing .. 254 Creating GIF Images Using Universal Printing.

7 255 Creating PCL (Printer Command Language ) Files Using Universal Printing .. 257 Creating PDF Files Using Universal Printing .. 259 Creating PNG (Portable Network Graphics) Using Universal Printing .. 261 Creating SVG (Scalable Vector Graphics) Files Using Universal Printing .. 263 PART 2 Windowing Environment Concepts287 Chapter 16 Introduction to the SAS Windowing Environment .. 289 What Is the SAS Windowing Environment? .. 289 Main Windows in the SAS Windowing Environment .. 290 Navigating in the SAS Windowing Environment .. 298 Getting Help in SAS .. 302 List of SAS Windows and Window Commands .. 303 Chapter 17 Managing Your Data in the SAS Windowing Environment .. 309 Introduction to Managing Your Data in the SAS Windowing Environment .. 309 Managing Data with SAS Explorer .. 310 Working with VIEWTABLE .. 315 Subsetting Data by Using the WHERE Expression .. 322 Exporting a Subset of Data .. 326 Importing Data into a Table.

8 329 PART 3 DATA Step Concepts333 Chapter 18 DATA Step Processing .. 335 Why Use a DATA Step? .. 335 Overview of DATA Step Processing .. 336 Processing a DATA Step: A Walk-through .. 339 About DATA Step Execution .. 343 About Creating a SAS Data Set with a DATA Step .. 349 Writing a Report with a DATA Step .. 353 The DATA Step and ODS .. 360 Chapter 19 Reading Raw Data .. 361 Definition of Reading Raw Data .. 361 Ways to Read Raw Data .. 362 Types of Data .. 363 Sources of Raw Data .. 366 Reading Raw Data with the INPUT Statement .. 367 How SAS Handles Invalid Data .. 372 Reading Missing Values in Raw Data .. 373 Reading Binary Data .. 374 Reading Column-Binary Data .. 376 Chapter 20 BY-Group Processing in the DATA Step .. 381 Definitions for BY-Group Processing .. 381 Syntax for BY-Group Processing .. 382 Understanding BY Groups .. 383 Invoking BY-Group Processing .. 384 ContentsvDetermining Whether the Data Requires Preprocessing for BY-Group Processing.

9 385 Preprocessing Input Data for BY-Group Processing .. 385 How the DATA Step Identifies BY Groups .. 386 Processing BY-Groups in the DATA Step .. 390 Chapter 21 Reading, Combining, and Modifying SAS Data Sets .. 395 Definitions for Reading, Combining, and Modifying SAS Data Sets .. 395 Overview of Tools .. 396 Reading SAS Data Sets .. 396 Combining SAS Data Sets: Basic Concepts .. 397 Combining SAS Data Sets: Methods .. 408 Error Checking When Using Indexes to Randomly Access or Update Data .. 436 Chapter 22 Using DATA Step Component Objects .. 445 Introduction to DATA Step Component Objects .. 445 Using the Hash Object .. 446 Using the Hash Iterator Object .. 458 Using the Java Object .. 461 Chapter 23 Array Processing .. 481 Definitions for Array Processing .. 481A Conceptual View of Arrays .. 482 Syntax for Defining and Referencing an Array .. 483 Processing Simple Arrays .. 484 Variations on Basic Array Processing.

10 488 Multidimensional Arrays: Creating and Processing .. 489 Specifying Array Bounds .. 491 Examples of Array Processing .. 493 PART 4 SAS Files Concepts497 Chapter 24 SAS Libraries .. 499 Definition of a SAS Library .. 499 Library Engines .. 501 Library Names .. 501 Library Concatenation .. 504 Permanent and Temporary Libraries .. 506 SAS System Libraries .. 507 Sequential Data Libraries .. 509 Tools for Managing Libraries .. 510 Chapter 25 SAS Data Sets .. 513 Definition of a SAS Data Set .. 513 Descriptor Information for a SAS Data Set .. 514 Data Set Names .. 515 Data Set Lists .. 517 Special SAS Data Sets .. 518 Sorted Data Sets .. 519 Tools for Managing Data Sets .. 524 Viewing and Editing SAS Data Sets .. 524 Chapter 26 SAS Data Files .. 527 Definition of a SAS Data File .. 528 Differences between Data Files and SAS Views .. 528viContentsUnderstanding the Observation Count in a SAS Data File.


Related search queries