<?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: How to request a new global option? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-request-a-new-global-option/m-p/820395#M323808</link>
    <description>&lt;P&gt;Every programming language has features that take some experience to realize when you might have an issue.&lt;/P&gt;
&lt;P&gt;That's sort of nature of the job. One person's "bug" is another's "feature" and vice versa.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One of the languages I worked with had a function that was a sub-string function that looked like:&lt;/P&gt;
&lt;P&gt;z = substr(variablename,position1,position2)&lt;/P&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;y = substr(variablename,position1;position2)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How long did it take you to determine the difference between those two statements? The same function could return different results depending one whether a comma or semicolon separated the position parameters. One worked like the SAS substr function and returned the string starting at position1 and returned position2 number of characters, the other returned a substr starting at position1 and returned the string ending at that position.&lt;/P&gt;
&lt;P&gt;Once you get used to that it is handy but I was always having to check to see which was "number of characters" and which was "ending position" because I had learned a different language prior that did not have that "feature"&amp;nbsp; and would use the wrong one about half the time. (And ended up only using that in the one class).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PIck a data set with 20 numeric variables and calculate the mean, max, min, median, standard deviation, skewness and kurtosis using SQL (or SAS Proc sql). &lt;STRONG&gt;You&lt;/STRONG&gt;, the programmer, have to explicity list each summary for each variable, 20*7 references. Proc means you provide the statistic list and the list of variables. If you are summarizing all the numeric variables you don't even need to do that. Different approaches for different languages.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Merge is nice for many things. And then you run into multiple data sets with multiple values of the By variables. Then not so nice. So may Proc SQL comes into play.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Finding the better tool is part of the learning process. Have fun.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 25 Jun 2022 19:53:07 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2022-06-25T19:53:07Z</dc:date>
    <item>
      <title>How to request a new global option?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-request-a-new-global-option/m-p/820276#M323746</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As far I'm aware of, the only way to be informed that two variables of the same name are used in a merge without being listed in the by statement is to display information messages in the log using options &lt;CODE class=" language-sas"&gt;msglevel=i;&lt;/CODE&gt;.&lt;/P&gt;
&lt;P&gt;- The option is not in the default setting.&lt;/P&gt;
&lt;P&gt;- The message is not really easy to notice (black color)&lt;/P&gt;
&lt;P&gt;- Other messages which are usually not that relevant popup on the way with this option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Question 1 : is there already a request to get a global option similair to mergenoby for this specific issue?&lt;/P&gt;
&lt;P&gt;Question 2: if not, how to request such new feature?&lt;/P&gt;
&lt;P&gt;Question 3: I would go for a global option called &lt;CODE class=" language-sas"&gt;mergeoverwrite=&lt;/CODE&gt; with &lt;CODE class=" language-sas"&gt;WARN&lt;/CODE&gt; by default. Would you have a better suggestion for it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data one;
   key=1; x=1; output;
   key=2; x=2; output;
run;


data two;
   key=1; x=5; output;
   key=2; x=6; output;
run;

*options mergeoverwrite=WARN;
options msglevel=i;

data demo;
   merge one two;
   by key;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jun 2022 16:41:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-request-a-new-global-option/m-p/820276#M323746</guid>
      <dc:creator>xxformat_com</dc:creator>
      <dc:date>2022-06-24T16:41:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to request a new global option?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-request-a-new-global-option/m-p/820292#M323757</link>
      <description>&lt;P&gt;If you look at the top of the forum where there is the menu of Community Learn Programming etc, the drop down for Community will show an option of "SASWare Ballot". That is the place here to make such suggestions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Considering the amount of code written over the years that is intentionally using the current behavior of the data step Merge, I strongly doubt there would be widespread support for making that proposed option the default. I know I don't want to see it in the logs for the dozens of projects I use Merge in.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jun 2022 17:36:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-request-a-new-global-option/m-p/820292#M323757</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-06-24T17:36:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to request a new global option?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-request-a-new-global-option/m-p/820352#M323792</link>
      <description>Thank you &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt; for SASWare Ballot.&lt;BR /&gt;&lt;BR /&gt;If the global option is added, that would already a great help, even with nowarn. &lt;BR /&gt;&lt;BR /&gt;I was just thinking that programs overwriting variables values by other variables values while merging would be something done by mistake, not intentionally. At least that's the way I program. That's way I would find useful to be notified, even in old validated programs. It would be similar and less impactful to the global option VARLENCHK. But I may be wrong there.&lt;BR /&gt;</description>
      <pubDate>Sat, 25 Jun 2022 09:20:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-request-a-new-global-option/m-p/820352#M323792</guid>
      <dc:creator>xxformat_com</dc:creator>
      <dc:date>2022-06-25T09:20:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to request a new global option?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-request-a-new-global-option/m-p/820395#M323808</link>
      <description>&lt;P&gt;Every programming language has features that take some experience to realize when you might have an issue.&lt;/P&gt;
&lt;P&gt;That's sort of nature of the job. One person's "bug" is another's "feature" and vice versa.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One of the languages I worked with had a function that was a sub-string function that looked like:&lt;/P&gt;
&lt;P&gt;z = substr(variablename,position1,position2)&lt;/P&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;y = substr(variablename,position1;position2)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How long did it take you to determine the difference between those two statements? The same function could return different results depending one whether a comma or semicolon separated the position parameters. One worked like the SAS substr function and returned the string starting at position1 and returned position2 number of characters, the other returned a substr starting at position1 and returned the string ending at that position.&lt;/P&gt;
&lt;P&gt;Once you get used to that it is handy but I was always having to check to see which was "number of characters" and which was "ending position" because I had learned a different language prior that did not have that "feature"&amp;nbsp; and would use the wrong one about half the time. (And ended up only using that in the one class).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PIck a data set with 20 numeric variables and calculate the mean, max, min, median, standard deviation, skewness and kurtosis using SQL (or SAS Proc sql). &lt;STRONG&gt;You&lt;/STRONG&gt;, the programmer, have to explicity list each summary for each variable, 20*7 references. Proc means you provide the statistic list and the list of variables. If you are summarizing all the numeric variables you don't even need to do that. Different approaches for different languages.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Merge is nice for many things. And then you run into multiple data sets with multiple values of the By variables. Then not so nice. So may Proc SQL comes into play.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Finding the better tool is part of the learning process. Have fun.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 25 Jun 2022 19:53:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-request-a-new-global-option/m-p/820395#M323808</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-06-25T19:53:07Z</dc:date>
    </item>
  </channel>
</rss>

