SAS Tricks and Techniques From the SNUG Committee. Bhupendra Pant University of Western Sydney College

Similar documents
DATA Step Debugger APPENDIX 3

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

Intro to MS Visual C++ Debugging

Debugging INTRODUCTION DEBUGGER WHAT IS VBA'S DEBUGGING ENVIRONMENT?

Debug for GDB Users. Action Description Debug GDB $debug <program> <args> >create <program> <args>

Make SAS Enterprise Guide Your Own. John Ladds Statistics Canada Paper

Supplement: Visual C++ Debugging

Chapter 12 Visual Program Debugger

A Tutorial for ECE 175

INVOKING THE DEBUGGER. Invoking the Data Step debugger is as simple as adding a parameter to the DATA statement:

Under the Debug menu, there are two menu items for executing your code: the Start (F5) option and the

SAP Debug Tips Switching between the Classic Debugger and New Debugger

Using gdb to find the point of failure

The DATA Statement: Efficiency Techniques

MadCap Lingo at HPE Big Data

Marten van Dijk, Syed Kamran Haider

Who Am I? Objective. Debugging Essentials

Parallel Debugging. ª Objective. ª Contents. ª Learn the basics of debugging parallel programs

Changing the Embedded World TM. Module 3: Getting Started Debugging

EG 4.1. PC-SAS users. for. I C T EG 4.1 for PC-SAS Users. Thursday - May 7 th, 2009

Introduction... 1 Part I: Getting Started with Excel VBA Programming Part II: How VBA Works with Excel... 31

Eclipse Tutorial. For Introduction to Java Programming By Y. Daniel Liang

Debugging in AnyLogic. Nathaniel Osgood CMPT

NetBeans Tutorial. For Introduction to Java Programming By Y. Daniel Liang. This tutorial applies to NetBeans 6, 7, or a higher version.

CSE 351. GDB Introduction

Code::Blocks Student Manual

CS354 gdb Tutorial Written by Chris Feilbach

1 Preface About this Manual Intended Audience Revision History Document Conventions Version...

EPG Data Analysis 101

Using the Xcode Debugger

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

BASIC USER TRAINING PROGRAM Module 5: Test Case Development

The clean-up functionality takes care of the following problems that have been happening:

BasicScript 2.25 User s Guide. May 29, 1996

Visual Studio 2008 Load Symbols Manually

News in RSA-RTE 10.2 updated for sprint Mattias Mohlin, May 2018

1. I NEED TO HAVE MULTIPLE VERSIONS OF VISUAL STUDIO INSTALLED IF I M MAINTAINING APPLICATIONS THAT RUN ON MORE THAN ONE VERSION OF THE.

Migration to SAS Grid: Steps, Successes, and Obstacles for Performance Qualification Script Testing

Delivering training since 1996

CS2: Debugging in Java

GDB Tutorial. A Walkthrough with Examples. CMSC Spring Last modified March 22, GDB Tutorial

Integration for CodeBlocks

CSE 374 Programming Concepts & Tools

Caliber 11.0 for Visual Studio Team Systems

<Insert Picture Here> How to Debug Oracle ADF Framework Applications

SAS Programs Read the raw data

MPLAB X Debugging Techniques

IRAS 6.0. Release Notes

COPYRIGHTED MATERIAL. Part I: Getting Started. Chapter 1: IDE. Chapter 2: Controls in General. Chapter 3: Program and Module Structure

A Long-Time SAS Programmer Learns New Tricks. DASUG Presentation by Lisa Horwitz, October 20, 2017

5/19/2015. Objectives. JavaScript, Sixth Edition. Understanding Syntax Errors. Introduction to Debugging. Handling Run-Time Errors

Installing Visual Studio for Report Design

MetaManager 3.3 New Features Guide METAMANAGER AN IBM GLOBAL SOLUTIONS DIRECTORY OFFERING BSP Software LLC 1/5

There are a few important ways that Smalltalk is different then other languages:

