<?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 Use of colon in SAS code in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Use-of-colon-in-SAS-code/m-p/592469#M15356</link>
    <description>&lt;P&gt;Dear SAS Users,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My question maybe basic, but I dared to ask you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are there a certain rules of using ":" in the SAS code? I understand well how : helps to explain "all columns that start with..." like in this example when calculating sum:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data quiz_summary;
	set pg2.class_quiz;
	Name = upcase(Name); 
	Mean3=mean(of Q:);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, there are more instances where I saw : , but I am not sure what does it mean there. Please, see this example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data regions;
input id c :$2. x;
cards;
1 N2  50
2 S1  20
3 N1 100
4 S2  70
5 N1  60
;

data south;
set regions;
if c=:'S';
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you know a document or a book chapter that explains all possible uses of : in SAS, please let me know. I would highly appreciate that!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Marina&lt;/P&gt;</description>
    <pubDate>Mon, 30 Sep 2019 17:44:00 GMT</pubDate>
    <dc:creator>marina_esp</dc:creator>
    <dc:date>2019-09-30T17:44:00Z</dc:date>
    <item>
      <title>Use of colon in SAS code</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Use-of-colon-in-SAS-code/m-p/592469#M15356</link>
      <description>&lt;P&gt;Dear SAS Users,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My question maybe basic, but I dared to ask you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are there a certain rules of using ":" in the SAS code? I understand well how : helps to explain "all columns that start with..." like in this example when calculating sum:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data quiz_summary;
	set pg2.class_quiz;
	Name = upcase(Name); 
	Mean3=mean(of Q:);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, there are more instances where I saw : , but I am not sure what does it mean there. Please, see this example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data regions;
input id c :$2. x;
cards;
1 N2  50
2 S1  20
3 N1 100
4 S2  70
5 N1  60
;

data south;
set regions;
if c=:'S';
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you know a document or a book chapter that explains all possible uses of : in SAS, please let me know. I would highly appreciate that!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Marina&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2019 17:44:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Use-of-colon-in-SAS-code/m-p/592469#M15356</guid>
      <dc:creator>marina_esp</dc:creator>
      <dc:date>2019-09-30T17:44:00Z</dc:date>
    </item>
    <item>
      <title>Re: Use of semicolon in SAS code</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Use-of-colon-in-SAS-code/m-p/592474#M15358</link>
      <description>&lt;PRE&gt;if c=:'S';&lt;/PRE&gt;
&lt;P&gt;When the equal sign is followed by a colon, it means that it is testing to see if the character variable BEGINS WITH the letter or string shown. So, for example, if you wanted to test if a state name begins with the letters NE, you could write&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if state_name=:"NE";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;which would select states NEVADA, NEW HAMPSHIRE, NEW JERSEY, NEW MEXICO, NEW YORK and NEBRASKA.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This test is case sensitive.&lt;/P&gt;</description>
      <pubDate>Sun, 29 Sep 2019 11:54:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Use-of-colon-in-SAS-code/m-p/592474#M15358</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-09-29T11:54:46Z</dc:date>
    </item>
    <item>
      <title>Re: Use of semicolon in SAS code</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Use-of-colon-in-SAS-code/m-p/592475#M15359</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I see how else we can use : , &amp;nbsp; you &amp;nbsp;resolved my confusion!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 29 Sep 2019 11:59:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Use-of-colon-in-SAS-code/m-p/592475#M15359</guid>
      <dc:creator>marina_esp</dc:creator>
      <dc:date>2019-09-29T11:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: Use of semicolon in SAS code</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Use-of-colon-in-SAS-code/m-p/592478#M15360</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/279488"&gt;@marina_esp&lt;/a&gt;&amp;nbsp; &amp;nbsp;The document has compiled your curiosity very well I think. See if this helps when you have time&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/resources/papers/proceedings/proceedings/sugi26/p073-26.pdf" target="_blank"&gt;https://support.sas.com/resources/papers/proceedings/proceedings/sugi26/p073-26.pdf&lt;/A&gt;&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;</description>
      <pubDate>Sun, 29 Sep 2019 13:13:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Use-of-colon-in-SAS-code/m-p/592478#M15360</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-09-29T13:13:52Z</dc:date>
    </item>
  </channel>
</rss>

