<?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 Re: labels were changed without any statement-why??? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/labels-were-changed-without-any-statement-why/m-p/501527#M133720</link>
    <description>&lt;P&gt;This will do what you describe. Note that the labels are not in the define blocks:&lt;/P&gt;
&lt;PRE&gt;proc report data=cars nowd OUT=QUARTILESx;
column origin type msrp=per25 msrp=per50 msrp=per75 msrp=pmin msrp=pmax;
define origin  / group; 
define type  / group; 
** Define Statistics;
define per25  / p25 ;  
define per50 / median ;  
define per75 /  p75 ; 
define pmin / min ; 
define pmax / max ;
run;

data cars2; 
merge cars  QUARTILESx; 
by origin type;
run;&lt;/PRE&gt;
&lt;P&gt;So, are you sure that the data set you are using was actually created with Proc Report code shown in the first post? Really?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 04 Oct 2018 15:10:56 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2018-10-04T15:10:56Z</dc:date>
    <item>
      <title>labels were changed without any statement-why???</title>
      <link>https://communities.sas.com/t5/SAS-Programming/labels-were-changed-without-any-statement-why/m-p/501334#M133657</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;In the following code I don't understand something.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In data set&amp;nbsp;QUARTILESx I created 5 new varabiles with following names:&lt;/P&gt;
&lt;P&gt;per25 &amp;nbsp;pet50 per75 pmin &amp;nbsp;pmax&lt;/P&gt;
&lt;P&gt;with the following labels:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;per25 &amp;nbsp;pet50 per75 pmin &amp;nbsp;pmax&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;In data set cars2 the labels of these varaibles were changed to MSRP.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Can you please explain why???&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Joe&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data=cars nowd OUT=QUARTILESx;
column origin type msrp=per25 msrp=per50 msrp=per75 msrp=pmin msrp=pmax;
define origin  / group; 
define type  / group; 
** Define Statistics;
define per25  / p25 'per25';  
define per50 / median 'per50';  
define per75 /  p75 'per75'; 
define pmin / min 'pmin'; 
define pmax / max 'pmax';
run;



data cars2; 
merge cars  QUARTILESx; 
by origin type;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Oct 2018 05:10:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/labels-were-changed-without-any-statement-why/m-p/501334#M133657</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2018-10-04T05:10:21Z</dc:date>
    </item>
    <item>
      <title>Re: labels were changed without any statement-why???</title>
      <link>https://communities.sas.com/t5/SAS-Programming/labels-were-changed-without-any-statement-why/m-p/501340#M133660</link>
      <description>&lt;P&gt;Doesn't happen.&lt;/P&gt;
&lt;P&gt;Run this code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort
  data=sashelp.cars
  out=cars
;
by origin type;
run;

proc report data=cars nowd OUT=QUARTILESx;
column origin type msrp=per25 msrp=per50 msrp=per75 msrp=pmin msrp=pmax;
define origin  / group; 
define type  / group; 
** Define Statistics;
define per25  / p25 'per25';  
define per50 / median 'per50';  
define per75 /  p75 'per75'; 
define pmin / min 'pmin'; 
define pmax / max 'pmax';
run;

data cars2; 
merge cars  QUARTILESx; 
by origin type;
run;

proc contents data=cars2;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And look at the result of the CONTENTS procedure:&lt;/P&gt;
&lt;PRE&gt;           Alphabetic List of Variables and Attributes

  #    Variable       Type    Len    Format      Label

  9    Cylinders      Num       8                               
  5    DriveTrain     Char      5                               
  8    EngineSize     Num       8                Engine Size (L)
 10    Horsepower     Num       8                               
  7    Invoice        Num       8    DOLLAR8.                   
 15    Length         Num       8                Length (IN)    
 11    MPG_City       Num       8                MPG (City)     
 12    MPG_Highway    Num       8                MPG (Highway)  
  6    MSRP           Num       8    DOLLAR8.                   
  1    Make           Char     13                               
  2    Model          Char     40                               
  4    Origin         Char      6                Origin         
  3    Type           Char      8                Type           
 13    Weight         Num       8                Weight (LBS)   
 14    Wheelbase      Num       8                Wheelbase (IN) 
 21    _BREAK_        Char     32                               
 16    per25          Num       8    DOLLAR8.    per25          
 17    per50          Num       8    DOLLAR8.    per50          
 18    per75          Num       8    DOLLAR8.    per75          
 20    pmax           Num       8    DOLLAR8.    pmax           
 19    pmin           Num       8    DOLLAR8.    pmin           
&lt;/PRE&gt;
&lt;P&gt;The labels are clearly there.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Oct 2018 05:56:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/labels-were-changed-without-any-statement-why/m-p/501340#M133660</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-10-04T05:56:47Z</dc:date>
    </item>
    <item>
      <title>Re: labels were changed without any statement-why???</title>
      <link>https://communities.sas.com/t5/SAS-Programming/labels-were-changed-without-any-statement-why/m-p/501527#M133720</link>
      <description>&lt;P&gt;This will do what you describe. Note that the labels are not in the define blocks:&lt;/P&gt;
&lt;PRE&gt;proc report data=cars nowd OUT=QUARTILESx;
column origin type msrp=per25 msrp=per50 msrp=per75 msrp=pmin msrp=pmax;
define origin  / group; 
define type  / group; 
** Define Statistics;
define per25  / p25 ;  
define per50 / median ;  
define per75 /  p75 ; 
define pmin / min ; 
define pmax / max ;
run;

data cars2; 
merge cars  QUARTILESx; 
by origin type;
run;&lt;/PRE&gt;
&lt;P&gt;So, are you sure that the data set you are using was actually created with Proc Report code shown in the first post? Really?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Oct 2018 15:10:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/labels-were-changed-without-any-statement-why/m-p/501527#M133720</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-10-04T15:10:56Z</dc:date>
    </item>
    <item>
      <title>Re: labels were changed without any statement-why???</title>
      <link>https://communities.sas.com/t5/SAS-Programming/labels-were-changed-without-any-statement-why/m-p/501644#M133785</link>
      <description>&lt;P&gt;Usually when that type of thing happens to me it is because&amp;nbsp;the dataset didn't get updated by the code I ran because I had the previous version of it open (in ViewTable for example) to look at it.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Oct 2018 18:28:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/labels-were-changed-without-any-statement-why/m-p/501644#M133785</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-10-04T18:28:02Z</dc:date>
    </item>
    <item>
      <title>Re: labels were changed without any statement-why???</title>
      <link>https://communities.sas.com/t5/SAS-Programming/labels-were-changed-without-any-statement-why/m-p/501665#M133794</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Usually when that type of thing happens to me it is because&amp;nbsp;the dataset didn't get updated by the code I ran because I had the previous version of it open (in ViewTable for example) to look at it.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Which would be clearly indicated in the log with something like this:&lt;/P&gt;
&lt;PRE&gt;ERROR: You cannot open USER.HAVE.DATA for output access with member-level control because
USER.HAVE.DATA is in use by you in resource environment ViewTable Window.
&lt;/PRE&gt;
&lt;P&gt;So read the log.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Oct 2018 19:05:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/labels-were-changed-without-any-statement-why/m-p/501665#M133794</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-10-04T19:05:28Z</dc:date>
    </item>
  </channel>
</rss>

