<?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: How to use parameters (like macro variables) in the path of SASEguide's imported task files in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-parameters-like-macro-variables-in-the-path-of/m-p/253352#M17808</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I known all this stuff and alternatives to export SAS data to Excel, but my question is: how to use variables (SAS or not SAS...) to use parameters in the imported files path of the SASEguide task.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I do not find any solution on my side, that's why I've asked to the community, hoping somebody already worked and addressed this need...&lt;/P&gt;
&lt;P&gt;If there no way, I'll post it in the SASWare Ballot...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thank you&lt;/P&gt;</description>
    <pubDate>Tue, 01 Mar 2016 06:26:54 GMT</pubDate>
    <dc:creator>PascalMaurice</dc:creator>
    <dc:date>2016-03-01T06:26:54Z</dc:date>
    <item>
      <title>How to use parameters (like macro variables) in the path of SASEguide's imported task files</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-parameters-like-macro-variables-in-the-path-of/m-p/253137#M17786</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We have been using macro-variables to parameterize the paths of the imported files, for example:&lt;/P&gt;
&lt;P&gt;%let year = 2015 ;&lt;/P&gt;
&lt;P&gt;filename in "&amp;amp;rootIn./myWorkBood&amp;amp;year..xls" ;&lt;/P&gt;
&lt;P&gt;proc import...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;now is we want to replace the old timer code by a brand new SASEguide task to import the data from the Excel Workbook, I do not find any way to get a variable known as well as by SASEguide as my sas Code, like&amp;nbsp;_CLIENTPROJECTPATH&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;any good idea ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thank you&lt;/P&gt;
&lt;P&gt;Pascal&lt;/P&gt;</description>
      <pubDate>Mon, 29 Feb 2016 09:18:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-parameters-like-macro-variables-in-the-path-of/m-p/253137#M17786</guid>
      <dc:creator>PascalMaurice</dc:creator>
      <dc:date>2016-02-29T09:18:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to use parameters (like macro variables) in the path of SASEguide's imported task files</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-parameters-like-macro-variables-in-the-path-of/m-p/253141#M17787</link>
      <description>&lt;P&gt;In a project, create a process flow called Autoexec, and define basic (mostly static) macro variables in a code there.&lt;/P&gt;
&lt;P&gt;Use user-defined prompts to supply the more dynamic macro variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How do you get the Excel workbook to the UNIX server?&lt;/P&gt;</description>
      <pubDate>Mon, 29 Feb 2016 09:40:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-parameters-like-macro-variables-in-the-path-of/m-p/253141#M17787</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-02-29T09:40:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to use parameters (like macro variables) in the path of SASEguide's imported task files</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-parameters-like-macro-variables-in-the-path-of/m-p/253161#M17790</link>
      <description>&lt;P&gt;Hi Kurt,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;the question is associated with the SEGuide task, not sas code, and in the SEGuide task you cannot (or I do not find how to) use macro-variables in the path of the Excel Workbook to be imported:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Feb 2016 12:29:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-parameters-like-macro-variables-in-the-path-of/m-p/253161#M17790</guid>
      <dc:creator>PascalMaurice</dc:creator>
      <dc:date>2016-02-29T12:29:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to use parameters (like macro variables) in the path of SASEguide's imported task files</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-parameters-like-macro-variables-in-the-path-of/m-p/253163#M17791</link>
      <description>&lt;P&gt;That is because the read of the Excel file is not done in SAS, but in the Enterprise Guide. Since EG is not able to run/interpret SAS code on its own, it can't take the contents of macro variables (which only exist in the workspace server) into account.&lt;/P&gt;
