<?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 How to use labels and formats in SAS to change names in outputs? in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/How-to-use-labels-and-formats-in-SAS-to-change-names-in-outputs/m-p/615427#M18751</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am fairly new at SAS. Currently, I am trying to use SAS to change the name of certain variables/values for differing outputs (proc freq, etc). For example, in my data set, race is categorized as 1, 2, 3, and so on. I would like to be able to use proc freq and get outputs where as for the variable of race, 1 would be outputted as white, 2 as black, 3 as asian, and so on. I thought that formats would be the proper way to do so but after formatting, my printouts still simply say 1, 2, 3.. for race.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the code I used for formatting:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc format;&lt;BR /&gt;value frace&lt;BR /&gt;1 = 'Black'&lt;BR /&gt;2 = 'White'&lt;BR /&gt;3 = 'Asian'&lt;BR /&gt;4 = 'NativeAM'&lt;BR /&gt;5 = 'HawaiianPI'&lt;BR /&gt;6 = 'Multi'&lt;BR /&gt;7 = 'Other'&lt;BR /&gt;;&lt;BR /&gt;value **bleep**egroup&lt;BR /&gt;1 = '&amp;lt;20'&lt;BR /&gt;2 = '20-24'&lt;BR /&gt;3 = '25-29'&lt;BR /&gt;4 = '30-34'&lt;BR /&gt;5 = '35-39'&lt;BR /&gt;6 = '40+'&lt;BR /&gt;;&lt;BR /&gt;value fethnicity&lt;BR /&gt;1 = 'Non-Hisp'&lt;BR /&gt;2 = 'Hisp'&lt;BR /&gt;;&lt;BR /&gt;value fmarital&lt;BR /&gt;1 = 'Single'&lt;BR /&gt;2 = 'Separated'&lt;BR /&gt;3 = 'Divorced'&lt;BR /&gt;4 = 'Widowed'&lt;BR /&gt;5 = 'Married'&lt;BR /&gt;;&lt;BR /&gt;value fincomegroup&lt;BR /&gt;1 = '&amp;lt;35000'&lt;BR /&gt;2 = '35000-49999'&lt;BR /&gt;3 = '50000-74999'&lt;BR /&gt;4 = '75000-99999'&lt;BR /&gt;5 = '100000 or more'&lt;BR /&gt;;&lt;BR /&gt;value feducat&lt;BR /&gt;0 = 'None'&lt;BR /&gt;1 = 'Less than HS'&lt;BR /&gt;2 = 'Less than HS'&lt;BR /&gt;3 = 'Less than HS'&lt;BR /&gt;4 = 'Less than HS'&lt;BR /&gt;5 = 'Less than HS'&lt;BR /&gt;6 = 'Less than HS'&lt;BR /&gt;7 = 'Less than HS'&lt;BR /&gt;8 = 'Less than HS'&lt;BR /&gt;9 = 'High School'&lt;BR /&gt;10 = 'High School'&lt;BR /&gt;11 = 'High School'&lt;BR /&gt;12 = 'High School'&lt;BR /&gt;13 = 'More than HS'&lt;BR /&gt;14 = 'More than HS'&lt;BR /&gt;15 = 'More than HS'&lt;BR /&gt;16 = 'More than HS'&lt;BR /&gt;17 = 'More than HS'&lt;BR /&gt;18 = 'More than HS'&lt;BR /&gt;22 = 'More than HS'&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data tmp1.identificationformats;&lt;BR /&gt;set tmp1.identification2;&lt;BR /&gt;format Race frace. Agegroup **bleep**egroup. Ethnicity fEthnicity. Marital fMarital. Income fIncomegroup. Educat fEducat.;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks so much!!&lt;/P&gt;</description>
    <pubDate>Mon, 06 Jan 2020 19:19:06 GMT</pubDate>
    <dc:creator>SM8</dc:creator>
    <dc:date>2020-01-06T19:19:06Z</dc:date>
    <item>
      <title>How to use labels and formats in SAS to change names in outputs?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-use-labels-and-formats-in-SAS-to-change-names-in-outputs/m-p/615427#M18751</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am fairly new at SAS. Currently, I am trying to use SAS to change the name of certain variables/values for differing outputs (proc freq, etc). For example, in my data set, race is categorized as 1, 2, 3, and so on. I would like to be able to use proc freq and get outputs where as for the variable of race, 1 would be outputted as white, 2 as black, 3 as asian, and so on. I thought that formats would be the proper way to do so but after formatting, my printouts still simply say 1, 2, 3.. for race.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the code I used for formatting:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc format;&lt;BR /&gt;value frace&lt;BR /&gt;1 = 'Black'&lt;BR /&gt;2 = 'White'&lt;BR /&gt;3 = 'Asian'&lt;BR /&gt;4 = 'NativeAM'&lt;BR /&gt;5 = 'HawaiianPI'&lt;BR /&gt;6 = 'Multi'&lt;BR /&gt;7 = 'Other'&lt;BR /&gt;;&lt;BR /&gt;value **bleep**egroup&lt;BR /&gt;1 = '&amp;lt;20'&lt;BR /&gt;2 = '20-24'&lt;BR /&gt;3 = '25-29'&lt;BR /&gt;4 = '30-34'&lt;BR /&gt;5 = '35-39'&lt;BR /&gt;6 = '40+'&lt;BR /&gt;;&lt;BR /&gt;value fethnicity&lt;BR /&gt;1 = 'Non-Hisp'&lt;BR /&gt;2 = 'Hisp'&lt;BR /&gt;;&lt;BR /&gt;value fmarital&lt;BR /&gt;1 = 'Single'&lt;BR /&gt;2 = 'Separated'&lt;BR /&gt;3 = 'Divorced'&lt;BR /&gt;4 = 'Widowed'&lt;BR /&gt;5 = 'Married'&lt;BR /&gt;;&lt;BR /&gt;value fincomegroup&lt;BR /&gt;1 = '&amp;lt;35000'&lt;BR /&gt;2 = '35000-49999'&lt;BR /&gt;3 = '50000-74999'&lt;BR /&gt;4 = '75000-99999'&lt;BR /&gt;5 = '100000 or more'&lt;BR /&gt;;&lt;BR /&gt;value feducat&lt;BR /&gt;0 = 'None'&lt;BR /&gt;1 = 'Less than HS'&lt;BR /&gt;2 = 'Less than HS'&lt;BR /&gt;3 = 'Less than HS'&lt;BR /&gt;4 = 'Less than HS'&lt;BR /&gt;5 = 'Less than HS'&lt;BR /&gt;6 = 'Less than HS'&lt;BR /&gt;7 = 'Less than HS'&lt;BR /&gt;8 = 'Less than HS'&lt;BR /&gt;9 = 'High School'&lt;BR /&gt;10 = 'High School'&lt;BR /&gt;11 = 'High School'&lt;BR /&gt;12 = 'High School'&lt;BR /&gt;13 = 'More than HS'&lt;BR /&gt;14 = 'More than HS'&lt;BR /&gt;15 = 'More than HS'&lt;BR /&gt;16 = 'More than HS'&lt;BR /&gt;17 = 'More than HS'&lt;BR /&gt;18 = 'More than HS'&lt;BR /&gt;22 = 'More than HS'&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data tmp1.identificationformats;&lt;BR /&gt;set tmp1.identification2;&lt;BR /&gt;format Race frace. Agegroup **bleep**egroup. Ethnicity fEthnicity. Marital fMarital. Income fIncomegroup. Educat fEducat.;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks so much!!&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jan 2020 19:19:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-use-labels-and-formats-in-SAS-to-change-names-in-outputs/m-p/615427#M18751</guid>
      <dc:creator>SM8</dc:creator>
      <dc:date>2020-01-06T19:19:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to use labels and formats in SAS to change names in outputs?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-use-labels-and-formats-in-SAS-to-change-names-in-outputs/m-p/615432#M18752</link>
      <description>&lt;P&gt;Formats are the way to do this. So what happens when you try? Is there an error in the LOG? Does the PROC FREQ not show the format? Can you show us what happens?&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jan 2020 19:30:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-use-labels-and-formats-in-SAS-to-change-names-in-outputs/m-p/615432#M18752</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-01-06T19:30:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to use labels and formats in SAS to change names in outputs?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-use-labels-and-formats-in-SAS-to-change-names-in-outputs/m-p/615443#M18757</link>
      <description>&lt;P&gt;For some reason, the formats went through without error but all of the outputs for the code I ran continued to use the original values. However, I tried it again and it just worked! Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jan 2020 19:52:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-use-labels-and-formats-in-SAS-to-change-names-in-outputs/m-p/615443#M18757</guid>
      <dc:creator>SM8</dc:creator>
      <dc:date>2020-01-06T19:52:02Z</dc:date>
    </item>
  </channel>
</rss>

