zoukankan      html  css  js  c++  java
  • SAS宏系统选项SYMBOLGEN MCOMPILENOTE MPRINT<NEST> MLOGIC(NEST)

    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;
    27
    28   %let reptitle=Book Section;
    29   %let repvar=section;
    30
    SYMBOLGEN:  Macro variable REPTITLE resolves to Book Section
    SYMBOLGEN:  Macro variable SYSDAY resolves to Tuesday
    31   title “Frequencies by &reptitle as of &sysday”;
    32   proc freq data=books.ytdsales;
    SYMBOLGEN:  Macro variable REPVAR resolves to section
    33     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 section
    38     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   %prtlast
    MPRINT(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 %prtlast
    MLOGIC(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.

  • 相关阅读:
    SPOJ 1812 LCS2 后缀自动机
    [APIO2014]回文串 后缀自动机_Manancher_倍增
    SPOJ8222 NSUBSTR
    [HAOI2016]找相同字符 广义后缀自动机_统计出现次数
    洛谷 P3804 【模板】后缀自动机 统计单词出现次数
    洛谷 P1368 工艺 后缀自动机 求最小表示
    力扣题目汇总(反转字符串中的单词,EXCEL表列序号,旋置矩阵)
    力扣题目汇总(重复N次元素,反转字符串,斐波那契数)
    力扣题目汇总(机器人返回原点,按奇偶排序,数字的补数)
    博客园美化的第二天(动态设置,以及结合ps制作)
  • 原文地址:https://www.cnblogs.com/yican/p/4735836.html
Copyright © 2011-2022 走看看