&lt;P&gt;When you import the Excel file, EG uses a Microsoft-supplied module to convert the Excel sheet into text data, transfers that to the workpsace server, and then runs import code to read that text file in the workspace server.&lt;/P&gt;
&lt;P&gt;The filename of the Excel file can not be parameterized, AFAIK.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Feb 2016 12:46:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-parameters-like-macro-variables-in-the-path-of/m-p/253163#M17791</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-02-29T12:46:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to use parameters (like macro variables) in the path of SASEguide's imported task files</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-parameters-like-macro-variables-in-the-path-of/m-p/253166#M17792</link>
      <description>&lt;P&gt;But sometimes there is some things passed from SEGuide to SAS Workspace, for example the SAS Workspace knows where the SASEguide project has been saved.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and ok, there is no&amp;nbsp;SAS macro-variable that can be used in this task, is there another way to provide parameters to be used in the path of the files imported ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thank you&lt;/P&gt;</description>
      <pubDate>Mon, 29 Feb 2016 12:51:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-parameters-like-macro-variables-in-the-path-of/m-p/253166#M17792</guid>
      <dc:creator>PascalMaurice</dc:creator>
      <dc:date>2016-02-29T12:51:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to use parameters (like macro variables) in the path of SASEguide's imported task files</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-parameters-like-macro-variables-in-the-path-of/m-p/253169#M17793</link>
      <description>&lt;P&gt;How to automate the ETL process for Excel data depends very much on the topology of your SAS/BI setup.&lt;/P&gt;
&lt;P&gt;Do you have a single machine, or a client-server? If client-server, what is the operating system of the server, and how is it interconnected with the rest of your IT landscape?&lt;/P&gt;
&lt;P&gt;Where does Excel data reside? On clients, or on network drives?&lt;/P&gt;</description>
      <pubDate>Mon, 29 Feb 2016 12:59:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-parameters-like-macro-variables-in-the-path-of/m-p/253169#M17793</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-02-29T12:59:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to use parameters (like macro variables) in the path of SASEguide's imported task files</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-parameters-like-macro-variables-in-the-path-of/m-p/253172#M17794</link>
      <description>&lt;P&gt;In addition to &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser﻿&lt;/a&gt;'s questions, do you have SAS/ACCESS to PC Files?&lt;/P&gt;</description>
      <pubDate>Mon, 29 Feb 2016 13:18:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-parameters-like-macro-variables-in-the-path-of/m-p/253172#M17794</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2016-02-29T13:18:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to use parameters (like macro variables) in the path of SASEguide's imported task files</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-parameters-like-macro-variables-in-the-path-of/m-p/253352#M17808</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I known all this stuff and alternatives to export SAS data to Excel, but my question is: how to use variables (SAS or not SAS...) to use parameters in the imported files path of the SASEguide task.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I do not find any solution on my side, that's why I've asked to the community, hoping somebody already worked and addressed this need...&lt;/P&gt;
&lt;P&gt;If there no way, I'll post it in the SASWare Ballot...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thank you&lt;/P&gt;</description>
      <pubDate>Tue, 01 Mar 2016 06:26:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-parameters-like-macro-variables-in-the-path-of/m-p/253352#M17808</guid>
      <dc:creator>PascalMaurice</dc:creator>
      <dc:date>2016-03-01T06:26:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to use parameters (like macro variables) in the path of SASEguide's imported task files</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-parameters-like-macro-variables-in-the-path-of/m-p/253354#M17809</link>
      <description>&lt;P&gt;Pascal,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I do is to:&lt;/P&gt;
