<?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 difference between function and option in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/difference-between-function-and-option/m-p/15382#M2025</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may need to explain more.&amp;nbsp; Typically, in SAS, a function is a mnemonic followed by a left and right parenthesis that may have to contain a value.&amp;nbsp; Functions return a value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Options, on the other hand, are settings you may want to control for various procs and statements &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Dec 2011 13:28:30 GMT</pubDate>
    <dc:creator>art297</dc:creator>
    <dc:date>2011-12-15T13:28:30Z</dc:date>
    <item>
      <title>difference between function and option</title>
      <link>https://communities.sas.com/t5/SAS-Programming/difference-between-function-and-option/m-p/15381#M2024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kindly explain difference between option and function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ashwini&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Dec 2011 11:45:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/difference-between-function-and-option/m-p/15381#M2024</guid>
      <dc:creator>Ashwini</dc:creator>
      <dc:date>2011-12-15T11:45:03Z</dc:date>
    </item>
    <item>
      <title>difference between function and option</title>
      <link>https://communities.sas.com/t5/SAS-Programming/difference-between-function-and-option/m-p/15382#M2025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may need to explain more.&amp;nbsp; Typically, in SAS, a function is a mnemonic followed by a left and right parenthesis that may have to contain a value.&amp;nbsp; Functions return a value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Options, on the other hand, are settings you may want to control for various procs and statements &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Dec 2011 13:28:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/difference-between-function-and-option/m-p/15382#M2025</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-12-15T13:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: difference between function and option</title>
      <link>https://communities.sas.com/t5/SAS-Programming/difference-between-function-and-option/m-p/15383#M2026</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And, to build on what Art said.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Functions can only be used in a limited set of places--typically a DATA step program or a %SYSFUNC call. As Art says, functions return a value, usually (but not always) from an argument, as defined in the function documentation. You can write your own functions using PROC FCMP. Here's a simple example of some functions:&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;data newclass;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; set sashelp.class;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; fakenum = sum(age,height,weight);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; fakemax = max(age,height,weight);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; date = today();&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc print data=newclass;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;format date mmddyy10.;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the above program, SUM, MAX and TODAY are all function calls. SUM and MAX have more than one argument. TODAY is a function that will return the current day, it needs the parentheses, but does not need any arguments.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Options alter some setting (system or procedure or statement) behavior. Options can be global system options, specified in an OPTIONS statement. Or, for some procedures, options can be placed directly on a statement, or sometimes they are placed in parentheses. Sometimes options take the form option=value, but sometimes an option can be a single word. For example:&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;options orientation=portrait center nodate nonumber;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc report data=sashelp.class nowd split='*' spanrows;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The OPTIONS statement is a global statement that is explicitly setting certain global option settings. In the OPTIONS statement, CENTER, NODATE, and NONUMBER are single word option specifications; while ORIENTATION=PORTRAIT is an option=value pair. For the PROC REPORT statement, NOWD and SPANROWS are single word statement-level options, while DATA=SASHELP.CLASS and SPLIT='*' are statement-level option=value pairs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Dec 2011 15:39:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/difference-between-function-and-option/m-p/15383#M2026</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2011-12-15T15:39:29Z</dc:date>
    </item>
  </channel>
</rss>

