<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic PROC PRINT - BY - unwanted variable in the output in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PROC-PRINT-BY-unwanted-variable-in-the-output/m-p/238875#M43903</link>
    <description>&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Hi,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;I'm working on a simple report and getting stuck at a point &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;I'm running below snippet for printing the data after all the work is done &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;FONT face="courier new,courier"&gt;&lt;CODE class=" language-sas"&gt;PROC PRINT DATA = R LABEL NOOBS ;
 VAR   TRAN_DATE                 
       DEP_AMTN                  
       TRANRMKS ;                
 SUM   DEP_AMTN ;                
 BY    T_MONTH ;                 
 WHERE DEP_AMTN &amp;gt; 0 ;            
RUN ; &lt;/CODE&gt;&lt;/FONT&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;I'm getting the expected output but with a "T_MONTH" on the left side of the total amount generated by SUM(DEP_AMTN) statement as below&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;FONT face="courier new,courier"&gt;&lt;CODE class=" language-sas"&gt;TRANSACTION MONTH=1                                                
                                                                   
TRANSACTION         DEPOSIT                                        
   DATE              AMOUNT            TRANSACTION REMARKS         
                                                                   
02-Jan-2015          100.00                 ABCDEF
30-Jan-2015        48953.00                 GHIJKL
-----------    ------------                                        
T_MONTH            49053.00                                        
&lt;/CODE&gt;&lt;/FONT&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Could anyone help me to get rid of it ?&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 11 Dec 2015 10:28:41 GMT</pubDate>
    <dc:creator>nrk1787db1</dc:creator>
    <dc:date>2015-12-11T10:28:41Z</dc:date>
    <item>
      <title>PROC PRINT - BY - unwanted variable in the output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-PRINT-BY-unwanted-variable-in-the-output/m-p/238875#M43903</link>
      <description>&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Hi,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;I'm working on a simple report and getting stuck at a point &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;I'm running below snippet for printing the data after all the work is done &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;FONT face="courier new,courier"&gt;&lt;CODE class=" language-sas"&gt;PROC PRINT DATA = R LABEL NOOBS ;
 VAR   TRAN_DATE                 
       DEP_AMTN                  
       TRANRMKS ;                
 SUM   DEP_AMTN ;                
 BY    T_MONTH ;                 
 WHERE DEP_AMTN &amp;gt; 0 ;            
RUN ; &lt;/CODE&gt;&lt;/FONT&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;I'm getting the expected output but with a "T_MONTH" on the left side of the total amount generated by SUM(DEP_AMTN) statement as below&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;FONT face="courier new,courier"&gt;&lt;CODE class=" language-sas"&gt;TRANSACTION MONTH=1                                                
                                                                   
TRANSACTION         DEPOSIT                                        
   DATE              AMOUNT            TRANSACTION REMARKS         
                                                                   
02-Jan-2015          100.00                 ABCDEF
30-Jan-2015        48953.00                 GHIJKL
-----------    ------------                                        
T_MONTH            49053.00                                        
&lt;/CODE&gt;&lt;/FONT&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Could anyone help me to get rid of it ?&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Dec 2015 10:28:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-PRINT-BY-unwanted-variable-in-the-output/m-p/238875#M43903</guid>
      <dc:creator>nrk1787db1</dc:creator>
      <dc:date>2015-12-11T10:28:41Z</dc:date>
    </item>
    <item>
      <title>Re: PROC PRINT - BY - unwanted variable in the output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-PRINT-BY-unwanted-variable-in-the-output/m-p/238893#M43907</link>
      <description>RTM&lt;BR /&gt;&lt;BR /&gt;SUMLABEL NOSUMLABEL SUMLABEL='RTM'</description>
      <pubDate>Fri, 11 Dec 2015 13:57:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-PRINT-BY-unwanted-variable-in-the-output/m-p/238893#M43907</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2015-12-11T13:57:07Z</dc:date>
    </item>
    <item>
      <title>Re: PROC PRINT - BY - unwanted variable in the output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-PRINT-BY-unwanted-variable-in-the-output/m-p/238898#M43909</link>
      <description>&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Hi data_null_,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Thank you for your response, I'm running this code in z/Os environment, perhaps I should have begin with this in my first post.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;If I use SUMLABEL alone with LABEL (as below)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;FONT face="courier new,courier"&gt;PROC PRINT DATA = R LABEL SUMLABEL NOOBS ;
 VAR   TRAN_DATE                 
       DEP_AMTN                  
       TRANRMKS ;                
 SUM   DEP_AMTN ;                
 BY    T_MONTH ;                 
 WHERE DEP_AMTN &amp;gt; 0 ;            
