| 1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| 2 |
<html> |
| 3 |
<head> |
| 4 |
<title>How to Create SAS Transport Files</title> |
| 5 |
</head> |
| 6 |
|
| 7 |
<body> |
| 8 |
<h1>How to Create SAS Transport Files</h1> |
| 9 |
<ol> |
| 10 |
<li>If any of the datasets you are exporting are not already in the |
| 11 |
<tt>WORK</tt> library, copy them to there: |
| 12 |
<pre> |
| 13 |
PROC COPY IN=mylib OUT=WORK; SELECT test1 test2; RUN; |
| 14 |
</pre> |
| 15 |
</li> |
| 16 |
<li>If you have created value label formats using <tt>PROC FORMAT; |
| 17 |
VALUE ...</tt>, output these value labels into a SAS |
| 18 |
dataset: |
| 19 |
<pre> |
| 20 |
PROC FORMAT CNTLOUT=format;RUN; |
| 21 |
</pre> |
| 22 |
</li> |
| 23 |
<li>Define a <tt>LIBNAME</tt> to reference the SAS Version 5 transport |
| 24 |
file engine: |
| 25 |
<pre> |
| 26 |
libname xp SASV5XPT "test.xpt"; |
| 27 |
</pre> |
| 28 |
</li> |
| 29 |
<li>Copy all needed datasets to, e.g., <tt>test.xpt</tt>: |
| 30 |
<pre> |
| 31 |
PROC COPY IN=work OUT=xp;SELECT test1 test2 format;RUN; |
| 32 |
</pre> |
| 33 |
<b>DO NOT</b> use <tt>PROC CPORT</tt> to create the file. |
| 34 |
</li> |
| 35 |
</ol> |
| 36 |
<hr> |
| 37 |
<address><a href="mailto:[email protected]">Frank E Harrell Jr</a></address> |
| 38 |
<!-- Created: Wed May 21 09:11:25 EDT 2003 --> |
| 39 |
<!-- hhmts start --> |
| 40 |
Last modified: Fri Jun 6 15:47:58 EDT 2003 |
| 41 |
<!-- hhmts end --> |
| 42 |
</body> |
| 43 |
</html> |