Debugging Java in Agents, Script Libraries, and XPages

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

ECE 3210 Laboratory 1: Develop an Assembly Program

Lab 1: Space Invaders. The Introduction

Frequently Asked Questions

General Improvements with GainSeeker versions 8.8 and 8.8.1

OE101b Architect OpenEdge Architect. John Kendall Solvepoint Corporation

Noopur Gupta Eclipse JDT/UI Committer IBM India

Lab 1: Simon. The Introduction

GETTING STARTED. A Step-by-Step Guide to Using MarketSight

Integrating Microsoft Office Learn about object linking and embedding (OLE) Tutorial 1 Integrating Word and Excel

An Overview of ABAP Debugger Settings and System Areas

An Introduction to Komodo

The NetBeans IDE is a big file --- a minimum of around 30 MB. After you have downloaded the file, simply execute the file to install the software.

Use That SAP to Write Your Code Sandra Minjoe, Genentech, Inc., South San Francisco, CA

Debugging for Fuco s. Explanation, tips & trics for debugging in SAP CRM

Microsoft Visual Basic Code Execution Has Been Interrupted Error

Select a report and click this to view it. Select a report and click this to change it.

IBM i Debugger. Overview Service Entry Points Debugger Functions Attach to an IBM i Job Launch Configurations and Settings

Exercise Session 6 Computer Architecture and Systems Programming

The ThreadX C-SPY plugin

Debugging with GDB and DDT

PACE Suite. Release Notes. Version Document version

CSE 374 Programming Concepts & Tools. Brandon Myers Winter 2015 Lecture 11 gdb and Debugging (Thanks to Hal Perkins)

UNIT IV -MACROPROCESSOR

After completing this appendix, you will be able to:

Rhapsody Interface Management and Administration

CSCI0330 Intro Computer Systems Doeppner. Lab 02 - Tools Lab. Due: Sunday, September 23, 2018 at 6:00 PM. 1 Introduction 0.

Code::Blocks Student Manual

7 The Integrated Debugger

Mastering the Visual LISP Integrated Development Environment

REST API Operations. 8.0 Release. 12/1/2015 Version 8.0.0

A Practical Introduction to SAS Data Integration Studio

Experiment N o 1. Introduction to Assembly Language Programming

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

Lab 8 - Vectors, and Debugging. Directions

SAS Enterprise Guide Moving from 4.1 to 4.3 What s New and Different?

Debugging. CSE 2231 Supplement A Annatala Wolf

Legacy Client Chart (LCC) Installation Guide for Purkinje System

The CS-220 Development Environment

MS Excel VBA Class Goals

Toad for Oracle s AppDesigner

What s New in SAS Studio?

Easing into Data Exploration, Reporting, and Analytics Using SAS Enterprise Guide

Moving Data and Results Between SAS and Excel. Harry Droogendyk Stratia Consulting Inc.

RefWorks Basic RefWorks for MCHS and MCCN Students last update August 2017

Transcription:

SAS Tricks and Techniques From the SNUG Committee Bhupendra Pant University of Western Sydney College

SAS Tricks and Techniques 1.Data Set Debugger in DMS 2.Recovering your SAS code from EG 3.Creating documented dataset attributes 4. SAS Resources & Links on Enterprise Guide 2

Data Step Debugger

Data Step Debugger Who has never used the Data Step Debugger? The DSD was first introduced in SAS 6.11. And the interface looks like it! The DSD is a port of the old SAS Component Language (SCL) debugger to the SAS Data Step. However klunky it looks, the DSD is an excellent learning tool to learn the details of the SAS Data Step, as well as solve logic and programming errors in your complex data steps. Unfortunately, the DSD is not available from Enterprise Guide. Documentation: http://support.sas.com/documentation/cdl/en/lebaseutilref/63492/html/ default/viewer.htm#n06w89msxn3za7n10g5sx25pa0j0.htm 4

