Warning: don't use Proc Cport to generate SAS transport file for submitting the data to FDA. See my article "Submit the Clinical Trial Datasets to FDA: Using the right .xpt file format"
Proc CPORT to creat SAS transport file
***This program will transfer all SAS data sets under c:\sourcedata directory
***to a single .xpt file called test.xtp;
filename xptfile "c:\temp\test.xpt";
libname source "c:\sourcedata\";
***For converting a data set;
proc cport library=source file=xptfile memtype=data;
run;
***For converting a format catalog;
proc cport library=source file=xptfile memtype=catalog;
run;
Proc CIMPORT to extract SAS transport file
/*********************************************************************
/* This program is used for extract the data from SAS transport file
/* generated by using PROC CPORT
/*********************************************************************;
FILENAME xpt 'transport_file_name.xpt';
libname dest 'destination_directory_name';
PROC CIMPORT INFILE= xpt LIBRARY=Dest;
RUN;
No comments:
Post a Comment