This week's SAS tip is from the new book Implementing CDISC Using SAS: An End-to-End Guide by Chris Holland and Jack Shostak. This comprehensive book will help anyone dealing with CDISC standards. Learn more about the book and the authors--plus get free content here.
The following excerpt is from SAS Press authors Chris Holland and Jack Shostak's book "Implementing CDISC Using SAS: An End-to-End Guide" Copyright © 2012, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED. (please note that results may vary depending on your version of SAS software).
Converting from Native SAS to Version 5.0 Transport Files
Many programmers might prefer to keep their SDTM and ADaM datasets in a native SAS format until they are ready to submit the data to the FDA for a regulatory submission. SAS provides a set of macros that facilitate conversions from native SAS formats to SAS transport files. These can be found at http://www.sas.com/industry/government/fda/macro.html. As suggested by the URL, these are to help programmers convert their data for FDA submissions.
Many of these macros build off one another. The %TOEXP macro converts a library of native SAS datasets to a separate directory of XPT files. It calls another macro, %DIRDELIM, which is also included in the set. The %TOEXP macro is quite simple to use:
%let outdir=&path\data\sdtm\xpt2; %let indir=&path\data\sdtm; %toexp(&indir, &outdir);
These macros are designed to work in a Microsoft Windows (or PC) and a UNIX or Linux environment. They can handle format catalogs as well (although that is not needed when dealing with SDTM and ADaM datasets because they should have no user-defined formats attached).
Because OpenCDISC requires datasets to be transport files, this macro can also be used before running an OpenCDISC validation report. (See Chapters 7 and 8.)