<?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: Problem with format table in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Problem-with-format-table/m-p/208397#M51659</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The field start in the format table quart ranges from 01 to 12 (representing months of the year), the label in the table is the quarter. When I read values from this table in my dataset with "funny" months like 13 and 21, it still returns values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would use merges only this is a very simplified example of what I'm doing so merge would appear to be the easier option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Jul 2015 09:09:40 GMT</pubDate>
    <dc:creator>brophymj</dc:creator>
    <dc:date>2015-07-22T09:09:40Z</dc:date>
    <item>
      <title>Problem with format table</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Problem-with-format-table/m-p/208395#M51657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to use a formatting table to map months to quarters. I've created a format table below called "quart". I've included a sample dataset with months but I've included two months outside the range of the format table. However, when I use the code check=put(month,quart.); I still get values for the months outside the range of the format table, specifically, 1 for month 13 and 2 for month 21. Is there a way to change the code so that the code is only executed where the months are in the range of the format table. Something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if check=put(month,quart.) ne "" then do;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the sample code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data quart; &lt;BR /&gt;input start $2. label $1.;&lt;BR /&gt;datalines;&lt;BR /&gt;011&lt;BR /&gt;021&lt;BR /&gt;031&lt;BR /&gt;042&lt;BR /&gt;052&lt;BR /&gt;062&lt;BR /&gt;073&lt;BR /&gt;083&lt;BR /&gt;093&lt;BR /&gt;104&lt;BR /&gt;114&lt;BR /&gt;124&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data quart;&lt;BR /&gt;set quart;&lt;BR /&gt;fmtname = "quart";&lt;BR /&gt;type = "c";&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc format cntlin = quart fmtlib; &lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data dataset; &lt;BR /&gt;input month $2.;&lt;BR /&gt;datalines;&lt;BR /&gt;01&lt;BR /&gt;02&lt;BR /&gt;13&lt;BR /&gt;21&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data dataset;&lt;BR /&gt;set dataset;&lt;BR /&gt;check=put(month,quart.);&lt;BR /&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jul 2015 08:02:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Problem-with-format-table/m-p/208395#M51657</guid>
      <dc:creator>brophymj</dc:creator>
      <dc:date>2015-07-22T08:02:01Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with format table</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Problem-with-format-table/m-p/208396#M51658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would suggest putting both sets of data in datasets and use normal merging techniques.&amp;nbsp; I would also clarify what you mean by "in the range of the format table"?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jul 2015 08:06:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Problem-with-format-table/m-p/208396#M51658</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-07-22T08:06:45Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with format table</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Problem-with-format-table/m-p/208397#M51659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The field start in the format table quart ranges from 01 to 12 (representing months of the year), the label in the table is the quarter. When I read values from this table in my dataset with "funny" months like 13 and 21, it still returns values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would use merges only this is a very simplified example of what I'm doing so merge would appear to be the easier option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jul 2015 09:09:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Problem-with-format-table/m-p/208397#M51659</guid>
      <dc:creator>brophymj</dc:creator>
      <dc:date>2015-07-22T09:09:40Z</dc:date>
    </item>
  </channel>
</rss>