&lt;P&gt;1. &amp;nbsp;Export my spreadsheet as Tab delimited text. &amp;nbsp;I have a VBA macro to do this if you're interested.&lt;/P&gt;
&lt;P&gt;2. &amp;nbsp;I then import the data into SAS EG, but I mark the task as runnable outside SAS. &amp;nbsp;I don't have EG open in front of me, but there's a check box that says something like that. &amp;nbsp;You *must* check the box.&lt;/P&gt;
&lt;P&gt;3. &amp;nbsp;I then take the generated code and cut and paste it into a SAS program inside EG.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sounds a little convoluted, but once you've exported the code, it just runs and runs, and needs no intervention if you've set your macros up correctly. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;</description>
      <pubDate>Tue, 01 Mar 2016 06:39:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-parameters-like-macro-variables-in-the-path-of/m-p/253354#M17809</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2016-03-01T06:39:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to use parameters (like macro variables) in the path of SASEguide's imported task files</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-parameters-like-macro-variables-in-the-path-of/m-p/253475#M17814</link>
      <description>&lt;P&gt;I'm not an expert on custom tasks, but...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would it be possible to run a small "invisible" SAS program from your custom task, that would get the values of the macro variables from SAS and then return them to your custom task for you to use?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;</description>
      <pubDate>Tue, 01 Mar 2016 16:02:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-parameters-like-macro-variables-in-the-path-of/m-p/253475#M17814</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2016-03-01T16:02:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to use parameters (like macro variables) in the path of SASEguide's imported task files</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-parameters-like-macro-variables-in-the-path-of/m-p/253479#M17815</link>
      <description>&lt;P&gt;If you can store your import file (Excel) in the same path as your project (or in a subfolder along side of it), then you can use Relative File paths in SAS Enterprise Guide to keep your project portable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See "How to enable relative file references" section &lt;A href="http://blogs.sas.com/content/sasdummy/2012/10/29/scm-with-sas-eg/" target="_self"&gt;in this blog post about source control&lt;/A&gt;. &amp;nbsp;Excerpted here:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4&gt;How to enable relative file references&lt;/H4&gt;
&lt;P&gt;SAS Enterprise Guide allows you to link in SAS programs and external data files (such as Excel or CSV files), so you don't have to lock up all of your content in the project (EGP) file. When working with source control, you need to enable one additional trick: tell SAS Enterprise Guide to treat these file references as &lt;EM&gt;relative&lt;/EM&gt; paths. (There's nothing like an absolute file path -- specific to your machine -- for messing up your collaboration effort.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.sas.com/content/sasdummy/files/2012/10/scm_relpath.png" target="_blank"&gt;&lt;IMG class="alignright size-full wp-image-2700" src="http://blogs.sas.com/content/sasdummy/files/2012/10/scm_relpath.png" border="0" alt="" width="296" height="117" /&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This setting is maintained &lt;STRONG&gt;per project&lt;/STRONG&gt;. To set it:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Select File-&amp;gt;Project Properties. The Properties window appears.&lt;/LI&gt;
&lt;LI&gt;Select the File References tab.&lt;/LI&gt;
&lt;LI&gt;Check the box: "Use paths relative to the project for programs and importable files"&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Tue, 01 Mar 2016 16:12:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-parameters-like-macro-variables-in-the-path-of/m-p/253479#M17815</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2016-03-01T16:12:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to use parameters (like macro variables) in the path of SASEguide's imported task files</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-parameters-like-macro-variables-in-the-path-of/m-p/253702#M17821</link>
      <description>&lt;P&gt;Hi Tom&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;perhaps some idea to dig in, I'll work on it when some time to do it&amp;nbsp;and tell you my thoughts&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thank you&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2016 06:40:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-parameters-like-macro-variables-in-the-path-of/m-p/253702#M17821</guid>
      <dc:creator>PascalMaurice</dc:creator>
      <dc:date>2016-03-02T06:40:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to use parameters (like macro variables) in the path of SASEguide's imported task files</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-parameters-like-macro-variables-in-the-path-of/m-p/253703#M17822</link>
      <description>&lt;P&gt;Hi Jim&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;there si some thing you cannot manage is the part of the importing task that extract the data from the Excel or csv file and then upload them on the server to be available to the sas data step.&lt;/P&gt;
