<?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 proc format &amp;amp; stored format in library in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/proc-format-amp-stored-format-in-library/m-p/704330#M26121</link>
    <description>&lt;PRE&gt;libname myfmts "/folders/myfolders/formats";&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;
&lt;P&gt;will create a format library myfmts and format file will be saved as formats.sas7bdat in the formats folder.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;you can define a format name as $genderf in the format file&lt;/P&gt;
&lt;PRE&gt;PROC FORMAT library=myfmts;&lt;BR /&gt;	VALUE $genderf 'm'='Male' 'f'='Female';&lt;BR /&gt;run;&lt;/PRE&gt;
&lt;P&gt;you can further write the second format names as group into the same format file.&lt;/P&gt;
&lt;PRE&gt;PROC FORMAT library=myfmts;&lt;BR /&gt;	VALUE asgroup 0-&amp;lt;60='F' 60-&amp;lt;70='D' 70-&amp;lt;80='C' 80-&amp;lt;90='B' 90-High='A' &lt;BR /&gt;		Other='Missing';&lt;BR /&gt;run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;the format file can be checked by&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc format library=myfmts fmtlib;&lt;BR /&gt;run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;libname myfmts "/folders/myfolders/formats" ;&lt;BR /&gt;options fmtsearch=(myfmts work library);&lt;BR /&gt;&lt;BR /&gt;proc print data = dataset1;&lt;BR /&gt;	format gender $genderf. averagescore asgroup.;&lt;BR /&gt;run;&lt;/PRE&gt;
&lt;P&gt;any misunderstanding?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 08 Dec 2020 03:20:14 GMT</pubDate>
    <dc:creator>anming</dc:creator>
    <dc:date>2020-12-08T03:20:14Z</dc:date>
    <item>
      <title>proc format &amp; stored format in library</title>
      <link>https://communities.sas.com/t5/New-SAS-User/proc-format-amp-stored-format-in-library/m-p/704330#M26121</link>
      <description>&lt;PRE&gt;libname myfmts "/folders/myfolders/formats";&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;
&lt;P&gt;will create a format library myfmts and format file will be saved as formats.sas7bdat in the formats folder.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;you can define a format name as $genderf in the format file&lt;/P&gt;
&lt;PRE&gt;PROC FORMAT library=myfmts;&lt;BR /&gt;	VALUE $genderf 'm'='Male' 'f'='Female';&lt;BR /&gt;run;&lt;/PRE&gt;
&lt;P&gt;you can further write the second format names as group into the same format file.&lt;/P&gt;
&lt;PRE&gt;PROC FORMAT library=myfmts;&lt;BR /&gt;	VALUE asgroup 0-&amp;lt;60='F' 60-&amp;lt;70='D' 70-&amp;lt;80='C' 80-&amp;lt;90='B' 90-High='A' &lt;BR /&gt;		Other='Missing';&lt;BR /&gt;run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;the format file can be checked by&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc format library=myfmts fmtlib;&lt;BR /&gt;run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;libname myfmts "/folders/myfolders/formats" ;&lt;BR /&gt;options fmtsearch=(myfmts work library);&lt;BR /&gt;&lt;BR /&gt;proc print data = dataset1;&lt;BR /&gt;	format gender $genderf. averagescore asgroup.;&lt;BR /&gt;run;&lt;/PRE&gt;
&lt;P&gt;any misunderstanding?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2020 03:20:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/proc-format-amp-stored-format-in-library/m-p/704330#M26121</guid>
      <dc:creator>anming</dc:creator>
      <dc:date>2020-12-08T03:20:14Z</dc:date>
    </item>
    <item>
      <title>Re: proc format &amp; stored format in library</title>
      <link>https://communities.sas.com/t5/New-SAS-User/proc-format-amp-stored-format-in-library/m-p/704333#M26122</link>
      <description>&lt;P&gt;SAS formats are stored in SAS catalogs which have a file extension of sas7bcat.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to call your SAS FORMATS catalog other than FORMATS then use LIBRARY = MyLib.MyFormats on your PROC FORMAT statement.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2020 03:58:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/proc-format-amp-stored-format-in-library/m-p/704333#M26122</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2020-12-08T03:58:56Z</dc:date>
    </item>
    <item>
      <title>Re: proc format &amp; stored format in library</title>
      <link>https://communities.sas.com/t5/New-SAS-User/proc-format-amp-stored-format-in-library/m-p/704465#M26131</link>
      <description>&lt;P&gt;And if the name of the format catalog is other than Formats you need to reference it in the FMTSEARCH with libname.myfmts or what ever.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2020 17:29:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/proc-format-amp-stored-format-in-library/m-p/704465#M26131</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-12-08T17:29:54Z</dc:date>
    </item>
  </channel>
</rss>

