<?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: Question: UNIX SAS under the batch mode in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Question-UNIX-SAS-under-the-batch-mode/m-p/94353#M26705</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you do&lt;/P&gt;&lt;P&gt;%put &amp;gt;&amp;gt;&amp;amp;xx1.&amp;lt;&amp;lt; ;&lt;/P&gt;&lt;P&gt;What do you see?&amp;nbsp; Do you see the extra blank at then end?&amp;nbsp; if so, I would tr %trim(), or even just:&lt;/P&gt;&lt;P&gt;%let xx1=&amp;amp;xx1;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 Jun 2012 20:59:28 GMT</pubDate>
    <dc:creator>Quentin</dc:creator>
    <dc:date>2012-06-27T20:59:28Z</dc:date>
    <item>
      <title>Question: UNIX SAS under the batch mode</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Question-UNIX-SAS-under-the-batch-mode/m-p/94351#M26703</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, guys:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is a weird problem I run into when I run SAS on a unix server under the batch mode. The code runs perfectly under the interactive mode, but the batch mode create some extra spaces between words, which causes trouble.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is a line in my code to read a dataset whose name are pre-specified by some macro variable. For example, I have a macro variable xx1=NewYork&lt;/P&gt;&lt;P&gt;The line of code is&lt;/P&gt;&lt;P&gt;&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; data xxx; set tmp.&amp;amp;xx1._out; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The SAS code after parsing the macro variable turns out to be&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; data xxx; set tmp.NewYork _out;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my case, NewYork_out is supposed to be a single dataset under the directory of tmp; however, the system read NewYork and _out as two separate words and search tmp.NewYork and work._out separately.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have any of you encountered similar problems?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for yoru input.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jun 2012 20:49:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Question-UNIX-SAS-under-the-batch-mode/m-p/94351#M26703</guid>
      <dc:creator>bigbigben</dc:creator>
      <dc:date>2012-06-27T20:49:48Z</dc:date>
    </item>
    <item>
      <title>Re: Question: UNIX SAS under the batch mode</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Question-UNIX-SAS-under-the-batch-mode/m-p/94352#M26704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure why batch mode would effect this but it looks like one of two issues.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Macro variable XX1 actually contains one or more trailing spaces.&amp;nbsp; Try %let xx1=&amp;amp;xx1; to remove any leading or trailing blanks.&lt;/P&gt;&lt;P&gt;2) The parser is getting confused and sticking a hard token break between the macro variable and the underscore.&lt;/P&gt;&lt;P&gt;Try assigning to a new macro variable.&lt;/P&gt;&lt;P&gt;%let inds=tmp.&amp;amp;xx1._out;&lt;/P&gt;&lt;P&gt;data xxx; set &amp;amp;inds; run;&lt;/P&gt;&lt;P&gt;Or try using %unquote() function.&lt;/P&gt;&lt;P&gt;data xxx; set tmp.%unquote(&amp;amp;xx1._out); run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jun 2012 20:58:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Question-UNIX-SAS-under-the-batch-mode/m-p/94352#M26704</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2012-06-27T20:58:06Z</dc:date>
    </item>
    <item>
      <title>Re: Question: UNIX SAS under the batch mode</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Question-UNIX-SAS-under-the-batch-mode/m-p/94353#M26705</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you do&lt;/P&gt;&lt;P&gt;%put &amp;gt;&amp;gt;&amp;amp;xx1.&amp;lt;&amp;lt; ;&lt;/P&gt;&lt;P&gt;What do you see?&amp;nbsp; Do you see the extra blank at then end?&amp;nbsp; if so, I would tr %trim(), or even just:&lt;/P&gt;&lt;P&gt;%let xx1=&amp;amp;xx1;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jun 2012 20:59:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Question-UNIX-SAS-under-the-batch-mode/m-p/94353#M26705</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2012-06-27T20:59:28Z</dc:date>
    </item>
  </channel>
</rss>

