将 .sas7bdat 从 SAS Studio 导出到本地机器 [英] Export .sas7bdat from SAS Studio to local machine

查看:49
本文介绍了将 .sas7bdat 从 SAS Studio 导出到本地机器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 SAS Studio(完全基于浏览器).我需要以 .sas7bdat 文件格式将数据集导出到我的本地机器.我认为它应该类似于 PROC EXPORT data = sqrtReg2 outfile = "C:\Documents\SAS\Target_Wins.sas7bdat";.但这会返回错误 ERROR:无法确定数据源类型.请使用 DBMS= 选项..但是 DBMS 选项只允许 CSV、选项卡和 DLM.如何以 .sas7bdat 文件格式将此数据集导出到我的本地计算机?

I am using SAS Studio(completely browser based). I need to export a dataset to my local machine in the .sas7bdat file format. I think it should be something like PROC EXPORT data = sqrtReg2 outfile = "C:\Documents\SAS\Target_Wins.sas7bdat";. But that returns the error ERROR: Unable to determine datasource type. Please use the DBMS= option.. But the DBMS option only allows for CSV, tab and DLM. How do I export this data set to my local machine in the .sas7bdat file format?

推荐答案

使用 SAS University Edition,您可以在 SAS 运行的虚拟机中设置共享文件夹,这些文件夹映射到您的真实机器上的实际文件夹.

With the SAS University Edition you can setup shared folders in the virtual machine where SAS runs that are mapped to actual folders on your real machine.

例如,您可能已将 C:\Documents\SAS\ 映射到 /folders/myfolders.您无法写入真实机器上未映射的其他位置,以便虚拟机可以看到它们.查看文档以了解获取文件夹映射的确切详细信息.

For example you might have mapped C:\Documents\SAS\ to /folders/myfolders. You cannot write to other locations on your real machine that are not mapped so that the virtual machine can see them. Check the documentation for exact details of getting the folders mapped.

让 SAS 放置数据集的正常方法是创建一个指向文件夹的 libref,然后在引用数据集时使用两级名称.您可以创建一个名为 OUT 的 libref,例如:

The normal way to have SAS place a dataset then is to create a libref that points to the folder and then use a two level name when referencing the data set. You could create a libref named OUT for example:

 libname out '/folders/myfolders/';
 data out.target_wins; 
   set sqrtReg2;
 run;

但您也可以直接引用文件,而无需先创建 libref.

But you can also just refer to the file directly without first creating a libref.

 data '/folders/myfolders/target_wins'; 
   set sqrtReg2;
 run;

请注意,由于 SAS 实际上在 Unix 中运行,因此您不能将 CamelCaseFileNames 用于 SAS 数据集.文件将始终全部为小写字母.

Note that since SAS is actually running in Unix you cannot use CamelCaseFileNames for your SAS datasets. The files will always be in all lowercase letters.

这篇关于将 .sas7bdat 从 SAS Studio 导出到本地机器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