<?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: Macro variable resolution error in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Macro-variable-resolution-error/m-p/173591#M13304</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You didn't do anything wrong. Try running this code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let path=&amp;amp;SASWORKLOCATION.;&lt;/P&gt;&lt;P&gt;%put &amp;amp;path.;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You'll see that SAS puts double quotes around the path name; you'll need to remove them to use the macro variable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 Jan 2015 22:33:41 GMT</pubDate>
    <dc:creator>TomKari</dc:creator>
    <dc:date>2015-01-07T22:33:41Z</dc:date>
    <item>
      <title>Macro variable resolution error</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Macro-variable-resolution-error/m-p/173590#M13303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am adapting a popular benchmark program that was written for base SAS in Windows to run in Enterprise Guide.&amp;nbsp; The program does PROC PRINTTO at the top so that it can read the log file at the end and parse out running times.&amp;nbsp; It was written to place the log file on the C: drive, but now EG is running this in a server environment, so I attempted to change the path from the C: drive to the &amp;amp;SASWORKLOCATION. value.&amp;nbsp; It didn't work.&amp;nbsp; Here is the error message:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;37&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %*let path=c:\temp\;&lt;/P&gt;&lt;P&gt;38&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %let path=&amp;amp;SASWORKLOCATION.;&lt;/P&gt;&lt;P&gt;39&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;40&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; options fullstimer;&lt;/P&gt;&lt;P&gt;41&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;42&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; proc printto log="&amp;amp;path.pmbm.txt" new;&lt;/P&gt;&lt;P&gt;NOTE: Line generated by the macro variable "PATH".&lt;/P&gt;&lt;P&gt;42&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ""/SASHome/saswork0/Lev1saswork/SAS_work4424000057DF_plccasam1sgn01/SAS_workC6E2000057DF_plccasam1sgn01/"pmbm.txt&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; _&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; 22&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; 76&lt;/P&gt;&lt;P&gt;ERROR 22-322: Syntax error, expecting one of the following: ;, FILE, LABEL, LOG, NAME, NEW, PRINT, UNIT.&amp;nbsp; &lt;/P&gt;&lt;P&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;/P&gt;&lt;P&gt;43&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;&lt;BR /&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;Can anyone please tell me what I did wrong?&amp;nbsp; And how to correct this so that the file gets written to the SASWORKLOCATION?&amp;nbsp; I don't want to modify anything else about the benchmark program (such as the choice of PROC PRINTTO) if I don't have to.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2015 22:11:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Macro-variable-resolution-error/m-p/173590#M13303</guid>
      <dc:creator>TMKAIG1</dc:creator>
      <dc:date>2015-01-07T22:11:13Z</dc:date>
    </item>
    <item>
      <title>Re: Macro variable resolution error</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Macro-variable-resolution-error/m-p/173591#M13304</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You didn't do anything wrong. Try running this code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let path=&amp;amp;SASWORKLOCATION.;&lt;/P&gt;&lt;P&gt;%put &amp;amp;path.;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You'll see that SAS puts double quotes around the path name; you'll need to remove them to use the macro variable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2015 22:33:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Macro-variable-resolution-error/m-p/173591#M13304</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2015-01-07T22:33:41Z</dc:date>
    </item>
    <item>
      <title>Re: Macro variable resolution error</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Macro-variable-resolution-error/m-p/173592#M13305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your macro variable SASWORKLOCATION already had double quotes around it.&lt;/P&gt;&lt;P&gt;Try:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;proc printto log=%sysfunc(quote(&amp;amp;sasworklocation.pmbm.txt))&amp;nbsp; new ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or just ask SAS where the work location is:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;proc printto log =%sysfunc(quote(%sysfunc(pathname(work))/pmbm.txt)) new ;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2015 22:35:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Macro-variable-resolution-error/m-p/173592#M13305</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2015-01-07T22:35:48Z</dc:date>
    </item>
    <item>
      <title>Re: Macro variable resolution error</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Macro-variable-resolution-error/m-p/173593#M13306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thank you to Tom and TomKari for the helpful responses.&amp;nbsp; The surrounding quotes in the SASWORKLOCATION value were the problem.&amp;nbsp; The SASWORKLOCATION variable doesn't seem to exist in base SAS 9.3.&amp;nbsp; I found it by doing %put _ALL_ in EG 6.1, and I didn't realize that the quotes I saw in the log were actually part of the macro variable value.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Tom --&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;%sysfunc(quote(&amp;amp;sasworklocation.pmbm.txt))&lt;/P&gt;&lt;P&gt;doesn't work, because the quotes are still in the &amp;amp;sasworklocation. value.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;%sysfunc(quote(%sysfunc(pathname(work))/pmbm.txt))&lt;/P&gt;&lt;P&gt;would work, but then you have to add in the "/" character, which seems OS specific; it works in UNIX, but would it also work in Windows?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I posted this issue on SAS-L and someone suggested using:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;%let path=%sysfunc(dequote(&amp;amp;SASWORKLOCATION.));&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;That solved the problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2015 23:58:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Macro-variable-resolution-error/m-p/173593#M13306</guid>
      <dc:creator>TMKAIG1</dc:creator>
      <dc:date>2015-01-07T23:58:27Z</dc:date>
    </item>
    <item>
      <title>Re: Macro variable resolution error</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Macro-variable-resolution-error/m-p/173594#M13307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;/ should work in Windows. SAS should handle converting to the appropriate value for your OS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;6&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; data _null_;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;7&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; infile &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;"%sysfunc(pathname(work))/&amp;amp;sysscp..log"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;8&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; input;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;9&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; put _infile_;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;10&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp;&amp;nbsp; run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;NOTE: &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: red; background: white;"&gt;The&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; infile &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;"C:\SAS Temporary Files\_TD5256/WIN.log"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; is:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Filename=C:\SAS Temporary Files\_TD5256\WIN.log,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RECFM=V,LRECL=&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;32767&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;,File Size (bytes)=&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;468&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Last Modified=&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;07&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;Jan2015:&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;19&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;:&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;50&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;:&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;20&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Create Time=&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;07&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;Jan2015:&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;19&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;:&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;50&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;:&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;19&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2015 00:55:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Macro-variable-resolution-error/m-p/173594#M13307</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2015-01-08T00:55:34Z</dc:date>
    </item>
  </channel>
</rss>

