0% found this document useful (0 votes)
37 views3 pages

Paper 218-28 Creating Tables or Listings With A Zero-Record SAS Data Set - Basic Program Structure and Three Simple Techniques

Uploaded by

KirthiKiran
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views3 pages

Paper 218-28 Creating Tables or Listings With A Zero-Record SAS Data Set - Basic Program Structure and Three Simple Techniques

Uploaded by

KirthiKiran
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

SUGI 28 Posters

Paper 218-28

Creating Tables or Listings with a Zero-Record SAS® Data Set


-- Basic Program Structure and Three Simple Techniques
Rubin Nan, Victor Loher
PRA International, Inc., Lenexa, Kansas

ABSTRACT ways to generate logic routes to manage a


situation that has records in the dataset and one
Oftentimes, particular tables or listings in a that has zero-records in the dataset.
clinical trial deal with zero-record SAS®
datasets. This occurs primarily in tables/listings HOW TO DO
that deal with death or serious adverse events.
To avoid the hard coding and to re-use the The key to this is to set up two logical routes:
SAS® programs created for the interim analyses, one for the dataset that has zero records and
the logical routes in SAS® programming should another for the dataset that has non-zero records.
program for both conditions: one with zero- Three techniques are presented in this paper to
records and another with non-zero records. This create logical conditions and sequentially direct
paper will provide basic program structure to implementation of the two logical routes. Here,
program for this type of table or listing and also I will use a SAE-related listing as an example.
provide three Techniques: EOF (end of file) In this example, I assume that an adverse event
option, SAS® Help library, and PROC SQL (AE) dataset exists in a Master library, and the
procedure-created macro variable. AE dataset contains no serious event (that is, the
values of the serious variable in this dataset will
INTRODUCTION be all blank; otherwise, the value will be ‘1’ if a
record shows a serious event).
To generate tables or listings in clinical trials for
reporting to regulatory agencies, SAS® The basic structure for creating this type of
programmers often need to create tables or listing starts by using one of three techniques to
listings using a zero-record dataset. This occurs create a macro variable, obs, with a possible
primarily in tables/listings that deal with death value of zero or non-zero, by which, to
or serious adverse events. In order to show discriminate the zero or non-zero conditions.
headers and titles of a table or listing by using
the SAS® PROC REPORT procedure, The three techniques are shown as follows:
programmers can generate a new dataset and put
new data into the dataset to satisfy the tabling Technique 1: Use Proc SQL procedure-
purpose, but this may violate a corporate created macro variable
programming convention against hard coding.
Moreover, in a clinical study that has an interim Proc sql noprint;
analysis, zero-record datasets at the interim select count(*) into: obs
analysis may contain records later with the from master.ae
addition of new subjects. This will require the where serious = ’1’;
creation of new coding for tables or listings, quit;
thus losing job efficiency. This paper will create
a SAE listing as an example using three simple

1
SUGI 28 Posters

%if &obs = 0 %then %do;


Technique 2: Use EOF Option
***************************
data _null_; You can create a zero-
set master.ae (keep = record dataset using the
serious) end=eof; following method. Of course,
you can also use whatever
retain S_flag 0; method you can to create a
if serious ne ' ' then dataset;
S_flag= 1; **************************;

if eof then do; data AE;


array var1, var2,...;
** If zero (no) SAE record; run;

if not S_flag then proc report data=AE


call symput('obs','0'); nowindows;
col var1 var2 ...;
** If SAE records are define var1;
present; define var2;
...
else
call symput('obs','1'); break after /skip;
end;
run; compute after;
line ' ';
Technique 3: Use SAS Help Library ...
line @65 'No serious
data _null_; adverse events were reported';
set sashelp.vtable; endcomp;
run;
if libname eq 'WORK' and %end;
memname eq 'AE' then do;
** if SAE happened, then show
if nobs eq 0 then regular listings or tables;
call symput('obs','0');
%else %do;
else
call symput('obs','1'); proc report data = AE
end; nowindows;
run; col var1 var2 ...;
define var1;
Once the macro variable is established, a macro define var2;
(e. g. AE here) is used to execute the two logical …
routes. break after /skip;

%macro AE; %end;


%mend;
**if no SAE happened, then; %AE;
2
SUGI 28 Posters

CONCLUSION

This paper presents the basic structure and three


simple programming techniques to deal with
zero-record SAS® datasets in the process of
creating tables or listings. With this basic
structure and one of the three techniques, SAS®
programmers can program tables or listings
without losing efficiency in projects having an
interim analysis while avoiding the use of hard
coding.

ACKNOWLEDGMENTS

The author and co-author of this paper sincerely


thank David Mullins and Doug Lassman for
their taking precious time to review the draft.

CONTACT INFORMATION

Your comments and questions are valued and


encouraged. Contact the author at:
Rubin Nan
PRA International, Inc.
16400 College Boulevard
Lenexa, Kansas 66219
Work phone: (913)-577-2882
Fax: (913) 599-0344
Email: [email protected]

Victor Loher
PRA International, Inc.
16400 College Boulevard
Lenexa, Kansas 66219
Work phone: (913)-577-2930
Fax: (913) 599-0344
Email: [email protected]

SAS and all other SAS Institute Inc. product or


service names are registered trademark or
trademarks of SAS Institute Inc. in the USA and
other countries. ® indicates USA registration.

Other brand and product names are trademarks


of their respective companies.

You might also like