Using SAS/SHARE More Efficiently

Similar documents
SAS Data Libraries. Definition CHAPTER 26

Storing and Reusing Macros

Using Data Transfer Services

SAS File Management. Improving Performance CHAPTER 37

Batch vs. Interactive: Why You Need Both Janet E. Stuelpner. ASG. Inc Cary. North Carolina

Optimizing System Performance

The SERVER Procedure. Introduction. Syntax CHAPTER 8

- a SAS/A~ Application

SAS Catalogs. Definition. Catalog Names. Parts of a Catalog Name CHAPTER 32

Using Cross-Environment Data Access (CEDA)

SAS I/O Engines. Definition. Specifying a Different Engine. How Engines Work with SAS Files CHAPTER 36

What Is a Communications Access Method? CHAPTER 1 Using Communications Access Methods

Preserving your SAS Environment in a Non-Persistent World. A Detailed Guide to PROC PRESENV. Steven Gross, Wells Fargo, Irving, TX

Introduction. LOCK Statement. CHAPTER 11 The LOCK Statement and the LOCK Command

Knit Perl and SAS Software for DIY Web Applications

SAS/FSP 9.2. Procedures Guide

Using SAS Files. Introduction CHAPTER 5

Locking SAS Data Objects

Using an ICPSR set-up file to create a SAS dataset

Creating and Executing Stored Compiled DATA Step Programs

OpenVMS Operating Environment

This chapter is recommended primarily for server administrators.

SHARING SAS DATA INA PC LAN ENVIRONMENT. Tony Payne, SPS Ltd. ABSTRACT

Version 6 and Version 7: A Peaceful Co-Existence Steve Beatrous and James Holman, SAS Institute Inc., Cary, NC

Paper Operating System System Architecture 9.2 Baseline and additional releases OpenVMS OpenVMS on Integrity 8.3 Solaris

Using the SQL Editor. Overview CHAPTER 11

Taking advantage of the SAS System on OS/390

Can I have the menu please?

Using the SAS(R) System in a distributed DOS(R)-to-VMS(TM) Environment using PCSA(TM) Software Thomas Emmerich, SAS Institute

David DeFlyer Class notes CS162 January 26 th, 2009

Using SAS Files. Introduction to SAS Files, Data Libraries, and Engines CHAPTER 4

TAKING ADVANTAGE OF THE SAS SYSTEM ON THE OS/390 PLATFORM. David Crow, SAS Institute Inc., Cary, NC

IBM Education Assistance for z/os V2R1

Year 2000 Issues for SAS Users Mike Kalt, SAS Institute Inc., Cary, NC Rick Langston, SAS Institute Inc., Cary, NC

HOW TO DEVELOP A SAS/AF APPLICATION

FSEDIT Procedure Windows

Introducing the SAS ODBC Driver

CHAPTER 7 Examples of Combining Compute Services and Data Transfer Services

More Data, Less Chatter : Improving Performance on z/os with IBM zhpf. Holden O Neal Session August 14, 2015

CHAPTER 13 Importing and Exporting External Data

Alan Davies. Scorpio Software Services Pty Ltd

Stephen M. Beatrous, SAS Institute Inc., Cary, NC John T. Stokes, SAS Institute Inc., Austin, TX

Data Set Options. Specify a data set option in parentheses after a SAS data set name. To specify several data set options, separate them with spaces.

SAS Support for TELNET on Windows

SAS/ACCESS Interface to R/3

Paper DB2 table. For a simple read of a table, SQL and DATA step operate with similar efficiency.

Procedures. PROC CATALOG CATALOG=<libref.>catalog <ENTRYTYPE=etype> <KILL>; CONTENTS <OUT=SAS-data-set> <FILE=fileref;>

Moving and Accessing SAS. 9.1 Files

Contents. Today's Topic: Introduction to Operating Systems

APPENDIX 3 Tuning Tips for Applications That Use SAS/SHARE Software

APPENDIX 2 Customizing SAS/ASSIST Software

Administrator for Enterprise Clients: User s Guide. Second Edition

SAS/ASSIST Software Setup

Moving and Accessing SAS Files between Operating Environments

Performance Considerations

David S. Septoff Fidia Pharmaceutical Corporation

SAS/Warehouse Administrator Usage and Enhancements Terry Lewis, SAS Institute Inc., Cary, NC

APPENDIX 4 Migrating from QMF to SAS/ ASSIST Software. Each of these steps can be executed independently.

OPERATING SYSTEMS OVERVIEW

