<?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 Passing an arbitrary number of parameters to a macro in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Passing-an-arbitrary-number-of-parameters-to-a-macro/m-p/37753#M7518</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It sets values to missing.&amp;nbsp; However, in this particular situation, I don't think it is needed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 29 Jan 2012 23:15:49 GMT</pubDate>
    <dc:creator>art297</dc:creator>
    <dc:date>2012-01-29T23:15:49Z</dc:date>
    <item>
      <title>Passing an arbitrary number of parameters to a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Passing-an-arbitrary-number-of-parameters-to-a-macro/m-p/37745#M7510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone, I'm new here so I'm not sure if I'm putting this thread in the right place but here goes :smileysilly:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm writing a macro that assembles a group of datasets into a single dataset in a certain layout for export. Now this macro needs to be able to, in general, accept any number of datasets as parameters, ie:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%MACRO Unite_Tables(table1,table2,...,tableN);&lt;/P&gt;&lt;P&gt;%MEND;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However the only way I know to declare parameters in a macro definition is one by one. Is there some way to pass an arbitrary number of parameters to a macro? At the moment I'm putting the names of the tables into a dataset and passing the name of that dataset to the macro and then reading those names into macros, but it's kind of an ugly solution.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jan 2012 23:08:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Passing-an-arbitrary-number-of-parameters-to-a-macro/m-p/37745#M7510</guid>
      <dc:creator>Forgotthesemicolon</dc:creator>
      <dc:date>2012-01-24T23:08:52Z</dc:date>
    </item>
    <item>
      <title>Re: Passing an arbitrary number of parameters to a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Passing-an-arbitrary-number-of-parameters-to-a-macro/m-p/37746#M7511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;DL&gt;&lt;DT&gt;&lt;A name="a000738795"&gt;&lt;/A&gt;PARMBUFF&lt;BR /&gt;PBUFF &lt;/DT&gt;&lt;DD&gt;&lt;P&gt;&lt;A name="a000738796"&gt;&lt;/A&gt;assigns the entire list of parameter values in a macro call, including the parentheses in a name-style invocation, as the value of the automatic macro variable SYSPBUFF.&lt;/P&gt;&lt;/DD&gt;&lt;DD&gt;&lt;P&gt;Using the PARMBUFF option, you can define a macro that accepts a varying number of parameter values.&lt;/P&gt;&lt;P&gt;&lt;A name="a000738797"&gt;&lt;/A&gt;If the macro definition includes both a set of parameters and the PARMBUFF option, the macro invocation causes the parameters to receive values and also causes the &lt;/P&gt;&lt;/DD&gt;&lt;DD&gt;&lt;P&gt;entire invocation list of values to be assigned to SYSPBUFF.&lt;/P&gt;&lt;P&gt;&lt;A name="a000738798"&gt;&lt;/A&gt;To invoke a macro defined with the PARMBUFF option in a windowing environment or interactive line mode session without supplying a value list,&lt;/P&gt;&lt;/DD&gt;&lt;DD&gt;&lt;P&gt; enter an empty set of parentheses or more program statements after the invocation to indicate the absence of a value list, even if the macro definition contains no parameters&lt;/P&gt;&lt;/DD&gt;&lt;P&gt;&lt;BR /&gt;But I would just use use a KEYWORD parameter like DATA= &amp;lt;blank delimited list of data set names&amp;gt;&lt;/P&gt;&lt;/DL&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jan 2012 23:35:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Passing-an-arbitrary-number-of-parameters-to-a-macro/m-p/37746#M7511</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2012-01-24T23:35:35Z</dc:date>
    </item>
    <item>
      <title>Re: Passing an arbitrary number of parameters to a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Passing-an-arbitrary-number-of-parameters-to-a-macro/m-p/37747#M7512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is this helpful?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data aa bb cc dd ee ff;&lt;/P&gt;&lt;P&gt;do i=1 to 5;&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql noprint;&lt;/P&gt;&lt;P&gt;select memname into : dsns separated by ', '&lt;/P&gt;&lt;P&gt;&amp;nbsp; from dictionary.tables&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; where libname='WORK';&lt;/P&gt;&lt;P&gt; quit;&lt;/P&gt;&lt;P&gt;%put &amp;amp;dsns;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; font-family: Arial, Helvetica, sans-serif;"&gt;%MACRO Unite_Tables(&amp;amp;dsns)&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; font-family: Arial, Helvetica, sans-serif;"&gt;%MEND;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Linlin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jan 2012 23:51:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Passing-an-arbitrary-number-of-parameters-to-a-macro/m-p/37747#M7512</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2012-01-24T23:51:19Z</dc:date>
    </item>
    <item>
      <title>Re: Passing an arbitrary number of parameters to a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Passing-an-arbitrary-number-of-parameters-to-a-macro/m-p/37748#M7513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I suggest you expand Linlin's example and put your list of tables into one macro variable. You can then pick up which table you want using %scan:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;%let&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; dataset_list = data1*data2*data3;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;%let&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; dataset2 = &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;%scan&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;(&amp;amp;dataset_list, 2,*);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;%put&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; &amp;amp;dataset2;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN style="font-size: 10pt; color: #000080; font-family: Courier New;"&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jan 2012 01:25:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Passing-an-arbitrary-number-of-parameters-to-a-macro/m-p/37748#M7513</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2012-01-25T01:25:57Z</dc:date>
    </item>
    <item>
      <title>Re: Passing an arbitrary number of parameters to a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Passing-an-arbitrary-number-of-parameters-to-a-macro/m-p/37749#M7514</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use spaces instead of commas between the dataset names.&amp;nbsp; Do not think of them as separate parameters but one parameter that takes a list of values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9;"&gt;%MACRO Unite_Tables(tablelist);&lt;/P&gt;&lt;P style="background-color: #eef4f9;"&gt;data united;&lt;/P&gt;&lt;P style="background-color: #eef4f9;"&gt; set &amp;amp;tablelist ;&lt;/P&gt;&lt;P style="background-color: #eef4f9;"&gt;run;&lt;/P&gt;&lt;P style="background-color: #eef4f9;"&gt;%MEND;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%unite_tables(t1 t2 t3);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jan 2012 02:08:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Passing-an-arbitrary-number-of-parameters-to-a-macro/m-p/37749#M7514</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2012-01-25T02:08:41Z</dc:date>
    </item>
    <item>
      <title>Re: Passing an arbitrary number of parameters to a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Passing-an-arbitrary-number-of-parameters-to-a-macro/m-p/37750#M7515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wow thanks guys, I didn't expect a reply so soon &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Those are all good ideas, in the end I went with Linlin &amp;amp; Saskiwi's suggestions. Here's the finished code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%MACRO unite_tables(input_tables,output_table);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* Read the number of rows in each table into variables. */&lt;/P&gt;&lt;P&gt;%LET num_input_tables = %EVAL(%SYSFUNC(COUNT(&amp;amp;input_tables.,*))+1);&lt;/P&gt;&lt;P&gt;%DO i=1 %TO &amp;amp;num_input_tables.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;%LET input_table_&amp;amp;i. = %SCAN(&amp;amp;input_tables.,&amp;amp;i.,*);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;DATA Spine_&amp;amp;i.; SET &amp;amp;&amp;amp;input_table_&amp;amp;i..;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Spine=_N_;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CALL SYMPUT("num_rows_&amp;amp;i.",COMPRESS(_N_));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;%END;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* Create a "spine" table to join the others on to. */&lt;/P&gt;&lt;P&gt;DATA Spine;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;DO Spine=1 TO MAX(&amp;amp;num_rows_1.%DO i=1 %TO 2;,&amp;amp;&amp;amp;num_rows_&amp;amp;i.. %END;); OUTPUT; END;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* Unite tables. */&lt;/P&gt;&lt;P&gt;PROC SQL;&lt;/P&gt;&lt;P&gt;CREATE TABLE &amp;amp;output_table. AS&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SELECT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;S.Spine&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;%DO i=1 %TO &amp;amp;num_input_tables.;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;A&amp;amp;i..* %END;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;FROM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Spine S&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;%DO i=1 %TO &amp;amp;num_input_tables.; LEFT JOIN Spine_&amp;amp;i. A&amp;amp;i.&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ON S.Spine = A&amp;amp;i..Spine %END;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;DATA &amp;amp;output_table.; SET &amp;amp;output_table.; DROP Spine; RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%MEND unite_tables;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What it does it take a given group of tables and blindly attach them to each other horizontally (makes it easier to copy and paste multiple datasets into Excel or whatever for adhoc work)... I don't know if SAS has an inbuilt way of doing this so I've always just made macros for it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jan 2012 04:13:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Passing-an-arbitrary-number-of-parameters-to-a-macro/m-p/37750#M7515</guid>
      <dc:creator>Forgotthesemicolon</dc:creator>
      <dc:date>2012-01-25T04:13:10Z</dc:date>
    </item>
    <item>
      <title>Re: Passing an arbitrary number of parameters to a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Passing-an-arbitrary-number-of-parameters-to-a-macro/m-p/37751#M7516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sounds like a lot of work to do something that you can do in a simple data step.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; merge sashelp.class sashelp.citiyr;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; call missing(of _all_);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jan 2012 00:33:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Passing-an-arbitrary-number-of-parameters-to-a-macro/m-p/37751#M7516</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2012-01-26T00:33:25Z</dc:date>
    </item>
    <item>
      <title>Passing an arbitrary number of parameters to a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Passing-an-arbitrary-number-of-parameters-to-a-macro/m-p/37752#M7517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh thanks, I didn't know you could use a merge without specifying a variable to join on, that's a lot neater :smileysilly:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What does the call missing statement do?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 29 Jan 2012 22:59:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Passing-an-arbitrary-number-of-parameters-to-a-macro/m-p/37752#M7517</guid>
      <dc:creator>Forgotthesemicolon</dc:creator>
      <dc:date>2012-01-29T22:59:30Z</dc:date>
    </item>
    <item>
      <title>Passing an arbitrary number of parameters to a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Passing-an-arbitrary-number-of-parameters-to-a-macro/m-p/37753#M7518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It sets values to missing.&amp;nbsp; However, in this particular situation, I don't think it is needed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 29 Jan 2012 23:15:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Passing-an-arbitrary-number-of-parameters-to-a-macro/m-p/37753#M7518</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-01-29T23:15:49Z</dc:date>
    </item>
    <item>
      <title>Re: Passing an arbitrary number of parameters to a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Passing-an-arbitrary-number-of-parameters-to-a-macro/m-p/37754#M7519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You do not need the output/call missing in this case. I was thinking of the case when you are merging by variables and have different number of observations per BY group.&amp;nbsp; In that case SAS will retain the value of the last member of the group from the dataset that has fewer observations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check out the difference in this example with a BY variable when you run it with or without the output and call missing statements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;data one ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set sashelp.class nobs=nobs;&lt;/P&gt;&lt;P&gt;&amp;nbsp; i = int(3*_n_/nobs);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data two ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set sashelp.citiyr nobs=nobs;&lt;/P&gt;&lt;P&gt;&amp;nbsp; i = int(3*_n_/nobs);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; merge one two ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; by i;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; call missing(of _all_);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2012 00:18:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Passing-an-arbitrary-number-of-parameters-to-a-macro/m-p/37754#M7519</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2012-01-30T00:18:05Z</dc:date>
    </item>
  </channel>
</rss>

