楼主: Tigflanker
2023 6

[问答] 如何将外部文件在SAS窗口中展示 [推广有奖]

  • 8关注
  • 18粉丝

副教授

49%

还不是VIP/贵宾

-

威望
0
论坛币
2321 个
通用积分
9.9128
学术水平
179 点
热心指数
194 点
信用等级
167 点
经验
27443 点
帖子
622
精华
0
在线时间
851 小时
注册时间
2011-3-27
最后登录
2023-5-14

楼主
Tigflanker 发表于 2013-9-3 11:09:37 |AI写论文
100论坛币
想问各位老师一个事:

SAS运行某程序后,会在一个路径生成一个txt的文件,我现在就想把这个文件展示出来:Output窗口,Html窗口,或者SAS内部的查看器,但是,不能是log窗口。

例如生成的文件在:C:\Users\guoti\Desktop\Mycro,文件叫做abc.txt

另外还有一个小问题,最好能设置5秒后打开,万一文件比较大,需要写入完全。。

注意:因为是在Unix环境中运行,必须需要在SAS中打开,否则会涉及权限问题。

求助,谢谢。

Capture.JPG (48.71 KB)

Capture.JPG

最佳答案

yongyitian 查看完整内容

try to submit the following code from program editor (not enhanced editor) It works on my site. data _null_; dm 'wedit "F:\MySas\class.txt" '; run;
关键词:Desktop output outpu Users Unix Desktop Users 如何 程序 最好
Bye SAS.
若有缘,能重聚。

沙发
yongyitian 发表于 2013-9-3 11:09:38
try to submit the following code from program editor (not enhanced editor)
It works on my site.

data _null_;                                                                                                         
  dm 'wedit "F:\MySas\class.txt" ';                                                                                 
run;
已有 1 人评分学术水平 热心指数 信用等级 收起 理由
Tigflanker + 1 + 1 + 1 3Q

总评分: 学术水平 + 1  热心指数 + 1  信用等级 + 1   查看全部评分

藤椅
Tigflanker 发表于 2013-9-3 14:17:48
哪位老师能给点线索也行,貌似那个DLGSAVE和他的用法差不多,但是出不来文件,只能手动选择。。

这个print file到底从何查起,我都在搜索“option print”了,大海捞针。。
Bye SAS.
若有缘,能重聚。

板凳
yuerqieqie 发表于 2013-9-3 21:10:45
DATA _NULL_ ; X = SLEEP(5) ; RUN ;  
dm "fileopen 'C:\Users\guoti\Desktop\Mycro\abc.txt'" ;
已有 1 人评分学术水平 热心指数 信用等级 收起 理由
Tigflanker + 1 + 1 + 1 貌似就是这个,明明试试,谢谢。

总评分: 学术水平 + 1  热心指数 + 1  信用等级 + 1   查看全部评分

报纸
Tigflanker 发表于 2013-9-4 09:36:25
yuerqieqie 发表于 2013-9-3 21:10
DATA _NULL_ ; X = SLEEP(5) ; RUN ;  
dm "fileopen 'C:\Users\guoti\Desktop\Mycro\abc.txt'" ;
这个还是不能用,我也没搞明白为什么,谢谢先
Bye SAS.
若有缘,能重聚。

地板
Tigflanker 发表于 2013-9-4 12:04:41
yongyitian 发表于 2013-9-4 10:55
try to submit the following code from program editor (not enhanced editor)
It works on my site.
Thanks you.

I have try this way yesterday. It works in Windows SAS but not in Unix.

I think I had to try another way that depend on Unix directly.

Thank you again. And by the way, I remember the rm command is open code, do not need set in data step.
Bye SAS.
若有缘,能重聚。

7
Tigflanker 发表于 2013-9-4 15:56:46
已解决,请版主帮忙修改下题目。
Bye SAS.
若有缘,能重聚。

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

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-26 11:40