SAS Data Set Utility with Excel Output

Slides:



Advertisements
Similar presentations
Intro to Proc Report with Excel Output
Advertisements

Chapter 10 Excel: Data Handling or What do we do with all that data?
DIVERSE REPORT GENERATION By Chris Speck PAREXEL International Durham, NC.
Axio Research E-Compare A Tool for Data Review Bill Coar.
The SAS ® System Additional Information on Statistical Analysis Programming.
Minitab® 15 Tips and Tricks
SC ICT Certification Level 1 07 Spreadsheets By Ross Parker.
Web Pages and Style Sheets Bert Wachsmuth. HTML versus XHTML XHTML is a stricter version of HTML: HTML + stricter rules = XHTML. XHTML Rule violations:
กระบวนวิชา CSS. What is CSS? CSS stands for Cascading Style Sheets Styles define how to display HTML elements Styles were added to HTML 4.0 to.
Outline Proc Report Tricks Kelley Weston. Outline Examples 1.Text that spans columnsText that spans columns 2.Patient-level detail in the titlesPatient-level.
The installation process is started by double-clicking on the USB-Key file ‘install.xls’
Creating a Compact Columnar Output with PROC REPORT Walter R. Young Principal Clinical Programmer Analyst Wyeth.
V Summer workshop in Guildford County, July, 2014.
Word Processing Features Adapted from CTAERN Curriculum PROFITT Curriculum Basic Computer Skills Module 3 Introduction to Microsoft Word.
How to Build Tabular Dashboards Using Proc Report
Docs, Spreadsheets, & Presentations. What Do YOU Know???
Merging census aggregate statistics with postal code-based microdata Laine Ruus University of Toronto. Data Library Service ,
Copyright © 2010, Meta-Xceed, Inc. All rights reserved. BI Flash and all other Meta-Xceed Inc. product or service names are registered trademarks or trademarks.
SAS PROC REPORT PROC TABULATE
Introduction to SAS Essentials Mastering SAS for Data Analytics Alan Elliott and Wayne Woodward SAS ESSENTIALS -- Elliott & Woodward1.
Macros n Macros are little programs that you can create to automate particular tasks that you may want to execute more easily than having to specify all.
Learning HTML. HTML Attributes HTML elements can have attributes Attributes provide additional information about an element Class – specifies a class.
Lesson No:9 MS-Word Tools, Mail Merge and working with Tables CHBT-01 Basic Micro process & Computer Operation.
 Starting Excel 2003  Using Help  Workbook Management  Cursor Management  Manipulating Data  Using Formulae and Functions  Formatting Spreadsheet.
