<?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 causing to show the jobs status to FAILED in Administration and Deployment</title>
    <link>https://communities.sas.com/t5/Administration-and-Deployment/Macro-causing-to-show-the-jobs-status-to-FAILED/m-p/677656#M19704</link>
    <description>&lt;P&gt;AFAIK, the SERVER= option is to identify the Windows server the SAS PC Files Server is running on, not the server where the Office files are stored. Those can be accessed by any accessible file share.from the&amp;nbsp;Windows server the SAS PC Files Server is running on. In your case it would be a lot simpler to have the&amp;nbsp;SAS PC Files Server installed on one Windows server and the SERVER= option can then be hardcoded. There is no reason this shouldn't work in a VM setup like you have.&lt;/P&gt;</description>
    <pubDate>Tue, 18 Aug 2020 22:13:56 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2020-08-18T22:13:56Z</dc:date>
    <item>
      <title>Macro causing to show the jobs status to FAILED</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Macro-causing-to-show-the-jobs-status-to-FAILED/m-p/676261#M19655</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;We've the below macro defined in &lt;STRONG&gt;appserver_autoexec_usermods.sas&amp;nbsp;&lt;/STRONG&gt;which is helpful when accessing spreadsheets, csv files and access DB files when using PC File Server.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;STRONG&gt;&lt;FONT size="4"&gt;/* Macro defined in appserver_autoexec_usermods.sas */&lt;/FONT&gt;&lt;BR /&gt;&lt;/STRONG&gt;%global srv;
data _null_;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; call symput("srv",compress("&amp;amp;_CLIENTMACHINE"));
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;FONT size="4"&gt;&lt;STRONG&gt;/* EXAMPLE of reading a Spreadsheet */&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;PROC IMPORT DBMS=excelcs
	OUT=test_import 
DATAFILE="\\location\abc\pqr\xyz\excel test.xlsx" REPLACE;
	PORT=9621;
	SERVER=&amp;amp;srv;
	serveruser="&amp;amp;da_lanid";
	serverpass="&amp;amp;da_pwd";
RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;ISSUE:&lt;/P&gt;&lt;P&gt;Users are able to read in and write the files using PC File server successfully. But in the Workspace server logs we see a message saying,&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;WARNING: Apparent symbolic reference _CLIENTMACHINE not resolved.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Due to this warning message, we're getting the state of all jobs as &lt;STRONG&gt;FAILED&lt;/STRONG&gt; even though the job was ran successfully.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SWO.PNG" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/48166i3EAB101174480973/image-size/large?v=v2&amp;amp;px=999" role="button" title="SWO.PNG" alt="SWO.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;We don't wan't to ask all the Users in our environment to their change their code to access files when using PC File Server.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to overcome this scenario without reinstalling EG?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please suggest!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SAS 9.4 M6 with SWO&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Aug 2020 18:44:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Macro-causing-to-show-the-jobs-status-to-FAILED/m-p/676261#M19655</guid>
      <dc:creator>Akshay_93</dc:creator>
      <dc:date>2020-08-12T18:44:59Z</dc:date>
    </item>
    <item>
      <title>Re: Macro causing to show the jobs status to FAILED</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Macro-causing-to-show-the-jobs-status-to-FAILED/m-p/676309#M19656</link>
      <description>&lt;P&gt;What server is your SAS PC File Server running on? The SERVER= parameter should specify this server, not every SAS users's client PC which is what that macro variable is trying to define.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Aug 2020 20:41:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Macro-causing-to-show-the-jobs-status-to-FAILED/m-p/676309#M19656</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2020-08-12T20:41:09Z</dc:date>
    </item>
    <item>
      <title>Re: Macro causing to show the jobs status to FAILED</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Macro-causing-to-show-the-jobs-status-to-FAILED/m-p/676322#M19658</link>
      <description>&lt;P&gt;Not possible in our case, because we've Enterprise Guide installed on 4 servers and it is presented through VMHorizon Client to the Users(VMHC is similar to Citrix).&lt;BR /&gt;VMHC has the ability to load balance and connect to the server which has less traffic.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Aug 2020 21:28:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Macro-causing-to-show-the-jobs-status-to-FAILED/m-p/676322#M19658</guid>
      <dc:creator>Akshay_93</dc:creator>
      <dc:date>2020-08-12T21:28:20Z</dc:date>
    </item>
    <item>
      <title>Re: Macro causing to show the jobs status to FAILED</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Macro-causing-to-show-the-jobs-status-to-FAILED/m-p/676336#M19659</link>
      <description>&lt;P&gt;What OS do your SAS servers run on? If it is Windows you don't need the SAS PC Files Server. If it is Unix/Linux you can read/write XLSX files also without the PC Files Server. Do you use MS Access databases which would still require use of the PC Files Server?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Aug 2020 22:36:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Macro-causing-to-show-the-jobs-status-to-FAILED/m-p/676336#M19659</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2020-08-12T22:36:49Z</dc:date>
    </item>
    <item>
      <title>Re: Macro causing to show the jobs status to FAILED</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Macro-causing-to-show-the-jobs-status-to-FAILED/m-p/676343#M19660</link>
      <description>&lt;P&gt;I don't understand what you are trying to do.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It sounds like you are trying to use some macro variable set by Enterprise Guide named _CLIENTMACHINE.&amp;nbsp; Are you sure that is the right variable that reflects the machine where Enterprise Guide is running?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now even if it is the right machine are you sure that is the machine you want?&amp;nbsp; If the users are running something like Citrix to run Enterprise Guide then the machine where EG is running is the Citrix server and not their individual PC.&amp;nbsp; Is that machine running PC Files Server?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the users can be assigned to one of many different Citrix servers then why does it matter which Citrix server you use to run PC Files Server?&amp;nbsp; Why not just run that on one machine and have each SAS program access that one machine?&amp;nbsp; Then you don't need to know what machine Enterprise Guide is running on.&amp;nbsp; That machine does not even have to be one of the Citrix servers, it just needs to run PC Files Server and have access to the files they users need to read/write.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Aug 2020 23:16:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Macro-causing-to-show-the-jobs-status-to-FAILED/m-p/676343#M19660</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-08-12T23:16:34Z</dc:date>
    </item>
    <item>
      <title>Re: Macro causing to show the jobs status to FAILED</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Macro-causing-to-show-the-jobs-status-to-FAILED/m-p/676351#M19661</link>
      <description>&lt;P&gt;Linux x64.&lt;/P&gt;&lt;P&gt;Yes, Sir. We do use PC File Server to connect to Access Database. We just replace the DBMS value to ACCESSCS.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Aug 2020 00:26:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Macro-causing-to-show-the-jobs-status-to-FAILED/m-p/676351#M19661</guid>
      <dc:creator>Akshay_93</dc:creator>
      <dc:date>2020-08-13T00:26:32Z</dc:date>
    </item>
    <item>
      <title>Re: Macro causing to show the jobs status to FAILED</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Macro-causing-to-show-the-jobs-status-to-FAILED/m-p/676535#M19667</link>
      <description>Could you add a SYMEXIST check before trying to set srv in your autoexec?&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://go.documentation.sas.com/?docsetId=mcrolref&amp;amp;docsetTarget=n1j6dly37s4370n14hdiznpbxso4.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank"&gt;https://go.documentation.sas.com/?docsetId=mcrolref&amp;amp;docsetTarget=n1j6dly37s4370n14hdiznpbxso4.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;</description>
      <pubDate>Thu, 13 Aug 2020 16:17:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Macro-causing-to-show-the-jobs-status-to-FAILED/m-p/676535#M19667</guid>
      <dc:creator>gwootton</dc:creator>
      <dc:date>2020-08-13T16:17:38Z</dc:date>
    </item>
    <item>
      <title>Re: Macro causing to show the jobs status to FAILED</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Macro-causing-to-show-the-jobs-status-to-FAILED/m-p/676604#M19671</link>
      <description>&lt;P&gt;So is the SAS PC Files Server running on each of the VMs hosting EG? If it is running on the same computer as EG then I don't think you need to specify the SERVER= option.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Aug 2020 21:26:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Macro-causing-to-show-the-jobs-status-to-FAILED/m-p/676604#M19671</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2020-08-13T21:26:00Z</dc:date>
    </item>
    <item>
      <title>Re: Macro causing to show the jobs status to FAILED</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Macro-causing-to-show-the-jobs-status-to-FAILED/m-p/677600#M19699</link>
      <description>Yes, we've it running on each. As we're importing/exporting Office files on different machines we're using SERVER=option.&lt;BR /&gt;&lt;BR /&gt;Correct me if I'm wrong!</description>
      <pubDate>Tue, 18 Aug 2020 19:21:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Macro-causing-to-show-the-jobs-status-to-FAILED/m-p/677600#M19699</guid>
      <dc:creator>Akshay_93</dc:creator>
      <dc:date>2020-08-18T19:21:26Z</dc:date>
    </item>
    <item>
      <title>Re: Macro causing to show the jobs status to FAILED</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Macro-causing-to-show-the-jobs-status-to-FAILED/m-p/677656#M19704</link>
      <description>&lt;P&gt;AFAIK, the SERVER= option is to identify the Windows server the SAS PC Files Server is running on, not the server where the Office files are stored. Those can be accessed by any accessible file share.from the&amp;nbsp;Windows server the SAS PC Files Server is running on. In your case it would be a lot simpler to have the&amp;nbsp;SAS PC Files Server installed on one Windows server and the SERVER= option can then be hardcoded. There is no reason this shouldn't work in a VM setup like you have.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Aug 2020 22:13:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Macro-causing-to-show-the-jobs-status-to-FAILED/m-p/677656#M19704</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2020-08-18T22:13:56Z</dc:date>
    </item>
    <item>
      <title>Re: Macro causing to show the jobs status to FAILED</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Macro-causing-to-show-the-jobs-status-to-FAILED/m-p/678214#M19717</link>
      <description>&lt;P&gt;Hey &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/78975"&gt;@gwootton&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Tried SYMEXIST and we still see the warning message.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%global srv;
