Programming Tips and Examples for Your Toolkit, III John Morrill, Pharmion Corporation, Overland Park, KS

Size: px
Start display at page:

Download "Programming Tips and Examples for Your Toolkit, III John Morrill, Pharmion Corporation, Overland Park, KS"

Transcription

1 Paper TT15 Programming Tips and Examples for Your Toolkit, III John Morrill, Pharmion Corporation, Overland Park, KS ABSTRACT This paper is a continuation of a series of PharmaSUG papers containing several ideas, each generally unrelated to the others. The series has been aimed toward the intermediate level pharmaceutical programmer. Brief ideas presented in this paper include (1) a method of validating tables using data sets prior to reporting (DSPTRs), (2) a use of PROC COMPARE that should be obvious but is perhaps underused, (3) dealing with incomplete information using expiring code, and (4) dealing with numbers displayed as negative zero. Two major areas covered in this paper are SAS tools designed to collect and present information about (5) the contents of SAS programs within a study and (6) the data within a study. Also covered is (7) a brief update on a consistency check paper from 2006 PharmaSUG. This update deals with American & British English spelling. Finally, (8) a fun little word-find routine is presented. 1. VALIDATION USING THE DATA SET PRIOR TO REPORT (DSPTR) The practice of creating derived variables in analysis files and reporting on them in table programs is widely used in the pharmaceutical industry. The derived variables in the analysis files are easily validated using PROC COMPARE. Table and listing output, though, is never a SAS data set that can utilize the many useful features of PROC COMPARE. However, PROC COMPARE can be effectively used even with table and listing output. Consider a table program that reads an analysis file, manipulates the data with various data steps and procedures, and produces a table using PROC REPORT. Consider further the data set that PROC REPORT reads to generate its output we will call this the Data Set Prior To Report (DSPTR). Consider that this DSPTR, a SAS data set, can be saved in a directory as an output just as the table itself is. Once the result of the PROC REPORT, the table output, is validated, the associated DSPTR becomes a validated record of the values in this table output and can be used as a standard against future runs of the table program. A PROC COMPARE between the new DSPTR and the validated DSPTR will quickly expose differences. Unexpected differences can be addressed while the absence of differences, or the presence of only explainable differences, can serve as a method of validation of the new output. Using DSPTRs can serve as an electronic replacement for what has often been a visual process. It can reduce the turnaround time on validation of outputs and can increase the accuracy of part of the validation process. Compared to electronically comparing old and new table output versions, using DSPTRs along with a quick visual scan is particularly effective when changing the number of titles or footnotes. Using DSPTRs does not replace the need to visually review the actual table output for formatting, page-breaking, titles, footnotes, and other issues. DSPTRs have been used effectively to check consistency of sample sizes across tables. 2. USING PROC COMPARE WITHIN THE ANALYSIS FILE At the risk of stating the obvious, PROC COMPARE can be effectively used in the creation and especially the update of analysis files. Your author states this because using PROC COMPARE in this way does not seem to be a common practice, but also because your author long failed to recognize its worth. While nothing replaces logically thinking through a piece of code (alas, with faulty logic even this fails), a beforechange versus after-change comparison of analysis file output can quickly point out faulty assumptions in logic. Using PROC COMPARE is a quick way to detect unexpected results. Detecting such errors is key to producing quality work, and detecting errors through PROC COMPARE is a way to reduce production time. In practice, I place a PROC COMPARE (or a macro call to it) at the end of a program and execute the compare at will. 3. DEALING WITH INCOMPLETE INFORMATION WITH EXPIRING CODE There are times when a certain assumption is needed in order to proceed with a SAS program. For example, let s say that a draft of the program is needed immediately but the precise definition of a variable is in question and may not be resolved for a month. Simply programming a presumed definition is dangerous since there is no guarantee that the issue will be revisited. So, programming a temporary definition and finding a way to guarantee review is what is needed. As long as the program will be run again after a month, the code below is one example of a way to ensure this review. Many variations exist; this one requires the user to update the date each day the program is executed. Without explicitly updating this section each day, the program will abort each time it is executed. Once the temporary definition is adjusted to the permanent one, this code may be inactivated (either by commenting out or by deleting).

2 * To be placed at the start of the program. *; %let code_date=19jan07; * ERROR WARNING: LOOK AT XYZ definition EXPIRING CODE *; %macro remember_to_update; %if (&sysdate NE &code_date) %then endsas;; %mend remember_to_update; %remember_to_update; 4. A SOLUTION FOR NEGATIVE ZEROS At times a very small negative number is displayed as negative zero. For example, displayed to one decimal place may appear as -0.0 instead of 0.0. A quick way to overcome this is shown below in the form of a macro placed in the offending data set. The extra macro variable d_frmt is shown to represent the flexibility of setting a general format for an entire suite of programs. %let d_frmt=6.1; %macro correct_neg_zero(ivn=,d_f=&d_frmt); &ivn=round(&ivn,1/10**(substr("&d_f",3))); %mend correct_neg_zero; data between; format q1 q2 6.3; input q1; q2=q1; q3=q1; %correct_neg_zero(ivn=q3,d_f=&d_frmt); cards; ; proc print; format q2 q3 6.1; ========= Obs q1 q2 q Note that a more general form of this macro would be required to handle all variations of the format. For example, specifying the format as 6. or 16.1 would cause a problem with this version of the macro. An index function could be used instead to find the format s decimal place. 5. A BIRD S EYE VIEW OF A SUITE OF SAS PROGRAMS What kinds of things would be valuable to know about the SAS programs in a given project? In this section we search SAS programs and output directories in order to collect and present information about the SAS programs within a study. Except where noted, the observations on the tables shown below are completely dynamic, meaning that no pre-set or expected observations are fixed but records appear only when such data exists. Code and limitations are given in sections 5.4 & 5.5, respectively.

3 5.1 SOURCES OF DATA Searching the SAS table programs themselves for permanent directories referenced would reveal a table like the one shown below. We might expect a folder or directory containing table programs to reference only derived data sets, as this table shows. At times early in a project before derived data sets are available, some table programs may need to point to the raw directory. If it is the goal for all final table programs to reference only derived data, the table below can be used to demonstrate this. Table SOURCE DIRECTORY name raw external derived ae.sas cm.sas mh.sas SOURCES OF DATA MORE DETAIL Again searching the SAS table programs themselves but this time for derived or analysis data set names produces a table like the one shown below. One use of this table would be to show which tables must be re-run if a given derived data set is altered. A similar table with derived data sets in the first column could be generated showing dependencies between derived data sets. Table DERIVED DATA SET name COREVAR AE EFF_ALL MH ae.sas cm.sas mh.sas DESTINATIONS AND TIMING OF OUTPUTS Searching program and output directories produces a table like the one shown below. This can be used to determine whether the appropriate outputs are being created and whether the appropriate time sequence exists. Flags can be generated to alert cases where the save date of the program is more recent than any of its outputs. A realistic version of this table would be a case where not all observations in the table are necessarily created dynamically in many projects a single program would create multiple outputs. Date/time stamps could be captured for more accuracy. Program DATE of FILE name Sas Log Lst RTF DSPTR AE.SAS 18Dec Dec Dec Dec Dec2006 CM.SAS 18Dec Dec Dec2006 MH.SAS 18Dec Dec Dec Dec2006 The absence of Lst and RTF output for the CM.SAS program is certainly cause for concern. The absence of RTF output for MH.SAS is also cause for concern, but the presence of MH.LST indicates that the MH program succeeded further than did the CM.SAS program. As AE.SAS and AE.LOG have more recent dates than the AE output, this is certainly cause for concern. Another example of searching directories, one for which code is shown in section 5.4, is shown below. In this case we are dynamically searching raw data directories for existence and date/time information. The first column is the raw data file name. The remaining columns contain the date/time stamps of these raw data files as they exist in various folders. The folder names incorporating the date of a given folder serve as the column headers. A missing date/time stamp means that the indicated file (row) does not exist in the indicated folder (column). This can be useful in tracing the timing of file updates.

