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.

  • 相关阅读:
    XGBoost算法--学习笔记
    机器学习--学习书籍
    一天搞懂深度学习-深度学习新浪潮
    如何在 Office 365 环境中设置联机 Exchange 邮箱大小和限制
    玩转Office 365中的Exchange Online服务 之十一 怎样在Exchange Online中配置邮件传递限制《转》
    玩转Office 365中的Exchange Online服务 之六 了解Exchange Online对于邮箱使用的限制《转》
    Hyper-V Ubuntu修改分辨率
    k8s 集群基本概念<转>
    Azure 中 Linux VM 的 SSH 公钥和私钥对
    docker学习笔记(k8s) 《转》
  • 原文地址:https://www.cnblogs.com/yican/p/4735836.html
Copyright © 2011-2022 走看看