<?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: C style structures in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/C-style-structures/m-p/245575#M45850</link>
    <description>&lt;P&gt;I agree with &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13674"&gt;@LinusH﻿&lt;/a&gt;&amp;nbsp;. It may be better if you could post a little bit of example start data, the desired output and business rules involved.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You may be more familiar with C but many of the approaches C users might propose are 1) almost "unnatural" for SAS and 2) may well not take advantage of SAS features.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My favorite example for comparing with other languages similar to C: You have a data set with a largish number of records and about 1000 numerical variables that you want to calculate mean, min, max, number of non-missing values. How many lines of code would you estimate to accomplish that in C?&lt;/P&gt;
&lt;P&gt;SAS: Proc means dataset=setname; run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 23 Jan 2016 00:02:36 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2016-01-23T00:02:36Z</dc:date>
    <item>
      <title>C style structures</title>
      <link>https://communities.sas.com/t5/SAS-Programming/C-style-structures/m-p/245307#M45756</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need to create a C language style structure that can hold heterogenous variables in it. What's the way to do it &amp;nbsp;in SAS ?&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2016 21:39:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/C-style-structures/m-p/245307#M45756</guid>
      <dc:creator>KrisNori</dc:creator>
      <dc:date>2016-01-21T21:39:27Z</dc:date>
    </item>
    <item>
      <title>Re: C style structures</title>
      <link>https://communities.sas.com/t5/SAS-Programming/C-style-structures/m-p/245309#M45757</link>
      <description>&lt;P&gt;Variables in SAS are numeric or character. What are you trying to do with said structure?&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2016 21:40:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/C-style-structures/m-p/245309#M45757</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-01-21T21:40:08Z</dc:date>
    </item>
    <item>
      <title>Re: C style structures</title>
      <link>https://communities.sas.com/t5/SAS-Programming/C-style-structures/m-p/245317#M45758</link>
      <description>&lt;P&gt;Hi Reeza, I want&amp;nbsp;to use the struct to compare&amp;nbsp;records in a different table.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2016 21:52:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/C-style-structures/m-p/245317#M45758</guid>
      <dc:creator>KrisNori</dc:creator>
      <dc:date>2016-01-21T21:52:32Z</dc:date>
    </item>
    <item>
      <title>Re: C style structures</title>
      <link>https://communities.sas.com/t5/SAS-Programming/C-style-structures/m-p/245327#M45762</link>
      <description>&lt;P&gt;Can you please explain in more detail?&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2016 22:12:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/C-style-structures/m-p/245327#M45762</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-01-21T22:12:09Z</dc:date>
    </item>
    <item>
      <title>Re: C style structures</title>
      <link>https://communities.sas.com/t5/SAS-Programming/C-style-structures/m-p/245402#M45789</link>
      <description>&lt;P&gt;There are no structure objects in SAS tables or in the SAS data step language. SAS programming is less procedural like C, but more database-like.&lt;/P&gt;
&lt;P&gt;If you need to group variables, you might take a look at macro variables.&lt;/P&gt;
&lt;P&gt;ie&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let struct_a = var_1 var_2 var3;

proc sort data=whatever;
by &amp;amp;struct_a;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 22 Jan 2016 08:29:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/C-style-structures/m-p/245402#M45789</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-01-22T08:29:20Z</dc:date>
    </item>
    <item>
      <title>Re: C style structures</title>
      <link>https://communities.sas.com/t5/SAS-Programming/C-style-structures/m-p/245404#M45790</link>
      <description>&lt;P&gt;Maybe you could take a look at Hash Table .&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jan 2016 09:22:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/C-style-structures/m-p/245404#M45790</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-01-22T09:22:06Z</dc:date>
    </item>
    <item>
      <title>Re: C style structures</title>
      <link>https://communities.sas.com/t5/SAS-Programming/C-style-structures/m-p/245491#M45817</link>
      <description>In the SCL programming language you could build list object structures that can be compared. That's available within the AF module.&lt;BR /&gt;&lt;BR /&gt;But may I ask what you are trying to achieve? What kind if data do you have, and why do you wish to use SAS for this particular case?</description>
      <pubDate>Fri, 22 Jan 2016 16:47:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/C-style-structures/m-p/245491#M45817</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-01-22T16:47:35Z</dc:date>
    </item>
    <item>
      <title>Re: C style structures</title>
      <link>https://communities.sas.com/t5/SAS-Programming/C-style-structures/m-p/245575#M45850</link>
      <description>&lt;P&gt;I agree with &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13674"&gt;@LinusH﻿&lt;/a&gt;&amp;nbsp;. It may be better if you could post a little bit of example start data, the desired output and business rules involved.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You may be more familiar with C but many of the approaches C users might propose are 1) almost "unnatural" for SAS and 2) may well not take advantage of SAS features.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My favorite example for comparing with other languages similar to C: You have a data set with a largish number of records and about 1000 numerical variables that you want to calculate mean, min, max, number of non-missing values. How many lines of code would you estimate to accomplish that in C?&lt;/P&gt;
&lt;P&gt;SAS: Proc means dataset=setname; run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 23 Jan 2016 00:02:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/C-style-structures/m-p/245575#M45850</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-01-23T00:02:36Z</dc:date>
    </item>
  </channel>
</rss>

