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

Similar documents
Step through Your DATA Step: Introducing the DATA Step Debugger in SAS Enterprise Guide

Using SAS/SHARE More Efficiently

Using Data Transfer Services

QUEST Procedure Reference

A Guided Tour Through the SAS Windowing Environment Casey Cantrell, Clarion Consulting, Los Angeles, CA

APPENDIX 2 Customizing SAS/ASSIST Software

Submitting Code in the Background Using SAS Studio

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

Easy CSR In-Text Table Automation, Oh My

CHAPTER 13 Importing and Exporting External Data

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

The 'SKIP' Statement

TestBase's Patented Slice Feature is an Answer to Db2 Testing Challenges

WHAT IS THE CONFIGURATION TROUBLESHOOTER?

Installation and Maintenance Instructions for SAS 9.2 Installation Kit for Basic DVD Installations on z/os

Information Visualization

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

Routing the SAS Log and SAS Procedure Output

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

Using Cross-Environment Data Access (CEDA)

Grid Computing in SAS 9.4

Making the most of SAS Jobs in LSAF

ABSTRACT MORE THAN SYNTAX ORGANIZE YOUR WORK THE SAS ENTERPRISE GUIDE PROJECT. Paper 50-30

Locking SAS Data Objects


CHAPTER-1: INTRODUCTION TO OPERATING SYSTEM:

Scheduling in SAS 9.4, Second Edition

SAS Clinical Data Integration 2.6

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

Using Graph-N-Go With ODS to Easily Present Your Data and Web-Enable Your Graphs Curtis A. Smith, Defense Contract Audit Agency, La Mirada, CA

Storing and Reusing Macros

Using the SQL Editor. Overview CHAPTER 11

Introduction. CHAPTER 3 Working in the SAS Windowing Environment

DATA Step Debugger APPENDIX 3

BI-09 Using Enterprise Guide Effectively Tom Miron, Systems Seminar Consultants, Madison, WI

Excel programmers develop two basic types of spreadsheets: spreadsheets

FRAME Your Mainframe Batch Applications

SAS/ASSIST Software Setup

Paper PS05_05 Using SAS to Process Repeated Measures Data Terry Fain, RAND Corporation Cyndie Gareleck, RAND Corporation

Paper CC16. William E Benjamin Jr, Owl Computer Consultancy LLC, Phoenix, AZ

SAS Business Rules Manager 1.2

Chapter 3: Process Concept

Chapter 3: Process Concept

Enterprise Client Software for the Windows Platform

Introduction to Computer Systems and Operating Systems

External Files. Definition CHAPTER 38

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

!! What is virtual memory and when is it useful? !! What is demand paging? !! When should pages in memory be replaced?

Programming Style. Quick Look. Features of an Effective Style. Naming Conventions

An Introduction to Compressing Data Sets J. Meimei Ma, Quintiles

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

Chapter 3: Process Concept

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

Operating System. Operating Systems Structure Chapter 2. Services Provided by the OS. Evolution of an Operating System

Parallelizing Windows Operating System Services Job Flows

OPERATING SYSTEM SUPPORT (Part 1)

Chapter 3: Processes

Chapter 28 Saving and Printing Tables. Chapter Table of Contents SAVING AND PRINTING TABLES AS OUTPUT OBJECTS OUTPUT OBJECTS...

Getting Up to Speed with PROC REPORT Kimberly LeBouton, K.J.L. Computing, Rossmoor, CA

Database Architectures

David S. Septoff Fidia Pharmaceutical Corporation

Going Under the Hood: How Does the Macro Processor Really Work?

Best Practice for Creation and Maintenance of a SAS Infrastructure

Are Your SAS Programs Running You? Marje Fecht, Prowerk Consulting, Cape Coral, FL Larry Stewart, SAS Institute Inc., Cary, NC

Definition: A data structure is a way of organizing data in a computer so that it can be used efficiently.

CONTROL OF BATCH PROGRAM EXECUTION WITH THE SAS SYSTEM

Performance Considerations

What s New in SAS Studio?

Designing Web Applications: Lessons from SAS User Interface Analysts Todd Barlow, SAS Institute Inc., Cary, NC

Increased Productivity Through The Use Of The Display Manager System Jim Anderson, Blue Cross Blue Shield of Nebraska

SAS Macro Dynamics - From Simple Basics to Powerful Invocations Rick Andrews, Office of the Actuary, CMS, Baltimore, MD

SAS Data Libraries. Definition CHAPTER 26

Using Metadata Queries To Build Row-Level Audit Reports in SAS Visual Analytics

SAS/FSP 9.2. Procedures Guide

Unlock SAS Code Automation with the Power of Macros

For example, let's say that we have the following functional specification:

CHAPTER 3 - PROCESS CONCEPT

ThruPut Manager AE Product Overview From

Scheduling in SAS 9.2

C H A P T E R SYSTEM DESIGN

CHAPTER 7 Examples of Combining Compute Services and Data Transfer Services

