Convert DTA to SAS7BDAT

Turn DTA files into SAS7BDAT. A SAS 9 data set in UTF-8.

Converted in an isolated sandbox on our serversDeleted after 24 hours

Drop DTA files on the dialor turn it to pick what to do

A SAS data set from your Stata file.A SAS 9 data set in UTF-8, with variable labels and dates carried over.

  1. What you get

    One SAS7BDAT file in the SAS 9 format, with text stored as UTF-8. Variable labels are kept.

    Stata dates and times become SAS values with the formats E8601DA for dates and E8601DT for date-times.

  2. What changes or is dropped

    Value labels are dropped. SAS keeps them in a separate format catalog, so they do not travel inside the data set.

    The extended missing values .a to .z become ordinary missing values.

    A variable name that SAS does not allow becomes a name of up to 32 Latin letters, digits and underscores. If the variable has no label, the original name is kept as its label. Text longer than 32,767 bytes is cut.

  3. Long text and empty files

    When some text is longer than 2,045 bytes, dates and times keep their SAS values but get no format.

    A file without rows fails with unsupported_elements.

    To go the other way, use SAS7BDAT to DTA.

DTA and SAS7BDAT.What each format is.

The formats

From · DTA

Stata Data

Stata datasets.

Extensions
.dta
MIME type
application/x-stata-dta
Kind
Text and data
To · SAS7BDAT

SAS Data

SAS datasets.

Extensions
.sas7bdat
MIME type
application/x-sas-data
Kind
Text and data

In your code.The same DTA to SAS7BDAT conversion through the API, for your app or your agent.

terminal
$ cv convert report.dta report.sas7bdat
$ cv convert report.dta report.sas7bdat

Questions.What people ask about DTA to SAS7BDAT.

01OF 04

Yes. Variable labels are kept. A renamed variable also gets its original name as a label when it has none.

No. They are dropped, because SAS keeps value labels in a separate format catalog.

They become ordinary missing values, so the letter that told them apart is lost.

The file has no rows. A DTA file without rows stops with unsupported_elements.

More conversions.Other ways in and out of DTA and SAS7BDAT.