A Tool to Reduce the Time Used in the Preparation of the Statistical Review Aid Used for Electronic Submission

Similar documents
A Useful Macro for Converting SAS Data sets into SAS Transport Files in Electronic Submissions

Get Started Writing SAS Macros Luisa Hartman, Jane Liao, Merck Sharp & Dohme Corp.

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

Utilizing the Stored Compiled Macro Facility in a Multi-user Clinical Trial Setting

SAS Macro Dynamics: from Simple Basics to Powerful Invocations Rick Andrews, Office of Research, Development, and Information, Baltimore, MD

SAS Drug Development Program Portability

Files Arriving at an Inconvenient Time? Let SAS Process Your Files with FILEEXIST While You Sleep

HOW TO DEVELOP A SAS/AF APPLICATION

Submission-Ready Define.xml Files Using SAS Clinical Data Integration Melissa R. Martinez, SAS Institute, Cary, NC USA

PharmaSUG China Paper 059

Paper PO06. Building Dynamic Informats and Formats

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

Storing and Reusing Macros

Journey to the center of the earth Deep understanding of SAS language processing mechanism Di Chen, SAS Beijing R&D, Beijing, China

One Project, Two Teams: The Unblind Leading the Blind

So Much Data, So Little Time: Splitting Datasets For More Efficient Run Times and Meeting FDA Submission Guidelines

The SAS Interface to REXX

Introduction. Getting Started with the Macro Facility CHAPTER 1

SAS Clinical Data Integration 2.4

Automated Checking Of Multiple Files Kathyayini Tappeta, Percept Pharma Services, Bridgewater, NJ

Run your reports through that last loop to standardize the presentation attributes

ABSTRACT INTRODUCTION THE ODS TAGSET FACILITY

CHAPTER 7 Using Other SAS Software Products

Using SAS to Control and Automate a Multi SAS Program Process Patrick Halpin, dunnhumby USA, Cincinnati, OH

LST in Comparison Sanket Kale, Parexel International Inc., Durham, NC Sajin Johnny, Parexel International Inc., Durham, NC

Permission Program. Support for Version 6 Only. Allowing SAS/SHARE Client Access to SAS Libraries or Files CHAPTER 40

Display the XML Files for Disclosure to Public by Using User-defined XSL Zhiping Yan, BeiGene, Beijing, China Huadan Li, BeiGene, Beijing, China

Submitting SAS Code On The Side

Chasing the log file while running the SAS program

Clinical Data Visualization using TIBCO Spotfire and SAS

esubmission - Are you really Compliant?

QUEST Procedure Reference

SAS Application to Automate a Comprehensive Review of DEFINE and All of its Components

SAS Job Monitor 2.2. About SAS Job Monitor. Overview. SAS Job Monitor for SAS Data Integration Studio

SAS Clinical Data Integration 2.6

Automate Analysis Results Metadata in the Define-XML v2.0. Hong Qi, Majdoub Haloui, Larry Wu, Gregory T Golm Merck & Co., Inc.

Paper A Simplified and Efficient Way to Map Variable Attributes of a Clinical Data Warehouse

PharmaSUG Paper SP04

An Alternate Way to Create the Standard SDTM Domains

Amie Bissonett, inventiv Health Clinical, Minneapolis, MN

When Powerful SAS Meets PowerShell TM

SAS Model Manager 15.1: Quick Start Tutorial

UNIT-IV: MACRO PROCESSOR

Text Generational Data Sets (Text GDS)

Making a List, Checking it Twice (Part 1): Techniques for Specifying and Validating Analysis Datasets

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

Simplifying Your %DO Loop with CALL EXECUTE Arthur Li, City of Hope National Medical Center, Duarte, CA

SAS Fair Banking 8.1 Installation Instructions

Arthur L. Carpenter California Occidental Consultants, Oceanside, California

Be Your Own Task Master - Adding Custom Tasks to EG Peter Eberhardt, Fernwood Consulting Group Inc. Toronto, ON

An Efficient Method to Create Titles for Multiple Clinical Reports Using Proc Format within A Do Loop Youying Yu, PharmaNet/i3, West Chester, Ohio

SAS Data Libraries. Definition CHAPTER 26

