SAS中文论坛

标题: macro ? GTL [打印本页]

作者: shiyiming    时间: 2011-6-9 03:31
标题: macro ? GTL
[quote:25h0g47j][color=#008000:25h0g47j]WARNING: Truncated record.[/color:25h0g47j]
3346 +                                                        layout gridded / columns=2 border=true opaque=true
           [color=#BF0000:25h0g47j]  ------
             180[/color:25h0g47j]
3346!+autoalign=(topright topleft top);

[color=#BF0000:25h0g47j]ERROR 180-322: Statement is not valid or it is used out of proper order.[/color:25h0g47j]

3347 +                                                                entry textattrs=(weight=bold) "Statistics";
              [color=#BF0000:25h0g47j]-----
              180[/color:25h0g47j]

ERROR 180-322: Statement is not valid or it is used out of proper order.

3347 +                                                    entry halign=right ' '
                                                         [color=#BF0000:25h0g47j] -----
                                                          180[/color:25h0g47j]
3347!+       ;
[color=#BF0000:25h0g47j]ERROR 180-322: Statement is not valid or it is used out of proper order.[/color:25h0g47j]
.....

[/quote:25h0g47j]
我的问题,macro运行无误。可以每当我
%inc 'N:\jingju11\_Macros_\plot.sas';
如上的错误便产生。
大家知道原因或者有此经验吗?
macro较长,类似如下.我想关键不是macro的具体内容,而是%inc执行时产生了莫名其妙的误解。
谢谢。京剧
[code:25h0g47j]....
%macro DistPlotMcr(dset=,var=, f=12.2, file=, orientation=, dpi=,style=);       
        ods path (prepend) work.templat(update);
        proc template;
                define statgraph ___DistPlotMcr_distribution;
                        MVAR VAR NOBS MEAN STD TEST TESTLABEL STAT PTYPE PVALUE;
                        begingraph/ designwidth=640px designheight=480px;
                                entrytitle "Distribution of " eval(collabel(VAR)) " with Descriptive Statistics";
                                layout overlay;
                                        layout lattice / rowweights=(.9 .1) columndatarange=union rowgutter=2px;
                                                。。。
                                                layout overlay / yaxisopts=(offsetmin=.04 griddisplay=auto_on);
                                                        discretelegend "norm" "kern" "band" / location=inside across=1 autoalign=(right left)  opaque=true;
                                                        histogram VAR / scale=percent primary=true binaxis=false;
                                                        densityplot VAR / normal( ) name="norm" legendlabel="Normal";
                                                        densityplot VAR / kernel( ) name="kern" legendlabel="Kernel" lineattrs=graphdata2(thickness=2px);
                                                        fringeplot VAR/ datatransparency=.65;
                                                        /* inset for descriptive statistics */
                                                        layout gridded / columns=2 border=true opaque=true autoalign=(topright topleft top);
                                                               
...[/code:25h0g47j]
作者: shiyiming    时间: 2011-6-9 08:31
标题: Re: macro ? GTL
试试看
%inc 'N:\jingju11\_Macros_\plot.sas' /lrecl=600;
作者: shiyiming    时间: 2011-6-9 20:52
标题: Re: macro ? GTL
问题解决了。谢谢。
另外,如果我用options SASAUTOS这个问题可以自动解决吗?
我想我的问题应该是,如果我要把这个macro plot放到autocall里,如何来避免记录长度的问题?
京剧




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