<?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: creating an Indicator in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/creating-an-Indicator/m-p/447599#M112486</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/167782"&gt;@dlazer1&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;I am trying to code if a auditor_fkey=222 then companyIND=1.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example if CompanyX is audited by auditor_fkey 222 in 2001, I need the companyIND to show up for that CompanyX regardless of the year (every time the company is in the database).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The issue I am running into is I need that 1 to show up for each time the company (company_fkey) was audited by a certain auditor based on the auditor_fkey.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You in your example if audited in 2001. Would you need to have that apply for years prior to 2001?&lt;/P&gt;
&lt;P&gt;If that is the case then something like this:&lt;/P&gt;
&lt;PRE&gt;proc sql;
   create table want as
   select a.*, ( not missing(b.company_fkey)) as companyIND
   from have as a
        left join
        (select company_fkey from have
         where auditor_fkey=222) as b
       on a.company_fkey=b.company_fkey
   ;
quit;&lt;/PRE&gt;</description>
    <pubDate>Wed, 21 Mar 2018 21:06:39 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2018-03-21T21:06:39Z</dc:date>
    <item>
      <title>creating an Indicator</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-an-Indicator/m-p/447580#M112473</link>
      <description>&lt;P&gt;I am trying to code if a auditor_fkey=222 then companyIND=1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example if CompanyX is audited by auditor_fkey 222 in 2001, I need the companyIND to show up for that CompanyX regardless of the year (every time the company is in the database).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The issue I am running into is I need that 1 to show up for each time the company (company_fkey) was audited by a certain auditor based on the auditor_fkey.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2018 20:37:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-an-Indicator/m-p/447580#M112473</guid>
      <dc:creator>dlazer1</dc:creator>
      <dc:date>2018-03-21T20:37:20Z</dc:date>
    </item>
    <item>
      <title>How to code if a company has been associated with another company?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-an-Indicator/m-p/447550#M112488</link>
      <description>&lt;P&gt;I am trying to figure out how to do an indicator variable for any company_fkey that has ever been associated with a particular auditor_fkey.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2018 19:35:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-an-Indicator/m-p/447550#M112488</guid>
      <dc:creator>dlazer1</dc:creator>
      <dc:date>2018-03-21T19:35:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to code if a company has been associated with another company? [how to improve your question]</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-an-Indicator/m-p/447561#M112489</link>
      <description>&lt;P&gt;Hello &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/167782"&gt;@dlazer1&lt;/a&gt;,&lt;/P&gt;&lt;BR /&gt; &lt;P&gt;Your question requires more details before experts can help.&amp;nbsp;Can you revise your question to include more information?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Review this checklist:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Specify a meaningful subject line for your topic.&amp;nbsp; Avoid generic subjects like "need help," "SAS query," or "urgent."&lt;/LI&gt;
&lt;LI&gt;When appropriate, provide sample data in text or DATA step format.&amp;nbsp; See &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;this article for one method&lt;/A&gt;&amp;nbsp;you can use.&lt;/LI&gt;
&lt;LI&gt;If you're encountering an error in SAS, include the SAS log or a screenshot of the error condition.&amp;nbsp;Use the&amp;nbsp;&lt;STRONG&gt;Photos&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;button to include the image in your message.&lt;BR /&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" style="width: 279px;"&gt;&lt;IMG src="https://kntur85557.i.lithium.com/t5/image/serverpage/image-id/16608i91A52F817EAC9A69/image-dimensions/279x150?v=1.0" width="279" height="150" alt="use_buttons.png" title="use_buttons.png" /&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;It also helps to include an example (table or picture) of the result that you're trying to achieve.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;To edit your original message, select the "blue gear" icon at the top of the message and select&amp;nbsp;&lt;STRONG&gt;Edit Message&lt;/STRONG&gt;.&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;From there you can adjust the title and add more details to the body of the message.&amp;nbsp; Or, simply reply to this message with any additional information you can supply.&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" style="width: 229px;"&gt;&lt;IMG src="https://kntur85557.i.lithium.com/t5/image/serverpage/image-id/16605iAC020BC79315B045/image-size/large?v=1.0&amp;amp;px=600" alt="edit_post.png" title="edit_post.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;SAS experts are eager to help -- help&amp;nbsp;&lt;EM&gt;them&lt;/EM&gt; by providing as much detail as you can.&lt;/P&gt; &lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-style:italic;font-size:smaller;"&gt;This prewritten response was triggered for you by fellow SAS Support Communities member &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/462"&gt;@PGStats&lt;/a&gt;&lt;/SPAN&gt;&lt;/P&gt;.</description>
      <pubDate>Wed, 21 Mar 2018 20:01:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-an-Indicator/m-p/447561#M112489</guid>
      <dc:creator>Community_Guide</dc:creator>
      <dc:date>2018-03-21T20:01:38Z</dc:date>
    </item>
    <item>
      <title>Re: creating an Indicator</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-an-Indicator/m-p/447584#M112475</link>
      <description>&lt;P&gt;Show us data you have, and data you want.&amp;nbsp; I'm not convinced I understand what you want.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2018 20:44:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-an-Indicator/m-p/447584#M112475</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2018-03-21T20:44:23Z</dc:date>
    </item>
    <item>
      <title>Re: creating an Indicator</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-an-Indicator/m-p/447599#M112486</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/167782"&gt;@dlazer1&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;I am trying to code if a auditor_fkey=222 then companyIND=1.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example if CompanyX is audited by auditor_fkey 222 in 2001, I need the companyIND to show up for that CompanyX regardless of the year (every time the company is in the database).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The issue I am running into is I need that 1 to show up for each time the company (company_fkey) was audited by a certain auditor based on the auditor_fkey.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You in your example if audited in 2001. Would you need to have that apply for years prior to 2001?&lt;/P&gt;
