<?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 automat import and export final reports in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-automat-import-and-export-final-reports/m-p/925072#M364087</link>
    <description>&lt;P&gt;Details matter.&lt;/P&gt;
&lt;P&gt;By "as following text" do you mean make a report that looks like that? Names of files?&lt;/P&gt;
&lt;P&gt;By "particular location" do you mean text file folder location? Columns and rows in the text file?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Typically when asking about making a report you need to provide examples of the source data and the rules involved in making a report. Unfortunately an example doesn't provide much in the way of the rules needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You subject line also mentions "import". Import what? what kind of file or data? What type of variables and properties are needed?&lt;/P&gt;</description>
    <pubDate>Sat, 20 Apr 2024 05:15:54 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2024-04-20T05:15:54Z</dc:date>
    <item>
      <title>how to automat import and export final reports</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-automat-import-and-export-final-reports/m-p/925071#M364086</link>
      <description>&lt;P&gt;Hi Experts,&lt;/P&gt;
&lt;P&gt;I want to automat report&amp;nbsp; to export as following txt format to particular location&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;abc_202401&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt; abc_202402&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;abc_202403&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt; abc_202404&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;........................&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;.......................&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;abc_202412&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 20 Apr 2024 05:01:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-automat-import-and-export-final-reports/m-p/925071#M364086</guid>
      <dc:creator>pavank</dc:creator>
      <dc:date>2024-04-20T05:01:45Z</dc:date>
    </item>
    <item>
      <title>Re: how to automat import and export final reports</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-automat-import-and-export-final-reports/m-p/925072#M364087</link>
      <description>&lt;P&gt;Details matter.&lt;/P&gt;
&lt;P&gt;By "as following text" do you mean make a report that looks like that? Names of files?&lt;/P&gt;
&lt;P&gt;By "particular location" do you mean text file folder location? Columns and rows in the text file?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Typically when asking about making a report you need to provide examples of the source data and the rules involved in making a report. Unfortunately an example doesn't provide much in the way of the rules needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You subject line also mentions "import". Import what? what kind of file or data? What type of variables and properties are needed?&lt;/P&gt;</description>
      <pubDate>Sat, 20 Apr 2024 05:15:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-automat-import-and-export-final-reports/m-p/925072#M364087</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-04-20T05:15:54Z</dc:date>
    </item>
    <item>
      <title>Re: how to automat import and export final reports</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-automat-import-and-export-final-reports/m-p/925073#M364088</link>
      <description>&lt;P&gt;Hi&amp;nbsp; ballardw&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;i want automatic for 12 months&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro export_files;
    %do month=1 %to 12;
        %let month_suffix = %sysfunc(putn(&amp;amp;month,z2.));
        %let file_name = abc_2024&amp;amp;month_suffix..txt;
        %let export_path = "/home/u35263349/My_Folder/export_classdatasett"; /* Specify your export path */
        
        /* Your data step or procedure to create the dataset to be exported */
        data _null_;
            file "&amp;amp;export_path.\&amp;amp;file_name";
            put "This is data for month &amp;amp;month_suffix.";
        run;
    %end;
%mend;

%export_files;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 20 Apr 2024 05:29:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-automat-import-and-export-final-reports/m-p/925073#M364088</guid>
      <dc:creator>pavank</dc:creator>
      <dc:date>2024-04-20T05:29:15Z</dc:date>
    </item>
    <item>
      <title>Re: how to automat import and export final reports</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-automat-import-and-export-final-reports/m-p/925077#M364089</link>
      <description>&lt;P&gt;Populate macro variable &amp;amp;export_path without quotes to not end-up with double quoting in the file statement.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Patrick_1-1713593198710.png" style="width: 808px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/95708iC21F8FDB69355C8D/image-dimensions/808x105?v=v2" width="808" height="105" role="button" title="Patrick_1-1713593198710.png" alt="Patrick_1-1713593198710.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 20 Apr 2024 06:10:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-automat-import-and-export-final-reports/m-p/925077#M364089</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2024-04-20T06:10:33Z</dc:date>
    </item>
    <item>
      <title>Re: how to automat import and export final reports</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-automat-import-and-export-final-reports/m-p/925086#M364091</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/390518"&gt;@pavank&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi&amp;nbsp; ballardw&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;i want automatic for 12 months&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro export_files;
    %do month=1 %to 12;
        %let month_suffix = %sysfunc(putn(&amp;amp;month,z2.));
        %let file_name = abc_2024&amp;amp;month_suffix..txt;
        %let export_path = "/home/u35263349/My_Folder/export_classdatasett"; /* Specify your export path */
        
        /* Your data step or procedure to create the dataset to be exported */
        data _null_;
            file "&amp;amp;export_path.\&amp;amp;file_name";
            put "This is data for month &amp;amp;month_suffix.";
        run;
    %end;
%mend;

%export_files;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;And what is wrong with this code? Please explain in detail. If there are errors in the log, please show us the log.&lt;/P&gt;</description>
      <pubDate>Sat, 20 Apr 2024 10:51:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-automat-import-and-export-final-reports/m-p/925086#M364091</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-04-20T10:51:52Z</dc:date>
    </item>
  </channel>
</rss>