While You Were Sleeping, SAS Was Hard At Work Andrea Wainwright-Zimmerman, Capital One Financial, Inc., Richmond, VA

Chapter 1: Introduction

You deserve ARRAYs; How to be more efficient using SAS!

A Practical Introduction to SAS Data Integration Studio

Chapter 3 Processes. Process Concept. Process Concept. Process Concept (Cont.) Process Concept (Cont.) Process Concept (Cont.)

Assignments. Assignment 2 is due TODAY, 11:59pm! Submit one per pair on Blackboard.

STAT 3304/5304 Introduction to Statistical Computing. Introduction to SAS

dbdos PRO 2 Quick Start Guide dbase, LLC 2013 All rights reserved.

Chapter 3: Processes

.THE INFORMATION CENTER INTERFACE (TICI) SA SI INQ FSP FSCALC A A2 G P N M J

CS/ECE 6780/5780. Al Davis

Page 1. Lab 5 Logistics. Implicit Threads. Explicit Thread Semantics. Problem not enough interrupt pins CS/ECE 6780/5780. Al Davis

Overview. CHAPTER 2 Using the SAS System and SAS/ ASSIST Software

SAS PROGRAM EFFICIENCY FOR BEGINNERS. Bruce Gilsen, Federal Reserve Board

SAS PROGRAM EFFICIENCY FOR BEGINNERS. Bruce Gilsen, Federal Reserve Board

Bruce Gilsen, Federal Reserve Board

Leveraging SAS Visualization Technologies to Increase the Global Competency of the U.S. Workforce

Chapter 3: Processes. Operating System Concepts 9 th Edit9on

Introduction. JES Basics

Transcription:

Batch vs. Interactive: Why You Need Both Janet E. Stuelpner. ASG. Inc Cary. North Carolina ABSTRACT error was small fa semi-colon was omitted or a closing quotation mark was missing), but caused the program On the mainframe, a great number of people write their to stop running almost immediately. You make the programs and then use batch submission exclusively to minor correction and resubmit the job. Again, the.job is run and test them. As we all know. at times this can waiting on the queue. Do you have any alternatives? be very frustrating. Others use interactive sessions Read on. exclusively. This paper will show the user the reasons why a combination of using batch submissions along WRITING A PROGRAM with an interactive sessions are beneficial to developing new programs. There are many ways to write a program. Everyone has his or her own individual style. Some people write the INTRODUCTION whole program from start to finish before they begin to test and debug it. Others approach a problem modularly. Multitasking on any large mainframe system allows The program is divided into sections. Each section of many users to edit and submit jobs at the same time. the code is written and then tested before moving on to A program is usually written using some type of editor, write the next. When the source code is finished, all and then stored. To run the program. the file is sections have been tested. The modules of the submitted to the operating system. While the job is program can then be run without incurring any errors. executing. the programmer can go on to do other things because execution is completely separate from other operations. SASS) programs consist of many steps which indude data manipulation and the production of output. Programs are usually created in a step by step manner This is terrific if the program runs without error the first where each step builds upon the last. In the course of time. Unfortunately, this rarely happens. More often one program, many SAS data sets may be created. To than not, a program must be run several times before all the bugs are removed and the output is exactly what is save space, many people use the same data set names over and over again, thus writing over old data sets and needed. This can be frustrating during periods of high minimizing the creation of new ones. Others create usage. The program is submitted for execution and it new data sets with every step. This results in a great waits, and waits, and waits. It can be waiting on the number of WORK data sets. The number and method queue to execute because other users' jobs are presently in the system or it can be waiting for of data set creation are a matter of individual choice, but influence how the debugging process will be done. resources that are temporarily unavailable to the job. It takes what seems like forever. In the meantime, the 977