RUN ; 
&lt;/FONT&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;then I get below output&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;FONT face="courier new,courier"&gt;TRANSACTION MONTH=1                                                       
                                                                          
                          DEPOSIT                                         
TRANSACTION DATE           AMOUNT            TRANSACTION REMARKS          
                                                                          
02-Jan-2015                100.00    		   ABCDEF
30-Jan-2015              48953.00    		   GHIJKL 
-----------------    ------------                                         
TRANSACTION MONTH        49053.00 &lt;/FONT&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;T_MONTH is now TRANSACTION MONTH&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;But when I try using NOSUMLABEL or SUMLABEL='RTM' then SAS displays below error message:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#993300" face="courier new,courier"&gt;ERROR 22-322: Syntax error, expecting one of the following: ;, BLANKLINE, DATA,&amp;nbsp; DOUBLE, HEADING, LABEL, N, NOOBS, OBS, ROUND, ROWS, SPLIT, STYLE, SUMLABEL, UNIFORM, WIDTH.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Can you please help?&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Dec 2015 14:23:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-PRINT-BY-unwanted-variable-in-the-output/m-p/238898#M43909</guid>
      <dc:creator>nrk1787db1</dc:creator>
      <dc:date>2015-12-11T14:23:00Z</dc:date>
    </item>
    <item>
      <title>Re: PROC PRINT - BY - unwanted variable in the output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-PRINT-BY-unwanted-variable-in-the-output/m-p/238910#M43914</link>
      <description>&lt;P&gt;Please show the code you attempted to use that generated the error message. You may have set the option incorrectly.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Dec 2015 15:22:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-PRINT-BY-unwanted-variable-in-the-output/m-p/238910#M43914</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-12-11T15:22:43Z</dc:date>
    </item>
    <item>
      <title>Re: PROC PRINT - BY - unwanted variable in the output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-PRINT-BY-unwanted-variable-in-the-output/m-p/238915#M43916</link>
      <description>&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Hi ballardw,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;I used below code &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;FONT face="courier new,courier"&gt;PROC PRINT DATA = R NOSUMLABEL NOOBS ;     
 VAR   TRAN_DATE                           
       DEP_AMTN                            
       TRANRMKS ;                          
 SUM   DEP_AMTN ;                          
 BY    T_MONTH ;                           
 WHERE DEP_AMTN &amp;gt; 0 ;                      
RUN ;                                      
&lt;/FONT&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 11 Dec 2015 15:29:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-PRINT-BY-unwanted-variable-in-the-output/m-p/238915#M43916</guid>
      <dc:creator>nrk1787db1</dc:creator>
      <dc:date>2015-12-11T15:29:53Z</dc:date>
    </item>
    <item>
      <title>Re: PROC PRINT - BY - unwanted variable in the output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-PRINT-BY-unwanted-variable-in-the-output/m-p/238918#M43917</link>
      <description>The extensions to SUMLABEL seem to only exist in SAS 9.4.  I Don't see how it can be done using earlier versions.</description>
      <pubDate>Fri, 11 Dec 2015 15:40:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-PRINT-BY-unwanted-variable-in-the-output/m-p/238918#M43917</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2015-12-11T15:40:08Z</dc:date>
    </item>
    <item>
      <title>Re: PROC PRINT - BY - unwanted variable in the output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-PRINT-BY-unwanted-variable-in-the-output/m-p/239120#M43958</link>
      <description>&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;Hi Data _null_, &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;Thank you for your promt response, I'm running this on 9.3 so till our SAS gets upgraded to 9.4 I'll keep this in progress &lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2015 11:15:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-PRINT-BY-unwanted-variable-in-the-output/m-p/239120#M43958</guid>
      <dc:creator>nrk1787db1</dc:creator>
      <dc:date>2015-12-14T11:15:20Z</dc:date>
    </item>
  </channel>
</rss>