4 MEMNAME CRDATE_R_ CRDATE_R_ CRDATE_R_ AE 10APR06:02:15:58 25SEP06:10:29:42 02OCT06:08:46:58 DATES 01FEB05:00:12:31 01FEB05:00:12:31. DEATH 10APR06:02:16:44 25SEP06:10:32:33 02OCT06:08:51:19 PREG 10APR06:02:17:28 25SEP06:10:35:24 02OCT06:08:55:20 PUNB. 25SEP06:10:35:25 02OCT06:08:55:21 RADIAT 10APR06:02:16:37 25SEP06:10:32:20 02OCT06:08:51:01 RAND003 31OCT05:13:25:57.. RESP 10APR06:02:17:28 25SEP06:10:35:25 02OCT06:08:55:22 RESP2 08DEC05:14:46:46. 02OCT06:08:55:36 SKELETAL 10APR06:02:17:28 25SEP06:10:35:26 02OCT06:08:55:23 In addition to checking dates between transfers of raw data, it is often useful to check other characteristics such as type, length, format, and label. Detecting changes to such characteristics immediately upon receipt of a transfer of new data can eliminate or reduce problems arising out of such changes. Note that we are not considering the contents of the data sets, just the meta-data. The data sets could contain complete garbage and we would not detect this using the methods described in this section. 5.4 CODE HIGHLIGHTS This first batch of code demonstrates a way to dynamically detect all SAS programs in a directory and then iterate through these programs, detecting the presence of a string in each file. This is for sections 5.1 and 5.2 above; formatting the output as shown in these sections is left for the reader. The code has not been made platform independent. * Code for parts 5.1 and 5.2 above. *; * Book is created dynamically below. *; filename book " U:\Conferences\qwe4.txt"; * This creates a file in the current directory consisting of file *; * names meeting the given criteria - in this case *.sas files. *; options noxsync noxwait; data _null_; call system("dir U:\MM003\tables\*.sas /b > qwe4.txt"); * cancel; * The file containing program names is read. Names and parsed *; * meaning that T_AE_Age.sas is turned to T_AE_Age. *; data any(keep=fn_new); infile book missover length=reclen; length fn $100.; input fn $varying100. reclen; fn_new=reverse(substr(reverse(upcase(compress(fn))),5)); * Macro variable is created containing file names strung together. *; proc sql noprint; select distinct fn_new into :fn_new separated by ' ' from any ; quit; * This is an empty initial file. Other files below are combined with this file. *; data combine; * This loops through all program names, reading the program itself and saving *; * lines from the program that contain the given string - in this case DERIVED.*; %macro loop; %let i=1;*49; %let ids=%scan(&fn_new,&i,%str( ));

5 %do %while (%length(&ids) gt 0); filename book2 "U:\MM003\tables\&ids..sas"; data &ids(keep=line source); infile book2 missover lrecl=2500 length=reclen obs=55400; length line $2500 source $100; input line $varying2500. reclen; if index(upcase(line),"derived.") GT 0; source="&ids"; data combine(where=(source NE '')); set combine &ids; %let i=%eval(&i+1); %let ids=%scan(&fn_new,&i,%str( )); %mend loop; %loop; * This shows all files (first column) containing the string DERIVED (second column). *; proc print width=min data=combine; var line; format line $80.; by source; id source; This next batch of code was used to generate the second example in section 5.3. Similar code could be used for the first example in 5.3. Using certain assumptions, the code below could be made dynamic rather than having to specify which directories are considered. * Code for part 5.3 above. *; libname r_ 'G:\BDM\project1\Data\Raw\2006_04_10'; libname r_ 'G:\BDM\project1\Data\Raw\2006_09_25'; libname r_ 'G:\BDM\project1\Data\Raw\2006_10_02'; title1 %SUBSTR(&SYSPROCESSNAME,9) " &sysdate9 &systime"; %macro ec9; %macro loop(ids=); proc contents data=&ids.._all_ out=c_&ids(keep=memname crdate rename=(crdate=crdate_&ids)) noprint; proc sort data=c_&ids nodupkey; by memname crdate_&ids; %mend loop; %loop(ids=r_060410); %loop(ids=r_060925); %loop(ids=r_061002); data all; merge c_r_ c_r_ c_r_061002; by memname; proc print width=min noobs; title2 "History of raw datasets"; title3 ' '; %mend ec9; ** NOTE - need to modify EC9 after each transfer. **; %ec9; *history of raw datasets*;

6 5.5 LIMITATIONS Depending on how various programmers write code, a naïve search of programs for sections 5.1 and 5.2 would yield incomplete information. For example, assume a program contains a call to external code. If this external code is where the requested string exists, associating the desired string with the correct program will be difficult. Additionally, this method does not take into account file references that are parsed together within a macro. Finally, this method does not distinguish between active code and text appearing within a SAS comment. There are ways to overcome these limitations. One method would be to utilize MPRINT output in the log file to detect exactly what files and directories are being referenced. 6. A BIRD S EYE VIEW OF A PROJECT S DATA A number of useful things can be learned by viewing some high level project information. The following sections can be easily generated with limited knowledge of a study s data sets and yet yield some potentially important results. The table found in section 6.1 presents transposed PROC CONTENTS output. The tables found in sections 6.2 and 6.3 use the SAS dictionary tables as the source of files. For continuity, the same data sets are used in sections 6.1 through 6.3. Code used to generate these tables is found in section DISTRIBUTION OF VARIABLE NAME AMONG ALL DATA SETS The following table shows raw data sets across the top and variable names down the side with a one indicating presence of that variable (row) in a given data set (column). Edit check=p01 Variables down, data sets across the top. Obs NAME DM AE CM LB MH NR VS 1 DOB DOMAIN ENDDT HIGH LOW PANEL PT RACE RELATED RESULT SERIOUS SEX STARTDT STUDY TEST VERBATIM VISIT pt vis_num We see that 19 unique variable names are found among seven data sets. Two variables, DOMAIN & STUDY, are common to every data set. PT (patient or subject number) is not in all data sets. This makes sense for NR (normal range) since lab normal ranges are independent of subject number. However, we notice that PT is not found in LB (laboratory results). Upon further inspection, a lower case version of PT is found. (This really happened in a study; it was quite helpful to recognize this fact early. Use of the option validvarname=upcase can be valuable for this type of issue.) It makes sense that VISIT is not found in DM (demographics) and NR as both are or can be independent of VISIT. Again we notice an aberration in LB as its visit variable is named vis_num. DM is one of several data sets which contain variables found nowhere else: DOB, RACE, & SEX. Similarity among data sets is reasonable easy to detect. For example, AE (adverse events) and CM (concomitant medications) share many of the same variables. This is useful in coming to an understanding of the keys or common merge variables of a set of data sets.

7 Note that values are not represented here, only the existence of variables in various data sets. So, we don t know that PT contains reasonable subject numbers (see section 6.3 for this) or that all records in these data sets belong to the same study. As a practical matter, the data sets across the top could be sorted alphabetically for ease of use. As with examples below, the ones/missing in the body of this table could be altered to show number of populated/missing records. Or perhaps other information such as the type and length of variables (e.g., N8 or C3) could be shown. 6.2 DISTRIBUTION OF VISIT NUMBER AMONG ALL DATA SETS The following tables show raw data sets across the top and visit number down the side with number of records within the table. Since we learned in section 6.1 that the LB data set uses a different variable for VISIT, distributions of both VISIT and VIS_NUM are shown. Edit check=p02_visit Distribution of VISIT among all data sets. VISIT AE CM MH VS Edit check=p02_vis_num Distribution of VIS_NUM among all data sets. vis_num LB We note that four non-missing values of VISIT are populated: 1, 2, 3, & 60. Perhaps 1, 2, and 3 are the first three visits in the study and 60 is a generic page used across VISITS. Seven data sets are in this study. We note that DM and NR are not represented in these tables since they do not contain any visit information. LB s visit information is not contained in the VISIT variable so its distribution is shown separately. Why does AE have some records at VISIT 60 but one record with the value of VISIT missing? Regarding CM: why is VISIT not populated for one record and is it an issue that CM does not contain any records at VISIT 60? Is it an issue that MH (medical history) has most of its records occurring at VISIT 1 (perhaps the screening visit is when MH information was recorded) but then has one record occurring at VISIT 60? Note that for a real study with many more data sets and a full complement of visits, it is at times quite useful to subset the data down to an individual subject to see the resulting distribution. This can quickly illustrate where that subject is missing data. A subsetting macro parameter could be added to facilitate this feature. Also for a full complement of data, one will notice that earlier visits are populated more heavily than later visits due to subjects incomplete progress through the study or subjects dropping out. A deviation from this pattern may be cause for concern. As in the case with VISIT 60, real studies use various numbers for purposes other than actual visits. For example, follow-up visits may be numbered in the 800s and unscheduled visits may be in the 900s. Once you are familiar with a study, data sets having records outside of expected places could trigger a review. The subject counts could be converted to a one tally per subject basis. This has been used, for example, to detect where a number of subjects were improperly missing lab results due to a lab loading issue or the lab mis-numbering visits. Note that with some minor modifications, all data sets could be shown even if they do not contain values. The option could be added to dynamically variables to summarize in P02 based on meeting certain criteria in P01. This would replace the parameter specification in the macro call of P02.

