SAS中文论坛

 找回密码
 立即注册

扫一扫,访问微社区

查看: 931|回复: 1
打印 上一主题 下一主题

求教:SAS中xpt文件是作什么用的

[复制链接]

49

主题

76

帖子

1462

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1462
楼主
 楼主| 发表于 2008-10-28 22:06:15 | 只看该作者

求教:SAS中xpt文件是作什么用的

SAS中xpt文件是作什么用的,怎样运用,谁有相关的资料希望share一下
<!-- e --><a href="mailto:jbiostat@gmail.com">jbiostat@gmail.com</a><!-- e -->
回复 支持 反对

使用道具 举报

49

主题

76

帖子

1462

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1462
沙发
 楼主| 发表于 2008-10-28 22:18:06 | 只看该作者

transport files

You can recreate the transport file using the XPORT engine on the libname statement and using proc copy code.  The SAS System Viewer is only able to read XPORT Transport files.  Sample code is:

libname xptfile XPORT 'c:\sasfile.xpt'; /* SASFILE.XPT will be created*/
proc copy in=work out=xptfile; /* replace WORK with your libname */
   select dataset;  /* replace DATASET with name of your SAS data set */
run;

This information is applicable to Transport files created with Version 7 SAS data sets and Version 6.12 SAS data sets.  The SAS System Viewer will NOT be modified to read SAS CPORT Transport files.

For example, if you have a transport file called MyFile.xpt, and it resides on the SAS server in: c:\documents and settings, then code similar to the following can be used to convert MyFile.xpt into a SAS data file which can be opened in SAS Enterprise Guide.

/* Specify a libname with a path on the SAS server */
/* for which you have write access. */
libname sasout 'c:\documents and settings\SASDataFiles';

/* Specify a libname with the xport engine,
/* and a path on the SAS server where the .xpt file resides. */
libname xptin xport 'c:\documents and settings\MyFile.xpt';

proc copy in=xptin out=sasout;
run;

After the code is executed successfully, you can then use File =&gt; Open to open the newly created SAS data file.
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|手机版|Archiver|SAS中文论坛  

GMT+8, 2026-2-5 03:25 , Processed in 0.098650 second(s), 20 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表