博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
SAS宏系统选项SYMBOLGEN MCOMPILENOTE MPRINT<NEST> MLOGIC(NEST)
阅读量:5998 次
发布时间:2019-06-20

本文共 3192 字,大约阅读时间需要 10 分钟。

SYMBOLGEN

  Details

    1. With SYMBOLGEN enabled, SAS presenets the results of the resolution of macro variables in the SAS log, it show the value of both automaci and user-defined macro variables.

    2. Helps Debug SAS Program and it only displays macro variable values when they are referenced.

  EXAMPLE

26   options symbolgen;2728   %let reptitle=Book Section;29   %let repvar=section;30SYMBOLGEN:  Macro variable REPTITLE resolves to Book SectionSYMBOLGEN:  Macro variable SYSDAY resolves to Tuesday31   title “Frequencies by &reptitle as of &sysday”;32   proc freq data=books.ytdsales;SYMBOLGEN:  Macro variable REPVAR resolves to section33     tables &repvar;34   run;NOTE: There were 3346 observations read from the data set      BOOKS.YTDSALES.NOTE: PROCEDURE FREQ used (Total process time):      real time           0.15 seconds      cpu time            0.01 seconds SYMBOLGEN:  Macro variable REPTITLE resolves to Book Section SYMBOLGEN:  Macro variable SYSDAY resolves to Tuesday 35 36   title “Means by &reptitle as of &sysday”;37   proc means data=books.ytdsales;SYMBOLGEN:  Macro variable REPVAR resolves to section38     class &repvar;39     var saleprice;40   run;NOTE: There were 3346 observations read from the data set      BOOKS.YTDSALES.NOTE: PROCEDURE MEANS used (Total process time):      real time           0.01 seconds      cpu time            0.03 seconds

 

mcompilenote=none/noautocall/all

  Details

    MCOMPILENOTE writes notes to the SAS log about whether a macro program compiles successfully

  Arguments

    none不会在日志中输出信息(default)

    noautocall会在日志中输出非autocall macros的所有宏的信息

    all输出所有信息

  Example

1 options mcompilenote=all;2 %macro mymacro; 3 %mend mymacro; NOTE: The macro MYMACRO completed compilation without errors.

 

OPTIONS MPRINT/NOMPRINT

   Details

    By default, SAS does not write to the SAS log SAS language statements submitted from within a macro program. If you want to see the SAS code that the macro processor constructs and submits, enable the MPRINT option.

    the text that is sent to the SAS compiler as a result of macro execution is printed in the SAS log

   Example

23   options mprint;24   %prtlastMPRINT(PRTLAST):   proc print data=WORK.SALES (obs=5); MPRINT(PRTLAST): run;

 

 

OPTIONS MPRINTNEST/NOMPRINTNEST

   Details

      Aligns the nesting level of macro programs and the SAS code generated by the execution of the macro programs in the SAS log.

 

OPTIONS MLOGIC | NOMLOGIC;

  Details

    The information written to the SAS log when MLOGIC is enabled includes the beginning and ending of the macro program and the results of arithmetic and logical macro language operations.

  Example

/*红色字体为作用效果*/ options nomprint mlogic;107 %prtlastMLOGIC(PRTLAST): Beginning execution. NOTE: There were 1 observations read from the dataset WORK.SALES. NOTE: PROCEDURE PRINT used: real time 0.02 seconds cpu time 0.02 seconds MLOGIC(PRTLAST): Ending execution.

  

 

OPTIONS MLOGICNEST | NOMLOGICNEST;

  Details

      Displays the nesting level of macro programs in the SAS log. This information is displayed in the MLOGIC output in the SAS log, and MLOGIC must be enabled for this option to work.

转载于:https://www.cnblogs.com/yican/p/4735836.html

你可能感兴趣的文章
python中read() readline()以及readlines()用法
查看>>
网络知识汇总(1)-朗文和牛津英语词典网址
查看>>
选择排序(C语言实现) 分类: 数据结构 2015-...
查看>>
Quartz_1_简单编程式任务调度使用(SimpleTrigger)
查看>>
web api 初体验 解决js调用跨域问题
查看>>
centos 安装docker
查看>>
互联网架构的三板斧
查看>>
阿里巴巴MySQL DBA面试题答案[转]
查看>>
JS乘法口诀表(一行代码)
查看>>
网络、会话建立与信任
查看>>
系统级性能分析工具perf的介绍与使用
查看>>
spring remoting源码分析--Hessian分析
查看>>
phpMyAdmim和Yii 连接Mysql报错。
查看>>
shell语法简单介绍
查看>>
MyEclipse 6.5 代码自动提示功能配置教程
查看>>
Java程序员面试失败的5大原因
查看>>
我认识的python(5)
查看>>
Promise实现
查看>>
报表性能优化
查看>>
js设计模式--迭代器模式
查看>>