SAS 9.4 Companion for UNIX Environments
Total Page:16
File Type:pdf, Size:1020Kb
SAS® 9.4 Companion for UNIX Environments SAS® Documentation The correct bibliographic citation for this manual is as follows: SAS Institute Inc. 2013. SAS® 9.4 Companion for UNIX Environments. Cary, NC: SAS Institute Inc. SAS® 9.4 Companion for UNIX Environments Copyright © 2013, SAS Institute Inc., Cary, NC, USA All rights reserved. Produced in the United States of America. For 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 Inc. For 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 this publication. The scanning, uploading, and distribution of this book via the Internet or any other means without the permission of the publisher is illegal and punishable by law. Please purchase only authorized electronic editions and do not participate in or encourage electronic piracy of copyrighted materials. Your support of others' rights is appreciated. U.S. Government Restricted Rights Notice: Use, duplication, or disclosure of this software and related documentation by the U.S. government is subject to the Agreement with SAS Institute and the restrictions set forth in FAR 52.227–19 Commercial Computer Software-Restricted Rights (June 1987). SAS Institute Inc., SAS Campus Drive, Cary, North Carolina 27513. Printing 1, June 2013 Electronic book 1, June 2013 SAS® Publishing provides a complete selection of books and electronic products to help customers use SAS software to its fullest potential. For more information about our e-books, e-learning products, CDs, and hard-copy books, visit the SAS Publishing Web site at support.sas.com/ publishing or call 1-800-727-3228. SAS® and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Other brand and product names are registered trademarks or trademarks of their respective companies. Contents About This Book . vii What's New in the SAS 9.4 Companion for UNIX Environments . xiii Recommended Reading . xvii PART 1 Running SAS Software Under UNIX 1 Chapter 1 • Getting Started with SAS in UNIX Environments . 3 Starting SAS Sessions in UNIX Environments . 4 Running SAS in a Foreground or Background Process . 6 Selecting a Method of Running SAS in UNIX Environments . 7 SAS Windowing Environment in UNIX Environments . 7 Interactive Line Mode in UNIX Environments . 9 Batch Mode in UNIX Environments . 10 Running SAS on a Remote Host in UNIX Environments . 11 X Command Line Options . 13 Executing Operating System Commands from Your SAS Session . 15 Customizing Your SAS Registry Files . 18 Customizing Your SAS Session By Using System Options . 18 Customizing Your SAS Session By Using Configuration and Autoexec Files . 21 Defining Environment Variables in UNIX Environments . 25 Specifying an Encoding for Pathnames on Disk . 26 Determining the Completion Status of a SAS Job in UNIX Environments . 26 Exiting or Interrupting Your SAS Session in UNIX Environments . 27 Ending a Process That Is Running as a SAS Server . 32 Interrupting a SAS Process and the Underlying DBMS Process . 32 Chapter 2 • Using SAS Files . 35 Introduction to SAS Files, Libraries, and Engines in UNIX Environments . 37 Common Types of SAS Files in UNIX Environments . 38 Filename Extensions and Member Types in UNIX Environments . 39 How File Extension Delimiters Are Handled . 41 Using Direct I/O . 41 Holding a File in Memory: The SASFILE Statement . 42 Sharing SAS Files in a UNIX Environment . 43 Migrating 32-Bit SAS Files to 64-Bit in UNIX Environments . 46 Creating a SAS File to Use with an Earlier Release . 47 Reading SAS Files from Previous Releases or from Other Hosts . 47 Referring to SAS Files By Using Librefs in UNIX Environments . 49 Specifying Pathnames in UNIX Environments . 52 Assigning a Libref to Several Directories (Concatenating Directories) . 53 Using Multiple Engines for a Library in UNIX Environments . 55 Using Environment Variables as Librefs in UNIX Environments . 55 Librefs Assigned by SAS in UNIX Environments . 56 Sasuser Library . 56 Work Library . 59 Multiple Work Directories . 59 Using One-Level Names to Access Permanent Files (User Library) . 60 iv Contents Accessing Disk-Format Libraries in UNIX Environments . 60 Accessing Sequential-Format Libraries in UNIX Environments . 61 Accessing BMDP, OSIRIS, or SPSS Files in UNIX Environments . 62 Support for Links in UNIX Environments . 66 Chapter 3 • Using External Files and Devices . 69 Introduction to External Files and Devices in UNIX Environments . 70 Accessing an External File or Device in UNIX Environments . 71 Specifying Pathnames in UNIX Environments . 72 Assigning Filerefs to External Files or Devices with the FILENAME Statement . 74 Concatenating Filenames in UNIX Environments . 77 Assigning a Fileref to a Directory (Using Aggregate Syntax) . 77 Using Environment Variables to Assign Filerefs in UNIX Environments . 78 Filerefs Assigned by SAS in UNIX Environments . 79 Reserved Filerefs in UNIX Environments . 80 Sharing External Files in a UNIX Environment . 80 Reading from and Writing to UNIX Commands (PIPE) . 81 Sending Electronic Mail Using the FILENAME Statement (EMAIL) . 84 Chapter 4 • Printing and Routing Output . 91 Overview of Printing Output in UNIX Environments . 92 Previewing Output in UNIX Environments . 92 The Default Routings for the SAS Log and Procedure Output in UNIX Environments . 93 Changing the Default Routings in UNIX Environments . 93 Routing SAS Logging Facility Messages to SYSLOGD . 95 Using the Print Dialog Box in UNIX Environments . 96 Using Commands to Print in UNIX Environments . 98 Using the PRINTTO Procedure in UNIX Environments . 100 Using SAS System Options to Route Output . 102 Printing Large Files with the PIPE Device Type in UNIX Environments . 103 Changing the Default Print Destination in UNIX Environments . 103 Changing the Default Print Command in UNIX Environments . 104 Controlling the Content and Appearance of Output in UNIX Environments . 104 Chapter 5 • Accessing Shared Executable Libraries from SAS . 107 Overview of Shared Libraries in SAS . 107 The SASCBTBL Attribute Table . 108 Special Considerations When Using Shared Libraries . 114 Examples of Accessing Shared Executable Libraries . 126 Chapter 6 • Viewing Output and Help in the SAS Remote Browser . 133 What Is Remote Browsing? . 133 Using Remote Browsing with ODS Output . 134 Installing the Remote Browser Server . 134 System Options for Remote Browsing . 134 Setting Up the SAS Remote Browser . 135 Remote Browsing and Firewalls . 135 PART 2 SAS Windowing Environment 137 Chapter 7 • Working in the SAS Windowing Environment . 139 Definition of the SAS Windowing Environment . 140 Description of SAS in the X Environment . 140 Contents v The SAS Session Manager (motifxsassm) in UNIX . 143 Displaying Function Key Definitions in UNIX Environments . ..