Beginning Tutorials. Introduction to SAS/FSP in Version 8 Terry Fain, RAND, Santa Monica, California Cyndie Gareleck, RAND, Santa Monica, California

capabilities and their overheads are therefore different.

Introduction. Keeping Efficiency in Perspective. CHAPTER 11 Writing Efficient and Portable Macros

Paper SAS Managing Large Data with SAS Dynamic Cluster Table Transactions Guy Simpson, SAS Institute Inc., Cary, NC

Virtual Machines WHEN YOU FINISH READING THIS CHAPTER YOU SHOULD BE ABLE TO:

Integrated Safety Reporting Anemone Thalmann elba - GEIGY Ltd (PH3.25), Basel

BAMS/DSS Use of Microsoft Streets & Trips

SAS ODBC Driver. Overview: SAS ODBC Driver. What Is ODBC? CHAPTER 1

Introduction. Introduction to SCL. SCL Elements CHAPTER 1

A simplistic approach to Grid Computing Edmonton SAS Users Group. April 5, 2016 Bill Benson, Enterprise Data Scienc ATB Financial

The DATA Statement: Efficiency Techniques

Beginning Tutorials. PROC FSEDIT NEW=newfilename LIKE=oldfilename; Fig. 4 - Specifying a WHERE Clause in FSEDIT. Data Editing

Patricia Guldin, Merck & Co., Inc., Kenilworth, NJ USA

FRAME Your Mainframe Batch Applications

Software Concepts. It is a translator that converts high level language to machine level language.

Help, I've Received a Spreadsheet File from StarOffice Calc...!

SAS Scalable Performance Data Server 4.45

CHAPTER 5 Macintosh: TCP/IP Access Method

An Annotated Guide: The New 9.1, Free & Fast SPDE Data Engine Russ Lavery, Ardmore PA, Independent Contractor Ian Whitlock, Kennett Square PA

Batch Jobs Performance Testing

Find2000: A Search Tool to Find Date-Related Strings in SAS

Compute (Bridgend) Ltd

Introduction to Computer Systems and Operating Systems

, endsubmit; RETURN;

Process a program in execution; process execution must progress in sequential fashion. Operating Systems

Moving and Accessing SAS 9.2 Files

Version 8 Base SAS Performance: How Does It Stack-Up? Robert Ray, SAS Institute Inc, Cary, NC

Accessibility Features in the SAS Intelligence Platform Products

An Introduction to SAS/SHARE, By Example

Windows: SPX Access Method

Tuning WebHound 4.0 and SAS 8.2 for Enterprise Windows Systems James R. Lebak, Unisys Corporation, Malvern, PA

Introduction to Operating System. Dr. Aarti Singh Professor MMICT&BM MMU

An Introduction to SAS/FSP Software Terry Fain, RAND, Santa Monica, California Cyndie Gareleck, RAND, Santa Monica, California

Operating Systems Fundamentals. What is an Operating System? Focus. Computer System Components. Chapter 1: Introduction

ABSTRACT INTRODUCTION

Best Practice for Creation and Maintenance of a SAS Infrastructure

FSVIEW Procedure Windows

Host-Target Testing Executive Summary Copyright

Last Class: Memory management. Per-process Replacement

Operator Combination and Control

from the source host, use the FTP put command to copy a file from the source host to the target host.

Transcription:

Using More Efficiently by Philip R Holland, Holland Numerics Ltd, UK Abstract is a very powerful product which allow concurrent access to SAS Datasets for reading and updating. However, if not used with care, it can also be the cause of significant system-wide performance problems. Although the product is widely used, its impact is not widely understood. This paper describes some of the potential pitfalls when using, and suggests techniques to gain the maximum benefit from the product. 1. Introduction The MVS operating system has 3 modes of file access. SHR permits read-only access, and OLD and MOD permit exclusive read/write access. Libraries under MVS are single files containing one or more members, e.g. DATA, VIEW, CATALOG, ACCESS, etc. User User Shared Local (read-only) Figure 1. Sharing Libraries without. If a user wants to read and write to sets and Catalogs in a, then the must be allocated to a Reference (libref) as OLD or MOD, which will prevent any other user from allocating it. If a user only wants to read from a, then allocating it as SHR will only permit other users to allocate it as SHR as well for read-only access at the same time.

