<?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 variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Creating-an-indicator-variable/m-p/265522#M52232</link>
    <description>&lt;P&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;&lt;STRONG&gt;Is this a fair representation of the sample data where the values for ID in any of the&amp;nbsp;3 tables&amp;nbsp;are in the set {1,2,3,12,34}?&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;&lt;STRONG&gt;Data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; TableA;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;Input&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; ID A B C;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;datalines&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;1&amp;nbsp; 1 &amp;nbsp;2&amp;nbsp; 3&lt;/P&gt;
&lt;P&gt;2 &amp;nbsp;4&amp;nbsp; 5&amp;nbsp; 6&lt;/P&gt;
&lt;P&gt;3&amp;nbsp; 7&amp;nbsp; 8&amp;nbsp; 9&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;Data&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; TableB;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;Input&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; ID A B C;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;datalines&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;12&amp;nbsp; 11 2&amp;nbsp; 3&lt;/P&gt;
&lt;P&gt;34&amp;nbsp;&amp;nbsp; 4&amp;nbsp; 5&amp;nbsp; 6&lt;/P&gt;
&lt;P&gt;1&amp;nbsp;&amp;nbsp; 71&amp;nbsp; 8&amp;nbsp; 9&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;Data&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; TableC;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;Input&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; ID A B C;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;datalines&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;1&amp;nbsp; 10&amp;nbsp; 2&amp;nbsp; 3&lt;/P&gt;
&lt;P&gt;2 &amp;nbsp;41 &amp;nbsp;5&amp;nbsp; 6&lt;/P&gt;
&lt;P&gt;3&amp;nbsp;&amp;nbsp; 7&amp;nbsp;&amp;nbsp; 8&amp;nbsp; 9&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If so, what do the values mean in the output:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;ID tableA tableB tableC&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/P&gt;
&lt;P&gt;12&amp;nbsp;&amp;nbsp; &amp;nbsp;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;
&lt;P&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why are only IDs 1,12 and 3 in the output table?&amp;nbsp; Also,&amp;nbsp;what does 0 mean in the tableA column where&amp;nbsp;ID=1?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 21 Apr 2016 20:08:04 GMT</pubDate>
    <dc:creator>Pamela_JSRCC</dc:creator>
    <dc:date>2016-04-21T20:08:04Z</dc:date>
    <item>
      <title>Creating an indicator variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-an-indicator-variable/m-p/265221#M52130</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create an indicator based on the value contributed from the tables while merging&lt;/P&gt;&lt;P&gt;i need to merge the 3 tables in order to generate an output.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i need to create an indicator column with the values 1 , 0 in it&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the output should look as below from the three tables merged.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data TableA;&lt;/P&gt;&lt;P&gt;Input A B C;&lt;/P&gt;&lt;P&gt;1 1 2 3&lt;/P&gt;&lt;P&gt;&amp;nbsp;2 4 5 6&lt;/P&gt;&lt;P&gt;7 8 9&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data TableB;&lt;/P&gt;&lt;P&gt;Input A B C;&lt;/P&gt;&lt;P&gt;12 11 2 3&lt;/P&gt;&lt;P&gt;34 4 5 6&lt;/P&gt;&lt;P&gt;1 71 8 9&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data Tablec;&lt;/P&gt;&lt;P&gt;Input ID A B C;&lt;/P&gt;&lt;P&gt;1 10 2 3&lt;/P&gt;&lt;P&gt;2 41 5 6&lt;/P&gt;&lt;P&gt;3 7 8 9&lt;/P&gt;&lt;P&gt;ID&amp;nbsp; &amp;nbsp;tableA&amp;nbsp; tableB&amp;nbsp; TABLEC&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;0&lt;/P&gt;&lt;P&gt;12&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;3&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope i am clear on this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2016 20:26:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-an-indicator-variable/m-p/265221#M52130</guid>
      <dc:creator>santosh_pat69</dc:creator>
      <dc:date>2016-04-20T20:26:43Z</dc:date>
    </item>
    <item>
      <title>Re: Creating an indicator variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-an-indicator-variable/m-p/265247#M52137</link>
      <description>&lt;P&gt;I'm sorry but I do not understand what you are trying to do.&amp;nbsp; In the first tables, you list only 3 variables but the data shows 4.&amp;nbsp; Should they all have ID, A, B and C variables like tableC?&amp;nbsp; What is the meaning of the "indicator" in the results?&amp;nbsp; How are you merging the tables, on what variables?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2016 21:50:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-an-indicator-variable/m-p/265247#M52137</guid>
      <dc:creator>Pamela_JSRCC</dc:creator>
      <dc:date>2016-04-20T21:50:35Z</dc:date>
    </item>
    <item>
      <title>Re: Creating an indicator variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-an-indicator-variable/m-p/265253#M52139</link>
      <description>&lt;P&gt;You can use the DATASET option IN to build indicator variables of the sets that contribute to any given record.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; merge a (in=InA)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b (in=InB)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c (in= InC)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; /* the varaibles InA InB and InC have values of 1/0 depending on whether&amp;nbsp;the associated dataset&amp;nbsp;is contributing to result.&lt;/P&gt;
&lt;P&gt;HOWEVER these are temporary variables. So you need to store them*/&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; TableA=InA;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TableB=InB;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TableC=InC;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2016 22:04:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-an-indicator-variable/m-p/265253#M52139</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-04-20T22:04:45Z</dc:date>
    </item>
    <item>
      <title>Re: Creating an indicator variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-an-indicator-variable/m-p/265283#M52153</link>
      <description>&lt;P&gt;Hi Super User,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you !!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create a indicator on the dataset&lt;/P&gt;&lt;P&gt;if the value of the By variable is present on the input tables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it would be something like this&lt;/P&gt;&lt;P&gt;if the variable A from tableA has the values of 100, and the Variable A from the tableB also has the value 100 but the table C has a different variable value 104.&lt;/P&gt;&lt;P&gt;i am trying to create the new variables A1 B1 and C1 based on the value of A fro tables A,B and C&lt;/P&gt;&lt;P&gt;the ouput after the merge should similar to&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;&amp;nbsp;&amp;nbsp; tableA&amp;nbsp; | &amp;nbsp; tableB&amp;nbsp; |&amp;nbsp; tableC&amp;nbsp; | A1 |&amp;nbsp; B1&amp;nbsp; | C1|&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;A&lt;/STRONG&gt; |100&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |100 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; |104 &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; |&amp;nbsp; 1&amp;nbsp; |&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp; | &amp;nbsp; 0 |&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope i am clear this time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Apr 2016 02:15:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-an-indicator-variable/m-p/265283#M52153</guid>
      <dc:creator>santosh_pat69</dc:creator>
      <dc:date>2016-04-21T02:15:11Z</dc:date>
    </item>
    <item>
      <title>Re: Creating an indicator variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-an-indicator-variable/m-p/265457#M52203</link>
      <description>&lt;P&gt;Since you don't show anything with a BY statement that bit needs to be shown. Post your merge code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are using A as&amp;nbsp;a BY variable with those values then the result you show will not happen as a Variable A in table C with value&amp;nbsp;104 will not match 100 for Variable A in sets A or B. But the IN variables I mentioned would have the A1 B1 and C1 values you indicate as desired.&lt;/P&gt;