Exploring the SAS Macro Function %SYSFUNC

A Mass Symphony: Directing the Program Logs, Lists, and Outputs

EMS Registry Job Aid for an EMR or EMT Student

Paper An Automated Reporting Macro to Create Cell Index An Enhanced Revisit. Shi-Tao Yeh, GlaxoSmithKline, King of Prussia, PA

Copy That! Using SAS to Create Directories and Duplicate Files

Routing the SAS Log and SAS Procedure Output

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

Chapter 3 Managing Results in Projects. Chapter Table of Contents

Preparing the Office of Scientific Investigations (OSI) Requests for Submissions to FDA

PhUSE US Connect 2019

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

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

PharmaSUG Paper AD03

Tales from the Help Desk 6: Solutions to Common SAS Tasks

New York State Department of Health Medicaid Perinatal Care Quality Improvement Project

Automation of makefile For Use in Clinical Development Nalin Tikoo, BioMarin Pharmaceutical Inc., Novato, CA

Macro Facility. About the Macro Facility. Automatic Macro Variables CHAPTER 14

APPENDIX 2 Customizing SAS/ASSIST Software

The Output Bundle: A Solution for a Fully Documented Program Run

SAS Macro Technique for Embedding and Using Metadata in Web Pages. DataCeutics, Inc., Pottstown, PA

EXPORTING SAS OUTPUT ONTO THE WORLD WIDE WEB

Extending the Scope of Custom Transformations

Creating and Executing Stored Compiled DATA Step Programs

SAS/AF FRAME Entries: A Hands-on Introduction

Index Introduction 3 Chapter 1. - Beginning the installation User License Application User Information 4

SAS Clinical Data Integration Server 2.1

PROC MEANS for Disaggregating Statistics in SAS : One Input Data Set and One Output Data Set with Everything You Need

CC13 An Automatic Process to Compare Files. Simon Lin, Merck & Co., Inc., Rahway, NJ Huei-Ling Chen, Merck & Co., Inc., Rahway, NJ

Using Dynamic Data Exchange

If You Need These OBS and These VARS, Then Drop IF, and Keep WHERE Jay Iyengar, Data Systems Consultants LLC

SAS Drug Development. SAS Macro API 1.3 User s Guide

While You Were Sleeping - Scheduling SAS Jobs to Run Automatically Faron Kincheloe, Baylor University, Waco, TX

DBLOAD Procedure Reference

Cutting the SAS LOG down to size Malachy J. Foley, University of North Carolina at Chapel Hill, NC

A Cross-national Comparison Using Stacked Data

Using Data Transfer Services

Making the most of SAS Jobs in LSAF

Scrambling of Un-Blinded Data without Scrambling Data Integrity! Jaya Baviskar, Pharmanet/i3, Mumbai, India

Using the SQL Editor. Overview CHAPTER 11

Utilizing the VNAME SAS function in restructuring data files

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

ABSTRACT DATA CLARIFCIATION FORM TRACKING ORACLE TABLE INTRODUCTION REVIEW QUALITY CHECKS

SAS Forecast Server 3.1. Administrator s Guide to Report Administration Tasks

Multiple Graphical and Tabular Reports on One Page, Multiple Ways to Do It Niraj J Pandya, CT, USA

Chapter 2 User Interface Features. networks Window. Drawing Panel

Anatomy of a Merge Gone Wrong James Lew, Compu-Stat Consulting, Scarborough, ON, Canada Joshua Horstman, Nested Loop Consulting, Indianapolis, IN, USA

PharmaSUG Paper PO22

Applying ADaM Principles in Developing a Response Analysis Dataset

Transcription:

A Tool to Reduce the Time Used in the Preparation of the Statistical Review Aid Used for Electronic Submission Eunice Ndungu, Merck Research Labs, Merck & Co., Blue Bell, PA 19422 ABSTRACT Statistical programmers in the pharmaceutical industry are usually faced with tight timelines within which to prepare SRA (Statistical Review Aids) that reflect the information submitted to the FDA through the CSR (Clinical Study Report). One can manually identify and copy all files needed in the submission, to a submission folder, running them from the destination folder to make sure they run correctly and accurately reproduce outputs in the CSR. This manual process, however, can be time-consuming. The programmer is faced with the task of identifying all the data sets accessed by the SAS macros. This is done by scrolling through SAS code to identify transport files invoked by the macros, or painfully scanning through the logs from the macro runs for error messages of data sets that the macro is looking for but cannot find. To eliminate the necessity for this manual drudgery, the %copy macro was developed. This paper discusses the design of this macro and how it can be used in two situations. 1. INTRODUCTION The %copy macro was designed for use in an environment in which analysis data sets are stored in the form of SAS transport files. Transport files are then accessed by the analysis macros which then generate tables, listings and graphs. This paper describes the use of the %copy macro in two scenarios In the first scenario, the user can specify to the %copy macro the names of the analysis macros used to generate the CSR tables. The user also must specify a search string that %copy can use to find the names of the SAS transport files. Once these are provided, the macro automatically identifies the transport files used in all analysis programs and then automatically copies them to a new area for the FDA In the second scenario, analysis macros generate not only the CSR outputs, but also store in a text file the values of the parameters specified when the analysis macro was called. These saved parameter values are used during submission preparation to make macro runs that confirm that the programmer s outputs still match those in the CSR. In this case, the %copy macro can use the file of saved parameter values to identify and copy to the submission area all of the files that may be needed for the submission, including all of the SAS transport files, the SAS macro files, and the calling programs. An overview of the of the %copy macro will be presented, including basic features, assumptions macro parameters, and syntax. In addition, examples are provided illustrating the reading and copying of SAS transport files. 1.1 BASIC FEATURES This macro has the flexibility of: Allowing the user to provide parameters to be used in identifying SAS transport files and macros used to generate CSR output. Using saved parameters if available to locate and copy submission files to the submission area. 1.2 ASSUMPTIONS The following assumptions must be satisfied for the macro to run properly: A SAS auto call library is used to access macros used to generate CSR output. This has a twofold benefit. The macros need to be compiled only once and not through each use. In addition, the calling programs will bear the same names as the macros they invoke, a feature used by the macro to identify calling programs. There is a macro that invokes SAS transport files and converts them to SAS temporary WORK data sets that are then used for analysis. This means that no matter how many SAS transport files are invoked and no matter the location of the call within the program, the %copy macro can recognize the calls and extract the names of the SAS transport files. 1

2. MACRO STRUCTURE 2.1 MACRO SYNTAX %copy (stdmacro=, maccald=, stdcall=, addmacs=, xptcall=, actucall=, cpymacs=, cpypgms=, destdat=, destmac=, destpgm=); 2.2TABLE OF MACRO PARAMETERS MACRO PARAMETER VALUE AND DESCRIPTION VARIABLE Parameters that apply to the first scenario ADDMACS Add a list of macros in which to search for XPT calls. Separate these names by a space. Example. addmacs=mcombo ecg vital. Else, leave blank. ACTUCALL XPTCALL Put the names of the actual macros used to read in the XPT files. Must match one-to-one with list in addmacs. E.g. actucall=xptmac1 xptmac2 xptmac2 Submit the keyword parameter call to read in XPT file that corresponds to each of the macros in ADDMACS. E.g. xptcall=intrans xptlist getxpt. Else leave blank. Parameters that apply to the second scenario STDMACRO Yes -I invoked some macro to read in XPT files and parameters were saved (scenario 2).. No -No macro that saves parameters was used (scenario 1). MACCALD If STDMACRO=yes, enter the name of the macro used to invoke XPT files and save the parameters. Example STDMACRO=getXPT if a macro %getxpt was used. Leave blank if the parameter for STDMACRO=No STDCALL If STDMACRO=yes enter the keyword parameter used by the macro that invokes the XPT data. Example. STDCALL =INTRANS for %getxpt(intrans=xptdata) Parameters on action to copy/not copy and destination specification CPYMACS Yes -Copy the macros that used the SAS transport files to the submission folder No -Do not copy macros to the submission area CPYPGMS Yes -Copy the non-macro SAS programs (calling programs) that used the SAS transport files to the submission folder No -Do not copy the non-macro SAS programs to the submission area DESTDAT Give the destination directory to put XPT data sets. E.g. u:\submission\sasdata DESTMAC Give the destination directory to put macros from macro libraries if the parameter CPYMACS=Yes E.g. u:\submission\sasmacros DESTPGM Give the destination directory to put the non-macro SAS programs from the Assembly area if CPYPGMS=Yes e.g. u:\submission\saspgms 2