8 6.3 DISTRIBUTION OF SUBJECT NUMBER AMONG ALL DATA SETS The following table shows raw data sets across the top and subject or patient (PT) number down the side with number of records within the table. Note that the NR data set is not presented since it contains no patient information. Edit check=p02_pt Distribution of PT among all data sets. PT CM AE DM LB MH VS We note that CM contains two records with no patient information certainly not what one would expect. The code used to produce this table (see section 6.4) did not distinguish between upper and lower case versions of the PT variable. Care should be taken to ensure this is done. Again, use of the option validvarname=upcase can be valuable for this type of issue. LB does not have data for a number of PTs. One wonders if perhaps 17 is an invalid patient number. Since it appears only in LB, one possibility is that PT 17 should really be PT 7. We note that PTs 1, 7, & 17 do not contain CM information. Perhaps these subjects dropped out of the study prior to having CM recorded or perhaps they truly have no CM information. We note that PT 1 is missing both CM and VS (vital sign) information. Other subjects also fail to have observations in various data sets. Summarizing what we have seen above, information can be learned about individual data sets by looking down the columns and information can be learned about individual subjects by looking across the rows. A similar statement could also be made for each of the tables in sections 6.1 and 6.2. As in section 6.2, the numbers within the body of the table which represent record counts could be converted to show a 1 if a given subject (row) is present in a given data set (column). Then a simple PROC PRINT with a SUM statement would give the number of subjects in each data set. 6.4 CODE HIGHLIGHTS The code below produces the tables shown in sections 6.1 through 6.3. Beginning level programmers may wish to note the use of the macros. In the P02 macro below, supplying a different parameter produces a table with vastly different information in it. Note that the parameter to P02 must be uppercase. %macro P01; title2 "Edit check=p01 Variables down, data sets across the top. (EC6)"; proc contents data=raw._all_ noprint out=cont(keep=memname name); proc sort data=cont; by name memname; data cont; set cont; f=1; proc print width=min; var name mem: f; run cancel; proc transpose data=cont out=cont_t(drop=_name_); by name; id memname; var f; proc print width=min uniform; %mend P01; %P01;

9 %macro P02(bv=); proc sql noprint; select memname into :memname_ separated by ' ' from dictionary.columns where upcase(libname)='raw' & upcase(name)="&bv" ; quit; data all_qv; length dataset $20; %macro loop; %let i=1; %let ids=%scan(&memname_,&i,%str( )); %do %while (%length(&ids) gt 0); proc freq data=raw.&ids(keep=&bv) noprint; tables &bv / missing list out=&ids(keep=&bv count); data &ids; set &ids; dataset="&ids"; data &ids._order; &bv=.z; dataset="&ids"; data all_qv; set all_qv &ids &ids._order; if dataset NE ''; %let i=%eval(&i+1); %let ids=%scan(&memname_,&i,%str( )); %mend loop; %loop; proc sort data=all_qv; by &bv dataset; * Alphabetizes except out of sorts data set placed first (?). *; proc transpose data=all_qv out=all_qv_t(drop=_:); by &bv; var count; id dataset; options ls=170 ps=67; title2 "Edit check=p02_&bv Distribution of &bv among all data sets. (P011)"; proc print uniform width=min noobs data=all_qv_t(where=(&bv NE.z)); title2; %mend P02; %P02(bv=VISIT); %P02(bv=VIS_NUM); %P02(bv=PT); 7. A CONSISTENCY CHECK UPDATE REGARDING AMERICAN AND BRITISH ENGLISH SPELLING 2006 PharmaSUG paper TT14 presented a SAS program that points out discrepancies in usage across a set of SAS outputs or within an MS Word document. This consistency check program creates a SAS data set with a single variable containing all words in a document or set of documents. Then each occurrence is counted, collapsed into a unique record, and scored for spelling and other characteristics. A use of this consistency check program that is not described in the paper is to detect British verses American versions of English. The special dictionary described in the paper can be modified to score words with various spellings such that words with British spelling are separated from words with American spelling in a special section of candidate words. If the intended audience is British, one can look over the American spelling section of the

10 Consistency Check output for candidates to be altered to use the British spelling. Alternatively, for an American audience, the British section could be checked. For a general audience, the decision to be consistent one way or another could be validated by using Consistency Check output. A good deal of customization (customisation?) is needed for this to be useful. Web sites exist with lists of words using British versus American English spellings. A search of british american english spelling list on your favorite search engine will generate a good start on this list. 8. A WORD-FIND SOLVER I feel fortunate to be able to make a living doing something I enjoy: programming. I also enjoy applying SAS to problems outside of my work. Occasionally something I learn in such pursuits is applicable to pharmaceutical programming. Outside of general programming learnings, I haven t quite found the direct application of a word-find yet, but perhaps a reader will suggest something. Read on. 8.1 THE TASK AND SOLUTION The objective of a word-find puzzle is to find a list of words (target) within a grid of letters. The words may be up, down, forward, backward, or diagonal but must be in a straight line. For example, the word CAT is found reading across from the initial position of the 6 th row and 2 nd column (6,2). CAT is also found starting from (4,4) both reading down and northwest. Y Z B D C A X T K L M N W J A H G O A I B C F P V C D A E Q U C A T S R A B C D E F A B C D E F The code in section 8.2 reads in the letters of the grid, generates candidate words composed of all valid combinations of letters in the grid, then compares the target list of words with these candidates. For matches, the beginning (p,q) and stopping (ps, qs) positions are printed as shown for the word CAT: Obs w p q ps qs 1 CAT CAT CAT CODE HIGHLIGHTS Highlights schmilights! Here is the whole program. options nocenter;* mprint mlogic macrogen symbolgen; * Read in grid to data set *; data wf; input q $; q_w=length(q); q_h=_n_; cards; YZBDCA XTKLMN WJAHGO AIBCFP VCDAEQ UCATSR ABCDEF ABCDEF ; * Read in grid to single macro variable and create macro variable dimension. *; proc sql noprint; select q_w, q

11 into :q_w, :q separated by ' ' from wf; select max(q_h) into :q_h from wf; quit; data q_max; q_max=max(&q_h,&q_w); proc sql noprint; select q_max into :q_max from q_max; quit; * From grid in the form of a single macro variable create an array of macro variables. *; %macro loop; %let i=1; %let ids=%scan(&q,&i,%str( )); %do %while (%length(&ids) gt 0); %do c=1 %to &q_w; %global mv_&i._&c; %let mv_&i._&c=%substr(&ids,%eval(&c),1); %let i=%eval(&i+1); %let ids=%scan(&q,&i,%str( )); %mend loop; %loop; * Cycle through grid capturing all possible words. *; %macro loop2; data all; length w $&q_max; %do p=1 %to &q_h; %do q=1 %to &q_w; %do x=-1 %to 1; %do y=-1 %to 1; %do wl = 2 %to &q_max; w= %do c=0 %to %eval(&wl-1); %let ps=%eval(&p+&y*&c); %let qs=%eval(&q+&x*&c); "&&MV_&ps._&qs" ' ' ; p=&p; q=&q; ps=&ps; qs=&qs; if (0 LT &ps LE &q_h) & (0 LT &qs LE &q_w) & NOT ((p EQ &ps) & (q EQ &qs)) then output; %mend loop2; %loop2; proc sort data=all; by w; ***proc print data=all(where=(w IN ('CAT' 'GO')));

