<?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 Assistance needed to input a static observation if it does not exist already in the BY GROUP in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Assistance-needed-to-input-a-static-observation-if-it-does-not/m-p/575823#M12937</link>
    <description>&lt;P&gt;Hello -&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to condition and manipulate some data that is focused on locality and then company name.&amp;nbsp; An example is below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the example below, the business "Olaf's Boat Cleaning Supplies" is not observed for Tampa.&amp;nbsp; I want to have SAS auto-create an observation for this company when this instance occurs.&amp;nbsp; I need this company to appear in each City.&amp;nbsp; I'm tapping my soon to be wrinkling forehead trying to figure this out.&amp;nbsp; Your help is appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;country - state - county - city - business_name - &lt;EM&gt;var5 - var6 - var7 (and so on)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;USA - Florida - Miami_Dade - Miami - Olaf s Boat Cleaning Supplies - -&lt;/P&gt;&lt;P&gt;USA - Florida - Miami_Dade - Miami - Mercury Boat Repair and Maintenance - -&lt;/P&gt;&lt;P&gt;USA - Florida - Citrus - Orlando - Olaf's Boat Cleaning Supplies - -&lt;/P&gt;&lt;P&gt;USA - Florida - Citrus - Orlando - Mercury Boat Repair and Maintenance - -&lt;/P&gt;&lt;P&gt;USA - Florida - Hillsborough - Tampa - Mercury Boat Repair and Maintenance - -&lt;/P&gt;&lt;P&gt;USA - Florida - Pinellas - Clearwater - Olaf's Boat Cleaning Supplies&lt;/P&gt;&lt;P&gt;USA - Florida - Pinellas - Clearwater - Mercury Boat Repair and Maintenance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 23 Jul 2019 14:44:22 GMT</pubDate>
    <dc:creator>gtchambers3</dc:creator>
    <dc:date>2019-07-23T14:44:22Z</dc:date>
    <item>
      <title>Assistance needed to input a static observation if it does not exist already in the BY GROUP</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Assistance-needed-to-input-a-static-observation-if-it-does-not/m-p/575823#M12937</link>
      <description>&lt;P&gt;Hello -&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to condition and manipulate some data that is focused on locality and then company name.&amp;nbsp; An example is below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the example below, the business "Olaf's Boat Cleaning Supplies" is not observed for Tampa.&amp;nbsp; I want to have SAS auto-create an observation for this company when this instance occurs.&amp;nbsp; I need this company to appear in each City.&amp;nbsp; I'm tapping my soon to be wrinkling forehead trying to figure this out.&amp;nbsp; Your help is appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;country - state - county - city - business_name - &lt;EM&gt;var5 - var6 - var7 (and so on)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;USA - Florida - Miami_Dade - Miami - Olaf s Boat Cleaning Supplies - -&lt;/P&gt;&lt;P&gt;USA - Florida - Miami_Dade - Miami - Mercury Boat Repair and Maintenance - -&lt;/P&gt;&lt;P&gt;USA - Florida - Citrus - Orlando - Olaf's Boat Cleaning Supplies - -&lt;/P&gt;&lt;P&gt;USA - Florida - Citrus - Orlando - Mercury Boat Repair and Maintenance - -&lt;/P&gt;&lt;P&gt;USA - Florida - Hillsborough - Tampa - Mercury Boat Repair and Maintenance - -&lt;/P&gt;&lt;P&gt;USA - Florida - Pinellas - Clearwater - Olaf's Boat Cleaning Supplies&lt;/P&gt;&lt;P&gt;USA - Florida - Pinellas - Clearwater - Mercury Boat Repair and Maintenance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2019 14:44:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Assistance-needed-to-input-a-static-observation-if-it-does-not/m-p/575823#M12937</guid>
      <dc:creator>gtchambers3</dc:creator>
      <dc:date>2019-07-23T14:44:22Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance needed to input a static observation if it does not exist already in the BY GROUP</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Assistance-needed-to-input-a-static-observation-if-it-does-not/m-p/575826#M12938</link>
      <description>&lt;P&gt;Generally you can do this by making a skeleton or template dataset that has all of the possible combinations.&lt;/P&gt;
&lt;P&gt;Do you have a list of cities?&amp;nbsp; or do you just want to use the list that appear in the data?&lt;/P&gt;
&lt;P&gt;Do you have a list of businesses? or do you just want to use the list that appear in the data?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql ;
create table skeleton as
select * 
from (select distinct country,state,county,city from have) A
   ,  (select distinct business_name from have) B
order by country,state,county,city,business_name
;
quit;

data want;
  merge skeleton have;
  by country state county city business_name;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2019 14:55:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Assistance-needed-to-input-a-static-observation-if-it-does-not/m-p/575826#M12938</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-07-23T14:55:23Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance needed to input a static observation if it does not exist already in the BY GROUP</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Assistance-needed-to-input-a-static-observation-if-it-does-not/m-p/575852#M12942</link>
      <description>&lt;P&gt;Thank you for your reply!&amp;nbsp;&amp;nbsp; A few quick questions -&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in this example, if I create a dummy or skeleton list (which I have a pre-determined list that I can identify and use), when I merge, will I create two observations for cities where the business name exists - e.g., two Olaf's or Mercury in Miami in the new data set?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2019 15:22:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Assistance-needed-to-input-a-static-observation-if-it-does-not/m-p/575852#M12942</guid>
      <dc:creator>gtchambers3</dc:creator>
      <dc:date>2019-07-23T15:22:04Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance needed to input a static observation if it does not exist already in the BY GROUP</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Assistance-needed-to-input-a-static-observation-if-it-does-not/m-p/575857#M12944</link>
      <description>&lt;P&gt;Should work. Try it.&lt;/P&gt;
&lt;P&gt;Make sure that the skeleton file has only one observation per group.&lt;/P&gt;
&lt;P&gt;And that the values are unique and coded the same.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So if there are two different Olaf's in Miami you need to have some variable to tells them apart and include that in the skeleton dataset. You might have Olaf's 1 and Olaf' 2 as the business name.&lt;/P&gt;
&lt;P&gt;Make sure the value match.&amp;nbsp; OLAF is not the same as Olaf.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2019 15:29:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Assistance-needed-to-input-a-static-observation-if-it-does-not/m-p/575857#M12944</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-07-23T15:29:11Z</dc:date>
    </item>
  </channel>
</rss>

