<?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: Need help with combining 2 libraries using proc format in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Need-help-with-combining-2-libraries-using-proc-format/m-p/16085#M2893</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sasbasis,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Be sure to back up the format libraries before attempting to make permanent changes!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAS lets you transfer data from a SAS data set to a format library, and vice versa.&amp;nbsp; Here is one approach (untested, so you may need to tweak the code):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc format library=libname.fmtlib1 cntlout=show_me_fmtlib1;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc format library=libname.fmtlib2 cntlout=show_me_fmtlib2;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* Not sure if sorting is necessary, but just in case;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sort data=show_me_fmtlib1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; by fmtname start end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sort data=show_me_fmtlib2;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; by fmtname start end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data combined;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; merge show_me_fmtlib1 show_me_fmtlib2;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; by fmtname start end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc format library=libname.fmtlib1 cntlin=combined;&lt;/P&gt;&lt;P&gt;run; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is no guarantee that the updates will work.&amp;nbsp; It is possible that fmtlib2 contains range definitions for fmtnm1 that incompatible with the definitions in fmtlib1.&amp;nbsp; But running the program will tell you if there is a problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Feb 2012 21:59:25 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2012-02-27T21:59:25Z</dc:date>
    <item>
      <title>Need help with combining 2 libraries using proc format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Need-help-with-combining-2-libraries-using-proc-format/m-p/16084#M2892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have 2 format catalog that I want to combine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, there is a format catalog with different format names - fmtlib1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Also there is another format catalog for just one format name(fmtnm1) which is in "fmtlib1" - fmtlib2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I combine both format names and update fmtlib1 with all values from&amp;nbsp; "fmtlib2" for fmtnm1 ? (It will be just update, not overwrite and fmtlib1 should have all formats remain same except for fmtnm1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks and appreciate any help!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2012 21:35:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Need-help-with-combining-2-libraries-using-proc-format/m-p/16084#M2892</guid>
      <dc:creator>sasbasls</dc:creator>
      <dc:date>2012-02-27T21:35:15Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with combining 2 libraries using proc format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Need-help-with-combining-2-libraries-using-proc-format/m-p/16085#M2893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sasbasis,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Be sure to back up the format libraries before attempting to make permanent changes!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAS lets you transfer data from a SAS data set to a format library, and vice versa.&amp;nbsp; Here is one approach (untested, so you may need to tweak the code):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc format library=libname.fmtlib1 cntlout=show_me_fmtlib1;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc format library=libname.fmtlib2 cntlout=show_me_fmtlib2;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* Not sure if sorting is necessary, but just in case;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sort data=show_me_fmtlib1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; by fmtname start end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sort data=show_me_fmtlib2;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; by fmtname start end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data combined;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; merge show_me_fmtlib1 show_me_fmtlib2;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; by fmtname start end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc format library=libname.fmtlib1 cntlin=combined;&lt;/P&gt;&lt;P&gt;run; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is no guarantee that the updates will work.&amp;nbsp; It is possible that fmtlib2 contains range definitions for fmtnm1 that incompatible with the definitions in fmtlib1.&amp;nbsp; But running the program will tell you if there is a problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2012 21:59:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Need-help-with-combining-2-libraries-using-proc-format/m-p/16085#M2893</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2012-02-27T21:59:25Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with combining 2 libraries using proc format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Need-help-with-combining-2-libraries-using-proc-format/m-p/16086#M2894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; I want to confirm one more doubt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fmtlib1has so many format names and fmtlib2 has one format name. So what I wanted to output is: all formats that are there in fmtlib1 + updated format name which is common to both libraries (should include values from fmtlib1 &amp;amp; fmtlib2 for that common format name). Thanks!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Feb 2012 21:06:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Need-help-with-combining-2-libraries-using-proc-format/m-p/16086#M2894</guid>
      <dc:creator>sasbasls</dc:creator>
      <dc:date>2012-02-29T21:06:10Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with combining 2 libraries using proc format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Need-help-with-combining-2-libraries-using-proc-format/m-p/16087#M2895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you provide an example of the two formats that overlap?&amp;nbsp; Do either or both have an assignment for other?&amp;nbsp; Do they share any assignments?&amp;nbsp; Does either use a range that would conflict with the other?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Feb 2012 21:14:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Need-help-with-combining-2-libraries-using-proc-format/m-p/16087#M2895</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-02-29T21:14:36Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with combining 2 libraries using proc format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Need-help-with-combining-2-libraries-using-proc-format/m-p/16088#M2896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; I don't understand 2nd part of your question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is how formats looked:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fmtlib1 had formats fmt1, fmt2, fmt3 etc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fmtlib2 has fmt2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So when I combine both formats, resulting format should have fmt1, fmt2(with values from fmtlib1 &amp;amp; fmtlib2 - after deduping), fmt3 etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance for any ideas!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Feb 2012 21:22:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Need-help-with-combining-2-libraries-using-proc-format/m-p/16088#M2896</guid>
      <dc:creator>sasbasls</dc:creator>
      <dc:date>2012-02-29T21:22:23Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with combining 2 libraries using proc format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Need-help-with-combining-2-libraries-using-proc-format/m-p/16089#M2897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What I would like to see are the new and old versions of fmt2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You just mentioned deduping thus, apparently, there are redundant entries.&amp;nbsp; My question is regarding the complexities of those entries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It would be one thing it they were just:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;old "a"=1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "b=2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;new "b"=2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "c"=3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but quite another if they were in a form like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;old "a","b"=1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "c"=2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;new "a","b","d"=1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "c","e"=2;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Feb 2012 21:28:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Need-help-with-combining-2-libraries-using-proc-format/m-p/16089#M2897</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-02-29T21:28:08Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with combining 2 libraries using proc format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Need-help-with-combining-2-libraries-using-proc-format/m-p/16090#M2898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, the solution that I provided should do that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notice that the contents of fmtlib1 and fmtlib2 get combined in the MERGE, so both get used to regenerate fmtlib1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is possible that this won't work, depending on how the additional entries mesh together.&amp;nbsp; For example: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In fmtlib1, fmtnm1 contains this range:&amp;nbsp; 20 - 30 = 'Medium'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In fmtlib2, fmtnm1 contains this range:&amp;nbsp; 25 - 35 = 'Medium'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's why you need to run the program and see if it works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And as forewarned, make copies of the two format libraries first.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Feb 2012 21:37:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Need-help-with-combining-2-libraries-using-proc-format/m-p/16090#M2898</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2012-02-29T21:37:23Z</dc:date>
    </item>
  </channel>
</rss>