&lt;P&gt;(And it may be a better idea to have VAR1 instead of A as there is potential for confusing your variable names with your data set names).&lt;/P&gt;</description>
      <pubDate>Thu, 21 Apr 2016 15:53:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-an-indicator-variable/m-p/265457#M52203</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-04-21T15:53:28Z</dc:date>
    </item>
    <item>
      <title>Re: Creating an indicator variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-an-indicator-variable/m-p/265489#M52217</link>
      <description>&lt;P&gt;Hi Super User,&lt;/P&gt;&lt;P&gt;I have tried this and i am close to the desred output.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After sorting all the tables by ID, and making the required manipulations on the datasets.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; M4;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#008000" face="Courier New" size="3"&gt;&lt;FONT color="#008000" face="Courier New" size="3"&gt;&lt;FONT color="#008000" face="Courier New" size="3"&gt;*(drop=XXXX_ID);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;merge&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; Dept.A_TRN(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;in&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;=a) Dept.B_TRN(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;in&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;=b) Dept.c_TRN(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;in&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;=c) f_TRN(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;IN&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;=d) ;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;By&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; ID;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;if&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; a &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;then&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;do&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;&amp;nbsp;A_TRN=&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'1'&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;End&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;Else&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;do&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;&amp;nbsp;A_TRN=&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'0'&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;end&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;if&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; b &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;then&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;do&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;&amp;nbsp;B_TRN = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'1'&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;End&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;Else&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;Do&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;&amp;nbsp;B_TRN = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'0'&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;End&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;if&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; c &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;then&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;do&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;&amp;nbsp;C_TRN = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'1'&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;End&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;Else&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;Do&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;&amp;nbsp;C_TRN = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'0'&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;End&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;if&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; d &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;then&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;do&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;&amp;nbsp;F_TRN = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'1'&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;End&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;Else&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;Do&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;&amp;nbsp;F_TRN = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'0'&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;End&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;Run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Apr 2016 18:05:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-an-indicator-variable/m-p/265489#M52217</guid>
      <dc:creator>santosh_pat69</dc:creator>
      <dc:date>2016-04-21T18:05:01Z</dc:date>
    </item>
    <item>
      <title>Re: Creating an indicator variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-an-indicator-variable/m-p/265522#M52232</link>
      <description>&lt;P&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;&lt;STRONG&gt;Is this a fair representation of the sample data where the values for ID in any of the&amp;nbsp;3 tables&amp;nbsp;are in the set {1,2,3,12,34}?&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;&lt;STRONG&gt;Data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; TableA;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;Input&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; ID A B C;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;datalines&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;1&amp;nbsp; 1 &amp;nbsp;2&amp;nbsp; 3&lt;/P&gt;
