如何在SAS University Edition中禁用自动选项语句?

时间:2015-05-17 13:49:34

标签: sas

每当我在SAS University Edition中提交代码时,会自动插入这样的语句并显示在日志中:

OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;

是什么导致这种情况,有没有办法禁用它?我甚至不确定这些语句是否正在执行任何操作,因为所有相关内容仍显示在日志中。

按照以下Dwal的建议,以下是所有其他生成的代码:

 1          OPTIONS NOSYNTAXCHECK;
 2          TITLE;
 3          FOOTNOTE;
 4          OPTIONS LOCALE=en_US DFLANG=LOCALE;
 5          DATA _NULL_;
 6          VALUE=GETOPTION("VALIDVARNAME");
 7          CALL SYMPUT("_WEBVVN", VALUE);
 8          RUN;

 NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       cpu time            0.01 seconds


 9          OPTIONS VALIDVARNAME=V7;
 10         FILENAME _HTMLOUT TEMP;
 11         FILENAME _GSFNAME TEMP;
 12         FILENAME _DATAOUT TEMP;
 13         %LET SYSCC=0;
 14         %LET _CLIENTAPP=SAS Studio;
 15         %LET _CLIENTAPPVERSION=3.3;
 16         %LET _SASPROGRAMFILE = %BQUOTE();
 17         %LET _BASEURL = %BQUOTE(http://localhost:10080/SASStudio/);
 18         %LET _EXECENV=SASProgrammer;
 19         DATA _NULL_;
 20         CALL SYMPUT("GRAPHINIT","");
 21         CALL SYMPUT("GRAPHTERM","");
 22         RC=TSLVL('GEOCODE');
 23         _ERROR_=0;
 24         IF (RC^=' ') THEN DO;
 25         CALL SYMPUT("GRAPHINIT","GOPTIONS RESET=ALL GSFNAME=_GSFNAME;");
 26         CALL SYMPUT("GRAPHTERM","GOPTIONS NOACCESSIBLE;");
 27         END;
 28         RUN;

 NOTE: Argument 1 to function TSLVL('GEOCODE') at line 22 column 4 is invalid.
 NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       cpu time            0.01 seconds


 29         DATA _NULL_;
 30         RC=SYSPROD("PRODNUM002");
 31         IF (RC^=1) THEN DO;
 32         CALL SYMPUT("GRAPHINIT","");
 33         CALL SYMPUT("GRAPHTERM","");
 34         END;
 35         RUN;

 NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       cpu time            0.00 seconds


 36         %LET _DATAOUT_MIME_TYPE=;
 37         %LET _DATAOUT_NAME=;
 38         %LET _DATAOUT_TABLE=;
 39         %LET _DATAOUT_URL=;
 40         %SYMDEL _DATAOUT_MIME_TYPE _DATAOUT_NAME _DATAOUT_URL _DATAOUT_TABLE;
 41         %LET _SASWS_ = %BQUOTE(/folders/myfolders);
 42         %LET _SASWSTEMP_=%BQUOTE(/folders/myfolders/.images/c1930fcb-2ffb-4ae0-8bfe-624b39b851b9);
 43         ODS LISTING CLOSE;
 44         OPTIONS PRINTERPATH=PDF;
 45         ODS AUTONAVIGATE OFF;
 46         ODS GRAPHICS ON;
 47         ODS HTML5 (ID=WEB) DEVICE=PNG GPATH="&_SASWSTEMP_" ENCODING=utf8 FILE=_HTMLOUT (TITLE='Results: Program') STYLE=Htmlblue
 47       ! OPTIONS(BITMAP_MODE='INLINE' SVG_MODE='INLINE' CSS_PREFIX='.ods_c1930fcb-2ffb-4ae0-8bfe-624b39b851b9'
 47       ! BODY_ID='div_c1930fcb-2ffb-4ae0-8bfe-624b39b851b9' );
 NOTE: Writing HTML5(WEB) Body file: _HTMLOUT
 48         &GRAPHINIT;
 49         OPTIONS FIRSTOBS=1;
 50         OPTIONS OBS=MAX;
 51         OPTIONS DTRESET DATE NUMBER NOTES;
 52         OPTIONS NOSYNTAXCHECK;
 53         

我实际提交的位:

 54         data _null_;
 55         put "Hello";
 56         run;

 Hello
 NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       cpu time            0.01 seconds

然后再做一些事情:

 57         
 58         OPTIONS NOSYNTAXCHECK;
 59         ODS HTML CLOSE;
 60         &GRAPHTERM; ;*';*";*/;RUN;QUIT;
 61         QUIT;RUN;
 62         OPTIONS VALIDVARNAME=&_WEBVVN;
 63         %SYMDEL _WEBVVN;
 64         ODS HTML5 (ID=WEB) CLOSE;
 65         
 66         FILENAME _GSFNAME;
 NOTE: Fileref _GSFNAME has been deassigned.
 67         DATA _NULL_;RUN;

 NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       cpu time            0.00 seconds


 67       !                 OPTIONS NOTES STIMER SOURCE SYNTAXCHECK;
 68       

1 个答案:

答案 0 :(得分:0)

可以在SAS中设置几个选项 - 以下列表按优先顺序排列(即#1取代#2等):

  1. 限制选项表,如果存在(如果你在大学服务器上这些可能已经设置好了)
  2. OPTIONS语句(或SAS系统选项窗口)
  3. Autoexec文件(包含OPTIONS语句)
  4. 命令行规范
  5. 配置文件规范
  6. SAS系统默认设置。
  7. 您可以通过汇总以下内容来检查这些选项的实际值,这将输出所有系统选项及其当前值的列表:

    OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;

    根据您的说法,听起来好像日志仍在输出备注/源行是吗?如果您在日志中看到proc options,那么它只是猜测,但可能是该语句来自autoexec文件(#3),然后由单位限制选项(#1)取代

    您可以通过查找AUTOEXEC选项的值从上面var x = 'foo'; 语句的输出中检查这一点,因为这将指定要提交的autoexec文件的路径(如果有)