2.3 FOLDER STRUCTURE OF THE ASSEMBLY AREA Below is a sample folder structure of the assembly area depicting the location of: SAS Transport files in the data analysis folder. Analysis macros in the SASmacros folder. Macro calling programs or stand alone SAS code in the SASpgms folder. Assembly SASdata SASmacros Demodata.xpt, labdata.xpt, rxcomp.xpt, vitdata.xpt, reasdisc.xpt, tempdat.xpt Ptaccnting.sas, ptacnting2.sas, csva.sas, comply.sas, basesur.sas, tempmac.sas, copy.sas SASpgms Ptaccnting.sas, ptacnting2.sas, adhoc1.sas, vchg.sas, copy.sas, csva.sas, comply.sas, basesur.sas Tools Utltypgm.sas, fda_save_parameters.txt 2.4.1 SCENARIO 1: ALLOWING THE USER TO PROVIDE PARAMETERS TO BE USED IN IDENTIFYING SAS TRANSPORT FILES AND MACROS USED TO GENERATE CSR OUTPUT. In the case where parameters have not been saved, the programmer provides parameters as in the examples shown below. %copy(addmacs = ptacnting ptacnting2 ptacnting2 vchg, actucall = convertxpt setdata rddat mcombo, xptcall = intrans xptlist rdxpt intrans, cpymacs = Yes, cpypgms = Yes, destdat = u:\submission\sasdata, destmac = u:\submission\sasmacros, destpgm = u:\submission\saspgms); In this case, each entry in any one of the first three parameters has a one-to-one match with the corresponding entry in the other two. Each of the three parameters has the same number of elements, separated by a space. In this example, each has 4 elements. In this scenario, the %copy macro scans through each of the macros ptacnting.sas, ptacnting2.sas and vchg.sas. It looks for calls to the corresponding macros convertxpt.sas, setdata.sas, rddat.sas and mcombo.sas. The latter set would be macros that convert SAS transport files to SAS WORK temporary data sets. The parameter values entered for the keyword parameter XPTCALL, e.g. intrans, xptlist, rdxpt, and intrans, point the %copy macro to the names of the SAS transport files invoked. See example below for the first macro on the call. 3

%macro ptacnting; **convert SAS transport file to temporary SAS data set**; %convertxpt(intrans=xptdata, outdata=rxcomp); *XPTdata is the xpt file; %mend ptacnting; In this case, XPTdata.xpt would be the SAS transport file. As in the second scenario, the user has the option of copying the XPT file and the macro in which it is used, to a destination submissions folder that they specify. 2.4.2 SCENARIO 2: USING SAVED PARAMETERS IF AVAILABLE Below is a sample text file (fda_save_parameters.txt) of parameters saved from a calling program in the SASpgms folder. In the text file, the value assigned to the macro parameter MACRONM (see below), gives the name of the macro in which the %copy macro will search for calls to SAS transport files. In this case, the macro would be csva.sas. Armed with these names and a string for the keyword parameter used by the macro that invokes the XPT data (see XPTCALL in parameter table and INTRANS parameter in the example below); the %copy macro can track and find the transport files. Example. fda_save_parameters.txt macronm = csva macronm = csva Protocol=100 Protocol=101 Population=ALL Population=MITT Timepoint=99 Timepoint=0 Study= Nesug10 Study= Nesug11 Tabname=12 Tabname=19 SuptList=No SuptList=Yes Saveparms=yes Saveparms=yes Datesaved=01Jun04 Datesaved=03Jun04 Example of call to a SAS transport file %macro csva; **convert transport file to temporary SAS data set**; %convertxpt (INTRANS=rxcomp, outdata=rxcomp); *rxcomp is the xpt file; %mend csva; Other CSVA SAS statements Two examples of parameter calls to generate output and save parameters. %csva(macronm = csva, Protocol=100, Population=ALL, Timepoint=99, Study= Nesug10, Tabname=12, SuptList=No, Saveparms=yes ); %csva(macronm = csva, Protocol=101, Population=MITT, Timepoint=0, Study= Nesug11, Tabname=19, SuptList=Yes, Saveparms=yes ); 4