Data Step Debugger Commands by Category Category Language elements Description Controlling Program Execution (G)O JUMP STEP (default: Enter Key) Starts or resumes execution of the DATA step. Restarts execution of a suspended program. Executes statements one at a time in the active program. Controlling the Windows HELP Displays information about debugger commands. Manipulating DATA Step Variables SWAP CALCULATE (DES)CRIBE (EX)AMINE SET Switches control between the SOURCE window and the LOG window. Evaluates a debugger expression and displays the result. Displays the attributes of one or more variables. Displays the value of one or more variables. Assigns a new value to a specified variable. 5

Data Step Debugger Commands by Category (cont) Category Language elements Description Manipulating Debugging Requests (B)REAK (D)ELETE LIST TRACE (W)ATCH Suspends program execution at an executable statement. Deletes breakpoints or the watch status of variables in the DATA step. Displays all occurrences of the item that is listed in the argument. Controls whether the debugger displays a continuous record of the DATA step execution. Suspends execution when the value of a specified variable changes. Tailoring the Debugger ENTER Assigns one or more debugger commands to the ENTER key. Terminating the Debugger (Q)UIT Quits or Terminates the Debuger 6

Example Invocation Note: There are two bugs in this example data class/debug; do until (eof); if _n_=1 then putlog "Starting the data step..."; set sashelp.class end=eof; m+ifn(sex="m",0,1); if sex="f" then f+1; end; putlog (m f) (=); run; 7

Screen shot 8

If you have access to SAS DMS, learn the Data Step Debugger! 9

Recovering your SAS code from EG

Broken EG Project? Ever had a time when your EG project wont open because it has corrupted or is too big to load? Felt like you have lost all that code you worked on? Did you know you can get the code back?

Here s How. Changer the file extension to.zip In this case I have several sub folders, so I Iooked for the most recent update Open it and there is your SAS code.

Creating documented dataset attributes

Proc contents is a great way of displaying the attributes of a dataset, but is doesn t translate well to distribute to team members. How about getting it to an Excel friendly format? You could use proc contents data = <infile> out = <outfile> then export to the resultant dataset to excel But how about:

You could try this In the data grid view click on the properties button

Select the columns tab and click on copy to clipboard

Paste into excel

SAS Resources & Links on Enterprise Guide

SAS Resources SAS Enterprise Guide SAS Enterprise Guide Overview: http://www.sas.com/technologies/bi/query_reporting/guide/index.html Product Documentation (including what s new across the versions): http://support.sas.com/documentation/onlinedoc/guide/index.html SAS Enterprise Guide Interactive Tour: http://www.sas.com/technologies/bi/query_reporting/guide/tour/itour_flash.ht ml YouTube video from SAS channel Using the Editor in EG for writing Programs New Features: http://www.youtube.com/watch?v=awbn7lqbmrm GOOD one similar to the workshops Various YouTube SAS channel Enterprise Guide videos: http://www.youtube.com/user/sassoftware/videos?query=enterprise+guide SAS Enterprise Guide Technical Papers: http://support.sas.com/resources/papers/tnote/tnote_enterpriseguide.html

List of Webinars SAS Webinar Getting Started with SAS Enterprise Guide: http://www.sas.com/reg/web/corp/2208268 SAS Webinar New Goodies for the SAS Programmer in SAS Enterprise Guide 4.3 (older version but a lot of new features that are still new since EG4.1): http://www.sas.com/reg/web/corp/1259797 SAS Webinar SAS Enterprise Guide for the Programmer: What's in It for Me?: http://www.sas.com/reg/gen/corp/858824 SAS Webinar Making SAS Enterprise Guide the Center of Your Business: http://www.sas.com/reg/web/corp/956991 SAS Webinar Introduction to Custom Tasks in SAS Enterprise Guide: http://www.sas.com/reg/web/corp/2246736

SAS Webinar Getting Started with SAS Enterprise Guide: http://www.sas.com/reg/web/corp/2208268

Questions?