<?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: sas array in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/sas-array/m-p/686390#M24420</link>
    <description>&lt;P&gt;There are 28 different missing vlaues in SAS. You are probably familiar with the dot as&amp;nbsp; a missing value. However, .b and .c and .d&amp;nbsp;&lt;EM&gt;etc&lt;/EM&gt;. are also missing values, each one different from the other. So the code is testing to see if nomiss(i) is either .b or .c and then changing the value of nomiss(i) to zero.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Seems like a pointless thing to do from my point of view, changing missing to zero, changing other missings to 999 and changing other missings to&amp;nbsp;9999996, I don't see a benefit, you can test to see when a variable has value .e just as easily as you can test to see if the variable is&amp;nbsp;9999996; in fact testing to see if a variable has value .e is actually easier, less typing and less chance to make a typographical error than testing to see if a variable is&amp;nbsp;9999996. Furthermore, leaving the values as missing instead of turning them into an integer allows you to do math properly (things like computing a sum or average) which can't be done if you have 9999996 as the value. However at least now you can understand what the code is doing.&lt;/P&gt;</description>
    <pubDate>Thu, 24 Sep 2020 15:08:49 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2020-09-24T15:08:49Z</dc:date>
    <item>
      <title>sas array</title>
      <link>https://communities.sas.com/t5/New-SAS-User/sas-array/m-p/686376#M24418</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Dear experts,&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;can you please help me understand the below code,&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;I am not getting what .b ,.c is doing in do loop here.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&amp;nbsp;want (rename=(acc_id=acct_id));&lt;/P&gt;
&lt;P&gt;set have;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; array nomiss ttl;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; do i=&lt;STRONG&gt;1&lt;/STRONG&gt; to dim(nomiss);&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; if nomiss{i} in (&lt;STRONG&gt;.b&lt;/STRONG&gt;,&lt;STRONG&gt;.c&lt;/STRONG&gt;) then nomiss{i}=&lt;STRONG&gt;0&lt;/STRONG&gt;;&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; if nomiss{i} in (&lt;STRONG&gt;.d&lt;/STRONG&gt;) then nomiss{i}=&lt;STRONG&gt;999&lt;/STRONG&gt;;&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; if nomiss{i} in (&lt;STRONG&gt;.e&lt;/STRONG&gt;) then nomiss{i}=&lt;STRONG&gt;9999996&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Sep 2020 14:01:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/sas-array/m-p/686376#M24418</guid>
      <dc:creator>Trishjais</dc:creator>
      <dc:date>2020-09-24T14:01:54Z</dc:date>
    </item>
    <item>
      <title>Re: sas array</title>
      <link>https://communities.sas.com/t5/New-SAS-User/sas-array/m-p/686389#M24419</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/242585"&gt;@Trishjais&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;STRONG&gt;Dear experts,&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;can you please help me understand the below code,&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;I am not getting what .b ,.c is doing in do loop here.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&amp;nbsp;want (rename=(acc_id=acct_id));&lt;/P&gt;