User User Server REMOTE Server SAS REMOTE Server Shared Local (read-only) Figure 2. Sharing Libraries with. A Server can allocate Libraries as OLD, which will prevent any other user from allocating those Libraries directly. However, by using the REMOTE, which is part of, other users can allocate those Libraries as SHR or OLD through the Server. The MVS operating system will see only one allocation, that of the Server, for each so no conflicts will exist between the user accesses. will read and write on behalf of the individual users. As a result, concurrent access can be controlled at a lower level than the default level of, e.g. library member, member record, etc. 2. Performance measurement The following observations were made using the SAS System for MVS release 6.08 running on an IBM mainframe. The client SAS user was a batch job running SAS and the server was another batch job running PROC SERVER under SAS, which were run concurrently. Time comparisons were calculated from information in the SAS Logs from each batch job.

Client Resource Consumption Server Client start Read data from Read data from Generate Formats in Generate Formats in Process local data Time Line Process and write data in Process and write data in Client close Figure 3. Relative CPU Resources for Local and Libraries. 2.1 Sequential read of set using a DATA step 2.1.1 Local set Client session = 10 CPU seconds, Server session = 0 CPU seconds 2.1.2 set in Client session = 11 CPU seconds, Server session = 12 CPU seconds 2.2 Copying a set to WORK using PROC COPY 2.2.1 Local set Client session = 10 CPU seconds, Server session = 0 CPU seconds

2.2.2 set in Client session = 11 CPU seconds, Server session = 12 CPU seconds 2.3 Generate a SAS Format into a permanent using PROC FORMAT 2.3.1 Local Client session = 10 CPU seconds, Server session = 0 CPU seconds 2.3.2 in Client session = 11 CPU seconds, Server session = 110 CPU seconds 3. Coding examples 3.1 Coding without considering overheads The following code will use about the same CPU time in the Client session and in the Server session, and the Client session will consume about 10% more CPU time than the equivalent code running with a local : libname sharelib 'PROJECT.GROUP.SASDB' disp=old server=sharesrv; data sharelib.ds01; set sharelib.ds00; * start of processing *; * end of processing.. *; output; run; 3.2 Coding with reduced overheads The following code will use a little more CPU time in the Client session, due to the additional PROC COPY steps, but will use much less CPU time in the Server session, as the only processing performed there will be the initial PROC COPY read and the final PROC COPY write of the Dataset: libname sharelib 'PROJECT.GROUP.SASDB' disp=old server=sharesrv; proc copy in=sharelib out=work; select ds00; run; data work.ds01; set work.ds00; * start of processing *; * end of processing.. *; output; run; proc copy in=work out=sharelib; select ds01;

run; 4. Further observations Servers are not limited to MVS platforms, and are supported under most of the other platforms supporting the SAS System, including CMS, OpenVMS, OS/2, Unix, Windows NT, Windows 95, VSE and AOS/VS. The following observations were made while working under OS/2 and Netware, although they will all apply to the platforms listed earlier. It is possible to store SAS/AF and SAS/FSP application Catalogs on a Server, but beware of compiling code directly into the -controlled Catalog. As compiling involves a certain amount of random access to the SAS Catalog containing the code, storing that SAS Catalog on a Server will make the overhead on that Server during compilation extremely expensive. It would be cheaper and quicker to compile local copies of the code and then copy the compiled code back to the Server. It is not recommended to put code compiled with the Debug option set on into a SAS Catalog in a SAS Data controlled by, as multiple access to that code module will severely impact the performance of the Server, and may even crash the Server. 5. Recommendations If a set or Catalog must be updated while other users are reading/updating data in the same, then only put those SAS objects into a controlled by. Put SAS data which is only read during the day in a shared and update when no other users are accessing the data (e.g. overnight). Only access sets controlled by in read and update steps, not for processing, as processing time will be mirrored unnecessarily on the Server. If the data on the Server has to be updated, copy the data to a local set, update the data in the local set, then copy the data back into the set controlled by remembering to check that it does not overwrite any data that has been updated by another user since the copy was taken. Avoid random access processing of sets controlled by as the Server will use significantly more resources than the Client task (e.g. PROC FORMAT). Compile local copies of SAS/AF and SAS/FSP code and then copy the compiled code back into the SAS Catalog on the Server. Do not put code compiled with the Debug option set into a SAS Catalog in a controlled by, as multiple access to that code module will severely impact the performance of the Server, and may even crash the Server. 6. References and further reading - Usage and Reference, Version 6, First Edition. The author is a consultant for Holland Numerics Ltd and can be contacted at the following address: Philip R Holland Holland Numerics Ltd

94 Green Drift Royston Herts. SG8 5BT UK e-mail: <phil.holland@bcs.org.uk> tel. (mobile): +44-(0)850-295556 SAS,, SAS/AF and SAS/FSP are a registered trademarks of SAS Institute Inc., Cary, NC, USA.