12 *** * Put in words to find here. *; data find; length w $&q_max; input w $; cards; JICC CAT GO QWERTY YXWAVUAA ; proc sort data=find; by w; ***proc print; *** data qwe; merge all(in=a) find(in=b); by w; if a & b b; proc print; CONCLUSION I hope something here was useful to you. I hope you take time to share your ideas with others. Don t forget how fun programming can be! REFERENCES Morrill, JM and David J. Austin, Consistency Check: QC Across Outputs for Inconsistencies Proceedings of the 2006 Annual Conference of the Pharmaceutical Industry SAS Users Group, May Available online at (accessed 24 January 2007). ACKNOWLEDGMENTS The concept of DSPTRs was first introduced to me in 2005 by Dr. Indra Fernando of Pharmion Corporation. It was independently suggested by Suzanne Lassman of EMB Statistical Solutions, Inc., and was used successfully on a recent project with EMB. The idea of using Consistency Check in detecting British versus American spelling variations was suggested by Neil Malone of Pharmion Corporation. My daughter Laura provided the impetus to create the word find solver. Doug Moore and Dr. Indra Fernando provided valuable comments in review of this paper. My thanks goes to these and many others who have freely shared ideas over the years. 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. CONTACT INFORMATION Your comments and questions are valued and encouraged. Contact the author at: John Morrill Pharmion Corporation 9900 W 109 th Street, Suite 300 Overland Park, KS Work Phone: JMorrill@Pharmion.com or JSMorrill@gmail.com

A Macro to Keep Titles and Footnotes in One Place

A Macro to Keep Titles and Footnotes in One Place CC25 ABSTRACT A Macro to Keep Titles and Footnotes in One Place John Morrill, Quintiles, Inc., Kansas City, MO A large project with titles and footnotes in each separate program can be cumbersome to maintain.

More information

Procedure for Stamping Source File Information on SAS Output Elizabeth Molloy & Breda O'Connor, ICON Clinical Research

Procedure for Stamping Source File Information on SAS Output Elizabeth Molloy & Breda O'Connor, ICON Clinical Research Procedure for Stamping Source File Information on SAS Output Elizabeth Molloy & Breda O'Connor, ICON Clinical Research ABSTRACT In the course of producing a report for a clinical trial numerous drafts

More information

Programming Tips and Examples for Your Toolkit, IV John Morrill, Pharmion Corporation, Overland Park, KS

Programming Tips and Examples for Your Toolkit, IV John Morrill, Pharmion Corporation, Overland Park, KS Paper TT10 Programming Tips and Examples for Your Toolkit, IV John Morrill, Pharmion Corporation, Overland Park, KS ABSTRACT This paper contains several generally unrelated ideas aimed toward the intermediate

More information

Data Edit-checks Integration using ODS Tagset Niraj J. Pandya, Element Technologies Inc., NJ Vinodh Paida, Impressive Systems Inc.

Data Edit-checks Integration using ODS Tagset Niraj J. Pandya, Element Technologies Inc., NJ Vinodh Paida, Impressive Systems Inc. PharmaSUG2011 - Paper DM03 Data Edit-checks Integration using ODS Tagset Niraj J. Pandya, Element Technologies Inc., NJ Vinodh Paida, Impressive Systems Inc., TX ABSTRACT In the Clinical trials data analysis

More information

PharmaSUG Paper TT11

PharmaSUG Paper TT11 PharmaSUG 2014 - Paper TT11 What is the Definition of Global On-Demand Reporting within the Pharmaceutical Industry? Eric Kammer, Novartis Pharmaceuticals Corporation, East Hanover, NJ ABSTRACT It is not

More information

Better Metadata Through SAS II: %SYSFUNC, PROC DATASETS, and Dictionary Tables

Better Metadata Through SAS II: %SYSFUNC, PROC DATASETS, and Dictionary Tables Paper 3458-2015 Better Metadata Through SAS II: %SYSFUNC, PROC DATASETS, and Dictionary Tables ABSTRACT Louise Hadden, Abt Associates Inc., Cambridge, MA SAS provides a wealth of resources for users to

More information

A SAS Macro Utility to Modify and Validate RTF Outputs for Regional Analyses Jagan Mohan Achi, PPD, Austin, TX Joshua N. Winters, PPD, Rochester, NY

A SAS Macro Utility to Modify and Validate RTF Outputs for Regional Analyses Jagan Mohan Achi, PPD, Austin, TX Joshua N. Winters, PPD, Rochester, NY PharmaSUG 2014 - Paper BB14 A SAS Macro Utility to Modify and Validate RTF Outputs for Regional Analyses Jagan Mohan Achi, PPD, Austin, TX Joshua N. Winters, PPD, Rochester, NY ABSTRACT Clinical Study

More information

Program Validation: Logging the Log

Program Validation: Logging the Log Program Validation: Logging the Log Adel Fahmy, Symbiance Inc., Princeton, NJ ABSTRACT Program Validation includes checking both program Log and Logic. The program Log should be clear of any system Error/Warning

More information

A Macro that can Search and Replace String in your SAS Programs

A Macro that can Search and Replace String in your SAS Programs ABSTRACT MWSUG 2016 - Paper BB27 A Macro that can Search and Replace String in your SAS Programs Ting Sa, Cincinnati Children s Hospital Medical Center, Cincinnati, OH In this paper, a SAS macro is introduced

More information

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

CC13 An Automatic Process to Compare Files. Simon Lin, Merck & Co., Inc., Rahway, NJ Huei-Ling Chen, Merck & Co., Inc., Rahway, NJ CC13 An Automatic Process to Compare Files Simon Lin, Merck & Co., Inc., Rahway, NJ Huei-Ling Chen, Merck & Co., Inc., Rahway, NJ ABSTRACT Comparing different versions of output files is often performed

More information

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

Going Under the Hood: How Does the Macro Processor Really Work? Going Under the Hood: How Does the Really Work? ABSTRACT Lisa Lyons, PPD, Inc Hamilton, NJ Did you ever wonder what really goes on behind the scenes of the macro processor, or how it works with other parts

More information

One Project, Two Teams: The Unblind Leading the Blind

One Project, Two Teams: The Unblind Leading the Blind ABSTRACT PharmaSUG 2017 - Paper BB01 One Project, Two Teams: The Unblind Leading the Blind Kristen Reece Harrington, Rho, Inc. In the pharmaceutical world, there are instances where multiple independent

More information

Keeping Track of Database Changes During Database Lock

Keeping Track of Database Changes During Database Lock Paper CC10 Keeping Track of Database Changes During Database Lock Sanjiv Ramalingam, Biogen Inc., Cambridge, USA ABSTRACT Higher frequency of data transfers combined with greater likelihood of changes

More information

Top Coding Tips. Neil Merchant Technical Specialist - SAS

Top Coding Tips. Neil Merchant Technical Specialist - SAS Top Coding Tips Neil Merchant Technical Specialist - SAS Bio Work in the ANSWERS team at SAS o Analytics as a Service and Visual Analytics Try before you buy SAS user for 12 years obase SAS and O/S integration

More information

%MISSING: A SAS Macro to Report Missing Value Percentages for a Multi-Year Multi-File Information System

%MISSING: A SAS Macro to Report Missing Value Percentages for a Multi-Year Multi-File Information System %MISSING: A SAS Macro to Report Missing Value Percentages for a Multi-Year Multi-File Information System Rushi Patel, Creative Information Technology, Inc., Arlington, VA ABSTRACT It is common to find

