<?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: Convert Label Values to Character String Column in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Convert-Label-Values-to-Character-String-Column/m-p/455717#M115340</link>
    <description>&lt;PRE&gt;DATA my_toy;
    SET toy;
	class_2 = put(class, myformat.);
RUN;&lt;/PRE&gt;
&lt;P&gt;Is that what you're trying to do?&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/169561"&gt;@dewittme&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a data set that has formatting. I would like to do some calculations, then append the the values while keeping the formatted text. What I would like to do is to convert the format text to a text in another column.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;MY ideal output would be "class_2" that has all of the text from the formatting for "class" but stored as text. MY actual data isn't this symbol...but that is what I would like to do.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;DATA toy;
    input class count;
	cards;
	1 5
	2 9
	3 5
	4 13
	;
RUN;

PROC FORMAT;
   value myformat 1 = 'From $1-100'
2 = 'From $101-200'
3 = 'From $201-300'
4 = 'From $301-400';
RUN;

DATA toy;
    SET toy;
	format class myformat.;
RUN;

DATA my_toy;
    SET toy;
	class_2 = put(class, 18.);
RUN;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 19 Apr 2018 18:31:33 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2018-04-19T18:31:33Z</dc:date>
    <item>
      <title>Convert Label Values to Character String Column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-Label-Values-to-Character-String-Column/m-p/455715#M115339</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a data set that has formatting. I would like to do some calculations, then append the the values while keeping the formatted text. What I would like to do is to convert the format text to a text in another column.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MY ideal output would be "class_2" that has all of the text from the formatting for "class" but stored as text. MY actual data isn't this symbol...but that is what I would like to do.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;DATA toy;
    input class count;
	cards;
	1 5
	2 9
	3 5
	4 13
	;
RUN;

PROC FORMAT;
   value myformat 1 = 'From $1-100'
2 = 'From $101-200'
3 = 'From $201-300'
4 = 'From $301-400';
RUN;

DATA toy;
    SET toy;
	format class myformat.;
RUN;

DATA my_toy;
    SET toy;
	class_2 = put(class, 18.);
RUN;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Apr 2018 18:20:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-Label-Values-to-Character-String-Column/m-p/455715#M115339</guid>
      <dc:creator>dewittme</dc:creator>
      <dc:date>2018-04-19T18:20:07Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Label Values to Character String Column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-Label-Values-to-Character-String-Column/m-p/455717#M115340</link>
      <description>&lt;PRE&gt;DATA my_toy;
    SET toy;
	class_2 = put(class, myformat.);
RUN;&lt;/PRE&gt;
&lt;P&gt;Is that what you're trying to do?&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/169561"&gt;@dewittme&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a data set that has formatting. I would like to do some calculations, then append the the values while keeping the formatted text. What I would like to do is to convert the format text to a text in another column.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;MY ideal output would be "class_2" that has all of the text from the formatting for "class" but stored as text. MY actual data isn't this symbol...but that is what I would like to do.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;DATA toy;
    input class count;
	cards;
	1 5
	2 9
	3 5
	4 13
	;
RUN;

PROC FORMAT;
   value myformat 1 = 'From $1-100'
2 = 'From $101-200'
3 = 'From $201-300'
4 = 'From $301-400';
RUN;

DATA toy;
    SET toy;
	format class myformat.;
RUN;

DATA my_toy;
    SET toy;
	class_2 = put(class, 18.);
RUN;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Apr 2018 18:31:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-Label-Values-to-Character-String-Column/m-p/455717#M115340</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-04-19T18:31:33Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Label Values to Character String Column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-Label-Values-to-Character-String-Column/m-p/455724#M115343</link>
      <description>&lt;P&gt;Yep, exactly along those lines, except I don't have access to the myformat format. My real data is a SAV file.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Apr 2018 18:58:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-Label-Values-to-Character-String-Column/m-p/455724#M115343</guid>
      <dc:creator>dewittme</dc:creator>
      <dc:date>2018-04-19T18:58:20Z</dc:date>
    </item>
  </channel>
</rss>

