Automagically Copying and Pasting Variable Names Arthur Tabachneck Roger DeAngelis Randy Herbison Insurance Bureau of Canada CompuCraft Inc Westat John.

Slides:



Advertisements
Similar presentations
Microsoft Excel 2003 To start Excel, click the start button. A slightly different procedure might be required for computers on a network. If you need assistance,
Advertisements

Worst, but still importable data I’ve ever seen Arthur Tabachneck Insurance Bureau of Canada.
Next Presentation: Presenter: Arthur Tabachneck Copy and Paste from Word or Excel to SAS Art holds a PhD from Michigan State University, has been a SAS.
A Participant’s View of the Internet Assessment System (IAS)
Microsoft Office 2010 Access Chapter 1 Creating and Using a Database.
Chapter 5 Creating, Sorting, and Querying a Table
1 An Introduction to IBM SPSS PSY450 Experimental Psychology Dr. Dwight Hennessy.
Access Tutorial 1 Creating a Database
Copyright 2007, Paradigm Publishing Inc. POWERPOINT 2007 CHAPTER 1 BACKNEXTEND 1-1 LINKS TO OBJECTIVES Create Presentation Open, Save, Run, Print, Close,Delete.
XP 1 Using Common Features of Microsoft Office 2003 Rod Rodrigues.
Office 2003 Introductory Concepts and Techniques M i c r o s o f t Access Project 1 Creating and Using a Database.
XP Using Common Features of Microsoft Office Tutorial 1.
If you are connected to the Internet, click and then click on the web page to experience an introduction to applications. The following lesson is about.
COMPREHENSIVE Excel Tutorial 8 Developing an Excel Application.
Introduction to VBA. This is not Introduction to Excel We’re going to assume you have a basic level of familiarity with Excel If you don’t, or you need.
Tutorial 1 Creating a Database. Objectives Learn basic database concepts and terms Learn basic database concepts and terms Explore the Microsoft Access.
Microsoft Office 2007 Word Integration Feature Linking an Excel Worksheet and Chart to a Word Document.
XP New Perspectives on Introducing Microsoft Office XP Tutorial 1 1 Introducing Microsoft Office XP Tutorial 1.
CHAPTER © 2013 The McGraw-Hill Companies, Inc. All rights reserved. 3 Scheduling.
Create Database Tables
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. WORD 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 22 Macros.
Chapter 1 Databases and Database Objects: An Introduction
PMS /134/182 HEX 0886B6 PMS /39/80 HEX 5E2750 PMS /168/180 HEX 00A8B4 PMS /190/40 HEX 66CC33 By Adrian Gardener Date 9 July 2012.
CHAPTER 9 Introducing Microsoft Office Learning Objectives Start Office programs and explore common elements Use the Ribbon Work with files Use.
Learning Objectives What is a spreadsheet and what is the difference between a spreadsheet and a worksheet? Start Excel, open an existing spreadsheet,
Office 2003 Advanced Concepts and Techniques M i c r o s o f t Excel Integration Feature Object Linking and Embedding (OLE) and Web Discussions.
® Microsoft Access 2010 Tutorial 1 Creating a Database.
General Systems Information ALEPH v20.01 Library Staff Training © South Dakota Library Network, 2013 ©Ex Libris (USA), 2011 Modified for SDLN Version
Office 2003 Advanced Concepts and Techniques M i c r o s o f t Access Project 6 Switchboards, PivotTables, and PivotCharts.
McGraw-Hill/Irwin The Interactive Computing Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft Excel 2002 Lesson 1 Introduction.
1 The EDIT Program The Edit program is a full screen text editor that allows you to: Create text files Create text files Edit an existing text files Edit.
Knowing Understanding the Basics Writing your own code SAS Lab.
Microsoft Access You will need a pen/pencil.. What is Microsoft Access? Access is a database management system.  Create a database, add/change delete.
Get up to speed What’s changed, and why Yes, there’s a lot of change in Excel It’s most noticeable at the top of the window. But it’s good change.
Key Applications Module Lesson 21 — Access Essentials
Create Lists in Millennium Jenny Schmidt SWITCH Library Consortium.
TASS Meeting Copy and Paste from Excel to SAS September 19th, 2008 Copy and Paste from Excel to SAS Dr. Arthur Tabachneck, Director Data Management with.
ISU Basic SAS commands Laboratory No. 1 Computer Techniques for Biological Research Animal Science 500 Ken Stalder, Professor Department of Animal Science.
® Microsoft Office 2013 Access Creating a Database.
XP New Perspectives on Microsoft Office FrontPage 2003 Tutorial 7 1 Microsoft Office FrontPage 2003 Tutorial 7 – Creating and Using Templates in a Web.
Office 2003 Introductory Concepts and Techniques M i c r o s o f t Access Project 1 Creating and Using a Database.
Office 2003 Advanced Concepts and Techniques M i c r o s o f t Access Project 6 Creating an Application System Using Macros, Wizards, and the Switchboard.
Microsoft Project – Tutorial 4 Assigning Resources and Costs we will now add resource management information and project cost data to our project a cost.
) Main Menu: You can access all aspects of the database from this screen 2) Contacts: You can access the “contact database management” side of.
 The ribbon is the primary form of navigation in the Microsoft Office 2007 system.  There are seven Tabs on the Ribbon, more (contextual) tabs will.