More information

Quality Control of Clinical Data Listings with Proc Compare

Quality Control of Clinical Data Listings with Proc Compare ABSTRACT Quality Control of Clinical Data Listings with Proc Compare Robert Bikwemu, Pharmapace, Inc., San Diego, CA Nicole Wallstedt, Pharmapace, Inc., San Diego, CA Checking clinical data listings with

More information

Clinical Data Visualization using TIBCO Spotfire and SAS

Clinical Data Visualization using TIBCO Spotfire and SAS ABSTRACT SESUG Paper RIV107-2017 Clinical Data Visualization using TIBCO Spotfire and SAS Ajay Gupta, PPD, Morrisville, USA In Pharmaceuticals/CRO industries, you may receive requests from stakeholders

More information

Advanced Visualization using TIBCO Spotfire and SAS

Advanced Visualization using TIBCO Spotfire and SAS PharmaSUG 2018 - Paper DV-04 ABSTRACT Advanced Visualization using TIBCO Spotfire and SAS Ajay Gupta, PPD, Morrisville, USA In Pharmaceuticals/CRO industries, you may receive requests from stakeholders

More information

Unlock SAS Code Automation with the Power of Macros

Unlock SAS Code Automation with the Power of Macros SESUG 2015 ABSTRACT Paper AD-87 Unlock SAS Code Automation with the Power of Macros William Gui Zupko II, Federal Law Enforcement Training Centers SAS code, like any computer programming code, seems to

More information

Matt Downs and Heidi Christ-Schmidt Statistics Collaborative, Inc., Washington, D.C.

Matt Downs and Heidi Christ-Schmidt Statistics Collaborative, Inc., Washington, D.C. Paper 82-25 Dynamic data set selection and project management using SAS 6.12 and the Windows NT 4.0 file system Matt Downs and Heidi Christ-Schmidt Statistics Collaborative, Inc., Washington, D.C. ABSTRACT

More information

Combining TLFs into a Single File Deliverable William Coar, Axio Research, Seattle, WA

Combining TLFs into a Single File Deliverable William Coar, Axio Research, Seattle, WA PharmaSUG 2016 - Paper HT06 Combining TLFs into a Single File Deliverable William Coar, Axio Research, Seattle, WA ABSTRACT In day-to-day operations of a Biostatistics and Statistical Programming department,

More information

Contents of SAS Programming Techniques

Contents of SAS Programming Techniques Contents of SAS Programming Techniques Chapter 1 About SAS 1.1 Introduction 1.1.1 SAS modules 1.1.2 SAS module classification 1.1.3 SAS features 1.1.4 Three levels of SAS techniques 1.1.5 Chapter goal

More information

Quick Data Definitions Using SQL, REPORT and PRINT Procedures Bradford J. Danner, PharmaNet/i3, Tennessee

Quick Data Definitions Using SQL, REPORT and PRINT Procedures Bradford J. Danner, PharmaNet/i3, Tennessee ABSTRACT PharmaSUG2012 Paper CC14 Quick Data Definitions Using SQL, REPORT and PRINT Procedures Bradford J. Danner, PharmaNet/i3, Tennessee Prior to undertaking analysis of clinical trial data, in addition

More information

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

Files Arriving at an Inconvenient Time? Let SAS Process Your Files with FILEEXIST While You Sleep Files Arriving at an Inconvenient Time? Let SAS Process Your Files with FILEEXIST While You Sleep Educational Testing Service SAS and all other SAS Institute Inc. product or service names are registered

More information

ODS DOCUMENT, a practical example. Ruurd Bennink, OCS Consulting B.V., s-hertogenbosch, the Netherlands

ODS DOCUMENT, a practical example. Ruurd Bennink, OCS Consulting B.V., s-hertogenbosch, the Netherlands Paper CC01 ODS DOCUMENT, a practical example Ruurd Bennink, OCS Consulting B.V., s-hertogenbosch, the Netherlands ABSTRACT The ODS DOCUMENT destination (in short ODS DOCUMENT) is perhaps the most underutilized

More information

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

So Much Data, So Little Time: Splitting Datasets For More Efficient Run Times and Meeting FDA Submission Guidelines Paper TT13 So Much Data, So Little Time: Splitting Datasets For More Efficient Run Times and Meeting FDA Submission Guidelines Anthony Harris, PPD, Wilmington, NC Robby Diseker, PPD, Wilmington, NC ABSTRACT

More information

The Dataset Diet How to transform short and fat into long and thin

The Dataset Diet How to transform short and fat into long and thin Paper TU06 The Dataset Diet How to transform short and fat into long and thin Kathryn Wright, Oxford Pharmaceutical Sciences, UK ABSTRACT What do you do when you are given a dataset with one observation

More information

Using PROC SQL to Calculate FIRSTOBS David C. Tabano, Kaiser Permanente, Denver, CO

Using PROC SQL to Calculate FIRSTOBS David C. Tabano, Kaiser Permanente, Denver, CO Using PROC SQL to Calculate FIRSTOBS David C. Tabano, Kaiser Permanente, Denver, CO ABSTRACT The power of SAS programming can at times be greatly improved using PROC SQL statements for formatting and manipulating

More information

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

LST in Comparison Sanket Kale, Parexel International Inc., Durham, NC Sajin Johnny, Parexel International Inc., Durham, NC ABSTRACT PharmaSUG 2013 - Paper PO01 LST in Comparison Sanket Kale, Parexel International Inc., Durham, NC Sajin Johnny, Parexel International Inc., Durham, NC The need for producing error free programming

More information

Base and Advance SAS

Base and Advance SAS Base and Advance SAS BASE SAS INTRODUCTION An Overview of the SAS System SAS Tasks Output produced by the SAS System SAS Tools (SAS Program - Data step and Proc step) A sample SAS program Exploring SAS

More information

The Proc Transpose Cookbook

The Proc Transpose Cookbook ABSTRACT PharmaSUG 2017 - Paper TT13 The Proc Transpose Cookbook Douglas Zirbel, Wells Fargo and Co. Proc TRANSPOSE rearranges columns and rows of SAS datasets, but its documentation and behavior can be

More information

A Macro To Generate a Study Report Hany Aboutaleb, Biogen Idec, Cambridge, MA

A Macro To Generate a Study Report Hany Aboutaleb, Biogen Idec, Cambridge, MA Paper PO26 A Macro To Generate a Study Report Hany Aboutaleb, Biogen Idec, Cambridge, MA Abstract: Imagine that you are working on a study (project) and you would like to generate a report for the status

More information

A Better Perspective of SASHELP Views

A Better Perspective of SASHELP Views Paper PO11 A Better Perspective of SASHELP Views John R. Gerlach, Independent Consultant; Hamilton, NJ Abstract SASHELP views provide a means to access all kinds of information about a SAS session. In

More information

3. Almost always use system options options compress =yes nocenter; /* mostly use */ options ps=9999 ls=200;

3. Almost always use system options options compress =yes nocenter; /* mostly use */ options ps=9999 ls=200; Randy s SAS hints, updated Feb 6, 2014 1. Always begin your programs with internal documentation. * ***************** * Program =test1, Randy Ellis, first version: March 8, 2013 ***************; 2. Don

More information

The %let is a Macro command, which sets a macro variable to the value specified.

The %let is a Macro command, which sets a macro variable to the value specified. Paper 220-26 Structuring Base SAS for Easy Maintenance Gary E. Schlegelmilch, U.S. Dept. of Commerce, Bureau of the Census, Suitland MD ABSTRACT Computer programs, by their very nature, are built to be

More information

Developing Data-Driven SAS Programs Using Proc Contents

Developing Data-Driven SAS Programs Using Proc Contents Developing Data-Driven SAS Programs Using Proc Contents Robert W. Graebner, Quintiles, Inc., Kansas City, MO ABSTRACT It is often desirable to write SAS programs that adapt to different data set structures

More information

TLFs: Replaying Rather than Appending William Coar, Axio Research, Seattle, WA

