<?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 Update Existing Format Value in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Update-Existing-Format-Value/m-p/341944#M78342</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to update existing format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i tried&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;FONT color="#000000"&gt;proc format library = work.formats&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;FONT color="#000000"&gt;cntlout = cntlout;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;FONT color="#000000"&gt;run;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Now i want to update value for the existing format.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Format name :- FMT1&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Old Value - ' OLDNAME'&amp;nbsp; to New Value - ' NEWNAME' &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;so next time it should pickup NEWNAME so how to update existing format FMT1 Value ?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Please advise.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Sanket&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 17 Mar 2017 12:28:13 GMT</pubDate>
    <dc:creator>Sanket</dc:creator>
    <dc:date>2017-03-17T12:28:13Z</dc:date>
    <item>
      <title>Update Existing Format Value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Update-Existing-Format-Value/m-p/341944#M78342</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to update existing format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i tried&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;FONT color="#000000"&gt;proc format library = work.formats&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;FONT color="#000000"&gt;cntlout = cntlout;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;FONT color="#000000"&gt;run;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Now i want to update value for the existing format.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Format name :- FMT1&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Old Value - ' OLDNAME'&amp;nbsp; to New Value - ' NEWNAME' &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;so next time it should pickup NEWNAME so how to update existing format FMT1 Value ?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Please advise.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Sanket&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2017 12:28:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Update-Existing-Format-Value/m-p/341944#M78342</guid>
      <dc:creator>Sanket</dc:creator>
      <dc:date>2017-03-17T12:28:13Z</dc:date>
    </item>
    <item>
      <title>Re: Update Existing Format Value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Update-Existing-Format-Value/m-p/341953#M78346</link>
      <description>&lt;P&gt;Post test datas in the form of a datastep if you want exact answers. &amp;nbsp;This is just the theory - use cntlout to get a dataset as you have done, updated that dataset as you want, then cntlin in proc format to read the dataset back in.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2017 12:54:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Update-Existing-Format-Value/m-p/341953#M78346</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-03-17T12:54:16Z</dc:date>
    </item>
    <item>
      <title>Re: Update Existing Format Value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Update-Existing-Format-Value/m-p/341961#M78350</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/22912"&gt;@Sanket&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to update existing format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i tried&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;FONT color="#000000"&gt;proc format library = work.formats&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;FONT color="#000000"&gt;cntlout = cntlout;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;FONT color="#000000"&gt;run;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Now i want to update value for the existing format.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Format name :- FMT1&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Old Value - ' OLDNAME'&amp;nbsp; to New Value - ' NEWNAME' &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;so next time it should pickup NEWNAME so how to update existing format FMT1 Value ?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Please advise.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Sanket&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You created a new dataset that describes all the formats in WORK when you ran&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format library = work.formats cntlout = cntlout;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Now you can look in that dataset (WORK.CNTLOUT) and replace the value you want to have replaced.&lt;/P&gt;
&lt;P&gt;After that, use the dataset as input for proc format:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format library = work.formats cntlin = cntlout;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2017 13:10:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Update-Existing-Format-Value/m-p/341961#M78350</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-03-17T13:10:29Z</dc:date>
    </item>
    <item>
      <title>Re: Update Existing Format Value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Update-Existing-Format-Value/m-p/342464#M78526</link>
      <description>Thank you !!   KurtBresmer &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; 

 It worked fine on Friday I tried with an below example.

proc format;
   value $id  '1'='Mary'
              '2'='Tom'
              '3'='Joe'
                                                ;
run;

options fmtsearch=(work);
proc format fmtlib library=work.formats;
select $id;
run;
quit;

proc format library = work.formats cntlout = cntlout;
select $id;
run;

proc sql;
update cntlout set LABEL='Kim' where label='Joe';
quit;

Now you can look in that dataset (WORK.CNTLOUT) and replace the value you want to have replaced.
After that, use the dataset as input for proc format:;

proc format library = work.formats cntlin = cntlout;
select $id;
run;

proc format library = work.formats cntlout = cntlout;
select $id;
run;</description>
      <pubDate>Mon, 20 Mar 2017 05:06:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Update-Existing-Format-Value/m-p/342464#M78526</guid>
      <dc:creator>Sanket</dc:creator>
      <dc:date>2017-03-20T05:06:40Z</dc:date>
    </item>
    <item>
      <title>Re: Update Existing Format Value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Update-Existing-Format-Value/m-p/342486#M78533</link>
      <description>&lt;P&gt;Use the "little running man" icon in the top of your "Post" or "Reply" window to post SAS code. This preserves the formatting and even gives you enhanced-editor-like coloring:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
value $id
  '1'='Mary'
  '2'='Tom'
  '3'='Joe'
;
run;

options fmtsearch=(work);

proc format fmtlib library=work.formats;
select $id;
run;

quit; * not necessary;

proc format library = work.formats cntlout = cntlout;
select $id;
run;

proc sql;
update cntlout
set LABEL='Kim'
where label='Joe';
quit;

proc format library = work.formats cntlin = cntlout;
select $id;
run;

proc format library = work.formats cntlout = cntlout;
select $id;
run; &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 20 Mar 2017 07:52:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Update-Existing-Format-Value/m-p/342486#M78533</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-03-20T07:52:06Z</dc:date>
    </item>
  </channel>
</rss>

