<?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: can we use both rename and in options in merge step? in Programming 1 and 2</title>
    <link>https://communities.sas.com/t5/Programming-1-and-2/can-we-use-both-rename-and-in-options-in-merge-step/m-p/765188#M937</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/354036"&gt;@jaliu&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Is there a reason I cannot use both the rename and in options? Or how can i fix the syntax?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data test;
merge stormbasin (rename=(BasinCode=Basin))(in=code) stormsum (in=sum);
if code=1;&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;All data set options for a specific set appear within one set of ().&lt;/P&gt;
&lt;P&gt;Try&lt;/P&gt;
&lt;PRE&gt;data test;
merge stormbasin (rename=(BasinCode=Basin)  in=code) stormsum (in=sum);
if code=1;&lt;/PRE&gt;
&lt;P&gt;Your code with the second ) after Basin ended the options for Stormbasin and the (in=code) wasn't valid as there was no data set associated with the option.&lt;/P&gt;
&lt;P&gt;Your code would have generated an error similar to the one here:&lt;/P&gt;
&lt;PRE&gt;759  data junk;
760     set sashelp.class (rename=(sex=gender)) (in=code);
                                                -
                                                22
                                                76
ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, ;, CUROBS, END, INDSNAME, KEY, KEYRESET, KEYS, NOBS, OPEN, POINT, _DATA_, _LAST_, _NULL_.

ERROR 76-322: Syntax error, statement will be ignored.

761  run;
&lt;/PRE&gt;
&lt;P&gt;The underscore under the ( says that character wasn't expected and most of the expected things listed are SET options which would be a clue that you have left data set options behind.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 31 Aug 2021 21:48:51 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2021-08-31T21:48:51Z</dc:date>
    <item>
      <title>can we use both rename and in options in merge step?</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/can-we-use-both-rename-and-in-options-in-merge-step/m-p/765183#M935</link>
      <description>&lt;P&gt;Is there a reason I cannot use both the rename and in options? Or how can i fix the syntax?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data test;
merge stormbasin (rename=(BasinCode=Basin))(in=code) stormsum (in=sum);
if code=1;&lt;/PRE&gt;</description>
      <pubDate>Tue, 31 Aug 2021 21:37:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/can-we-use-both-rename-and-in-options-in-merge-step/m-p/765183#M935</guid>
      <dc:creator>jaliu</dc:creator>
      <dc:date>2021-08-31T21:37:35Z</dc:date>
    </item>
    <item>
      <title>Re: can we use both rename and in options in merge step?</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/can-we-use-both-rename-and-in-options-in-merge-step/m-p/765187#M936</link>
      <description>&lt;P&gt;Use one pair of brackets to specify the data set options (rename= and in=).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
merge stormbasin (rename=(BasinCode=Basin) in=code) 
      stormsum   (in=sum);
if code=1;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Tue, 31 Aug 2021 21:42:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/can-we-use-both-rename-and-in-options-in-merge-step/m-p/765187#M936</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2021-08-31T21:42:09Z</dc:date>
    </item>
    <item>
      <title>Re: can we use both rename and in options in merge step?</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/can-we-use-both-rename-and-in-options-in-merge-step/m-p/765188#M937</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/354036"&gt;@jaliu&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Is there a reason I cannot use both the rename and in options? Or how can i fix the syntax?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data test;
merge stormbasin (rename=(BasinCode=Basin))(in=code) stormsum (in=sum);
if code=1;&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;All data set options for a specific set appear within one set of ().&lt;/P&gt;
&lt;P&gt;Try&lt;/P&gt;
&lt;PRE&gt;data test;
merge stormbasin (rename=(BasinCode=Basin)  in=code) stormsum (in=sum);
if code=1;&lt;/PRE&gt;
&lt;P&gt;Your code with the second ) after Basin ended the options for Stormbasin and the (in=code) wasn't valid as there was no data set associated with the option.&lt;/P&gt;
&lt;P&gt;Your code would have generated an error similar to the one here:&lt;/P&gt;
&lt;PRE&gt;759  data junk;
760     set sashelp.class (rename=(sex=gender)) (in=code);
                                                -
                                                22
                                                76
ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, ;, CUROBS, END, INDSNAME, KEY, KEYRESET, KEYS, NOBS, OPEN, POINT, _DATA_, _LAST_, _NULL_.

ERROR 76-322: Syntax error, statement will be ignored.

761  run;
&lt;/PRE&gt;
&lt;P&gt;The underscore under the ( says that character wasn't expected and most of the expected things listed are SET options which would be a clue that you have left data set options behind.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Aug 2021 21:48:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/can-we-use-both-rename-and-in-options-in-merge-step/m-p/765188#M937</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-08-31T21:48:51Z</dc:date>
    </item>
    <item>
      <title>Re: can we use both rename and in options in merge step?</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/can-we-use-both-rename-and-in-options-in-merge-step/m-p/765191#M938</link>
      <description>&lt;P&gt;is it possible that options require () only when we can list multiple data sets next to eachother without a semicolon? i.e. if there would no be no confusion (and this goes for other statements as well) then the syntax wouldn't require ()?&lt;/P&gt;</description>
      <pubDate>Tue, 31 Aug 2021 22:11:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/can-we-use-both-rename-and-in-options-in-merge-step/m-p/765191#M938</guid>
      <dc:creator>jaliu</dc:creator>
      <dc:date>2021-08-31T22:11:37Z</dc:date>
    </item>
    <item>
      <title>Re: can we use both rename and in options in merge step?</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/can-we-use-both-rename-and-in-options-in-merge-step/m-p/765233#M941</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/354036"&gt;@jaliu&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Data set options always require one set of (), regardless how many data sets are specified before the semicolon. So, if there's only one dataset you also need the ().&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Wed, 01 Sep 2021 07:08:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/can-we-use-both-rename-and-in-options-in-merge-step/m-p/765233#M941</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2021-09-01T07:08:18Z</dc:date>
    </item>
    <item>
      <title>Re: can we use both rename and in options in merge step?</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/can-we-use-both-rename-and-in-options-in-merge-step/m-p/765364#M945</link>
      <description>&lt;P&gt;maybe you are misunderstanding my question. I want to know why sometimes we need () for options and sometimes we don't.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Sep 2021 14:22:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/can-we-use-both-rename-and-in-options-in-merge-step/m-p/765364#M945</guid>
      <dc:creator>jaliu</dc:creator>
      <dc:date>2021-09-01T14:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: can we use both rename and in options in merge step?</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/can-we-use-both-rename-and-in-options-in-merge-step/m-p/765872#M966</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Data set options always need a (one) set of round brackets and the options should be specified within the ().&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I agree you can do something like:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
set have nobs=nobs point=nobs;
call symputx('yymm',yymm);
stop;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;but, here, nobs= and point= are no data set options but rather data STEP options.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kind regards,&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Fri, 03 Sep 2021 15:31:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/can-we-use-both-rename-and-in-options-in-merge-step/m-p/765872#M966</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2021-09-03T15:31:37Z</dc:date>
    </item>
  </channel>
</rss>

