<?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: Standard way of describing what SAS programs do? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Standard-way-of-describing-what-SAS-programs-do/m-p/113335#M292685</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may want to be a bit more descriptive than just MERGE such as which sets or type of merge.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your example looks like somthing I might call SPLIT CUSTOMERS because you are taking one set and splitting it into two. SELECT would be either reducing variable or reducing records in my mind, which is why I would be a little more descriptive.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 Nov 2012 15:47:10 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2012-11-01T15:47:10Z</dc:date>
    <item>
      <title>Standard way of describing what SAS programs do?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Standard-way-of-describing-what-SAS-programs-do/m-p/113334#M292684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I like using Enterprise Guide to spread out my code, so I can see how the data moves.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can easily see the order in which code must be run.&amp;nbsp; If I change something, I can easily see which programs must be re-run.&lt;/P&gt;&lt;P&gt;When I create a new piece of code, the name give to it is:&amp;nbsp; Program, Program1, Program2, Program3 etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a standard way of describing what SAS programs do, so that I can come up with a descriptive name to name the programs?&lt;/P&gt;&lt;P&gt;This would make it easy to get a high level understanding of what someone else's code does without opening each program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;Code that merges two datasets, with proc sql or datastep, could be labeled:&amp;nbsp; MERGE&lt;/P&gt;&lt;P&gt;Code that transposes could be labeled:&amp;nbsp; TRANSPOSE&lt;/P&gt;&lt;P&gt;Code that appends tables could be labeled:&amp;nbsp; APPEND&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How would I label this code?&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;data&amp;nbsp; tag_wo_account tag_w_account;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;set&amp;nbsp;&amp;nbsp; tagdata;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; if cust_acct_nbr&amp;gt;0&amp;nbsp; then output tag_w_account;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; if cust_acct_nbr&amp;lt;=0 then output tag_wo_account;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or this code (which does the same thing as above):&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;proc sql;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;create table tag_w_amount as&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;select *&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;from tagdata&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;where cust_acct_nbr&amp;gt;0;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;create table tag_wo_account as&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;select *&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;from tagdata&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;where cust_acct_nbr&amp;lt;=0;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;quit;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P&gt;Maybe I should label it SELECT, because it selects rows from the tables?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just wanted to see what other people's thoughts are.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Adam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Oct 2012 18:08:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Standard-way-of-describing-what-SAS-programs-do/m-p/113334#M292684</guid>
      <dc:creator>adamhyman</dc:creator>
      <dc:date>2012-10-31T18:08:37Z</dc:date>
    </item>
    <item>
      <title>Re: Standard way of describing what SAS programs do?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Standard-way-of-describing-what-SAS-programs-do/m-p/113335#M292685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may want to be a bit more descriptive than just MERGE such as which sets or type of merge.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your example looks like somthing I might call SPLIT CUSTOMERS because you are taking one set and splitting it into two. SELECT would be either reducing variable or reducing records in my mind, which is why I would be a little more descriptive.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Nov 2012 15:47:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Standard-way-of-describing-what-SAS-programs-do/m-p/113335#M292685</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2012-11-01T15:47:10Z</dc:date>
    </item>
    <item>
      <title>Re: Standard way of describing what SAS programs do?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Standard-way-of-describing-what-SAS-programs-do/m-p/113336#M292686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are looking at this from a programmer's point of view.&amp;nbsp; Might it be important for a nonprogrammer to understand the flow?&amp;nbsp; Do you ever have to explain to your internal customers what your program does?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you noted, there are steps where you could use entirely differernt programming techniques to accomplish the same purpose.&amp;nbsp; I would switch to a functional point of view, with a little more detail.&amp;nbsp; Example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SPLIT OUT BAD CUSTOMER NUMBERS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wouldn't care whether it was done with a MERGE or SQL.&amp;nbsp; As you can see, I don't mind typing a bit more (yes, I am willing to use 32-character variable names).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure this is any different from ballardw's suggestion ... just another vote to move in that direction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Nov 2012 16:02:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Standard-way-of-describing-what-SAS-programs-do/m-p/113336#M292686</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2012-11-01T16:02:43Z</dc:date>
    </item>
    <item>
      <title>Re: Standard way of describing what SAS programs do?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Standard-way-of-describing-what-SAS-programs-do/m-p/113337#M292687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And another vote with the group. Generally, in documenting software functionality, a good approach is VERB NOUN(s), where:&lt;/P&gt;&lt;P&gt;VERB should be a specific action done by the software (Sort, Merge, Display, Report ...). Don't use "general" terms like Process, as they don't provide any insight.&lt;/P&gt;&lt;P&gt;NOUN(s) should be objects that make sense in your business terminology (Customer, Part Number, Financial Code).&lt;/P&gt;&lt;P&gt;So you can see that "SPLIT OUT BAD CUSTOMER NUMBERS" is a very good name for the process. As an additional benefit, this will tend to drive your programs towards implementing single functions that can be clearly described, which is beneficial for ongoing maintenance. When you find yourself using more than one verb, or resorting to verbs like PROCESS, it's time to start thinking about whether your program is a muddle of coincidentally linked functions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Nov 2012 16:50:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Standard-way-of-describing-what-SAS-programs-do/m-p/113337#M292687</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2012-11-01T16:50:06Z</dc:date>
    </item>
  </channel>
</rss>