Ts_print in a few easy steps There are four screens: Entities, Data Items, Date, and Report Format.
Spreadsheets in Finance and Forecasting Presentation 9 Macros.
Essential ODS PDF Patrick Thornton.
McGraw-Hill/Irwin The Interactive Computing Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft Excel 2002 Lesson 1 Introduction.
Macro Overview Mihaela Simion. Macro Facility Overview Definition : The SAS Macro Facility is a tool within base SAS software that contains the essential.
By: Jennifer Huff & Courtney Stenzhorn. What Do YOU Know???
31-04: Respond Offline to Planning Schedules Supply Chain Platform Training Presentation Updated April 2011.
Priya Ramaswami Janssen R&D US. Advantages of PROC REPORT -Very powerful -Perform lists, subsets, statistics, computations, formatting within one procedure.
Microsoft Excel – Pivot Tables Introduction to Microsoft Excel Pivot tables Please login to the computers and launch Microsoft Excel. Rob Jones Room WG43.
McGraw-Hill/Irwin The Interactive Computing Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft Excel 2002 Working with Data Lists.
Paper 3 Unit 15 – Web Authoring Software Choices Graphics Exporting Graphics Creating CSS RGB Colour CSS – Body, Table and TD Border Collapse Tables -
Intermacs Form Download Excel Tutorial Pivot Tables, Graphic Tools, Macros By: Devin Koehl.
Chapter 2 Getting Data into SAS Directly enter data into SAS data sets –use the ViewTable window. You can define columns (variables) with the Column Attributes.
© 2008 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Niranjan Damera-Venkata HP Labs Design.
1 EPIB 698C Lecture 1 Instructor: Raul Cruz-Cano
SAS ® 101 Based on Learning SAS by Example: A Programmer’s Guide Chapters 14 & 19 By Tasha Chapman, Oregon Health Authority.
Microsoft Excel 2007 Noris Bt. Ismail Faculty of Information and Communication Technology Tel : (Ext 8408) BCOMP0101.
Build your Metadata with PROC CONTENTS and ODS OUTPUT Louise S. Hadden Abt Associates Inc.
Better Metadata Through SAS® II: %SYSFUNC, PROC DATASETS, and Dictionary Tables.
SAS ® 101 Based on Learning SAS by Example: A Programmer’s Guide Chapters 5 & 6 By Ravi Mandal.
Introduction To CSS. Lesson 1: History of CSS CSS was proposed in 1994 as a web styling language. To helps solve some of the problems HTML 4. There were.
Core LIMS Training: Entering Experimental Data – Simple Data Entry.
Appendix A 12.0 Workbench Environment
DoD EA Dip Cse - NCW Export Macros
Data Entry Format 2017.
Greg Steffens Noumena Solutions
Using ODS Excel Migrating from DDE to ODS
Formatting a Worksheet
Download/Upload Receipts
Chapter 2: Getting Data into SAS
Creating Accessible PDFs from Word Docs
SAS Programming Introduction to SAS.
INSTRUCTIONS TO COMPLETE 2017 POOL RE MEMBER DATA RETURN
Materials Engineering Product Data Management (ePDM)
Product Lifecycle Management (PLM) Enovia
ECONOMETRICS ii – spring 2018
Importing Data from Excel (XLS) into P6 Client
Introduction to SAS A SAS program is a list of SAS statements executed in order Every SAS statement ends with a semicolon! SAS statements can be in caps.
A SAS macro to check SDTM domains against controlled terminology
The MIS and Dashboard.
Fundamentals of Data Structures
BUSINESS COMMUNICATION SKILLS PRESENTATION SKILLS OF THESIS & PROJECT
ICT Spreadsheets Lesson 1: Introduction to Spreadsheets
This presentation document has been prepared by Vault Intelligence Limited (“Vault") and is intended for off line demonstration, presentation and educational.
Never Cut and Paste Again
Amos Introduction In this tutorial, you will be briefly introduced to the student version of the SEM software known as Amos. You should download the current.
Presentation transcript:

SAS Data Set Utility with Excel Output Rob Horton This presentation will cover the utility code to produce and output a Microsoft excel spread sheet containing a list of data sets associated creation dates, number of observations and variables within. The utility has been used across multiple protocols to allow a non-programmer to quickly check that all data was extracted post data base release.

The Set Up *** Set up path for project, protocol and data sets to use ***; %let prot_path = /app/bin/project/; ** Unix path to the project **; %let protocols = A1201; ** Protocols to check, if blank all in directory **; %let ignore_protocols = ; ** Protocols to skip **; %let ignore_datasets = MT1 MT2; ** Datasets to skip **; %let data_path = data; ** Dataset library to use: data or derived_data **; %let cutdt = "06MAY2011:07:06:00"dt; ** Flag modification dates prior to **; %let outxml = ~/matrix_&prot_path._&data_path..xml; ** Output file name and path **; A number of macro variables are set up to allow the correct study path and data sets to be found Including/Excluding particular protocols and data sets. We can check either raw or derived data sets. Set a cut off date for flagging. And define the output xml file location. Company Confidential

List the files The macro builds a list of protocols to be checked based on the macro variable settings, then using SAS Help files, reads in the data set details for those specified files, excluding the “ignored” datasets. The data sets containing this meta data for each file are then appended into a single data set named “Matrix”. Code not included here but it is available in the paper. Company Confidential

ODS ods tagsets.excelxp options( absolute_column_width="15, %sysfunc(repeat(%str(16, 10, 10,), 50)) 10" embedded_titles='yes' print_header="&sysdate9.: dataset (/&data_path) matrix" autofilter='yes' frozen_headers='yes' frozen_rowheaders='1' sheet_label="Matrix" sheet_name="Matrix" ) file="&outxml." style=statistical ; This section of the code uses ODS to output in Microsoft Excel format: Sheet 1: A “matrix” or horizontal list of data set names with modification date, number of records and number of variables as one row per study. Company Confidential

Proc Report proc report data=rep nowd missing headline headskip split='|'; column protocol memname, ( modate nlobs nvar dummy) ; define protocol/group order=data width=32 id ; define memname/across ; define modate/display style=[background=cutdt.]; define nlobs/display "Number Records" style=[background=clrs.]; define nvar/display "Number Variables" style=[background=clrs.]; define dummy/noprint; run; Use proc report to populate the columns/rows specified in the previous ODS. Using style to colour the background. Company Confidential

Format Colouring proc format; value clrs 0 = '#FFCC00' . = '#FF6600' 0< - high = '#FFFFFF' ; value rnderr 0 = '#FFFFFF‘ . = '#FF6600‘ 0< - high = '#FF00FF' value cutdt low - <&cutdt ='#FF0000'; Hex Code Colour #FFCC00 Yellow #FF6600 Orange #FFFFFF White #FF0000 Red #FF00FF Pink #FFFF99 Pale Yellow #CCFFFF Pale Blue Using proc format and Hex codes to apply colours to cells with specific attributes. Company Confidential

Horizontal List   AE AUA Protocol Date Modified Number Records Number Variables A1201 06MAY11:06:46:38 628 68 2959 62 We have a horizontal list where protocols are the rows and the data sets are 3 columns wide with the modification date number of records and number of variables for each data set. The colours have been applied as the modification date is earlier then the 06May2011 07:06 time that was specified in set up. Company Confidential

Vertical List ods tagsets.excelxp options( absolute_column_width="12, 10, 16, 10, 10, 16, 20, 10, 10, 10, 10, 10, 10, 10" embedded_titles='yes' print_header="&sysdate9.: dataset (/&data_path.) matrix (&sysdate.)" autofilter='yes' frozen_headers='yes' frozen_rowheaders='2' sheet_name="List" sheet_label="List" ); proc report data=rep nowd headline headskip missing; column protocol memname modate nlobs nvar z; define protocol/display "Study" style=[background=#CCFFFF]; define memname/display "Dataset" style=[background=#FFFF99]; define modate/display style=[background=cutdt.]; define nlobs/display "Number Records" style=[background=clrs.]; define nvar/display "Number Variables" style=[background=clrs.]; define z/display noprint computed; compute z; if memname eq 'RAND_ERR' then do; call define('NLOBS', 'style', 'style=[background='||put(nlobs, rnderr.)||']'); end; endcomp; run; Second ODS block with proc report to produce the second spread sheet that has a vertical list of data sets Proc report compute block. RAND_ERR is a data set created because some studies used the same randomization number for more than one subject, if this occurs then RAND_ERR is populated and therefore we wanted to highlight where that data set is populated: Company Confidential

List Study Dataset Date Modified Number Records Number Variables A1201 AE 06MAY11:06:46:38 628 68 AUA 2959 62 BLD 06MAY11:06:46:39 6203 64 BP 06MAY11:07:15:39 5070 33 CD 06MAY11:07:05:19 1097 58 COM 06MAY11:06:46:40 CT 470 43 DE 06MAY11:06:39:07 609 76 ECG 01AUG08:04:22:13 503 37 EFF 06MAY11:07:15:38 2133 44 EFF2 418 LB 06MAY11:07:21:34 32020 50 MH 06MAY11:07:10:45 1168 30 PD PE 06MAY11:07:10:44 7372 42 PK 4022 46 QE 1229 49 RANDO 15 RAND_ERR 06MAY11:09:11:56 1 6 SB 06MAY11:06:39:30 36 SCDG 01AUG08:04:30:48 522 38 TD 839 111 Here you can see we have a lot of data sets created prior to the DBR the comments data set is empty so may require further investigation and the rand _err data set is populated so would also need investigating. This tool was used where we were running 17 studies and pooling the data it saved a great deal of manual checking to navigate to individual study directories and investigate data set issues. Company Confidential

Questions? Company Confidential