<?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: Cannot load custom formats using options=fmtsearch(libref) in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/Cannot-load-custom-formats-using-options-fmtsearch-libref/m-p/353574#M2392</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/133759"&gt;@gabyelle&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hello Reeza&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your reply - although I don't have the technical knowledge under my belt yet to understand what you mean with&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"catalogs don't transfer systems"?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt; means that SAS catalogs are version and operating system specific. A libref.formats catalog created with version X may not be usable with version Y. SAS programs, OTOH, can easily be used in different SAS versions and on different platforms.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format library=libref;
......
run;

options fmtsearch=(libref);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;is totally portable, just the libname statement needs to be adapted.&lt;/P&gt;</description>
    <pubDate>Wed, 26 Apr 2017 07:09:54 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2017-04-26T07:09:54Z</dc:date>
    <item>
      <title>Cannot load custom formats using options=fmtsearch(libref)</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Cannot-load-custom-formats-using-options-fmtsearch-libref/m-p/353510#M2386</link>
      <description>&lt;P&gt;I am hoping someone might be able to shed some light on why options=fmtsearch(libref) does not work, but % include "filepath" does. I wonder what different syntax might be needed in SAS Studio in the the options statemement?&lt;/P&gt;&lt;P&gt;Below the code that does not work:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname libref "/folders/myfolders/thefoldername";
options fmtsearch=(libref);
data mydata;
set thefoldername.mydata;
run;
proc sgplot data=mydata;
 title1 'Scatterplot of v1 vs v2';
 title2 'All Participants'; scatter x=v1 y=v2;
 xaxis values=(50 to 80 by 10);
 run; title;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;the plot works fine, the correct number of observations are read in but the log show the formats are not loaded:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="sasNote"&gt;NOTE: Format YESNO was not found or could not be loaded.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Format SES was not found or could not be loaded.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;etc&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;As I mentioned earlier, using %include "filepath" works fine - formats are loaded.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;I spent hours pouring over the boards and searching on the internet but to no avail. Could anyone&amp;nbsp;help?&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Thanks!&lt;/DIV&gt;</description>
      <pubDate>Tue, 25 Apr 2017 23:47:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Cannot-load-custom-formats-using-options-fmtsearch-libref/m-p/353510#M2386</guid>
      <dc:creator>gabyelle</dc:creator>
      <dc:date>2017-04-25T23:47:43Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot load custom formats using options=fmtsearch(libref)</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Cannot-load-custom-formats-using-options-fmtsearch-libref/m-p/353525#M2387</link>
      <description>&lt;P&gt;I suspect there may be some misunderstanding here. %include is for including and running SAS code, which I'm guessing contains the code that creates the SAS formats.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For FMTSEARCH to work it needs to point to the SAS library where the SAS FORMAT catalog is created. By default, this will be the WORK library unless you specify otherwise. What you could try is this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname libref "/folders/myfolders/thefoldername";

proc format library = libref;
  * put your format code here;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 26 Apr 2017 00:34:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Cannot-load-custom-formats-using-options-fmtsearch-libref/m-p/353525#M2387</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2017-04-26T00:34:13Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot load custom formats using options=fmtsearch(libref)</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Cannot-load-custom-formats-using-options-fmtsearch-libref/m-p/353532#M2388</link>
      <description>&lt;P&gt;You may want to explore using %include within your autoexec. Giventthat catalogs don't transfer systems, ie from Unix to Windows or 32bit to 64 bit is also an issue, it may be easier to stick with loading formats either as needed or at startup.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2017 00:54:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Cannot-load-custom-formats-using-options-fmtsearch-libref/m-p/353532#M2388</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-04-26T00:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot load custom formats using options=fmtsearch(libref)</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Cannot-load-custom-formats-using-options-fmtsearch-libref/m-p/353539#M2389</link>
      <description>&lt;P&gt;Just a possibility ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you don't specify the name of the catalog to look in to locate formats, it's assumed to be named formats. &amp;nbsp;So the catalog name that's being searched is libref.formats. &amp;nbsp;It's possible that the formats are actually saved under a different catalog name within that same libref. &amp;nbsp;You would have to specify the two-part name within the FMTSEARCH option, for example, libref.myformats or whatever the name actually is.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2017 01:18:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Cannot-load-custom-formats-using-options-fmtsearch-libref/m-p/353539#M2389</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-04-26T01:18:28Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot load custom formats using options=fmtsearch(libref)</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Cannot-load-custom-formats-using-options-fmtsearch-libref/m-p/353569#M2390</link>
      <description>&lt;P&gt;Check the include files to see in which library the formats are created. Big chance that it is work, so your fmtsearch would be useless.&lt;/P&gt;
