SAS author's tip: Converting from native SAS to version 5.0 transport files


Implementing CDISC Using SASThis 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 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.)


About Author

Shelly Goodin

Social Media Specialist, SAS Publications

Shelly Goodin is SAS Publications' social media marketer and the editor of "SAS Publishing News". She’s worked in the publishing industry for over thirteen years, including seven years at SAS, and enjoys creating opportunities for fans of SAS and JMP software to get to know SAS Publications' many offerings and authors.


  1. Pingback: SAS author’s tip: Converting from version 5.0 transport files to native SAS - The SAS Bookshelf

  2. I purchased this book when it was first released. It is a great book with CDISC insights to create SDTM and ADaM datasets. I strongly recommend this book for all pharmaceutical SAS programmers.

Back to Top