<?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: Using concatenation with IDLABEL in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Using-concatenation-with-IDLABEL/m-p/468532#M285445</link>
    <description>&lt;P&gt;Simple, create the variable with the label you want before proc transpose.&lt;/P&gt;</description>
    <pubDate>Thu, 07 Jun 2018 21:06:36 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2018-06-07T21:06:36Z</dc:date>
    <item>
      <title>Using concatenation with IDLABEL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-concatenation-with-IDLABEL/m-p/468507#M285444</link>
      <description>&lt;P&gt;It would be helpful to have concatenation on the IDLABEL statement. At the moment it only allows variables like:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;IDLABEL alergy_variable; * where 'alergy_variable' may be 'Milk', 'Beef', or whatever the value of the variable is; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However the IDLABEL statement is for 'labeling' so it would be nice if the statement would allow for better dynamic labeling like so:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;IDLABEL cat("Do you think you have a food alergy to...",alergy_variable);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 07 Jun 2018 19:33:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-concatenation-with-IDLABEL/m-p/468507#M285444</guid>
      <dc:creator>wpg_unc</dc:creator>
      <dc:date>2018-06-07T19:33:30Z</dc:date>
    </item>
    <item>
      <title>Re: Using concatenation with IDLABEL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-concatenation-with-IDLABEL/m-p/468532#M285445</link>
      <description>&lt;P&gt;Simple, create the variable with the label you want before proc transpose.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jun 2018 21:06:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-concatenation-with-IDLABEL/m-p/468532#M285445</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-06-07T21:06:36Z</dc:date>
    </item>
    <item>
      <title>Re: Using concatenation with IDLABEL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-concatenation-with-IDLABEL/m-p/468583#M285446</link>
      <description>&lt;P&gt;Suggestions for improvements or modifications can be made in SAS Ballotware section here:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SASware-Ballot-Ideas/idb-p/sas_ideas" target="_blank"&gt;https://communities.sas.com/t5/SASware-Ballot-Ideas/idb-p/sas_ideas&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As indicated however, this is relatively easy to work around, you can add a previous step that creates the variable as desired in the data set. Another option, if you want it in one step is to use VALIDVARNAME=ANY, then you can have the actual variable labelled as 'My long text label' and list them in ID statement as well. There's the DELIM option to add a separator for the ID variables.&amp;nbsp;&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/45514"&gt;@wpg_unc&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;It would be helpful to have concatenation on the IDLABEL statement. At the moment it only allows variables like:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;IDLABEL alergy_variable; * where 'alergy_variable' may be 'Milk', 'Beef', or whatever the value of the variable is; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However the IDLABEL statement is for 'labeling' so it would be nice if the statement would allow for better dynamic labeling like so:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;IDLABEL cat("Do you think you have a food alergy to...",alergy_variable);&lt;/CODE&gt;&lt;/PRE&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>Fri, 08 Jun 2018 03:15:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-concatenation-with-IDLABEL/m-p/468583#M285446</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-06-08T03:15:22Z</dc:date>
    </item>
    <item>
      <title>Re: Using concatenation with IDLABEL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-concatenation-with-IDLABEL/m-p/468648#M285447</link>
      <description>&lt;P&gt;Thanks but I wanted to avoid manually entering a long list of variable names before I run PROC TRANSPOSE.&amp;nbsp; It would save some time to simply be able to do the concatenation within PROC TRANSPOSE.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jun 2018 11:27:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-concatenation-with-IDLABEL/m-p/468648#M285447</guid>
      <dc:creator>wpg_unc</dc:creator>
      <dc:date>2018-06-08T11:27:00Z</dc:date>
    </item>
    <item>
      <title>Re: Using concatenation with IDLABEL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-concatenation-with-IDLABEL/m-p/468732#M285448</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/45514"&gt;@wpg_unc&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thanks but I wanted to avoid manually entering a long list of variable names before I run PROC TRANSPOSE.&amp;nbsp; It would save some time to simply be able to do the concatenation within PROC TRANSPOSE.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Possibly this comment is because you are unfamiliar with some of the less known functions such as VNAME and the use of arrays.&lt;/P&gt;
&lt;P&gt;This creates a not terribly fancy variable to hold text build in the fashion you describe.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data example;
   set sashelp.class (obs=1);
   array n _numeric_;
   array c _character_;
   length Idvar $ 100;
   do i=1 to dim(n);
      idvar = catx(" ","This is the label for variable",vname(n[i]));
      output;
   end;
   do i=1 to dim(c);
      idvar = catx(" ","This is the label for variable",vname(c[i]));
      output;
   end;
   keep idvar;
run;&lt;/PRE&gt;
&lt;P&gt;But since you have posted 1) no starting data, 2) no actual desired result and 3) have not even bothered to name the procedure this is supposed to modify (it's lucky you weren't trying to do something to ID has many procedures have ID statements) it is hard to provide a more targeted response.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since IDLABEL is designed to point to a VARIABLE not an explicit text value this would be a very extreme departure from the existing behavior. Perhaps if you declared appropriate LABELS when the data were originally created a double transpose might help here. But no example data ....&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jun 2018 15:23:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-concatenation-with-IDLABEL/m-p/468732#M285448</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-06-08T15:23:00Z</dc:date>
    </item>
    <item>
      <title>Re: Using concatenation with IDLABEL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-concatenation-with-IDLABEL/m-p/470001#M285449</link>
      <description>&lt;P&gt;I submitted this question as a feature request.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jun 2018 17:03:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-concatenation-with-IDLABEL/m-p/470001#M285449</guid>
      <dc:creator>wpg_unc</dc:creator>
      <dc:date>2018-06-13T17:03:58Z</dc:date>
    </item>
  </channel>
</rss>

