<?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: For SAS Base PROC FORMAT? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/For-SAS-Base-PROC-FORMAT/m-p/454047#M114770</link>
    <description>&lt;P&gt;The answer might be a sort of "maybe".&lt;/P&gt;
&lt;P&gt;The LIBRARY option on a proc format statement indicates where a format may be stored. If Library is not specified then that would be the WORK library.&lt;/P&gt;
&lt;P&gt;You have a SAS option call FMTSEARCH which tells SAS where to search for formats and the order to search the libraries.&lt;/P&gt;
&lt;P&gt;This code will show the current setting you have as a Log entry:&lt;/P&gt;
&lt;PRE&gt;proc options option=fmtsearch;run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You use the Options statement to assign or modify the FMTSEARCH order such as&lt;/P&gt;
&lt;P&gt;options fmtsearch=(WORK SASHELP OLDLIB);&amp;nbsp; would assign these three libraries to the search path.&lt;/P&gt;
&lt;P&gt;Options append(fmtsearch= NewLIb); would add NEWLIB to the end of the current FMTSEARCH order, Insert would place it at the beginning of the search order.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you specify a library on the PROC Format statement and do not add it to the FMTSEARCH path then the formats there cannot be found. If the library is not assigned at the time the format is used then the format cannot be found.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One proc format creates a format in a library on the current fmtsearch path the format may be used anywhere in the SAS session.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With the default library of WORK and WORK almost always in the FMTSEARCH option then formats are generally available as long as the Proc Format code is run in every session.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;All this stuff related to libraries is because some organizations have many custom formats and creating permanent formats in a known location users can reference means they do not have to run the code to recreate all of the formats in each session. These organization also usually have settings in the SAS set up to set the FMTSEARCH to reference the libraries.&lt;/P&gt;</description>
    <pubDate>Fri, 13 Apr 2018 20:05:38 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2018-04-13T20:05:38Z</dc:date>
    <item>
      <title>For SAS Base PROC FORMAT?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/For-SAS-Base-PROC-FORMAT/m-p/454040#M114768</link>
      <description>&lt;P&gt;Is &lt;STRONG&gt;PROC FORMAT&lt;/STRONG&gt; statement &lt;STRONG&gt;GLOBAL&lt;/STRONG&gt; statement?&lt;/P&gt;&lt;P&gt;Because, we can use value statement in any data step statement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank You.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Apr 2018 19:39:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/For-SAS-Base-PROC-FORMAT/m-p/454040#M114768</guid>
      <dc:creator>kishangabani</dc:creator>
      <dc:date>2018-04-13T19:39:54Z</dc:date>
    </item>
    <item>
      <title>Re: For SAS Base PROC FORMAT?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/For-SAS-Base-PROC-FORMAT/m-p/454047#M114770</link>
      <description>&lt;P&gt;The answer might be a sort of "maybe".&lt;/P&gt;
&lt;P&gt;The LIBRARY option on a proc format statement indicates where a format may be stored. If Library is not specified then that would be the WORK library.&lt;/P&gt;
&lt;P&gt;You have a SAS option call FMTSEARCH which tells SAS where to search for formats and the order to search the libraries.&lt;/P&gt;
&lt;P&gt;This code will show the current setting you have as a Log entry:&lt;/P&gt;
&lt;PRE&gt;proc options option=fmtsearch;run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You use the Options statement to assign or modify the FMTSEARCH order such as&lt;/P&gt;
&lt;P&gt;options fmtsearch=(WORK SASHELP OLDLIB);&amp;nbsp; would assign these three libraries to the search path.&lt;/P&gt;
&lt;P&gt;Options append(fmtsearch= NewLIb); would add NEWLIB to the end of the current FMTSEARCH order, Insert would place it at the beginning of the search order.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you specify a library on the PROC Format statement and do not add it to the FMTSEARCH path then the formats there cannot be found. If the library is not assigned at the time the format is used then the format cannot be found.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One proc format creates a format in a library on the current fmtsearch path the format may be used anywhere in the SAS session.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With the default library of WORK and WORK almost always in the FMTSEARCH option then formats are generally available as long as the Proc Format code is run in every session.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;All this stuff related to libraries is because some organizations have many custom formats and creating permanent formats in a known location users can reference means they do not have to run the code to recreate all of the formats in each session. These organization also usually have settings in the SAS set up to set the FMTSEARCH to reference the libraries.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Apr 2018 20:05:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/For-SAS-Base-PROC-FORMAT/m-p/454047#M114770</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-04-13T20:05:38Z</dc:date>
    </item>
    <item>
      <title>Re: For SAS Base PROC FORMAT?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/For-SAS-Base-PROC-FORMAT/m-p/454081#M114773</link>
      <description>&lt;P&gt;Hi: Just a clarification. Once you define a user-defined FORMAT, using a VALUE, INVALUE or PICTURE statement, within a PROC FORMAT step, you can use the format NAME on a FORMAT statement within a DATA step program. However, you cannot use a VALUE statement in a DATA step program, as shown below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="value_data_step.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/19795i1DB1081FF2298259/image-size/large?v=v2&amp;amp;px=999" role="button" title="value_data_step.png" alt="value_data_step.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;However, when you define a format within a PROC FORMAT step, as shown below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="value_used_correctly.png" style="width: 574px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/19796i496A24C9BBD39FED/image-size/large?v=v2&amp;amp;px=999" role="button" title="value_used_correctly.png" alt="value_used_correctly.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Then you CAN use a FORMAT statement to associate the format name with a specific variable in your program.&lt;BR /&gt;&lt;BR /&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Fri, 13 Apr 2018 23:34:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/For-SAS-Base-PROC-FORMAT/m-p/454081#M114773</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2018-04-13T23:34:42Z</dc:date>
    </item>
    <item>
      <title>Re: For SAS Base PROC FORMAT?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/For-SAS-Base-PROC-FORMAT/m-p/454203#M114804</link>
      <description>&lt;P&gt;Hi, again&lt;/P&gt;&lt;P&gt;I understand.&amp;nbsp;&lt;/P&gt;&lt;P&gt;so,&lt;STRONG&gt; PROC FORMAT&lt;/STRONG&gt; statement, in &lt;STRONG&gt;VALUE&lt;/STRONG&gt; stat.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We can use any of the SAS dataset or file in SAS any session. Just run, &lt;STRONG&gt;PROC FORMAT&lt;/STRONG&gt; stat. and use any where we want.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank You.&lt;/P&gt;</description>
      <pubDate>Sat, 14 Apr 2018 20:28:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/For-SAS-Base-PROC-FORMAT/m-p/454203#M114804</guid>
      <dc:creator>kishangabani</dc:creator>
      <dc:date>2018-04-14T20:28:00Z</dc:date>
    </item>
    <item>
      <title>Re: For SAS Base PROC FORMAT?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/For-SAS-Base-PROC-FORMAT/m-p/454248#M114807</link>
      <description>Hmm. Well I would say that you use a VALUE statement in a PROC FORMAT step. What you define with a VALUE statement is a user-defined format. You can use this format in a FORMAT statement in any procedure step that uses formats and in DATA step programs.&lt;BR /&gt;&lt;BR /&gt;  We cover many of these concepts in our Programming 1 class, which is free as self-paced e-learning.&lt;BR /&gt;&lt;BR /&gt;Cynthia</description>
      <pubDate>Sun, 15 Apr 2018 05:41:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/For-SAS-Base-PROC-FORMAT/m-p/454248#M114807</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2018-04-15T05:41:00Z</dc:date>
    </item>
  </channel>
</rss>