&lt;P&gt;2 &amp;nbsp;4&amp;nbsp; 5&amp;nbsp; 6&lt;/P&gt;
&lt;P&gt;3&amp;nbsp; 7&amp;nbsp; 8&amp;nbsp; 9&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;Data&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; TableB;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;Input&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; ID A B C;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;datalines&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;12&amp;nbsp; 11 2&amp;nbsp; 3&lt;/P&gt;
&lt;P&gt;34&amp;nbsp;&amp;nbsp; 4&amp;nbsp; 5&amp;nbsp; 6&lt;/P&gt;
&lt;P&gt;1&amp;nbsp;&amp;nbsp; 71&amp;nbsp; 8&amp;nbsp; 9&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;Data&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; TableC;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;Input&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; ID A B C;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;datalines&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;1&amp;nbsp; 10&amp;nbsp; 2&amp;nbsp; 3&lt;/P&gt;
&lt;P&gt;2 &amp;nbsp;41 &amp;nbsp;5&amp;nbsp; 6&lt;/P&gt;
&lt;P&gt;3&amp;nbsp;&amp;nbsp; 7&amp;nbsp;&amp;nbsp; 8&amp;nbsp; 9&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If so, what do the values mean in the output:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;ID tableA tableB tableC&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/P&gt;
&lt;P&gt;12&amp;nbsp;&amp;nbsp; &amp;nbsp;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;
&lt;P&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why are only IDs 1,12 and 3 in the output table?&amp;nbsp; Also,&amp;nbsp;what does 0 mean in the tableA column where&amp;nbsp;ID=1?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Apr 2016 20:08:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-an-indicator-variable/m-p/265522#M52232</guid>
      <dc:creator>Pamela_JSRCC</dc:creator>
      <dc:date>2016-04-21T20:08:04Z</dc:date>
    </item>
    <item>
      <title>Re: Creating an indicator variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-an-indicator-variable/m-p/265779#M52319</link>
      <description>&lt;P&gt;Is there some particular reason you want your indicator variables to be character? They are more cumbersome to work with.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could use to make character values of '0' and '1':&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Courier New"&gt;A_TRN=&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; put(a,f1.);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Courier New"&gt;B_TRN=&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; put(b,f1.);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Courier New"&gt;C_TRN=&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; put(c,f1.);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Courier New"&gt;F_TRN=&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; put(d,f1.); &amp;lt;sub-optimal choice using d, in=F would make much more sense&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000" face="Courier New" size="3"&gt;Instead of all the If-Then-Else statements&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Apr 2016 21:44:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-an-indicator-variable/m-p/265779#M52319</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-04-22T21:44:48Z</dc:date>
    </item>
    <item>
      <title>Re: Creating an indicator variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-an-indicator-variable/m-p/265798#M52328</link>
      <description>hi SuperUser,&lt;BR /&gt;&lt;BR /&gt;Thank you for your comments, let me follow your suggestion, the indicator need not be a char it can be either of the num or char.&lt;BR /&gt;&lt;BR /&gt;Will keep you posted on this&lt;BR /&gt;Thanks a million</description>
      <pubDate>Sat, 23 Apr 2016 02:40:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-an-indicator-variable/m-p/265798#M52328</guid>
      <dc:creator>santosh_pat69</dc:creator>
      <dc:date>2016-04-23T02:40:50Z</dc:date>
    </item>
    <item>
      <title>Re: Creating an indicator variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-an-indicator-variable/m-p/265799#M52329</link>
      <description>Hi Jessica&lt;BR /&gt;&lt;BR /&gt;Please ignore my previous comments.&lt;BR /&gt;&lt;BR /&gt;The data was made up at the last minute. The 0 and 1 are used as an indicator 1 to state that the variable is present on tableA if it's not present on the table B or TableC then it should be 0 or vice versa.&lt;BR /&gt;&lt;BR /&gt;I have already achevied this using if then else. Was looking to build this efficiently.</description>
      <pubDate>Sat, 23 Apr 2016 02:44:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-an-indicator-variable/m-p/265799#M52329</guid>
      <dc:creator>santosh_pat69</dc:creator>
      <dc:date>2016-04-23T02:44:40Z</dc:date>
    </item>
  </channel>
</rss>

