SAS(R) 9.1.3 Companion for Z/OS
Total Page:16
File Type:pdf, Size:1020Kb
SAS® 9.1.3 Companion for z/OS The correct bibliographic citation for this manual is as follows: SAS Institute Inc. 2004. SAS ® 9.1.3 Companion for z/OS. Cary, NC: SAS Institute Inc. SAS® 9.1.3 Companion for z/OS Copyright © 2004, SAS Institute Inc., Cary, NC, USA ISBN 1-59047-529-1 All rights reserved. Produced in the United States of America. For a hard-copy 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. 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. 1st printing, July 2004 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/pubs 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 What’s New vii Overview vii Details vii PART1 Running SAS Software under z/OS 1 Chapter 1 Initializing and Configuring SAS Software 3 Invoking SAS in the z/OS Environment 4 Connecting to SAS under z/OS 6 Customizing Your SAS Session 7 Specifying Physical Files 14 SAS Software Files 15 Transporting SAS Data Sets between Operating Environments 25 Accessing SAS Files in Other Operating Environments 25 Utilizing Input/Output Features 26 Reserved z/OS DDnames 26 Setting Up the Remote Help System 27 Exiting or Terminating Your SAS Session in the z/OS Environment 28 Support for SAS Software 29 Solving Problems under z/OS 31 Chapter 2 Using SAS Data Libraries 35 Introduction 36 SAS Library Engines 36 SAS View Engines 39 Library Implementation Types for Base and Sequential Engines 40 Assigning SAS Data Libraries 53 Chapter 3 Accessing BMDP, SPSS, and OSIRIS Files 67 Introduction to the BMDP, SPSS, and OSIRIS Engines 67 Accessing BMDP Files 68 Accessing SPSS Files 69 Accessing OSIRIS Files 70 Chapter 4 Allocating External Files 73 Introduction to External Files 73 Ways of Allocating External Files 73 Using the FILENAME Statement or Function to Allocate External Files 74 Using the JCL DD Statement to Allocate External Files 76 Using the TSO Allocate Command to Allocate External Files 77 Allocating External Files on Tape 77 Allocating External Files to a Pipe 78 iv Allocating Generation Data Sets 79 Allocating Nonstandard External Files 80 Concatenating External Files 81 Displaying Information about External Files 81 Deallocating External Files 81 Chapter 5 Accessing External Files 83 Referring to External Files 84 How SAS Determines Device Types 85 Writing to External Files 85 Reading from External Files 92 Accessing Nonstandard Files 97 Accessing UNIX System Services Files 100 Writing Your Own I/O Access Methods 107 Accessing SAS Statements from a Program 107 Using the INFILE/FILE User Exit Facility 107 Chapter 6 Directing SAS Log and SAS Procedure Output 109 Types of SAS Output 110 Directing Output to External Files with the PRINTTO Procedure 112 Directing Output to External Files with System Options 113 Directing Output to External Files with the DMPRINT Command 115 Directing Output to External Files with the FILE Command 115 Directing Output to External Files with DD Statements 115 Directing Output to a Printer 116 Directing Output to a Remote Destination 122 Directing Procedure Output: ODS Examples 123 Sending E-Mail from within SAS Software 131 Chapter 7 Universal Printing 147 Introduction to Universal Printing 148 Using Universal Printing in the Windowing Environment 148 Using Universal Printing in a Batch Environment 154 Sample Programs and Summary 160 The SASLIB.HOUSES Data Set 178 PART2 Application Considerations 181 Chapter 8 SAS Interfaces to ISPF and REXX 183 SAS Interface to ISPF 184 SAS Interface to REXX 199 Chapter 9 Data Representation 207 Representation of Numeric Variables 207 Using the LENGTH Statement to Save Storage Space 207 How Character Values Are Stored 208 v Line-Feed Characters and Transferring Data between EBCDIC and ASCII 209 Chapter 10 Optimizing Performance 211 Introduction to Optimizing Performance 212 Collecting Performance Statistics 212 Optimizing I/O 213 Efficient Sorting 218 Some SAS System Options That Can Affect Performance 218 Managing Memory 219 Loading SAS Modules Efficiently 221 Other Considerations for Improving Performance 221 PART3 Host-Specific Features of the SAS Language 223 Chapter 11 Data Set Options under z/OS 225 Data Set Options in the z/OS Environment 225 Summary of SAS Data Set Options in the z/OS Environment 228 Chapter 12 Formats under z/OS 233 Formats in the z/OS Environment 233 Considerations for Using Formats in the z/OS Environment 233 Chapter 13 Functions and CALL Routines under z/OS 245 Functions and CALL Routines under z/OS 245 Chapter 14 Informats under z/OS 277 Informats in the z/OS Environment 277 Considerations for Using Informats under z/OS 277 Chapter 15 Macros under z/OS 287 Macros in the z/OS Environment 287 Automatic Macro Variables 287 Macro Statements 289 Macro Functions 290 Autocall Libraries 290 Stored Compiled Macro Facility 292 Other Host-Specific Aspects of the Macro Facility 293 Additional Sources of Information 293 Chapter 16 Procedures under z/OS 295 Procedures in the z/OS Environment 295 Chapter 17 Statements under z/OS 359 Statements in the z/OS Environment 359 Chapter 18 System Options under z/OS 407 System Options in the z/OS Environment 410 Summary Table of SAS System Options 529 vi Chapter 19 Windows and Commands in z/OS Environments 547 Windows and Commands in the z/OS Environment 548 Using the Graphical Interface 548 Host-Specific Windows in the z/OS Environment 550 Host-Specific Windows of the FORM Subsystem 556 Host-Specific Window Commands 559 SAS System Options That Affect the z/OS Windowing Environment 569 Terminal Support in the z/OS Environment 569 PART4 Appendixes 573 Appendix 1 Using the INFILE/FILE User Exit Facility 575 Introduction 575 Writing a User Exit Module 575 Function Descriptions 579 SAS Service Routines 585 Building Your User Exit Module 587 Activating an INFILE/FILE User Exit 587 Sample Program 588 Appendix 2 Host-System Subgroup Error Messages 599 Introduction 599 Messages from the SASCP Command Processor 599 Messages from the TSO Command Executor 601 Messages from the Internal CALL Command Processor 603 Appendix 3 Recommended Reading 605 Recommended Reading 605 Glossary 607 Index 615 vii What’s New Overview New features in SAS 9.0 (and later) under z/OS include support for the following items: long format names remote help record-level sharing (RLS) for VSAM data sets and extended-format VSAM data sets. Note: This section describes the features of SAS software under z/OS that are new or enhanced since SAS 8.2. z/OS is the successor to the OS/390 operating system. SAS 9.1 (and later) for z/OS is supported on both OS/390 and z/OS operating systems and, throughout this document, any reference to z/OS also applies to OS/390, unless otherwise stated. For important information about new developments for SAS 9.1 (and later) for z/ OS, see support.sas.com. R Details Long Format Names Beginning with version 9.0, SAS supports “Long Format Names” on page 38 up to a maximum length of 32 bytes. Because earlier versions of SAS support format names that are only a maximum length of 8 bytes, you will not be able to use earlier versions of SAS to read SAS 9.0 (and later) data sets that contain long format names. viii What’s New Remote Help The “Setting Up the Remote Help System” on page 27 enables users who access SAS by using a z/OS emulator (or a real 3270) to view SAS documentation with a Web browser on a PC that is running Microsoft Windows. Previously, all documentation was displayed by the itemstore help in the SAS Help window in the z/OS emulator. By displaying this documentation in your Windows Web browser, the browsing capability is improved and the documentation content is more complete. SAS Language Elements The following SAS statements have been enhanced: The NRLS option in the INFILE statement instructs SAS not to attempt to open a VSAM data set in record-level sharing (RLS) mode, even if the data set is defined as RLS eligible. The libref argument in the LIBNAME statement now supports library names that contain underscores (_). The following SAS system options are new: The DLEXCPCOUNT option reports EXCPs (Execute Channel Program calls) to direct access bound libraries. The DLMSGLEVEL option specifies which level of messages to generate for SAS data libraries. The FILESPACE option at initialization specifies how the FILENAME and LIBNAME statements should provide default values when allocating a new z/ OS data set. The new SAS function DSNCATLGD verifies the existence of a file in the z/OS system catalog.