&lt;P&gt;You can then use a macro to build the full pathname of the transfered file, but not to build the filename of the Excel or csv file&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thank you&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2016 06:43:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-parameters-like-macro-variables-in-the-path-of/m-p/253703#M17822</guid>
      <dc:creator>PascalMaurice</dc:creator>
      <dc:date>2016-03-02T06:43:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to use parameters (like macro variables) in the path of SASEguide's imported task files</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-parameters-like-macro-variables-in-the-path-of/m-p/253704#M17823</link>
      <description>&lt;P&gt;Hi Chris,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;nice to see you on my track !&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;your proposal is perhaps the beginning of a solution for the path of the file to be imported, now we have to find something to manage the file name itself: for example you have a myWorkbook_2015.xls file and you want to make something like myWorkbook_&amp;amp;year..xls because the name of your excel file change over the year.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thank you&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2016 06:50:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-parameters-like-macro-variables-in-the-path-of/m-p/253704#M17823</guid>
      <dc:creator>PascalMaurice</dc:creator>
      <dc:date>2016-03-02T06:50:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to use parameters (like macro variables) in the path of SASEguide's imported task files</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-parameters-like-macro-variables-in-the-path-of/m-p/253884#M17829</link>
      <description>&lt;P&gt;PascalMaurice,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have you seen Chris Hemedinger's &lt;A href="http://blogs.sas.com/content/sasdummy/2012/12/06/copy-files-in-sas-eg/" target="_self"&gt;Copy Files Task&lt;/A&gt;? &amp;nbsp;It's super useful. &amp;nbsp;I use it to upload/download files all the times using macro variables inside my program(s). &amp;nbsp;Let me see if I can find an example.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2016 17:02:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-parameters-like-macro-variables-in-the-path-of/m-p/253884#M17829</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2016-03-02T17:02:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to use parameters (like macro variables) in the path of SASEguide's imported task files</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-parameters-like-macro-variables-in-the-path-of/m-p/253889#M17830</link>
      <description>&lt;P&gt;Here's something of an example of controlling file names for upload/download:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Step 1: &amp;nbsp;I have a macro that generates one to many files based on the data available at the time. &amp;nbsp;I'm using data from within a SAS data set to name my output files, but you could use date macros. &amp;nbsp;I'm downloading, but this technique can also be used for uploading.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%MACRO  Create_Files_By_Package (Package_ID= );
	PROC  EXPORT  
		DATA=WORK.Fltrd_Assn_Mtrs_5DayIRR_LE30
		(WHERE=(Package_ID  =  "&amp;amp;Package_ID"))
		OUTFILE="/sasapps/soc/Package_Assigned_Meters/Mtrs_5DayIRR_LE30_&amp;amp;Package_ID..csv"  
		DBMS=CSV
		REPLACE
		;
	RUN;

	%Check_SYSERR;

%MEND;


/**  For each unique Package_ID (as identified by FIRST.), call a macro to       				**/
/**  create a CSV file from the SAS dataset for just that Package_ID             				**/
DATA  _NULL_;
SET   WORK.Fltrd_Assn_Mtrs_5DayIRR_LE30;
  BY  Package_ID;

	IF  FIRST.Package_ID  THEN
		CALL  EXECUTE ('%Create_Files_By_Package(Package_ID='||strip(Package_ID)||');');
		
RUN;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Step 2: &amp;nbsp;I set some macro variables to control the download and then execute the Copy Files Task in my Enterprise Guide workflow.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%LET  Datafile=Mtrs_5DayIRR*;
%LET  Download_To=C:\Users\barbourj\Documents\Tech\SAS\Output;
%LET  Download_From=/sasapps/soc/Package_Assigned_Meters/&amp;amp;Datafile..csv;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Note that here I'm using a wildcard so that all files matching&amp;nbsp;Mtrs_5DayIRR* will be downloaded. &amp;nbsp;For example, files&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Mtrs_5DayIRR_LE30_WS2015_11.csv&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;Mtrs_5DayIRR_LE30_WS2015_12.csv&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;Mtrs_5DayIRR_LE30_WS2016_01.csv&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;Mtrs_5DayIRR_LE30_WS2016_02.csv&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;would all be downloaded.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Everything in my example is driven by the data in a SAS data set, but you could set yours up to be by date, time, etc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2016 17:25:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-parameters-like-macro-variables-in-the-path-of/m-p/253889#M17830</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2016-03-02T17:25:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to use parameters (like macro variables) in the path of SASEguide's imported task files</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-parameters-like-macro-variables-in-the-path-of/m-p/254059#M17843</link>
      <description>&lt;P&gt;Hi Jim&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thank you, I think your proposal could be the solution, until we find macro variables support in the SASEguide Import data task. I've opened another track to work on a translation of the Copy Files Task from Chris for my French Customers. And start to build a demo to show them they can use this Custom Task to answer their need.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks again Jim&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2016 05:24:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-parameters-like-macro-variables-in-the-path-of/m-p/254059#M17843</guid>
      <dc:creator>PascalMaurice</dc:creator>
      <dc:date>2016-03-03T05:24:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to use parameters (like macro variables) in the path of SASEguide's imported task files</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-parameters-like-macro-variables-in-the-path-of/m-p/254113#M17847</link>
      <description>&lt;P&gt;You are welcome, and good luck.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One thing that might be tricky. &amp;nbsp;You will notice that I'm passing a normal SAS variable in my CALL EXECUTE statement. &amp;nbsp;If you pass in a macro variable, there are conditions where it may not work properly due to the timing of the way the macro facility works in SAS. &amp;nbsp;This is particularly true if there are macro variables inside your macro logic that are derived from the passed macro variable. &amp;nbsp;In that case instead of:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA  _NULL_;