XP New Perspectives on Microsoft Office FrontPage 2003 Tutorial 7 1 Microsoft Office FrontPage 2003 Tutorial 8 – Integrating a Database with a FrontPage.
Microsoft Office 2010 is the newest version of Microsoft Office, offering features that provide users with better functionality and easier ways to work.
Lesson 14: Exploring Excel Learning Objectives After studying this lesson, you will be able to:  Explain ways Excel can help your productivity.
Lesson 1: Exploring Excel Learning Objectives After studying this lesson, you will be able to:  Explain ways Excel can help your productivity.
INTRODUCTION TO ACCESS. OBJECTIVES  Define the terms field, record, table, relational database, primary key, and foreign key  Create a blank database.
MODULE 9 Integrating Word, Excel, Access, and PowerPoint © Paradigm Publishing, Inc.1.
®® Microsoft Windows 7 Windows Tutorial 2 Organizing Your Files.
TASS Meeting Using Multiple DOW Loops September 25th, 2009 Using Multiple DOW Loops Dr. Arthur Tabachneck Director, Data Management Idea stolen from a.
TASS Meeting using inputn to re-format data September 25 th, 2009 using inputn to re-format data Dr. Arthur Tabachneck Director, Data Management Note:
1 EPIB 698C Lecture 1 Instructor: Raul Cruz-Cano
>>0 >>1 >> 2 >> 3 >> 4 >>
Easy Access with templates I: Create a database Lesson 16 By the end of this lesson you will be able to complete the following: Find the best database.
Office 2013 and Windows 8: Essential Concepts and Skills Microsoft Office 2013.
Chapter 7 Creating Templates, Importing Data, and Working with SmartArt, Images, and Screen Shots Microsoft Excel 2013.
McGraw-Hill/Irwin The Interactive Computing Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft Excel 2002 Using Macros Lesson.
SAS ® Global Forum 2014 March Washington, DC Arthur Tabachneck Thornhill, ON Canada Tom Abernathy New York, NY Matt Kastin Penn Valley, PA.
TASS Meeting Quickly Finding Project Code March 13th, 2009 A way to quickly find all of your project code Dr. Arthur Tabachneck Director, Data Management.
What’s changed, and why Lesson 1 By the end of this lesson you will be able to complete the following: Get a handle on the new look of Excel. Understand.
Office 2003 Introductory Concepts and Techniques M i c r o s o f t Access Project 1 Creating and Using a Database.
Chapter 8 Using Document Collaboration, Integration, and Charting Tools Microsoft Word 2013.
SAS ® Global Forum 2014 March Washington, DC Arthur Tabachneck Thornhill, ON Canada Tom Abernathy New York, NY Matt Kastin Penn Valley, PA.
After completing this lesson, you will be able to:
Dr. Arthur Tabachneck Director, Data Management
a useful SAS 9.2 feature I wasn’t aware of *
Presentation transcript:

Automagically Copying and Pasting Variable Names Arthur Tabachneck Roger DeAngelis Randy Herbison Insurance Bureau of Canada CompuCraft Inc Westat John King Tom Abernathy Andrew Clapson Ouachita Clinical Data Services, Inc. Pfizer, Inc. Ottawa, Ontario

Coder’s Corner April 12, 2010 Forum SAS Have you ever wished that SAS provided a way for you to easily develop point-and-click methods for accomplishing common tasks?

Coder’s Corner April 12, 2010 Forum SAS The present project began in response to a SAS-L post asking: Is there a way to copy and paste any table’s variable names?

Coder’s Corner April 12, 2010 Forum SAS and, of course, the task had to be accomplished almost automagically

Coder’s Corner April 12, 2010 Forum SAS and suppose that you only have base SAS but, regardless, you’re not quite a SAS guru you’d really like to impress the people you work with and/or make SAS easier to use

Coder’s Corner April 12, 2010 Forum SAS how? take advantage of some not very well known capabilities of SAS Explorer

Coder’s Corner April 12, 2010 Forum SAS how? take advantage of some not very well known capabilities of SAS Explorer

Coder’s Corner April 12, 2010 Forum SAS how? take advantage of some not very well known capabilities of SAS Explorer

Coder’s Corner April 12, 2010 Forum SAS such a capability is only moments away with the method described in this presentation

Coder’s Corner April 12, 2010 Forum SAS how? Click anywhere in the SAS Explorer side of the screen

Coder’s Corner April 12, 2010 Forum SAS how? Click on Tools→Options→Explorer

Coder’s Corner April 12, 2010 Forum SAS how? Click on the ‘Members’ tab, the ‘Table’ Library Member and, finally, on the ‘Edit’ Button

Coder’s Corner April 12, 2010 Forum SAS how? Click on Add

Coder’s Corner April 12, 2010 Forum SAS how? In the Explorer Options’ Action screen type the Action you want users to see: e.g., Copy Variable &Names to Clipboard 1 Copy Variable &Names to Clipboard Action Copy Variable &Names to Clipboard

Coder’s Corner April 12, 2010 Forum SAS 2 how? Type the Action Command you want SAS to apply: gsubmit "filename _cb clipbrd;data _null_;file _cb;dsn='%8b'||'.'||'%32b';length name $32;do dsid=open(dsn,'I') while(dsid ne 0);do i = 1 to attrn(dsid,'NVARS');name = varname(dsid,i);put end; dsid = close(dsid);end;run; filename _cb clear; "; Copy Variable &Names to Clipboard gsubmit ‘filename _cb clipbrd;data _null_ filename _cb clipbrd; data _null_; file _cb; dsn='%8b'||'.'||'%32b'; length name $32; do dsid=open(dsn,'I') while(dsid ne 0); do i = 1 to attrn(dsid,'NVARS'); name = varname(dsid,i); put end; dsid = close(dsid); end; run; filename _cb clear; Action Command gsubmit "filename _cb clipbrd;data _null_;file _cb;dsn='%8b'||'.'||'%32b'; length name $32;do dsid=open(dsn,'I') while(dsid ne 0);do i = 1 to attrn(dsid, 'NVARS');name = varname(dsid,i);put end; dsid = close(dsid);end; run; filename _cb clear; ";

Coder’s Corner April 12, 2010 Forum SAS Copy Variable &Names to Clipboard how? Copy Variable &Names to Clipboard gsubmit ‘filename _cb clipbrd;data _null_ Click on OK to exit the Add Action screen 3

Coder’s Corner April 12, 2010 Forum SAS how? Click on OK to exit the Table Options screen 4