&lt;P&gt;set have;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; array nomiss ttl;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; do i=&lt;STRONG&gt;1&lt;/STRONG&gt; to dim(nomiss);&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; if nomiss{i} in (&lt;STRONG&gt;.b&lt;/STRONG&gt;,&lt;STRONG&gt;.c&lt;/STRONG&gt;) then nomiss{i}=&lt;STRONG&gt;0&lt;/STRONG&gt;;&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; if nomiss{i} in (&lt;STRONG&gt;.d&lt;/STRONG&gt;) then nomiss{i}=&lt;STRONG&gt;999&lt;/STRONG&gt;;&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; if nomiss{i} in (&lt;STRONG&gt;.e&lt;/STRONG&gt;) then nomiss{i}=&lt;STRONG&gt;9999996&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;SAS allows 27 "special missing" values in addition to the standard missing represented by default "." . These are .A through .Z (26 letters, case doesn't matter) and ._&amp;nbsp; Just like the missing value, the special missing values are not used in calculations.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So the code is comparing the specific missing values to assign numeric values for some reason. I really hope the reason is for export to a different data system / file or else calculations are likely going to be very screwy.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another approach is outlined here: &lt;A href="https://communities.sas.com/t5/SAS-Programming/Character-and-Numeric-in-Same-Field/m-p/686382" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/Character-and-Numeric-in-Same-Field/m-p/686382&lt;/A&gt;&amp;nbsp; where a format is used to display the values but would maintain the missing values.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Sep 2020 14:46:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/sas-array/m-p/686389#M24419</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-09-24T14:46:46Z</dc:date>
    </item>
    <item>
      <title>Re: sas array</title>
      <link>https://communities.sas.com/t5/New-SAS-User/sas-array/m-p/686390#M24420</link>
      <description>&lt;P&gt;There are 28 different missing vlaues in SAS. You are probably familiar with the dot as&amp;nbsp; a missing value. However, .b and .c and .d&amp;nbsp;&lt;EM&gt;etc&lt;/EM&gt;. are also missing values, each one different from the other. So the code is testing to see if nomiss(i) is either .b or .c and then changing the value of nomiss(i) to zero.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Seems like a pointless thing to do from my point of view, changing missing to zero, changing other missings to 999 and changing other missings to&amp;nbsp;9999996, I don't see a benefit, you can test to see when a variable has value .e just as easily as you can test to see if the variable is&amp;nbsp;9999996; in fact testing to see if a variable has value .e is actually easier, less typing and less chance to make a typographical error than testing to see if a variable is&amp;nbsp;9999996. Furthermore, leaving the values as missing instead of turning them into an integer allows you to do math properly (things like computing a sum or average) which can't be done if you have 9999996 as the value. However at least now you can understand what the code is doing.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Sep 2020 15:08:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/sas-array/m-p/686390#M24420</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-09-24T15:08:49Z</dc:date>
    </item>
    <item>
      <title>Re: sas array</title>
      <link>https://communities.sas.com/t5/New-SAS-User/sas-array/m-p/686392#M24421</link>
      <description>&lt;P&gt;.A-.Z are special missing values.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, if you're doing a survey and someone doesn't answer a question you may want to mark that as missing. But if the question uses skip logic - only some people are asked the question - you may want to identify that differently, so you may code missing because they didn't answer as .A and missing because not asked as .B and missing because of some other reason, .Z&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's the documentation reference on Missing Values&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?docsetId=lrcon&amp;amp;docsetTarget=p175x77t7k6kggn1io94yedqagl3.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en"&gt;https://documentation.sas.com/?docsetId=lrcon&amp;amp;docsetTarget=p175x77t7k6kggn1io94yedqagl3.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/242585"&gt;@Trishjais&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;STRONG&gt;Dear experts,&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;can you please help me understand the below code,&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;I am not getting what .b ,.c is doing in do loop here.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&amp;nbsp;want (rename=(acc_id=acct_id));&lt;/P&gt;
&lt;P&gt;set have;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; array nomiss ttl;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; do i=&lt;STRONG&gt;1&lt;/STRONG&gt; to dim(nomiss);&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; if nomiss{i} in (&lt;STRONG&gt;.b&lt;/STRONG&gt;,&lt;STRONG&gt;.c&lt;/STRONG&gt;) then nomiss{i}=&lt;STRONG&gt;0&lt;/STRONG&gt;;&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; if nomiss{i} in (&lt;STRONG&gt;.d&lt;/STRONG&gt;) then nomiss{i}=&lt;STRONG&gt;999&lt;/STRONG&gt;;&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; if nomiss{i} in (&lt;STRONG&gt;.e&lt;/STRONG&gt;) then nomiss{i}=&lt;STRONG&gt;9999996&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Sep 2020 14:49:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/sas-array/m-p/686392#M24421</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-09-24T14:49:45Z</dc:date>
    </item>
    <item>
      <title>Re: sas array</title>
      <link>https://communities.sas.com/t5/New-SAS-User/sas-array/m-p/686399#M24422</link>
      <description>Agreed with Paige regarding that recoding to 9999 is not helpful, you can no longer do summary statistics and calculations on the field now without the risk of skewing your results. Using special missing values is a safer and more user friendly approach.</description>
      <pubDate>Thu, 24 Sep 2020 14:59:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/sas-array/m-p/686399#M24422</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-09-24T14:59:09Z</dc:date>
    </item>
    <item>
      <title>Re: sas array</title>
      <link>https://communities.sas.com/t5/New-SAS-User/sas-array/m-p/686402#M24423</link>
      <description>&lt;P&gt;Very neatly explained by&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;. I just can't resist this "must share" priceless classic authored by Sir&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/19879"&gt;@Quentin&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.lexjansen.com/nesug/nesug01/ps/ps8009.pdf" target="_blank"&gt;https://www.lexjansen.com/nesug/nesug01/ps/ps8009.pdf&lt;/A&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Sep 2020 15:21:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/sas-array/m-p/686402#M24423</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2020-09-24T15:21:01Z</dc:date>
    </item>
    <item>
      <title>Re: sas array</title>
      <link>https://communities.sas.com/t5/New-SAS-User/sas-array/m-p/686435#M24427</link>
      <description>&lt;P&gt;Thanks for the kind mention&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/138205"&gt;@novinosrin&lt;/a&gt;&amp;nbsp;.&amp;nbsp; That was my first paper, a poster for NESUG because I was way too scared to present anything, but a poster was enough to earn me a ticket to the conference from the good folks I was lucky enough to work with at Westat.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Years later I was at a new job, and we were talking about missing data, and someone opened a folder of papers they had downloaded and they had a copy of that paper.&amp;nbsp; I was so excited and said "wow, great to know someone read my paper", and the head programmer said "relax, just because they downloaded it doesn't mean they read it." : )&lt;/P&gt;</description>
      <pubDate>Thu, 24 Sep 2020 17:04:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/sas-array/m-p/686435#M24427</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2020-09-24T17:04:25Z</dc:date>
    </item>
    <item>
      <title>Re: sas array</title>
      <link>https://communities.sas.com/t5/New-SAS-User/sas-array/m-p/686438#M24428</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/19879"&gt;@Quentin&lt;/a&gt;&amp;nbsp;-&lt;SPAN&gt;&amp;nbsp;&lt;EM&gt;I was so excited and said "wow, great to know someone read my paper", and the head programmer said "relax,&lt;STRONG&gt; just because they downloaded it doesn't mean they read it&lt;/STRONG&gt;." : )&amp;nbsp;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If "they" didn't, it's their loss in my humble yet very strong opinion. Who's acknowledgement should matter to anoint you as a "genius"? It's none other than Guru Paul D who mentioned to me what a genius you are.&lt;/P&gt;
&lt;P&gt;FYI- We were chatting for 2 hours over the phone last week. Just general chat like we talked about almost any random fun topic like weather, cars, Covid, jet engines,music etc but SAS lol, though something came up about SAS in context and he mentioned what a genius you are. Kudos!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Sep 2020 17:22:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/sas-array/m-p/686438#M24428</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2020-09-24T17:22:56Z</dc:date>
    </item>
    <item>
      <title>Re: sas array</title>
      <link>https://communities.sas.com/t5/New-SAS-User/sas-array/m-p/686444#M24429</link>
      <description>&lt;P&gt;Paul is just as generous as his praise as you are.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was only lucky to meet Paul and many other SAS notables from SAS-L early in my career, and benefitted greatly from such a welcoming SAS community.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm constantly amazed by how little I know about SAS, my expertise (as it is) is in small areas, and definitely not keeping up with the growth of SAS languages/platforms.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Sep 2020 17:37:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/sas-array/m-p/686444#M24429</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2020-09-24T17:37:16Z</dc:date>
    </item>
  </channel>
</rss>