data _null_;
     if symexist("_CLIENTMACHINE") then
        call symput("srv",compress("&amp;amp;_CLIENTMACHINE"));
     else
        call symput('abc','abc');
     run; &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Any suggestions on how to get rid of "_CLIENTMACHINE"?&lt;/P&gt;</description>
      <pubDate>Thu, 20 Aug 2020 18:45:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Macro-causing-to-show-the-jobs-status-to-FAILED/m-p/678214#M19717</guid>
      <dc:creator>Akshay_93</dc:creator>
      <dc:date>2020-08-20T18:45:30Z</dc:date>
    </item>
    <item>
      <title>Re: Macro causing to show the jobs status to FAILED</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Macro-causing-to-show-the-jobs-status-to-FAILED/m-p/678227#M19718</link>
      <description>&lt;P&gt;How about:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%global srv;
%macro clientmachine;
%if %symexist(_clientmachine) %then %let srv=&amp;amp;_clientmachine;
%mend;
%clientmachine;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 20 Aug 2020 19:20:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Macro-causing-to-show-the-jobs-status-to-FAILED/m-p/678227#M19718</guid>
      <dc:creator>gwootton</dc:creator>
      <dc:date>2020-08-20T19:20:16Z</dc:date>
    </item>
    <item>
      <title>Re: Macro causing to show the jobs status to FAILED</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Macro-causing-to-show-the-jobs-status-to-FAILED/m-p/678252#M19719</link>
      <description>&lt;P&gt;Almost worked!!!&lt;/P&gt;&lt;P&gt;We no longer see the WARNING message in the logs, but when ran a &lt;STRONG&gt;%put &amp;amp;srv;&amp;nbsp;&lt;/STRONG&gt;the client machine is read as blank by which we're failing to import/export Office files.&lt;/P&gt;&lt;P&gt;Here is the error we get when trying to exporting a spreadsheet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;30         PROC EXPORT DATA= test
31         OUTFILE= "\\location\abc\pqr\xyz\excel test.xlsb"
32         DBMS=EXCELCS REPLACE;
33         sheet="test";
NOTE: The previous statement has been deleted.
34         port=9621;
35         server=&amp;amp;srv;
                      _
                      22
ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string.  

36         serveruser="&amp;amp;da_lanid";
37         serverpass="&amp;amp;da_pwd";
38         RUN;

ERROR: Failed to connect to the Server: NAME.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE EXPORT used (Total process time):&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Aug 2020 20:04:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Macro-causing-to-show-the-jobs-status-to-FAILED/m-p/678252#M19719</guid>
      <dc:creator>Akshay_93</dc:creator>
      <dc:date>2020-08-20T20:04:51Z</dc:date>
    </item>
    <item>
      <title>Re: Macro causing to show the jobs status to FAILED</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Macro-causing-to-show-the-jobs-status-to-FAILED/m-p/678261#M19720</link>
      <description>It sounds like the variable _CLIENTMACHINE is not set when the macro runs, so it isn't setting the value.&lt;BR /&gt;Since _CLIENTMACHINE is being set by the client (Enterprise Guide for example) it wouldn't be present until after the autoexec files on the server are run.&lt;BR /&gt;If you call the %clientmachine macro again before your code does it function?</description>
      <pubDate>Thu, 20 Aug 2020 20:21:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Macro-causing-to-show-the-jobs-status-to-FAILED/m-p/678261#M19720</guid>
      <dc:creator>gwootton</dc:creator>
      <dc:date>2020-08-20T20:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: Macro causing to show the jobs status to FAILED</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Macro-causing-to-show-the-jobs-status-to-FAILED/m-p/678271#M19721</link>
      <description>&lt;P&gt;Does it work correctly if you hardcode the server name?&lt;/P&gt;</description>
      <pubDate>Thu, 20 Aug 2020 21:16:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Macro-causing-to-show-the-jobs-status-to-FAILED/m-p/678271#M19721</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2020-08-20T21:16:37Z</dc:date>
    </item>
  </channel>
</rss>