In the following sections, each method of program creation will be discussed with respect to its effect on the debugging process and the advantages and disadvantages of interactive and batch processing. View the list file... can t find the problem yet Revise the program to print out other intermediary files BATCH - THE DISADVANTAGES View the list file... found the problem Batch (or background execution) is defined as a method of running programs in which you prepare a file containing SAS statements and any necessary operating system control statements (e.g., JCl on MVS. DCL on VMS'") and submit the file to the Revise the program View the list file Print the output operating system. When you run jobs in this manner, separate files are created to contain the job log and the listings produced from any output procedu,res. You can You,can see how this can be,a tedious process. Every time a mistake is made or something is overlooked, the view these files on-tine or print them. If you want to program must be revised and rerun. If the system is look at 'any of the intermediary WORK data sets, in a batch submission, you must print the data set in some fashion. A PROC PRINT will cause the data to be very busy, or the program is complicated, this -can mean a great deal of waiting. When you are in the process of writing,a _ program, this can slow things down printed in the list file. Placing PUT statements in a data tremendously. When you have a deadline, there are step (either in a OAT A_NULL _ or within a temporary other ways to proceed in a more timely manner. data step) will cause the data to be printed in the log. BATCH - THE ADVANTAGES The sequence of events in developing a new program can be: Your program is complete. You submit your program to run. You can submit many jobs to run sequentially or Run a program at the same time. At this point it may not matter View the log... errors whether the program waits or runs for 10 minutes or Correct errors half an hour. Once you submit the job. you can do other things because the batch job runs independently View the log... this time there are no errors of anything else. You can even submit the job so that it runs at a later time or overnight when system resources View the list file... the output is not what was are greater becaue.of lower usage. This is a great expected advantag~ when the system is busy and the program Revise the program to print out intermediary must wait_or takes a long time to run. files 978

INTERACTIVE - THE DISADVANTAGES Display Manager requires more resources - primarily memory than a batch job running the same program. An interactive facility is a system that alternately Where real memory or swap space are tight, Display accepts and responds to input. The SAS Display Manager may run slowly. Some mainframe system Manager is such a system. In one session. multiple groups disable it or discourage its use. In many shops tasks can be accomplished. You can write the programs in the Program Editor window, run the program and view the log in the Log window and view they do not make interactive SAS available to the users. INTERACTIVE - THE ADVANTAGES the results in the Output window. The output can be printed from the Output window as well. When a batch job is submitted to the operating system, unless you specifically go through the program and The program is complete. All the errors have been comment out sections, the whole program is run. One removed. You are certain that it will run dean and the output is exactly right. Are you sure you want to run of the advantages of interactive programming is that sections can be run independently of the whole the program in your interactive session? Of course, you program. The INCLUDE and %INCLUDE commands can print the output directly from your session. The make source code available from external files. You problem is that while your job is running. you cannot do anything else. This is only true in MVS systems like TSO and CMS which can handle only one foreground task at a time. In systems like UNIX", OS/2", Windows NT"', etc., you can have several foreground tasks running simultaneously and switch between them at can run your program directly from the external file in your interactive session using %INCLUOE (On an MVS system, using the JCLEXCL option causes SAS to ignore the JCL that is usually included in the source file). You use the INCLUDE command to bring source code from an external file into the Program Editor will. window. Of course, you always have the option of running the whole program. However, if you want to Hopefully, while you were testing your code, you were using a subset of the data that is needed for the final submit portions of the program, this is also possible. Sections of the program can be placed into the project. This will cause the program to run faster. clipboard. Then the code can be submitted to SAS Also, during your testing, you were running a subset of directly from the clipboard. the program. When the first step was completed, you ran the second step. The WORK files were still there, so the program did not have to be run from the beginning. This also saves time. However. now you are ready to run the entire program with all the data As the program is being developed there are several things that can be done. The first is that the program can be saved as it is being written. (Of course, this is not different from writing the program and submitting it from the beginning. This will take time. During this in batch mode.) The program can be run in stages. time, you will not be able to proceed with anything else. Each time a program is run, the intermediary WORK This is the greatest disadvantage of the interactive files are kept. They can be viewed using SAS/FSP system on the mainframe. It is important to note that procedures. If the results are not what you had 979

expected, you can recall the program and run it again after making the appropriate corrections. View the output file Print the output The advantage is that you do not have to run the It seems as if there are the same number of steps as program again just to print out data sets. If the with batch submission. The difference is that with the program was written all at once, you can run the whole thing and look at each data set that is created (provided interactive session, the program is run fewer times and, each iteration of the process takes Jess time because you give each data set a unique name). This makes there is no waiting in batch queues. The reason is that debugging a program a great deal easier. You can see exactly where the error occurred, fix it, and rerun it. Even if the modular approach is taken, errors show up the WORK data sets have not been deleted. They are available for viewing and many more program revisions can take place in a shorter amount of time. immediately and can be fixed and the program rerun. CONCLUSION The sequence of events in developing a new program can be: Run a program View the log... errors Interactive is the better choice while a program is being developed. Throughout the writing and debugging stages of development various segments can be run and tested using a subset of the data. Correct errors Batch is the way to go when a program is complete. Batch processing uses fewer system resources than View the log... this time there are no errors does the display manager. So. when a program has View the list file... the output is not what was expected been debugged and you are ready to produce the final results, run it in batch. View the WORK data sets Revise the program to correct errors View the output... can t find the problem yet When writing a program, the most important factor to consider is comfort. We are all creatures of habit. We tend to do what is easiest, even though it is not necessarily what is most efficient. View the WORK data sets Revise the program to correct errors In the short term, the expense of learning something new is great. However, in the long term, the effort is almost always worthwhile. This holds true in View the output... found the problem programming as well as any other field. In the Revise the program mainframe environment, it is best to use a combination of interactive and batch programming. If the combination is used ccr:ectly. it will save a great 980

amount of time in the process of writing, testing and running programs. ACKNOWLEDGMENTS I would like to gratefully thank two people, without whose help and encouragement this paper would not have been written. The first is my husband, Robert Stuelpner, who suffered through reading and rereading many drafts. The second is Roger Staum, whose helpful hints were much appreciated. SAS is a registered trademark or trademark of SAS Institute, Inc. in the USA and other countries. Other brand product names are registered trademarks or trademarks of their respective companies. 011 indicates USA registration. 981