Usage Note 22656: How to determine the creation method of a SASĀ® transport file
A SAS transport file can be created with any of the following:
- PROC COPY or a DATA step with the XPORT engine
(transport files created with PROC COPY and the XPORT engine are sometimes referred to as V5 transport files)
- PROC CPORT
- The Autocall macro LOC2XPT (transport files created with the macro are referred to as V8 transport files)
If the creation method of a transport file is unknown, you can use the following method to determine how the file was created.
Run the following DATA step code:
filename tranfile 'physical_storage_location';
data _null_;
infile tranfile obs=5;
input theline $ascii80. ;
put theline;
run;
Note: Operating system commands, such as the following DOS command, can be used to open the file or the file can be opened in Notepad:
c:> type c:\tranfile.dat | more
When you check your SAS log (or your screen if you are using the DOS command or Notepad), you will see one of the following:
- If the first line of the display contains LIBRARY HEADER RECORD, the transport file was created by the XPORT engine using PROC COPY or the DATA step. For example:
HEADER RECORD*******LIBRARY HEADER RECORD!!!!!!!0000000000000000000000000
-
If you see LIBV8 HEADER RECORD as shown below, the transport file was created by the Autocall macro LOC2XPT.
HEADER RECORD*******LIBV8 HEADER RECORD!!!!!!!0000000000000000000000000
-
If you see a **COMPRESSED** line as shown below, the transport file was created by the CPORT procedure.
**COMPRESSED** **COMPRESSED** **COMPRESSED** **COMPRESSED** **COMPRESSED*
Now that you have determined the method that was used to create the transport file, use a compatible strategy to read the transport file and write it back out to a SAS data set. In the order in which these are discussed, compatible strategies for reading the transport file are:
- PROC COPY or the DATA step with the XPORT engine
- The Autocall macro LOC2XPT
- PROC CIMPORT
Operating System and Release Information
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
This note illustrates how to determine the creation method of a SAS transport file if the method is unknown.
Type: | Usage Note |
Priority: | low |
Topic: | Data Management ==> Administration ==> Migration
|
Date Modified: | 2007-11-26 10:24:40 |
Date Created: | 2002-12-16 10:56:49 |