<?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: Proc Transpose idlabel is not printed by Proc Print in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-Transpose-idlabel-is-not-printed-by-Proc-Print/m-p/477175#M286191</link>
    <description>&lt;P&gt;use a concatenated approach&lt;/P&gt;&lt;P&gt;something like&lt;/P&gt;&lt;P&gt;proc transpose data=data_in out=test delim='_';&lt;BR /&gt;by user_id metadata_user_id;&lt;BR /&gt;var attribute_value;&lt;BR /&gt;id attr_id attribute_name;&lt;BR /&gt;run;&lt;/P&gt;</description>
    <pubDate>Wed, 11 Jul 2018 17:44:29 GMT</pubDate>
    <dc:creator>novinosrin</dc:creator>
    <dc:date>2018-07-11T17:44:29Z</dc:date>
    <item>
      <title>Proc Transpose idlabel is not printed by Proc Print</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Transpose-idlabel-is-not-printed-by-Proc-Print/m-p/477157#M286185</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when using PROC TRANSPOSE&amp;nbsp;with the IDLABEL option, SAS refuses to print those labels when using PROC PRINT with the LABEL option. Does anyone has a clue? Is it because the length of the variable 'Attribute_name' is more then 32?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="c1.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/21721iCE3CAD09365BA90B/image-size/large?v=v2&amp;amp;px=999" role="button" title="c1.PNG" alt="c1.PNG" /&gt;&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;PRE&gt;&lt;CODE class=" language-sas"&gt;options label;&lt;BR /&gt;
proc transpose data=data_in out=test;
by user_id metadata_user_id;
var attribute_value;
idlabel attribute_name;
run; &lt;BR /&gt;
proc print data=test label; run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="c2.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/21722i649E3BD2D9538CF7/image-size/large?v=v2&amp;amp;px=999" role="button" title="c2.PNG" alt="c2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Leonard&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jul 2018 17:09:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Transpose-idlabel-is-not-printed-by-Proc-Print/m-p/477157#M286185</guid>
      <dc:creator>Leonard32</dc:creator>
      <dc:date>2018-07-11T17:09:27Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Transpose idlabel is not printed by Proc Print</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Transpose-idlabel-is-not-printed-by-Proc-Print/m-p/477159#M286186</link>
      <description>&lt;P&gt;What does the log show for that code?&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jul 2018 17:14:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Transpose-idlabel-is-not-printed-by-Proc-Print/m-p/477159#M286186</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-07-11T17:14:19Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Transpose idlabel is not printed by Proc Print</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Transpose-idlabel-is-not-printed-by-Proc-Print/m-p/477160#M286187</link>
      <description>&lt;P&gt;You are missing the ID statement&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;IDLABEL Statement&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class="shortDesc"&gt;Creates labels for the transposed variables.&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;TABLE cellspacing="2" cellpadding="4"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;Restriction:&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Must appear after an ID statement.&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Wed, 11 Jul 2018 17:17:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Transpose-idlabel-is-not-printed-by-Proc-Print/m-p/477160#M286187</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-07-11T17:17:17Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Transpose idlabel is not printed by Proc Print</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Transpose-idlabel-is-not-printed-by-Proc-Print/m-p/477172#M286188</link>
      <description>&lt;P&gt;That is kind of the essence of the problem. I'm not able to use the ID statement, because the names of the variables have length &amp;gt; 32. Some names are almost identical, but become unique after position 32, SAS isn't able to distinguish the variables and SAS complains that for example for one variable:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;The ID value "'tr.car.bhvr.accel_h.non_motorway'n" occurs twice in the same BY group.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;So I want to overcome this problem by using the labels instead of the names. I think labels aren't limited to 32 characters?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I could start renaming the variables ... but we are talking about data sets with more than 1.000 variables. So that is not feasible.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jul 2018 17:40:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Transpose-idlabel-is-not-printed-by-Proc-Print/m-p/477172#M286188</guid>
      <dc:creator>Leonard32</dc:creator>
      <dc:date>2018-07-11T17:40:07Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Transpose idlabel is not printed by Proc Print</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Transpose-idlabel-is-not-printed-by-Proc-Print/m-p/477173#M286189</link>
      <description>&lt;P&gt;Make it up. Since you're not using it's irrelevant, so make a variable or number that uniquely identifies the values and then the labels are what is displayed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/59866"&gt;@Leonard32&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;That is kind of the essence of the problem. I'm not able to use the ID statement, because the names of the variables have length &amp;gt; 32. Some names are almost identical, but become unique after position 32, SAS isn't able to distinguish the variables and SAS complains that for example for one variable:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;The ID value "'tr.car.bhvr.accel_h.non_motorway'n" occurs twice in the same BY group.&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;So I want to overcome this problem by using the labels instead of the names. I think labels aren't limited to 32 characters?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I could start renaming the variables ... but we are talking about data sets with more than 1.000 variables. So that is not feasible.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jul 2018 17:41:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Transpose-idlabel-is-not-printed-by-Proc-Print/m-p/477173#M286189</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-07-11T17:41:34Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Transpose idlabel is not printed by Proc Print</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Transpose-idlabel-is-not-printed-by-Proc-Print/m-p/477174#M286190</link>
      <description>&lt;P&gt;&lt;A href="https://stats.idre.ucla.edu/sas/faq/how-can-i-create-an-enumeration-variable-by-groups/" target="_blank"&gt;https://stats.idre.ucla.edu/sas/faq/how-can-i-create-an-enumeration-variable-by-groups/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create an enumeration of VAR1-VAR### using the approach above and the CATS function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/59866"&gt;@Leonard32&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;That is kind of the essence of the problem. I'm not able to use the ID statement, because the names of the variables have length &amp;gt; 32. Some names are almost identical, but become unique after position 32, SAS isn't able to distinguish the variables and SAS complains that for example for one variable:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;The ID value "'tr.car.bhvr.accel_h.non_motorway'n" occurs twice in the same BY group.&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;So I want to overcome this problem by using the labels instead of the names. I think labels aren't limited to 32 characters?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I could start renaming the variables ... but we are talking about data sets with more than 1.000 variables. So that is not feasible.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jul 2018 17:42:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Transpose-idlabel-is-not-printed-by-Proc-Print/m-p/477174#M286190</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-07-11T17:42:26Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Transpose idlabel is not printed by Proc Print</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Transpose-idlabel-is-not-printed-by-Proc-Print/m-p/477175#M286191</link>
      <description>&lt;P&gt;use a concatenated approach&lt;/P&gt;&lt;P&gt;something like&lt;/P&gt;&lt;P&gt;proc transpose data=data_in out=test delim='_';&lt;BR /&gt;by user_id metadata_user_id;&lt;BR /&gt;var attribute_value;&lt;BR /&gt;id attr_id attribute_name;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jul 2018 17:44:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Transpose-idlabel-is-not-printed-by-Proc-Print/m-p/477175#M286191</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-07-11T17:44:29Z</dc:date>
    </item>
  </channel>
</rss>