SET   WORK.Fltrd_Assn_Mtrs_5DayIRR_LE30;
  BY  Package_ID;

	IF  FIRST.Package_ID  THEN
		CALL  EXECUTE ('%Create_Files_By_Package(Package_ID='||strip(Package_ID)||');');
		
RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You might want to try the following:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA  _NULL_;
SET   WORK.Fltrd_Assn_Mtrs_5DayIRR_LE30;
  BY  Package_ID;

	IF  FIRST.Package_ID  THEN
		CALL  EXECUTE (%NRSTR('%Create_Files_By_Package(Package_ID='||strip(&amp;amp;Working_Directory&amp;amp;Run_Date)||');'));
		
RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I am not at work right now, so I don't have an example in front of me, but I think I have the syntax of the command right. &amp;nbsp;The %NRSTR tells the macro facility &lt;EM&gt;not&lt;/EM&gt; to resolve the passed macro variables and immediately begin execution. &amp;nbsp;Instead, the variables are resolved, then any macro variables depending on the passed macro variables are resolved, and then execution begins.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Again, good luck,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;P.S. &amp;nbsp;If your data step that calls the macro is a long running step, you might want to use DOSUBL instead of CALL EXECUTE. &amp;nbsp; The difference is that when using CALL EXECUTE, your code will not be executed until&amp;nbsp;&lt;EM&gt;after&lt;/EM&gt; your data step finishes whereas with DOSUBL, your code should begin immediate execution. &amp;nbsp;I have not used DOSUBL a great deal but from reading Chris Hemedinger's blog, it appears to hold great promise. &amp;nbsp;If you have a long running data step driving your CALL EXECUTE statements, you might want to experiment with DOSUBL.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2016 10:23:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-parameters-like-macro-variables-in-the-path-of/m-p/254113#M17847</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2016-03-03T10:23:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to use parameters (like macro variables) in the path of SASEguide's imported task files</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-parameters-like-macro-variables-in-the-path-of/m-p/254264#M17854</link>
      <description>&lt;P&gt;PascalMaurice:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm at work now. &amp;nbsp;Here (below) is a cut and paste from a functioning program. &amp;nbsp;This may be helpful in terms of the syntax which can be a bit tricky. &amp;nbsp;The syntax I included above isn't quite right. &amp;nbsp;Better to use this actual working code as an example. &amp;nbsp;This code reads through a list of tabs (worksheets) exported as text from two different Excel workbooks, importing each tab in turn (163 of them for each Excel file) into SAS. &amp;nbsp;It compares each of the two sets tabs, a 100% sample vs. a 1% sample of data, looking for significant differences in the distribution of values and writes a report.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA _NULL_;&lt;BR /&gt; SET WORK.Tab_Names;&lt;BR /&gt;&lt;BR /&gt; CALL EXECUTE ('%NRSTR(%Process_Excel_Tab(Tab_Name=' || strip(TabName) || ');)'); &lt;BR /&gt;&lt;BR /&gt;RUN;&lt;BR /&gt;%Check_SYSERR;&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Inside the macro, I set up a number of parameters based on the name of the Tab that is passed into the macro. &amp;nbsp;These parameters then control a variety of programs that process data based on the parameters. &amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%MACRO	Process_Excel_Tab(Tab_Name=);
