SAS中文论坛

标题: 求助:SAS程序在命令行执行时能输出到屏幕吗? [打印本页]

作者: shiyiming    时间: 2008-9-11 10:36
标题: 求助:SAS程序在命令行执行时能输出到屏幕吗?
我的SAS程序是在命令行下执行的,调试不太方便,如果能在程序中加入调试信息,然后在运行过程中,实时显示在屏幕上就好了
作者: shiyiming    时间: 2008-9-11 10:58
标题: Re: 求助:SAS程序在命令行执行时能输出到屏幕吗?
x command.

x "echo val=&val"; #under unix;
作者: shiyiming    时间: 2008-9-11 11:02
标题: Re: 求助:SAS程序在命令行执行时能输出到屏幕吗?
options mprint mlogic;

%put &tname &cname;
作者: shiyiming    时间: 2008-9-11 11:15
标题: to ahuige
thanks 这个是我需要的,

另外在问一下,SAS程序有没有这样的options用来屏蔽这些x command,就是说只有我调试的时候才使用x command输出到屏幕,release的时候就关掉。
作者: shiyiming    时间: 2008-9-11 11:18
标题: to ydlin
因为我在执行的时候使用了 -log,所以,%put 全部写到log文件里去了,这两个options我已经在使用了,只是%put虽然能输出一些信息到log,但不是实时的,我的需求是,运行时实时输出到屏幕。
谢了
作者: shiyiming    时间: 2008-9-12 09:29
标题: to jackyyb
SAS has its own debug module. But you can only use logical statement of macro to execute x command conditionally.

%let debug=yes;

.........................

%if &debug=yes %then x........................;
作者: shiyiming    时间: 2008-9-16 13:43
标题: to ahuige
thanks,

I still got a problem, when x command want to output some special characters,as below:

x command is : x "Finish get local setting for &var" /*macro variable var has special characters,the value is 2BL;1-FCN_SD.4x8;* */

Finish get local setting for 2BL
/sbin/sh: 1-FCN_SD.4x8:  not found.
/sbin/sh: *----13:31:36:  not found.

how to resolve it?




欢迎光临 SAS中文论坛 (https://mysas.net/forum/) Powered by Discuz! X3.2