Coder’s Corner April 12, 2010 Forum SAS a solution then, whenever you or a user right-click on a file in the SAS Explorer window

Coder’s Corner April 12, 2010 Forum SAS then you can paste the variable names into SAS or any other program that has copy/paste functionality The Hotkey Driven Solution

Coder’s Corner April 12, 2010 Forum SAS The Hotkey Driven Solution then you can paste the variable names into SAS or any other program that has copy/paste functionality

Coder’s Corner April 12, 2010 Forum SAS wouldn’t it be nice to put all of your (or your users) common tasks on that menu? Copy Variable Names to Clipboard Run Proc Contents Get descriptive statistics Show all correlations Compare groups Print bar charts Run factor analysis Action command for Proc Contents gsubmit "proc contents data=%8b.%s;run;";

Coder’s Corner April 12, 2010 Forum SAS For those of you who want a non-point-and-click solution a complete just as easy to develop hotkey-driven solution is also described in our paper

Coder’s Corner April 12, 2010 Forum SAS Type and save the following SAS program (e.g., as c:\copy.sas): 1 The Hotkey Driven Solution filename _cb clipbrd; data _null_; window DSN rows=8 columns=80 irow=1 icolumn=2 color=black 'Enter 1 or 2 level data set name: ‘ color=gray dsn $41. required=yes attr=underline color=yellow; display DSN blank; file _cb; length name $32; do dsid = open(dsn,'I') while(dsid ne 0); do i = 1 to attrn(dsid,'NVARS'); name = varname(dsid,i); put end; dsid = close(dsid); end; stop; run; filename _cb clear; filename _cb clipbrd; data _null_; window DSN rows=8 columns=80 irow=1 icolumn=2 color=black 'Enter 1 or 2 level data set name: ‘ color=gray dsn $41. required=yes attr=underline color=yellow; display DSN blank; file _cb; length name $32; do dsid = open(dsn,'I') while(dsid ne 0); do i = 1 to attrn(dsid,'NVARS'); name = varname(dsid,i); put end; dsid = close(dsid); end; stop; run; filename _cb clear;

Coder’s Corner April 12, 2010 Forum SAS Assign a key to run the code In command line type: keydef "CTL F11" "gsubmit '%inc ""c:\copy.sas"";' " 2 The Hotkey Driven Solution keydef "CTL F11" "gsubmit '%inc ""c:\copy.sas"";' "

Coder’s Corner April 12, 2010 Forum SAS Save the assigned key assignment In command line type: keys 3 The Hotkey Driven Solution

Coder’s Corner April 12, 2010 Forum SAS Save the assigned key assignment In command line type: save, then click on ‘Yes’ and ‘OK’ 4 The Hotkey Driven Solution

Coder’s Corner April 12, 2010 Forum SAS Then, whenever you or a user enters the assigned key they will be asked to ‘Enter 1 or 2 level data set name:’ The Hotkey Driven Solution

Coder’s Corner April 12, 2010 Forum SAS then you can paste the variable names into SAS or any other program that has copy/paste functionality The Hotkey Driven Solution

Coder’s Corner April 12, 2010 Forum SAS The Hotkey Driven Solution then you can paste the variable names into SAS or any other program that has copy/paste functionality

Coder’s Corner April 12, 2010 Forum SAS Author Contact Information Your comments and questions are valued and encouraged. Contact the authors: Arthur Tabachneck, Ph.D. Director, Data Management Insurance Bureau of Canada 2235 Sheppard Ave. East Toronto, Ontario L3T 5K9 John King, Ouachita Clinical Data Services, Inc. Mount Ida, AR Randy Herbison, Senior Systems Analyst Westat 1650 Research Boulevard Rockville, MD Roger DeAngelis CompuCraft Inc 1770 Via Petirrojo Apt A Newbury Park, CA Andrew Clapson Ottawa, Ontario Tom Abernathy Pfizer, Inc. 235 E. 42 nd Street New York, NY