<?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: how to insert an other value in an existing string proc format in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-insert-an-other-value-in-an-existing-string-proc-format/m-p/433659#M107538</link>
    <description>&lt;P&gt;I'm a little too rushed to spell it out in detail, but here's the idea.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Run PROC FORMAT, using the CNTLOUT= option.&amp;nbsp; That gives you a SAS data set holding all the information needed to generate the format in its current form.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Modify the SAS data set, adding an observation that changes two variables:&lt;/P&gt;
&lt;P&gt;HLO='O'&lt;/P&gt;
&lt;P&gt;Label = 'Other'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use the modified data set as input to PROC FORMAT, using the CNTLIN= option.&lt;/P&gt;</description>
    <pubDate>Fri, 02 Feb 2018 18:43:16 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2018-02-02T18:43:16Z</dc:date>
    <item>
      <title>how to insert an other value in an existing string proc format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-insert-an-other-value-in-an-existing-string-proc-format/m-p/433618#M107522</link>
      <description>&lt;P&gt;Does&amp;nbsp;any one know how to add an "other" entry to an existing SAS proc format.&amp;nbsp; For example you've already built and stored a format called sex:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P align="LEFT"&gt;proc format;&lt;/P&gt;
&lt;P align="LEFT"&gt;value $sex&lt;/P&gt;
&lt;P align="LEFT"&gt;'1' = ‘Female’&lt;/P&gt;
&lt;P align="LEFT"&gt;'2' = ‘Male’&lt;/P&gt;
&lt;P align="LEFT"&gt;;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now instead of re-running the above to include an "other" value can I just insert a new "row" into this that says OTHER=Unknown?&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2018 17:38:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-insert-an-other-value-in-an-existing-string-proc-format/m-p/433618#M107522</guid>
      <dc:creator>john_sanzone</dc:creator>
      <dc:date>2018-02-02T17:38:40Z</dc:date>
    </item>
    <item>
      <title>Re: how to insert an other value in an existing string proc format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-insert-an-other-value-in-an-existing-string-proc-format/m-p/433631#M107529</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13581"&gt;@john_sanzone&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Does&amp;nbsp;any one know how to add an "other" entry to an existing SAS proc format.&amp;nbsp; For example you've already built and stored a format called sex:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P align="LEFT"&gt;proc format;&lt;/P&gt;
&lt;P align="LEFT"&gt;value $sex&lt;/P&gt;
&lt;P align="LEFT"&gt;'1' = ‘Female’&lt;/P&gt;
&lt;P align="LEFT"&gt;'2' = ‘Male’&lt;/P&gt;
&lt;P align="LEFT"&gt;;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now instead of re-running the above to include an "other" value can I just insert a new "row" into this that says OTHER=Unknown?&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Not if you want the format do display "unknown" .&lt;/P&gt;
&lt;P&gt;Run&lt;/P&gt;
&lt;PRE&gt;proc format;
value $sex
'1' = ‘Female’
'2' = ‘Male’
other='Unknown'
;
run;&lt;/PRE&gt;
&lt;P&gt;to modify the format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is not much overhead in proc format so rerunning the code shouldn't be much of an issue. Why were you worried about rerunning it?&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2018 17:51:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-insert-an-other-value-in-an-existing-string-proc-format/m-p/433631#M107529</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-02-02T17:51:42Z</dc:date>
    </item>
    <item>
      <title>Re: how to insert an other value in an existing string proc format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-insert-an-other-value-in-an-existing-string-proc-format/m-p/433659#M107538</link>
      <description>&lt;P&gt;I'm a little too rushed to spell it out in detail, but here's the idea.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Run PROC FORMAT, using the CNTLOUT= option.&amp;nbsp; That gives you a SAS data set holding all the information needed to generate the format in its current form.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Modify the SAS data set, adding an observation that changes two variables:&lt;/P&gt;
&lt;P&gt;HLO='O'&lt;/P&gt;
&lt;P&gt;Label = 'Other'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use the modified data set as input to PROC FORMAT, using the CNTLIN= option.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2018 18:43:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-insert-an-other-value-in-an-existing-string-proc-format/m-p/433659#M107538</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-02-02T18:43:16Z</dc:date>
    </item>
  </channel>
</rss>