TLFs: Replaying Rather than Appending William Coar, Axio Research, Seattle, WA ABSTRACT PharmaSUG 2013 - Paper PO16 TLFs: Replaying Rather than Appending William Coar, Axio Research, Seattle, WA In day-to-day operations of a Biostatistics and Statistical Programming department, we

More information

PharmaSUG Paper PO12

PharmaSUG Paper PO12 PharmaSUG 2015 - Paper PO12 ABSTRACT Utilizing SAS for Cross-Report Verification in a Clinical Trials Setting Daniel Szydlo, Fred Hutchinson Cancer Research Center, Seattle, WA Iraj Mohebalian, Fred Hutchinson

More information

How to Incorporate Old SAS Data into a New DATA Step, or What is S-M-U?

How to Incorporate Old SAS Data into a New DATA Step, or What is S-M-U? Paper 54-25 How to Incorporate Old SAS Data into a New DATA Step, or What is S-M-U? Andrew T. Kuligowski Nielsen Media Research Abstract / Introduction S-M-U. Some people will see these three letters and

More information

Logging the Log Magic: Pulling the Rabbit out of the Hat

Logging the Log Magic: Pulling the Rabbit out of the Hat ABSTRACT PharmaSUG2010 - Paper TT08 Logging the Log Magic: Pulling the Rabbit out of the Hat Adel Fahmy, BenchWorkzz, Austin, Texas Program Validation includes checking both program Log and Logic. Program

More information

Uncommon Techniques for Common Variables

