<?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: Can we name user-defined names to user-defined formats? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Can-we-name-user-defined-names-to-user-defined-formats/m-p/274371#M54730</link>
    <description>&lt;P&gt;There is another very good reason not to separate out the formats into a separate catalog per format. The SAS option that tells where to look for formats, FMTSEARCH,&amp;nbsp;will, when given a library to search for formats, find all of them if they are in a default named FORMATS catalog. Otherwise you would have to specific each and every separate catalog by name for it to be found.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 01 Jun 2016 14:39:32 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2016-06-01T14:39:32Z</dc:date>
    <item>
      <title>Can we name user-defined names to user-defined formats?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-we-name-user-defined-names-to-user-defined-formats/m-p/274308#M54713</link>
      <description>&lt;P&gt;Below is a program to create some user-defined formats and to store them in myfmts library:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname myfmts '/folders/myfolders/formats';
libname learn '/folders/myfolders';

proc format library=myfmts;
	value $gender 'M'='Male' 'F'='Female' ' '='Not entered' other='Miscoded';
	value age low-29='Less than 30' 30-50='30 to 50' 51-high='51+';
	value $likert '1'='Strongly disagree' '2'='Disagree' '3'='No opinion' 
		'4'='Agree' '5'='Strongly agree';
run;


proc format library=myfmts;
	value agenew low-&amp;lt;10 = 'Less Than 10' 10-&amp;lt;20 = '10-20' 20-&amp;lt;30 = '20-30'
			30-&amp;lt;40 = '30-40' 40-&amp;lt;50 = '40-50' 50-high = 'Greater Than 50';
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Now, all formats are getting stored in same file viz. "formats.sas7bcat".&lt;/P&gt;&lt;P&gt;Can I,&lt;/P&gt;&lt;P&gt;1. Change the name of this file to say, age_fmts etc. while programming.&lt;/P&gt;&lt;P&gt;2. Here, I am using proc format procedure two times, generally I want to save two (format) files in my library myfmts (or to my folder "formats"). But, I am getting only one file viz. formats.sas7bcat instead of two. &amp;nbsp;However, I can see that all of my formats are get saved in same file (formats.sas7bcat) by running: proc format library=myfmts fmtlib;&amp;nbsp;run; commands. &amp;nbsp;But, can I generate&amp;nbsp;two files in same folder "formats" and can I decide there names also.&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2016 07:59:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-we-name-user-defined-names-to-user-defined-formats/m-p/274308#M54713</guid>
      <dc:creator>AG_Stats</dc:creator>
      <dc:date>2016-06-01T07:59:24Z</dc:date>
    </item>
    <item>
      <title>Re: Can we name user-defined names to user-defined formats?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-we-name-user-defined-names-to-user-defined-formats/m-p/274319#M54716</link>
      <description>&lt;P&gt;Formats are stored in a SAS catalog, called formats.sas7bcat. &amp;nbsp;You can have diffrerent files in differrent location, but not two in one place (as far as I can remember). &amp;nbsp;If you need to do this, then why not create a dataste of your formats - you can have as many of them as you want and call it what you want. &amp;nbsp;Or, a better solution to my mind, avoid proprietary file formats all together, if you really have to use formats (and I never do anymore), then save as text file and run each time, or use datasets. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2016 08:33:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-we-name-user-defined-names-to-user-defined-formats/m-p/274319#M54716</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-06-01T08:33:28Z</dc:date>
    </item>
    <item>
      <title>Re: Can we name user-defined names to user-defined formats?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-we-name-user-defined-names-to-user-defined-formats/m-p/274321#M54717</link>
      <description>&lt;P&gt;If you use a two-level name in the &lt;FONT face="courier new,courier"&gt;library=&lt;/FONT&gt; part of the &lt;FONT face="courier new,courier"&gt;proc format&lt;/FONT&gt; statement, you can name the catalog in addition to the library.&lt;/P&gt;
&lt;P&gt;You must then specify that catalog in the &lt;FONT face="courier new,courier"&gt;fmtsearch&lt;/FONT&gt; system option.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format library=mylib.myfmts ........

options fmtsearch=(mylib.myfmts);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 01 Jun 2016 08:36:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-we-name-user-defined-names-to-user-defined-formats/m-p/274321#M54717</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-06-01T08:36:15Z</dc:date>
    </item>
    <item>
      <title>Re: Can we name user-defined names to user-defined formats?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-we-name-user-defined-names-to-user-defined-formats/m-p/274335#M54721</link>
      <description>&lt;P&gt;There's usually no pint in have different format catalogs, or have them renamed.&lt;/P&gt;
&lt;P&gt;The formats itself become "entries" within that catalog, with the same name as the format as specified in PROC FORMAT, with the entry type as FORMAT (nume) or FORMATC (char).&lt;/P&gt;
&lt;P&gt;You can browse the contents of the SAS format&amp;nbsp;catalog (file) by using PROC CATALOG.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2016 12:18:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-we-name-user-defined-names-to-user-defined-formats/m-p/274335#M54721</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-06-01T12:18:23Z</dc:date>
    </item>
    <item>
      <title>Re: Can we name user-defined names to user-defined formats?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-we-name-user-defined-names-to-user-defined-formats/m-p/274371#M54730</link>
      <description>&lt;P&gt;There is another very good reason not to separate out the formats into a separate catalog per format. The SAS option that tells where to look for formats, FMTSEARCH,&amp;nbsp;will, when given a library to search for formats, find all of them if they are in a default named FORMATS catalog. Otherwise you would have to specific each and every separate catalog by name for it to be found.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2016 14:39:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-we-name-user-defined-names-to-user-defined-formats/m-p/274371#M54730</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-06-01T14:39:32Z</dc:date>
    </item>
    <item>
      <title>Re: Can we name user-defined names to user-defined formats?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-we-name-user-defined-names-to-user-defined-formats/m-p/274620#M54836</link>
      <description>&lt;P&gt;Thanks RW9. However, I only know to make dataset for character formats (and somewhat for numeric). &amp;nbsp;Can you give me an example of dataset (or raw text file) having formats for group of ranges. &amp;nbsp;For this please give me the codes, use the following formats:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format library=myfmts;
	value $gender 'M'='Male' 'F'='Female' ' '='Not entered' other='Miscoded';
	value age low-29='Less than 30' 30-50='30 to 50' 51-high='51+';
	value $likert '1'='Strongly disagree' '2'='Disagree' '3'='No opinion' 
		'4'='Agree' '5'='Strongly agree';
        value $likert_new '1'-'3' = 'Agree' '4','5' = 'Disagree';
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thanks in Advance,&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jun 2016 11:58:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-we-name-user-defined-names-to-user-defined-formats/m-p/274620#M54836</guid>
      <dc:creator>AG_Stats</dc:creator>
      <dc:date>2016-06-02T11:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: Can we name user-defined names to user-defined formats?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-we-name-user-defined-names-to-user-defined-formats/m-p/274640#M54842</link>
      <description>&lt;P&gt;You have provided it. &amp;nbsp;Just save that code to a text file, then #include it in any program thats needs it.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jun 2016 12:49:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-we-name-user-defined-names-to-user-defined-formats/m-p/274640#M54842</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-06-02T12:49:55Z</dc:date>
    </item>
  </channel>
</rss>

