<?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 pass macro parameter to File reader transformation to read latest csv file? in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-pass-macro-parameter-to-File-reader-transformation-to/m-p/82876#M764</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;H1&gt;&lt;A _jive_internal="true" href="https://communities.sas.com/message/129597#129597"&gt;How to pass macro parameter to File reader transformation to read latest csv file?&lt;/A&gt; &lt;/H1&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please I have this question in SAS DI 3.4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Jun 2012 13:15:00 GMT</pubDate>
    <dc:creator>SYN</dc:creator>
    <dc:date>2012-06-14T13:15:00Z</dc:date>
    <item>
      <title>How to pass macro parameter to File reader transformation to read latest csv file?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-pass-macro-parameter-to-File-reader-transformation-to/m-p/82875#M763</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;I have one situation,&lt;/P&gt;&lt;P&gt;I have 3 different .CSV files and using file reader tranformation I have build the job for all 3 csv files.&lt;/P&gt;&lt;P&gt;I want to pass latest files every time using my user written code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please help me how to pass macro parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any simple way please let me know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2012 13:09:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-pass-macro-parameter-to-File-reader-transformation-to/m-p/82875#M763</guid>
      <dc:creator>SYN</dc:creator>
      <dc:date>2012-06-14T13:09:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass macro parameter to File reader transformation to read latest csv file?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-pass-macro-parameter-to-File-reader-transformation-to/m-p/82876#M764</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;H1&gt;&lt;A _jive_internal="true" href="https://communities.sas.com/message/129597#129597"&gt;How to pass macro parameter to File reader transformation to read latest csv file?&lt;/A&gt; &lt;/H1&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please I have this question in SAS DI 3.4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2012 13:15:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-pass-macro-parameter-to-File-reader-transformation-to/m-p/82876#M764</guid>
      <dc:creator>SYN</dc:creator>
      <dc:date>2012-06-14T13:15:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass macro parameter to File reader transformation to read latest csv file?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-pass-macro-parameter-to-File-reader-transformation-to/m-p/82877#M765</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;DI 3.4 may not support my approach; I haven't checked. What I do in 4.x, in a nutshell, is to &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) define the CSV in the metadata with a macro variable reference as the filename&amp;nbsp; (like &amp;amp;csvfile). make certain the generated code wraps this in double quotes or you're stuffed. This may actually be the breaking point for 3.4.&lt;/P&gt;&lt;P&gt;2) define and load a table that holds files present in your input location and keeps track of their processed status, eg through a timestamp. &lt;/P&gt;&lt;P&gt;3) Then in a job process that table in the first step to find out which file must be processed. Stick that value in a macro var. As the next step process the external file you defined in the metadata. Give that step a parameter to transfer the result from step 1 into the macro variable that matches the filename of the CSV file from 1). As a last step (or a subsequent job) mark the file as processed in the table as defined in 2).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck, Jan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2012 14:34:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-pass-macro-parameter-to-File-reader-transformation-to/m-p/82877#M765</guid>
      <dc:creator>jklaverstijn</dc:creator>
      <dc:date>2012-06-14T14:34:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass macro parameter to File reader transformation to read latest csv file?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-pass-macro-parameter-to-File-reader-transformation-to/m-p/82878#M766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi SYN,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this link..it might be helpfull&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" class="active_link" href="https://communities.sas.com/message/129750#129750"&gt;https://communities.sas.com/message/129750#129750&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will help you in making a parameter file and you can resolve that in you DI,One more thing you need to do is to get the latest file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Shiva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jun 2012 13:02:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-pass-macro-parameter-to-File-reader-transformation-to/m-p/82878#M766</guid>
      <dc:creator>shivas</dc:creator>
      <dc:date>2012-06-15T13:02:48Z</dc:date>
    </item>
  </channel>
</rss>