&lt;P&gt;If that is the case then something like this:&lt;/P&gt;
&lt;PRE&gt;proc sql;
   create table want as
   select a.*, ( not missing(b.company_fkey)) as companyIND
   from have as a
        left join
        (select company_fkey from have
         where auditor_fkey=222) as b
       on a.company_fkey=b.company_fkey
   ;
quit;&lt;/PRE&gt;</description>
      <pubDate>Wed, 21 Mar 2018 21:06:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-an-Indicator/m-p/447599#M112486</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-03-21T21:06:39Z</dc:date>
    </item>
    <item>
      <title>Re: creating an Indicator</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-an-Indicator/m-p/447623#M112499</link>
      <description>&lt;P&gt;This did not output what I'm looking for.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is an example and the indicator is how I need it coded. Basically if any year, an auditor_fkey for any company_fkey is there, then there needs to be an indicator.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2018 23:01:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-an-Indicator/m-p/447623#M112499</guid>
      <dc:creator>dlazer1</dc:creator>
      <dc:date>2018-03-21T23:01:25Z</dc:date>
    </item>
    <item>
      <title>Re: creating an Indicator</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-an-Indicator/m-p/447624#M112500</link>
      <description />
      <pubDate>Wed, 21 Mar 2018 23:01:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-an-Indicator/m-p/447624#M112500</guid>
      <dc:creator>dlazer1</dc:creator>
      <dc:date>2018-03-21T23:01:46Z</dc:date>
    </item>
    <item>
      <title>Re: creating an Indicator</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-an-Indicator/m-p/447928#M112606</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/167782"&gt;@dlazer1&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;This did not output what I'm looking for.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is an example and the indicator is how I need it coded. Basically if any year, an auditor_fkey for any company_fkey is there, then there needs to be an indicator.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;No actual input data&lt;/P&gt;
&lt;P&gt;No actual example output&lt;/P&gt;
&lt;P&gt;And your document doesn't actually clear much up as you don't show where the desired "auditor_fkey" values to select come from or use to create the indicators might be.&lt;/P&gt;
&lt;P&gt;You show values of auditor_fkey of&lt;/P&gt;
&lt;P&gt;xxxxxx50&lt;/P&gt;
&lt;P&gt;2&lt;/P&gt;
&lt;P&gt;xxxxxx51&lt;/P&gt;
&lt;P&gt;xxxxxx52&lt;/P&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HOW in a generic sense as in a programmable rule are we to derive that the only auditor_fkey values you want are&lt;/P&gt;
&lt;P&gt;xxxxxx50&lt;/P&gt;
&lt;P&gt;xxxxxx51&lt;/P&gt;
&lt;P&gt;xxxxxx52&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the &lt;STRONG&gt;rule&lt;/STRONG&gt; is any auditor_fkey that start with xxxxxx then state that as part of the processing logic. IF your xxxxxx are actually masking critical information that changes from record to record then we need to know that as well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did the example I provided work for that stated auditor_fkey value? If not then you need to provide lots more information about why not:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"This did not output what I'm looking for" is awful vague especially since there was no example provided of the desired output.&lt;BR /&gt;&lt;BR /&gt;Unexpected output? Provide input data in the form of a dataset, the actual results and the expected results. Data should be in the form of a data step. Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat&lt;/A&gt;... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Mar 2018 20:15:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-an-Indicator/m-p/447928#M112606</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-03-22T20:15:54Z</dc:date>
    </item>
  </channel>
</rss>

