<?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 Trigger an MS Access macro in SAS in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Trigger-an-MS-Access-macro-in-SAS/m-p/460106#M14264</link>
    <description>&lt;P&gt;Hello community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I work in EG on a SASapp Server, large data queries off a data warehouse.&amp;nbsp;&amp;nbsp;I also house additional data sources on servers that are not connected to the SASapp environment.&amp;nbsp; I have an MS Access database that I export data from SAS into, and the Access database has a macro in it that I want to automate triggering in SAS.&amp;nbsp; Does anyone have a good resource on triggering an Access macro in SAS code?&amp;nbsp; I would love to automate this step of a process without going in to Access and clicking run macro, but I just can't figure it out.&amp;nbsp; Thanks in advance!&lt;/P&gt;</description>
    <pubDate>Fri, 04 May 2018 17:14:52 GMT</pubDate>
    <dc:creator>PatricktLeon</dc:creator>
    <dc:date>2018-05-04T17:14:52Z</dc:date>
    <item>
      <title>Trigger an MS Access macro in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Trigger-an-MS-Access-macro-in-SAS/m-p/460106#M14264</link>
      <description>&lt;P&gt;Hello community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I work in EG on a SASapp Server, large data queries off a data warehouse.&amp;nbsp;&amp;nbsp;I also house additional data sources on servers that are not connected to the SASapp environment.&amp;nbsp; I have an MS Access database that I export data from SAS into, and the Access database has a macro in it that I want to automate triggering in SAS.&amp;nbsp; Does anyone have a good resource on triggering an Access macro in SAS code?&amp;nbsp; I would love to automate this step of a process without going in to Access and clicking run macro, but I just can't figure it out.&amp;nbsp; Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Fri, 04 May 2018 17:14:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Trigger-an-MS-Access-macro-in-SAS/m-p/460106#M14264</guid>
      <dc:creator>PatricktLeon</dc:creator>
      <dc:date>2018-05-04T17:14:52Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger an MS Access macro in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Trigger-an-MS-Access-macro-in-SAS/m-p/460139#M14265</link>
      <description>&lt;P&gt;Unfortunately I think either a DDE or VBS script is your best bet.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First check if you have XCMD option enabled so that you can pass commands to your system via an X/%SYSEXEC/CALL SYSTEM command.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would probably &lt;A href="https://stackoverflow.com/questions/20403424/script-to-open-access-database-run-macro-and-persist-access-instance" target="_self"&gt;find a VBS script&lt;/A&gt; that could do it and then execute the script via SAS.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 May 2018 19:03:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Trigger-an-MS-Access-macro-in-SAS/m-p/460139#M14265</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-05-04T19:03:06Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger an MS Access macro in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Trigger-an-MS-Access-macro-in-SAS/m-p/460142#M14266</link>
      <description>&lt;P&gt;You said that SASApp isn't connect to your MS Access environment, so this probably won't help you --&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;'s suggestion might be best.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But&amp;nbsp;&lt;STRONG&gt;if you did&lt;/STRONG&gt; have SAS/ACCESS to OLEDB or ODBC, you could use SAS to talk to MS Access, and then you could use a&amp;nbsp;&lt;STRONG&gt;stored procedure&lt;/STRONG&gt; in the database to trigger this work.&amp;nbsp; You can run a database stored procedure via the EXECUTE statement in PROC SQL with an explicit passthrough connection.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;​
 connect to oledb ​
     ( provider="Microsoft.Jet.OLEDB.4.0"​
       properties=('data source'='C:\SAS\Data\youdatabase.mdb')​
     ) ;​
  execute (execute sasdata) ​
    by oledb;​
 disconnect from oledb;​
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 04 May 2018 19:17:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Trigger-an-MS-Access-macro-in-SAS/m-p/460142#M14266</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2018-05-04T19:17:14Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger an MS Access macro in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Trigger-an-MS-Access-macro-in-SAS/m-p/460150#M14267</link>
      <description>&lt;P&gt;I would avoid DDE/VBS (both are deprecated even though they continue to work)&amp;nbsp; and use PowerShell instead. You may or may not be able to use PowerShell but is worth trying. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;EG can also take add-ins using a .NET interface (I use C#). The add-ins are easy to do. See Chris' book on them at:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.amazon.com/Custom-Tasks-Enterprise-Guide-Microsoft/dp/1607646781" target="_blank"&gt;https://www.amazon.com/Custom-Tasks-Enterprise-Guide-Microsoft/dp/1607646781&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 May 2018 19:53:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Trigger-an-MS-Access-macro-in-SAS/m-p/460150#M14267</guid>
      <dc:creator>AlanC</dc:creator>
      <dc:date>2018-05-04T19:53:50Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger an MS Access macro in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Trigger-an-MS-Access-macro-in-SAS/m-p/473190#M14849</link>
      <description>&lt;P&gt;Hi Chris,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since I don't have X-CMD access in this system, I wanted to try to execute the stored procedure via the ODBC route you mentioned.&amp;nbsp; However, will this be possible to execute from EG on a SASApp server, put trigger the local Access database on a windows local connection?&amp;nbsp; Would you be willing to share the syntax of that, similar to the OLEDB code you so kindly shared?&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jun 2018 22:42:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Trigger-an-MS-Access-macro-in-SAS/m-p/473190#M14849</guid>
      <dc:creator>PatricktLeon</dc:creator>
      <dc:date>2018-06-25T22:42:27Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger an MS Access macro in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Trigger-an-MS-Access-macro-in-SAS/m-p/473330#M14851</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/202665"&gt;@PatricktLeon&lt;/a&gt;&amp;nbsp;Are you saying that you have SAS/ACCESS to ODBC on your SASApp system, and you want to connect back to a Microsoft Access database file on your local PC?&amp;nbsp; I don't have an example to support that.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since your Microsoft Access database is not a running database process, but simply a file that can be accessed using Microsoft data APIs (driven by ODBC in this case), I'm not sure that this approach is feasible.&amp;nbsp; SAS is running on your remote server, and assuming it's also a Windows machine (that has the software to drive MS Access actions), it would need to open/access your database file from where it's running, which might result in a large transfer of information to the server just to trigger these actions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you're looking to automate an MS Access action based on content from the SAS server, you might look into a different scripting method like PowerShell.&amp;nbsp; You can use PowerShell to connect to SAS, run code, get files, and then also to drive MS Access.&amp;nbsp; &lt;A href="https://blogs.sas.com/content/sasdummy/tag/powershell/" target="_self"&gt;I have several PowerShell-SAS examples&lt;/A&gt;.&amp;nbsp; PowerShell-MS Access examples are easy to find with internet search.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jun 2018 12:08:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Trigger-an-MS-Access-macro-in-SAS/m-p/473330#M14851</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2018-06-26T12:08:08Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger an MS Access macro in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Trigger-an-MS-Access-macro-in-SAS/m-p/473547#M14855</link>
      <description>&lt;P&gt;Hi Chris,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes that is the correct scenario you are describing.&amp;nbsp; I have SAS/ACCESS to ODBC on&amp;nbsp;my SASApp system, and&amp;nbsp;I want to connect back to a Microsoft Access database file on my local PC.&amp;nbsp; I appreciate your suggestions and I'm a little frustrated that I'm working in a server multi-verse where they can't all talk to each other directly.&amp;nbsp; I downloaded your System Command(VB) add-in for EG; I can execute script to see the local directory (C: )&amp;nbsp;that contains an Access database.&amp;nbsp; The add-in log shows the file in the local directory correctly, but I haven't ironed out the script to trigger the Access macro.&amp;nbsp; Do you think it might be possible?&amp;nbsp; Thank you so much for your advanced insight!&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jun 2018 21:10:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Trigger-an-MS-Access-macro-in-SAS/m-p/473547#M14855</guid>
      <dc:creator>PatricktLeon</dc:creator>
      <dc:date>2018-06-26T21:10:53Z</dc:date>
    </item>
  </channel>
</rss>