Uncommon Techniques for Common Variables Paper 11863-2016 Uncommon Techniques for Common Variables Christopher J. Bost, MDRC, New York, NY ABSTRACT If a variable occurs in more than one data set being merged, the last value (from the variable

More information

Application of Modular Programming in Clinical Trial Environment Mirjana Stojanovic, CALGB - Statistical Center, DUMC, Durham, NC

Application of Modular Programming in Clinical Trial Environment Mirjana Stojanovic, CALGB - Statistical Center, DUMC, Durham, NC PharmaSUG2010 - Paper PO08 Application of Modular Programming in Clinical Trial Environment Mirjana Stojanovic, CALGB - Statistical Center, DUMC, Durham, NC ABSTRACT This paper describes a modular approach

More information

Taming a Spreadsheet Importation Monster

Taming a Spreadsheet Importation Monster SESUG 2013 Paper BtB-10 Taming a Spreadsheet Importation Monster Nat Wooding, J. Sargeant Reynolds Community College ABSTRACT As many programmers have learned to their chagrin, it can be easy to read Excel

More information

ODS/RTF Pagination Revisit

ODS/RTF Pagination Revisit PharmaSUG 2018 - Paper QT-01 ODS/RTF Pagination Revisit Ya Huang, Halozyme Therapeutics, Inc. Bryan Callahan, Halozyme Therapeutics, Inc. ABSTRACT ODS/RTF combined with PROC REPORT has been used to generate

More information

Prove QC Quality Create SAS Datasets from RTF Files Honghua Chen, OCKHAM, Cary, NC

Prove QC Quality Create SAS Datasets from RTF Files Honghua Chen, OCKHAM, Cary, NC Prove QC Quality Create SAS Datasets from RTF Files Honghua Chen, OCKHAM, Cary, NC ABSTRACT Since collecting drug trial data is expensive and affects human life, the FDA and most pharmaceutical company

More information

ABSTRACT DATA CLARIFCIATION FORM TRACKING ORACLE TABLE INTRODUCTION REVIEW QUALITY CHECKS

ABSTRACT DATA CLARIFCIATION FORM TRACKING ORACLE TABLE INTRODUCTION REVIEW QUALITY CHECKS Efficient SAS Quality Checks: Unique Error Identification And Enhanced Data Management Analysis Jim Grudzinski, Biostatistics Manager Of SAS Programming Covance Periapproval Services Inc, Radnor, PA ABSTRACT

More information

PDF Multi-Level Bookmarks via SAS

PDF Multi-Level Bookmarks via SAS Paper TS04 PDF Multi-Level Bookmarks via SAS Steve Griffiths, GlaxoSmithKline, Stockley Park, UK ABSTRACT Within the GlaxoSmithKline Oncology team we recently experienced an issue within our patient profile

More information

Useful Tips When Deploying SAS Code in a Production Environment

Useful Tips When Deploying SAS Code in a Production Environment Paper SAS258-2014 Useful Tips When Deploying SAS Code in a Production Environment ABSTRACT Elena Shtern, SAS Institute Inc., Arlington, VA When deploying SAS code into a production environment, a programmer

More information

Macros are a block of code that can be executed/called on demand

Macros are a block of code that can be executed/called on demand What Are These Macros are a block of code that can be executed/called on demand Global variables are variables that you assign a value to, which can be referenced anywhere within your program. (Leah s

More information

A Practical Introduction to SAS Data Integration Studio

A Practical Introduction to SAS Data Integration Studio ABSTRACT A Practical Introduction to SAS Data Integration Studio Erik Larsen, Independent Consultant, Charleston, SC Frank Ferriola, Financial Risk Group, Cary, NC A useful and often overlooked tool which

More information

Macro Quoting: Which Function Should We Use? Pengfei Guo, MSD R&D (China) Co., Ltd., Shanghai, China

Macro Quoting: Which Function Should We Use? Pengfei Guo, MSD R&D (China) Co., Ltd., Shanghai, China PharmaSUG China 2016 - Paper 81 Macro Quoting: Which Function Should We Use? Pengfei Guo, MSD R&D (China) Co., Ltd., Shanghai, China ABSTRACT There are several macro quoting functions in SAS and even some

More information

HAVE YOU EVER WISHED THAT YOU DO NOT NEED TO TYPE OR CHANGE REPORT NUMBERS AND TITLES IN YOUR SAS PROGRAMS?

HAVE YOU EVER WISHED THAT YOU DO NOT NEED TO TYPE OR CHANGE REPORT NUMBERS AND TITLES IN YOUR SAS PROGRAMS? HAVE YOU EVER WISHED THAT YOU DO NOT NEED TO TYPE OR CHANGE REPORT NUMBERS AND TITLES IN YOUR SAS PROGRAMS? Aileen L. Yam, PharmaNet, Inc., Princeton, NJ ABSTRACT In clinical research, the table of contents

More information

How to Create Data-Driven Lists

How to Create Data-Driven Lists Paper 9540-2016 How to Create Data-Driven Lists Kate Burnett-Isaacs, Statistics Canada ABSTRACT As SAS programmers we often want our code or program logic to be driven by the data at hand, rather than

More information

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

Run your reports through that last loop to standardize the presentation attributes PharmaSUG2011 - Paper TT14 Run your reports through that last loop to standardize the presentation attributes Niraj J. Pandya, Element Technologies Inc., NJ ABSTRACT Post Processing of the report could

More information

There s No Such Thing as Normal Clinical Trials Data, or Is There? Daphne Ewing, Octagon Research Solutions, Inc., Wayne, PA

There s No Such Thing as Normal Clinical Trials Data, or Is There? Daphne Ewing, Octagon Research Solutions, Inc., Wayne, PA Paper HW04 There s No Such Thing as Normal Clinical Trials Data, or Is There? Daphne Ewing, Octagon Research Solutions, Inc., Wayne, PA ABSTRACT Clinical Trials data comes in all shapes and sizes depending

More information

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

Paper A Simplified and Efficient Way to Map Variable Attributes of a Clinical Data Warehouse Paper 117-28 A Simplified and Efficient Way to Map Variable Attributes of a Clinical Data Warehouse Yanyun Shen, Genentech, Inc., South San Francisco ABSTRACT In the pharmaceutical industry, pooling a

More information

Report Writing, SAS/GRAPH Creation, and Output Verification using SAS/ASSIST Matthew J. Becker, ST TPROBE, inc., Ann Arbor, MI

Report Writing, SAS/GRAPH Creation, and Output Verification using SAS/ASSIST Matthew J. Becker, ST TPROBE, inc., Ann Arbor, MI Report Writing, SAS/GRAPH Creation, and Output Verification using SAS/ASSIST Matthew J. Becker, ST TPROBE, inc., Ann Arbor, MI Abstract Since the release of SAS/ASSIST, SAS has given users more flexibility

More information

Don t Get Blindsided by PROC COMPARE Joshua Horstman, Nested Loop Consulting, Indianapolis, IN Roger Muller, Data-to-Events.

Don t Get Blindsided by PROC COMPARE Joshua Horstman, Nested Loop Consulting, Indianapolis, IN Roger Muller, Data-to-Events. ABSTRACT Paper RF-11-2013 Don t Get Blindsided by PROC COMPARE Joshua Horstman, Nested Loop Consulting, Indianapolis, IN Roger Muller, Data-to-Events.com, Carmel, IN "" That message is the holy grail for

More information

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

Paper CC16. William E Benjamin Jr, Owl Computer Consultancy LLC, Phoenix, AZ Paper CC16 Smoke and Mirrors!!! Come See How the _INFILE_ Automatic Variable and SHAREBUFFERS Infile Option Can Speed Up Your Flat File Text-Processing Throughput Speed William E Benjamin Jr, Owl Computer

More information

A Macro for Generating the Adverse Events Summary for ClinicalTrials.gov

A Macro for Generating the Adverse Events Summary for ClinicalTrials.gov SESUG Paper AD-127-2017 A Macro for Generating the Adverse Events Summary for ClinicalTrials.gov Andrew Moseby and Maya Barton, Rho, Inc. ABSTRACT In the clinical trials industry, the website ClinicalTrials.gov

More information

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

The Output Bundle: A Solution for a Fully Documented Program Run Paper AD05 The Output Bundle: A Solution for a Fully Documented Program Run Carl Herremans, MSD (Europe), Inc., Brussels, Belgium ABSTRACT Within a biostatistics department, it is required that each statistical

More information

Consistency Check: QC Across Outputs for Inconsistencies

Consistency Check: QC Across Outputs for Inconsistencies ABSTRACT Paper TT14 Consistency Check: QC Across Outputs for Inconsistencies John Morrill, Quintiles, Inc., Kansas City, MO David J. Austin, PRA International, Charlottesville, VA Executing a SAS program

More information

Building Sequential Programs for a Routine Task with Five SAS Techniques

Building Sequential Programs for a Routine Task with Five SAS Techniques ABSTRACT SESUG Paper BB-139-2017 Building Sequential Programs for a Routine Task with Five SAS Techniques Gongmei Yu and Paul LaBrec, 3M Health Information Systems. When a task needs to be implemented

More information

Arthur L. Carpenter California Occidental Consultants, Oceanside, California

Arthur L. Carpenter California Occidental Consultants, Oceanside, California Paper 028-30 Storing and Using a List of Values in a Macro Variable Arthur L. Carpenter California Occidental Consultants, Oceanside, California ABSTRACT When using the macro language it is not at all

More information

Same Data Different Attributes: Cloning Issues with Data Sets Brian Varney, Experis Business Analytics, Portage, MI

Same Data Different Attributes: Cloning Issues with Data Sets Brian Varney, Experis Business Analytics, Portage, MI Paper BB-02-2013 Same Data Different Attributes: Cloning Issues with Data Sets Brian Varney, Experis Business Analytics, Portage, MI ABSTRACT When dealing with data from multiple or unstructured data sources,

More information

Check Please: An Automated Approach to Log Checking

Check Please: An Automated Approach to Log Checking ABSTRACT Paper 1173-2017 Check Please: An Automated Approach to Log Checking Richann Watson, Experis In the pharmaceutical industry, we find ourselves having to re-run our programs repeatedly for each

More information

Text Generational Data Sets (Text GDS)

Text Generational Data Sets (Text GDS) Paper 274-2017 Text Generational Data Sets (Text GDS) Dr. Kannan Deivasigamani HSBC ABSTRACT This paper offers a way to fill the void that SAS currently has with respect to the missing feature in the language,

More information

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

SAS Macro Dynamics - From Simple Basics to Powerful Invocations Rick Andrews, Office of the Actuary, CMS, Baltimore, MD Paper BB-7 SAS Macro Dynamics - From Simple Basics to Powerful Invocations Rick Andrews, Office of the Actuary, CMS, Baltimore, MD ABSTRACT The SAS Macro Facility offers a mechanism for expanding and customizing

More information

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

SAS Macro Dynamics: from Simple Basics to Powerful Invocations Rick Andrews, Office of Research, Development, and Information, Baltimore, MD ABSTRACT CODERS CORNER SAS Macro Dynamics: from Simple Basics to Powerful Invocations Rick Andrews, Office of Research, Development, and Information, Baltimore, MD The SAS Macro Facility offers a mechanism

More information

Using Proc Freq for Manageable Data Summarization

Using Proc Freq for Manageable Data Summarization 1 CC27 Using Proc Freq for Manageable Data Summarization Curtis Wolf, DataCeutics, Inc. A SIMPLE BUT POWERFUL PROC The Frequency procedure can be very useful for getting a general sense of the contents

More information

A Practical and Efficient Approach in Generating AE (Adverse Events) Tables within a Clinical Study Environment

A Practical and Efficient Approach in Generating AE (Adverse Events) Tables within a Clinical Study Environment A Practical and Efficient Approach in Generating AE (Adverse Events) Tables within a Clinical Study Environment Abstract Jiannan Hu Vertex Pharmaceuticals, Inc. When a clinical trial is at the stage of

More information

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

Migration to SAS Grid: Steps, Successes, and Obstacles for Performance Qualification Script Testing PharmaSUG 2017 - Paper AD16 Migration to SAS Grid: Steps, Successes, and Obstacles for Performance Qualification Script Testing Amanda Lopuski, Chiltern, King of Prussia, PA Yongxuan Mike Tan, Chiltern,

More information

INTRODUCTION TO SAS HOW SAS WORKS READING RAW DATA INTO SAS

INTRODUCTION TO SAS HOW SAS WORKS READING RAW DATA INTO SAS TO SAS NEED FOR SAS WHO USES SAS WHAT IS SAS? OVERVIEW OF BASE SAS SOFTWARE DATA MANAGEMENT FACILITY STRUCTURE OF SAS DATASET SAS PROGRAM PROGRAMMING LANGUAGE ELEMENTS OF THE SAS LANGUAGE RULES FOR SAS

More information

Dictionary.coumns is your friend while appending or moving data

Dictionary.coumns is your friend while appending or moving data ABSTRACT SESUG Paper CC-41-2017 Dictionary.coumns is your friend while appending or moving data Kiran Venna, Dataspace Inc. Dictionary.columns is a dictionary table, which gives metadata information of

More information

How to write ADaM specifications like a ninja.

How to write ADaM specifications like a ninja. Poster PP06 How to write ADaM specifications like a ninja. Caroline Francis, Independent SAS & Standards Consultant, Torrevieja, Spain ABSTRACT To produce analysis datasets from CDISC Study Data Tabulation

More information

Checking for Duplicates Wendi L. Wright

Checking for Duplicates Wendi L. Wright Checking for Duplicates Wendi L. Wright ABSTRACT This introductory level paper demonstrates a quick way to find duplicates in a dataset (with both simple and complex keys). It discusses what to do when

More information

FSEDIT Procedure Windows

FSEDIT Procedure Windows 25 CHAPTER 4 FSEDIT Procedure Windows Overview 26 Viewing and Editing Observations 26 How the Control Level Affects Editing 27 Scrolling 28 Adding Observations 28 Entering and Editing Variable Values 28

More information

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

Tales from the Help Desk 6: Solutions to Common SAS Tasks SESUG 2015 ABSTRACT Paper BB-72 Tales from the Help Desk 6: Solutions to Common SAS Tasks Bruce Gilsen, Federal Reserve Board, Washington, DC In 30 years as a SAS consultant at the Federal Reserve Board,

More information

Missing Pages Report. David Gray, PPD, Austin, TX Zhuo Chen, PPD, Austin, TX

Missing Pages Report. David Gray, PPD, Austin, TX Zhuo Chen, PPD, Austin, TX PharmaSUG2010 - Paper DM05 Missing Pages Report David Gray, PPD, Austin, TX Zhuo Chen, PPD, Austin, TX ABSTRACT In a clinical study it is important for data management teams to receive CRF pages from investigative

More information

CareDx Customer Web Portal User Guide Version 3.6.3

CareDx Customer Web Portal User Guide Version 3.6.3 CareDx Customer Web Portal User Guide Version 3.6.3 Copyright Notice CareDx, Inc, 3260 Bayshore Blvd, Brisbane, CA 94005 Copyright 2015 CareDx All rights reserved. This document is protected by the copyright

More information

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

Getting Up to Speed with PROC REPORT Kimberly LeBouton, K.J.L. Computing, Rossmoor, CA SESUG 2012 Paper HW-01 Getting Up to Speed with PROC REPORT Kimberly LeBouton, K.J.L. Computing, Rossmoor, CA ABSTRACT Learning the basics of PROC REPORT can help the new SAS user avoid hours of headaches.

More information

How to Keep Multiple Formats in One Variable after Transpose Mindy Wang

How to Keep Multiple Formats in One Variable after Transpose Mindy Wang How to Keep Multiple Formats in One Variable after Transpose Mindy Wang Abstract In clinical trials and many other research fields, proc transpose are used very often. When many variables with their individual

More information

When ANY Function Will Just NOT Do

When ANY Function Will Just NOT Do Paper 1174-2017 When ANY Function Will Just NOT Do Richann Watson, Experis; Karl Miller, inventiv Health ABSTRACT Have you ever been working on a task and wondered whether there might be a SAS function

More information

A Macro to Create Program Inventory for Analysis Data Reviewer s Guide Xianhua (Allen) Zeng, PAREXEL International, Shanghai, China

A Macro to Create Program Inventory for Analysis Data Reviewer s Guide Xianhua (Allen) Zeng, PAREXEL International, Shanghai, China PharmaSUG 2018 - Paper QT-08 A Macro to Create Program Inventory for Analysis Data Reviewer s Guide Xianhua (Allen) Zeng, PAREXEL International, Shanghai, China ABSTRACT As per Analysis Data Reviewer s

More information

Lab #1: Introduction to Basic SAS Operations

Lab #1: Introduction to Basic SAS Operations Lab #1: Introduction to Basic SAS Operations Getting Started: OVERVIEW OF SAS (access lab pages at http://www.stat.lsu.edu/exstlab/) There are several ways to open the SAS program. You may have a SAS icon

More information

SAS Scalable Performance Data Server 4.3

SAS Scalable Performance Data Server 4.3 Scalability Solution for SAS Dynamic Cluster Tables A SAS White Paper Table of Contents Introduction...1 Cluster Tables... 1 Dynamic Cluster Table Loading Benefits... 2 Commands for Creating and Undoing

More information

Automate Clinical Trial Data Issue Checking and Tracking

Automate Clinical Trial Data Issue Checking and Tracking PharmaSUG 2018 - Paper AD-31 ABSTRACT Automate Clinical Trial Data Issue Checking and Tracking Dale LeSueur and Krishna Avula, Regeneron Pharmaceuticals Inc. Well organized and properly cleaned data are

More information

Validation Summary using SYSINFO

Validation Summary using SYSINFO Validation Summary using SYSINFO Srinivas Vanam Mahipal Vanam Shravani Vanam Percept Pharma Services, Bridgewater, NJ ABSTRACT This paper presents a macro that produces a Validation Summary using SYSINFO

More information

2. Don t forget semicolons and RUN statements The two most common programming errors.

2. Don t forget semicolons and RUN statements The two most common programming errors. Randy s SAS hints March 7, 2013 1. Always begin your programs with internal documentation. * ***************** * Program =test1, Randy Ellis, March 8, 2013 ***************; 2. Don t forget semicolons and

More information

An Approach Finding the Right Tolerance Level for Clinical Data Acceptance

An Approach Finding the Right Tolerance Level for Clinical Data Acceptance Paper P024 An Approach Finding the Right Tolerance Level for Clinical Data Acceptance Karen Walker, Walker Consulting LLC, Chandler Arizona ABSTRACT Highly broadcasted zero tolerance initiatives for database

More information

Keh-Dong Shiang, Department of Biostatistics & Department of Diabetes, City of Hope National Medical Center, Duarte, CA

Keh-Dong Shiang, Department of Biostatistics & Department of Diabetes, City of Hope National Medical Center, Duarte, CA Validating Data Via PROC SQL Keh-Dong Shiang, Department of Biostatistics & Department of Diabetes, City of Hope National Medical Center, Duarte, CA ABSTRACT The Structured Query Language (SQL) is a standardized

More information

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

Automated Checking Of Multiple Files Kathyayini Tappeta, Percept Pharma Services, Bridgewater, NJ PharmaSUG 2015 - Paper QT41 Automated Checking Of Multiple Files Kathyayini Tappeta, Percept Pharma Services, Bridgewater, NJ ABSTRACT Most often clinical trial data analysis has tight deadlines with very

More information

%MAKE_IT_COUNT: An Example Macro for Dynamic Table Programming Britney Gilbert, Juniper Tree Consulting, Porter, Oklahoma

%MAKE_IT_COUNT: An Example Macro for Dynamic Table Programming Britney Gilbert, Juniper Tree Consulting, Porter, Oklahoma Britney Gilbert, Juniper Tree Consulting, Porter, Oklahoma ABSTRACT Today there is more pressure on programmers to deliver summary outputs faster without sacrificing quality. By using just a few programming

More information

OUT= IS IN: VISUALIZING PROC COMPARE RESULTS IN A DATASET

OUT= IS IN: VISUALIZING PROC COMPARE RESULTS IN A DATASET OUT= IS IN: VISUALIZING PROC COMPARE RESULTS IN A DATASET Prasad Ilapogu, Ephicacy Consulting Group; Masaki Mihaila, Pfizer; ABSTRACT Proc compare is widely used in the pharmaceutical world to validate

More information

ehepqual- HCV Quality of Care Performance Measure Program

ehepqual- HCV Quality of Care Performance Measure Program NEW YORK STATE DEPARTMENT OF HEALTH AIDS INSTITUTE ehepqual- HCV Quality of Care Performance Measure Program USERS GUIDE A GUIDE FOR PRIMARY CARE AND HEPATITIS C CARE PROVIDERS * * For use with ehepqual,

More information

Making the most of SAS Jobs in LSAF

Making the most of SAS Jobs in LSAF PharmaSUG 2018 - Paper AD-26 Making the most of SAS Jobs in LSAF Sonali Garg, Alexion; Greg Weber, DataCeutics ABSTRACT SAS Life Science Analytics Framework (LSAF) provides the ability to have a 21 CFR

More information

SAS Programming Basics

SAS Programming Basics SAS Programming Basics SAS Programs SAS Programs consist of three major components: Global statements Procedures Data steps SAS Programs Global Statements Procedures Data Step Notes Data steps and procedures

More information

ABSTRACT INTRODUCTION THE GENERAL FORM AND SIMPLE CODE

ABSTRACT INTRODUCTION THE GENERAL FORM AND SIMPLE CODE Paper SA06 Painless Extraction: Options and Macros with PROC PRESENV Keith Fredlund, MS (candidate) Grand Valley State University, Allendale, Michigan; Thinzar Wai, MS (candidate) Grand Valley State University,

More information

PharmaSUG Paper AD09

PharmaSUG Paper AD09 PharmaSUG 2015 - Paper AD09 The Dependency Mapper: How to save time on changes post database lock Apoorva Joshi, Biogen, Cambridge, MA Shailendra Phadke, Eliassen Group, Wakefield, MA ABSTRACT We lay emphasis

More information

WHAT ARE SASHELP VIEWS?

WHAT ARE SASHELP VIEWS? Paper PN13 There and Back Again: Navigating between a SASHELP View and the Real World Anita Rocha, Center for Studies in Demography and Ecology University of Washington, Seattle, WA ABSTRACT A real strength

More information