%LET	DeBug			=	*;
%LET	Data_Type		=	100;
%LET	FileIn			=	&amp;amp;DataLib&amp;amp;Tab_Name._&amp;amp;Data_Type;
%LET	Data_Format		=	txt;
%LET	Report_Title	=	&amp;amp;Tab_Name._&amp;amp;Data_Type;
OPTIONS	SOURCE2;
%INCLUDE "&amp;amp;IncLib.Import_Program.sas";
OPTIONS	NOSOURCE2;
%*Check_SYSERR;

TITLE	"&amp;amp;Report_Title";
PROC	CONTENTS	DATA=Out.Percent_&amp;amp;Data_Type	POSITION;	
RUN		&amp;amp;Control_Value;	
%Check_SYSERR;

PROC	PRINT		DATA=Out.Percent_&amp;amp;Data_Type;			
RUN		&amp;amp;Control_Value;	
%Check_SYSERR;

/*--------------------------------------------------------------------------*/

%LET	DeBug			=	*;
%LET	Data_Type		=	1;
%LET	FileIn			=	&amp;amp;DataLib&amp;amp;Tab_Name._&amp;amp;Data_Type;
%LET	Data_Format		=	txt;
%LET	Report_Title	=	&amp;amp;Tab_Name._&amp;amp;Data_Type;
OPTIONS	SOURCE2;
%INCLUDE "&amp;amp;IncLib.Import_Program.sas";
OPTIONS	NOSOURCE2;
%*Check_SYSERR;

TITLE	"&amp;amp;Report_Title";
PROC	CONTENTS	DATA=Out.Percent_&amp;amp;Data_Type	POSITION;	
RUN		&amp;amp;Control_Value;	
%Check_SYSERR;

PROC	PRINT		DATA=Out.Percent_&amp;amp;Data_Type;			
RUN  &amp;amp;Control_Value;	
%Check_SYSERR;

/*--------------------------------------------------------------------------*/

%LET	DeBug			=	*;
%LET	Data_Type1		=	1;
%LET	Data_Type100	=	100;
%LET	HTMLout			=   &amp;amp;HTMLlib&amp;amp;Tab_Name._&amp;amp;Data_Type1._Percent_vs_&amp;amp;Data_Type100..html;
OPTIONS	SOURCE2;
%INCLUDE "&amp;amp;IncLib.Compare_Program.sas";
OPTIONS	NOSOURCE2;
%*Check_SYSERR;

/*--------------------------------------------------------------------------*/

TITLE  "&amp;amp;Tab_Name. -- &amp;amp;Data_Type1. Percent vs. &amp;amp;Data_Type100. Percent";
PROC	CONTENTS  	DATA=Out.Percent_&amp;amp;Data_Type100._Final  POSITION;
RUN		&amp;amp;Control_Value;	
%Check_SYSERR;

ODS  	HTML   	BODY="&amp;amp;HTMLout";
PROC	PRINT	DATA=Out.Percent_&amp;amp;Data_Type100._Final;
	ID	Range_Start  Range_End	;
RUN		&amp;amp;Control_Value;	
%Check_SYSERR;

ODS	 	HTML 	CLOSE;

PROC  DELETE  DATA=Out.Percent_&amp;amp;Data_Type1;
RUN   &amp;amp;Control_Value;	
%Check_SYSERR;

PROC  DELETE  DATA=Out.Percent_&amp;amp;Data_Type100;
RUN   &amp;amp;Control_Value;	
%Check_SYSERR;

PROC  DELETE  DATA=Out.Percent_&amp;amp;Data_Type100._Final;
RUN   &amp;amp;Control_Value;	
%Check_SYSERR;

%MEND	Process_Excel_Tab;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I wrote this code in a hurry in one night, so it's not the most elegant, but perhaps this may be helpful as something of an example how to work with macro variables while processing tabs exported as text from Excel. &amp;nbsp;I apologize if you already know all of this. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2016 17:53:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-parameters-like-macro-variables-in-the-path-of/m-p/254264#M17854</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2016-03-03T17:53:09Z</dc:date>
    </item>
  </channel>
</rss>

