Transcription of Base SAS 9.2 Procedures Guide
1 Base SAS Procedures 11/22/09 11:41:14 AMThe correct bibliographic citation for this manual is as follows: SAS Institute Inc. SAS Procedures Guide . Cary, NC: SAS Institute SAS Procedures GuideCopyright 2009 by SAS Institute Inc., Cary, NC, USAISBN 978 1-59994-714-3 All rights reserved. Produced in the United States of a hard-copy book:No part of this publication may be reproduced, stored in aretrieval system, or transmitted, in any form or by any means, electronic, mechanical,photocopying, or otherwise, without the prior written permission of the publisher, SASI nstitute a Web download or e-book.
2 Your use of this publication shall be governed by theterms established by the vendor at the time you acquire this Government Restricted Rights , duplication, or disclosure of thissoftware and related documentation by the government is subject to the Agreementwith SAS Institute and the restrictions set forth in FAR 19 Commercial ComputerSoftware-Restricted Rights (June 1987).SAS Institute Inc., SAS Campus Drive, Cary, North Carolina electronic printing, February 20092nd electronic printing, September 20093rd electronic printing, May 20101st printing, June 2009 SAS Publishing provides a complete selection of books and electronic products to helpcustomers use SAS software to its fullest potential.
3 For more information about oure-books, e-learning products, CDs, and hard-copy books, visit the SAS Publishing Web call and all other SAS Institute Inc. product or service names are registered trademarksor trademarks of SAS Institute Inc. in the USA and other countries. indicates brand and product names are registered trademarks or trademarks of theirrespective s NewxiiiOverviewxiiiNew Base SAS ProceduresxivEnhanced Base SAS ProceduresxvDocumentation EnhancementsxxivPART1 Concepts 1 Chapter 1 Choosing the Right Procedure 3 Functional Categories of Base SAS Procedures3 Report-Writing Procedures5 Statistical Procedures6 Utility Procedures8 Brief Descriptions of Base SAS Procedures10 Chapter 2 Fundamental Concepts for Using Base SAS Procedures 17 Language Concepts17 Procedure Concepts20 Output Delivery System33 Chapter 3 Statements with the Same Function in Multiple
4 Procedures 35 Overview35 Statements36 Chapter 4 In-Database Processing of Base Procedures 49 Base Procedures That Are Enhanced for In-Database Processing49 PART2 Procedures 51 Chapter 5 The APPEND Procedure 55 Overview: APPEND Procedure55 Syntax: APPEND Procedure55 Chapter 6 The CALENDAR Procedure 57 Overview: CALENDAR Procedure59 Syntax: CALENDAR Procedure64 Concepts: CALENDAR Procedure82 Results: CALENDAR Procedure92 Examples: CALENDAR Procedure93 Chapter 7 The CALLRFC Procedure 129 Information about the CALLRFC Procedure129ivChapter 8 The CATALOG Procedure 131 Overview: CATALOG Procedure131 Syntax: CATALOG Procedure132 Concepts: CATALOG Procedure142 Results: CATALOG Procedure146 Examples: CATALOG Procedure147 Chapter 9 The CHART Procedure 155 Overview: CHART Procedure155 Syntax: CHART Procedure160 Concepts: CHART Procedure173 Results: CHART Procedure174 Examples: CHART Procedure175 References189 Chapter 10 The CIMPORT Procedure 191 Overview: CIMPORT Procedure191 Syntax: CIMPORT Procedure192 CIMPORT Problems: Importing Transport Files198 Examples: CIMPORT Procedure203 Chapter 11 The COMPARE Procedure 207 Overview: COMPARE Procedure208 Syntax.
5 COMPARE Procedure211 Concepts: COMPARE Procedure222 Results: COMPARE Procedure226 Examples: COMPARE Procedure239 Chapter 12 The CONTENTS Procedure 259 Overview: CONTENTS Procedure259 Syntax: CONTENTS Procedure259 Chapter 13 The COPY Procedure 261 Overview: COPY Procedure261 Syntax: COPY Procedure261 Concepts: COPY Procedure262 Example: COPY Procedure263 Chapter 14 The CORR Procedure 267 Information about the CORR Procedure267 Chapter 15 The CPORT Procedure 269 Overview: CPORT Procedure269 Syntax: CPORT Procedure270 READ= Data Set Option in the PROC CPORT Statement278 Results: CPORT Procedure279 Examples: CPORT Procedure279vChapter 16 The CV2 VIEW Procedure 285 Information about the CV2 VIEW Procedure285 Chapter 17 The DATASETS Procedure 287 Overview: DATASETS Procedure288 Syntax: DATASETS Procedure291 Concepts: DATASETS Procedure353 Results: DATASETS Procedure359 Examples: DATASETS Procedure372 Chapter 18 The DBCSTAB Procedure 399 Information about the DBCSTAB Procedure399 Chapter 19 The DISPLAY Procedure 401 Overview: DISPLAY Procedure401 Syntax: DISPLAY Procedure401 Example.
6 DISPLAY Procedure402 Chapter 20 The DOCUMENT Procedure 405 Information about the DOCUMENT Procedure405 Chapter 21 The EXPLODE Procedure 407 Information about the EXPLODE Procedure407 Chapter 22 The EXPORT Procedure 409 Overview: EXPORT Procedure409 Syntax: EXPORT Procedure409 Examples: EXPORT Procedure412 Chapter 23 The FCMP Procedure 417 Overview: FCMP Procedure420 Syntax: FCMP Procedure420 Concepts: FCMP Procedure431 PROC FCMP and DATA Step Differences435 Working with Arrays438 Reading Arrays and Writing Arrays to a Data Set439 Using Macros with PROC FCMP Routines442 Variable Scope in PROC FCMP Routines442 Recursion443 Directory Transversal445 Identifying the Location of Compiled Functions and Subroutines: The CMPLIB=System Option448 Special Functions and CALL Routines: Overview451 Special Functions and CALL Routines: Matrix CALL Routines451 Special Functions and CALL Routines: C Helper Functions and CALL Routines463 Special Functions and CALL Routines.
7 Other Functions467 Functions for Calling SAS Code from Within Functions472 The FCmp Function Editor477viExamples: FCMP Procedure488 Chapter 24 The FONTREG Procedure 497 Overview: FONTREG Procedure497 Syntax: FONTREG Procedure498 Concepts: FONTREG Procedure504 Examples: FONTREG Procedure506 Chapter 25 The FORMAT Procedure 511 Overview: FORMAT Procedure512 Syntax: FORMAT Procedure513 Informat and Format Options534 Specifying Values or Ranges536 Concepts: FORMAT Procedure537 Results: FORMAT Procedure541 Examples: FORMAT Procedure546 Chapter 26 The FORMS Procedure 573 Information about the FORMS Procedure573 Chapter 27 The FREQ Procedure 575 Information about the FREQ Procedure575 Chapter 28 The FSLIST Procedure 577 Overview: FSLIST Procedure577 Syntax: FSLIST Procedure577 Using the FSLIST Window582 Chapter 29 The HTTP Procedure 589 Overview: HTTP Procedure589 Syntax: HTTP Procedure589 Using Hypertext Transfer Protocol Secure (HTTPS)591 Examples: HTTP Procedure592 Chapter 30 The IMPORT Procedure 595 Overview: IMPORT Procedure595 Syntax: IMPORT Procedure596 Examples.
8 IMPORT Procedure599 Chapter 31 The INFOMAPS Procedure 605 Information about the INFOMAPS Procedure605 Chapter 32 The JAVAINFO Procedure 607 Overview: JAVAINFO Procedure607 Syntax: JAVAINFO Procedure607 Chapter 33 The MEANS Procedure 609 Overview: MEANS Procedure610 Syntax: MEANS Procedure612viiConcepts: MEANS Procedure637In-Database Processing for PROC MEANS640 Statistical Computations: MEANS Procedure641 Results: MEANS Procedure644 Examples: MEANS Procedure646 References675 Chapter 34 The METADATA Procedure 677 Information about the METADATA Procedure677 Chapter 35 The METALIB Procedure 679 Information about the METALIB Procedure679 Chapter 36 The METAOPERATE Procedure 681 Information about the METAOPERATE Procedure681 Chapter 37 The MIGRATE Procedure 683 Overview: MIGRATE Procedure683 Syntax: MIGRATE Procedure685 Concepts: MIGRATE Procedure687 Migrating a Library with Validation Tools693 Using the SLIBREF= Option693 Examples695 Chapter 38 The OPTIONS Procedure 701 Overview: OPTIONS Procedure701 Syntax.
9 OPTIONS Procedure707 Results: OPTIONS Procedure710 Examples: OPTIONS Procedure710 Chapter 39 The OPTLOAD Procedure 715 Overview: OPTLOAD Procedure715 Syntax: OPTLOAD Procedure715 Chapter 40 The OPTSAVE Procedure 717 Overview: OPTSAVE Procedure717 Syntax: OPTSAVE Procedure717 Chapter 41 The PLOT Procedure 719 Overview: PLOT Procedure720 Syntax: PLOT Procedure722 Concepts: PLOT Procedure738 Results: PLOT Procedure743 Examples: PLOT Procedure744 Chapter 42 The PMENU Procedure 777 Overview: PMENU Procedure777 Syntax: PMENU Procedure778viiiConcepts: PMENU Procedure792 Examples: PMENU Procedure794 Chapter 43 The PRINT Procedure 815 Overview: PRINT Procedure815 Syntax: PRINT Procedure818 Results: Print Procedure832 Examples: PRINT Procedure835 Chapter 44 The PRINTTO Procedure 887 Overview: PRINTTO Procedure887 Syntax: PRINTTO Procedure888 Concepts: PRINTTO Procedure891 Examples: PRINTTO Procedure892 Chapter 45 The PROTO Procedure 903 Overview: PROTO Procedure903 Syntax: PROTO Procedure904 Concepts: PROTO Procedure906C Helper Functions and CALL Routines916 Results: PROTO Procedure918 Examples: PROTO Procedure919 Chapter 46 The PRTDEF Procedure 921 Overview.
10 PRTDEF Procedure921 Syntax: PRTDEF Procedure921 Input Data Set: PRTDEF Procedure923 Examples: PRTDEF Procedure928 Chapter 47 The PRTEXP Procedure 933 Overview: PRTEXP Procedure933 Syntax: PRTEXP Procedure933 Concepts: PRTEXP Procedure935 Examples: PRTEXP Procedure935 Chapter 48 The PWENCODE Procedure 937 Over