&lt;P&gt;Keep in mind that including the .sas files executes the proc format and creates the formats on the spot, while fmtsearch only works for formats that have already been created with the format procedure.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2017 06:43:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Cannot-load-custom-formats-using-options-fmtsearch-libref/m-p/353569#M2390</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-04-26T06:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot load custom formats using options=fmtsearch(libref)</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Cannot-load-custom-formats-using-options-fmtsearch-libref/m-p/353573#M2391</link>
      <description>&lt;P&gt;Hello Reeza&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your reply - although I don't have the technical knowledge under my belt yet to understand what you mean with&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"catalogs don't transfer systems"?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2017 07:02:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Cannot-load-custom-formats-using-options-fmtsearch-libref/m-p/353573#M2391</guid>
      <dc:creator>gabyelle</dc:creator>
      <dc:date>2017-04-26T07:02:26Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot load custom formats using options=fmtsearch(libref)</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Cannot-load-custom-formats-using-options-fmtsearch-libref/m-p/353574#M2392</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/133759"&gt;@gabyelle&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hello Reeza&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your reply - although I don't have the technical knowledge under my belt yet to understand what you mean with&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"catalogs don't transfer systems"?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt; means that SAS catalogs are version and operating system specific. A libref.formats catalog created with version X may not be usable with version Y. SAS programs, OTOH, can easily be used in different SAS versions and on different platforms.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format library=libref;
......
run;

options fmtsearch=(libref);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;is totally portable, just the libname statement needs to be adapted.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2017 07:09:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Cannot-load-custom-formats-using-options-fmtsearch-libref/m-p/353574#M2392</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-04-26T07:09:54Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot load custom formats using options=fmtsearch(libref)</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Cannot-load-custom-formats-using-options-fmtsearch-libref/m-p/353649#M2393</link>
      <description>&lt;P&gt;Thanks very much Kurt - you have clarified a lot and I got to the bottom of it thanks to your hints - the formats weren't being loaded because the statement library=...&amp;nbsp;after&amp;nbsp;proc format was missing in the format file&amp;nbsp;I had been given.&lt;/P&gt;&lt;P&gt;I also found out that there are two catalogs in SAS Studio - not just formats.sas7cat but also&amp;nbsp;format.sas7cat - I can set the code to refer to either, by using library=libref.format or libref.formats - as long as I keep the reference consistent when I call the formats in the options fmtsearch=(libref.format(s)).&amp;nbsp;&lt;/P&gt;&lt;P&gt;As AmyP pointed out in another post on SAS catalogs, you can't actually see what is in the catalog directly (I tried the&amp;nbsp;code snippets but cannot make much sense of the output as I can't open the individual catalogs).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As an aside, a&amp;nbsp;difference I noticed when comparing logs produced after running&amp;nbsp;%include and&amp;nbsp;options fmtsearch=( ) is&amp;nbsp;that the log doesn't confim the formats are loaded in the latter, but they appear to&amp;nbsp;actually have loaded as the data displays the correct value labels.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wonder why?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PS I also read your Maxims - very useful reading even&amp;nbsp;for a&amp;nbsp;beginner like me!&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2017 11:55:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Cannot-load-custom-formats-using-options-fmtsearch-libref/m-p/353649#M2393</guid>
      <dc:creator>gabyelle</dc:creator>
      <dc:date>2017-04-26T11:55:23Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot load custom formats using options=fmtsearch(libref)</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Cannot-load-custom-formats-using-options-fmtsearch-libref/m-p/353650#M2394</link>
      <description>&lt;P&gt;If SAS is given only a library name in fmtsearch, it will look for formats.sas7bcat in that library. But you can use any name for a formats catalog when you specify a two-level name (eg libref.format, note the missing "s") in fmtsearch.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The Maxims will be expanded in the future, so take a look every now and then. Suggestions are also welcome.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2017 11:52:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Cannot-load-custom-formats-using-options-fmtsearch-libref/m-p/353650#M2394</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-04-26T11:52:04Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot load custom formats using options=fmtsearch(libref)</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Cannot-load-custom-formats-using-options-fmtsearch-libref/m-p/353652#M2395</link>
      <description>&lt;P&gt;OK - got it Kurt - thanks again!&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2017 11:59:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Cannot-load-custom-formats-using-options-fmtsearch-libref/m-p/353652#M2395</guid>
      <dc:creator>gabyelle</dc:creator>
      <dc:date>2017-04-26T11:59:26Z</dc:date>
    </item>
  </channel>
</rss>

