Home  /  Resources & support  /  FAQs  /  Old Stat/Transfer: Converting SAS datasets to Stata using Stat/Transfer
Note: This FAQ concerns older versions of Stat/Transfer. It is not relevant for more recent versions.

Old Stat/Transfer: I am having trouble converting a SAS dataset to a Stata dataset using Stat/Transfer. What is wrong?

Title   Old Stat/Transfer: Converting SAS datasets to Stata using Stat/Transfer
Author Steve Dubnoff, Circle Systems

SAS transport files are the subject of most of our technical support questions. Part of the problem is that SAS provides many names for the same file format and a similar name — CPORT — for another format. The only documented format, and the one recommended by SAS for transporting data to other platforms, is the format produced by the XPORT engine. That is the format Stat/Transfer can convert.

In addition, there are in all fairnessa number of computer/technical issues outside of SAS's control that can make what starts as a valid SAS Transport file into an invalid one. This is especially true if the original file starts out on an IBM mainframe or a VAX. SAS provides a technical document on their website that outlines these issues.

Stat/Transfer tries to trap many of the errors that occur because the file is in the wrong format or because it has been damaged in transport from a different host, but, sometimes, it simply becomes confused and must stop with the “No message available” error.

When making Transport files in SAS, make sure you use a reasonable facsimile of the example SAS program in the Stat/Transfer manual. Do not use PROC CPORT, as this produces a file in an entirely different format that is readable only by SAS.

When you have trouble converting a Transport file, particularly if you did not produce the file yourself, look at the very first line of the file. It should say something like

        HEADER RECORD*******LIBRARY HEADER RECORD

If it does not, it is not a SAS transport file, and Stat/Transfer will not be able to read it.