Guides / SAS transport (.xpt) files explained
SAS transport (.xpt) files explained
Most study datasets are sent as SAS transport files, one .xpt file per dataset. Here's what's inside one, the limits that trip people up, and how to open a big one without SAS.
What a SAS transport file is
A SAS transport file (.xpt) is an old, simple and openly documented format from SAS for moving datasets between computers. FDA asks for study datasets as version 5 transport files, one dataset per file: dm.xpt, ae.xpt, lb.xpt and so on.
Version 5 .xpt limits
| Item | Version 5 limit |
|---|---|
| Dataset and variable names | 8 characters |
| Labels | 40 characters |
| Text values | 200 characters (longer text goes into SUPP-- or split variables) |
| Numbers | Stored in IBM floating point, not the PC's usual format |
| Characters | Plain ASCII is safest; FDA rules flag other characters |
Version 8 (and 9) transport files allow longer names, labels and values, but check what your reviewer accepts before you send them.
What's inside an .xpt file
The file starts with header records that list each variable's name, label, type, length and format. Then come the rows, each one the same length. Because every row has the same length, a program can jump straight to row 2,000,000 without reading the rows before it.
Opening big .xpt files
Lab and questionnaire datasets can run to several gigabytes. FDA's Study Data Technical Conformance Guide asks you to split datasets bigger than 5 GB. Our checker reads .xpt files in small slices, so a 5 GB file opens in Chrome or Firefox, with paging, filters and sorting, without loading it all into memory.
Dataset-JSON, the newer alternative
CDISC Dataset-JSON is a newer exchange format without the version 5 limits. Our checker reads it too, so you can check the same dataset in either format.
Questions about SAS transport (.xpt) files
Can I open an .xpt file without SAS?
Yes. Our checker opens .xpt files in your browser, shows every row and variable, and lets you filter and sort. R and Python can read them too.
Why are my numbers slightly off after converting .xpt?
Version 5 stores numbers in IBM floating point. Good readers convert them exactly; a reader that guesses the format can show small differences.
Is an .xpt file the same as a .sas7bdat file?
No. A .sas7bdat is SAS's own dataset file. An .xpt is the transport format made for moving data, and it's the one FDA asks for.
This guide is general information to help you understand the standards. It isn't official FDA or CDISC guidance; read the published documents for your submission.