PharmaSUG 2020 – Paper 209
Automation of Conversion of SAS® Programs to Text files for
submissions to the FDA
Sapan Shah
Sachin Agarwal
ABSTRACT
During Clinical Trials Statistical Programmers, works on creation of many SAS® programs to produce
SDTM, ADaM datasets, Tables, Listings and Graphs as per the study requirements and various ad-hoc
and post-hoc request also, which ends with “.sas” extension. The ”.sas” extension SAS® programs are
required for working on different SAS® software but for NDA submission process, one of the
requirement by FDA is that all the submitted SAS® programs have to be in “.txt” format. In this paper,
we will show how to utilize PC SAS® software and MS command prompt in order to change extension
from “.sas” to “.txt” for submission to the FDA. This “.sas” to “.txt” conversion Macro helps Statistical
Programmer in saving their valuable time by eliminating manual conversion as well as eliminate the
error possibility, which might happen during manual conversion.
INTRODUCTION
In this paper, we are going to explain how to utilize PC SAS® software and MS command prompt in
order to change extension from “.sas” to “.txt” for submission to the FDA without losing the indentation
of the original program(s).
We will use an example to demonstrate how to utilize to different software’s in order to change the
extension of the file.
THE EXAMPLE
This paper uses a PC SAS® 9.4 software program macro and embedded Windows SERVER 2008
command prompt within the SAS® program to demonstrate the automation process to change
extension from “.sas” to “.txt”. In order to utilize this code, we will be required to make the copies of all
the original “.sas” programs from the original directory to a temporary directory where we plan to save
the converted “.txt” program files, which happens automatically using this code itself:
%macro Convert_SAS_txt(source=%nrstr(), prod=%nrstr());
proc datasets lib=work nolist kill memtype=data;
run;
quit;
%put &source.;
%put &prod.;