EXAMPLE OF THE PROCESS OF CREATING AND USING A TEXT FILE OF SAVED PARAMETERS Suppose a programmer had a macro that generated differed tables based on parameter selections in the macro call. In the example above, two separate calls to the %csva macro would generate two different tables based on different protocol and population selections. Suppose the %csva macro had an inbuilt functionality to save the above parameter selections in a text file. Using the saveparms= keyword parameter, the end user would only save parameters for output that would be included in the CSR, and hence the submission. Consequently, the %copy macro would easily identify from the text file, the macros used to generate CSR tables and target only these files in the search for calls to transport files. A sample call to %copy macro %copy(stdmacro = yes, maccald = saveparms, stdcall = intrans, destdat =u:\submission\sasdata, destmac=u:\submission\sasmacros, destpgm=u:\submission\saspgms); After transport files have been identified, they can then be copied to the destination specified by using the parameter DESTDAT, e.g. DESTDAT=u:\Submission\SASdata. Through the optional use of the parameters CPYMACS=yes and CPYPGMS=yes, the macro may also copy over the analysis macros and the calling programs to the destinations specified, e.g. DESTMAC=u:\Submission\SASmacros and DESTPGM=u:\Submission\SASpgms respectively. 3.SAMPLE CODE FOR READING AND MOVING XPT FILES The code extracts given below give the reader a glimpse of the part of the macro that identifies and extracts transport files and also the part that copies over files to destinations dictated by the user. 3.1 Reading SAS XPT files from the macros in the Assembly area %**--------------------------------------------------------------------------------------------** **Assign macro variables for all the XPT data set names invoked in each macro ** **Create a macro variable for the number of transport files to be copied over. ** **-----------------------------------------------------------------------------------------------**; data _null_; set &macname end=eof; datanm=compress(substr(token, index(token, '=') +1, length(token)-index(token, '=') ) ".xpt"); call symput('datanm' left(_n_),datanm); if eof then call symput('d_obs',left(_n_)); run; where &macname = data set containing information passed through %copy call token = variable with the calls to the XPT files &datanm&i = macro variable for the names of transport files 3.2 Moving SAS XPT files to submission area %**-----------------------------------------------------------------------** **Copy over the XPT files from Assembly directory to the user** **specified destination directory. ** **-------------------------------------------------------------------------**; %macro copydat; %do k=1 %to &d_obs; X copy &datadir.\&&datanm&k &Dest_dat.\&&datanm&k; %end; %mend copydat; %copydat; Where: &d_obs = macro variable keeping count of the XPT files found &datadir = macro variable for source location of XPT file. &&datanm&k = macro variable for the name of each XPT file that needs to be copied &dest_dat = macro variable for the destination folder for the transport files. 5

4. CONCLUDING SUMMARY This macro is a critical tool for the programmer. An XPT file can be invoked anywhere in the SAS program and several different SAS XPT files could be called within a single program. As has been shown, the %copy macro counters these limitations by automating the process of accurately tracking, finding and copying necessary submission programs and data files from the assembly area to the submission area. This alleviates the burden on the programmer, and expedites the submission process. Using this tool, a job that would take a whole day can be done in minutes. REFERENCES SAS Macro Language Reference First Edition Copyright 1997 by SAS institute, Cary, NC, USA SAS Institute Inc., SAS Language Reference Version 6 First Edition Copyright 1990 by SAS institute, Cary, NC, USA ACKNOWLEDGMENTS The author greatly acknowledges the thorough review and candid feedback from John Troxell, Donna Usavage, Amy Gillespie, Xingshu Zhu, and James Wu. TRADEMARKS 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 countries. indicates USA registration. Other brand and product names are registered trademarks or trademarks of their respective companies. CONTACT INFORMATION Eunice Ndungu Merck & Co. (BL 3-2) West Point, PA 19486-004 (484) 344-7933 E-mail: Eunice_Ndungu@merck.com 6