<?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: dataflux How to split a file into multiple .txt output files in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/dataflux-How-to-split-a-file-into-multiple-txt-output-files/m-p/819907#M20402</link>
    <description>&lt;P&gt;Awesome !! you are great Audrey!! i have all the files as per how many cluster i have :-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lambad_0-1655971015109.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/72633i9769663457D92E93/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lambad_0-1655971015109.png" alt="lambad_0-1655971015109.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 23 Jun 2022 07:57:06 GMT</pubDate>
    <dc:creator>lambad</dc:creator>
    <dc:date>2022-06-23T07:57:06Z</dc:date>
    <item>
      <title>dataflux How to split a file into multiple .txt output files</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/dataflux-How-to-split-a-file-into-multiple-txt-output-files/m-p/819329#M20390</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Good day!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone help me on this, i have Data Set on SAS Dataflux Data Management studio, where i have done the clustering, now base on each cluster i needs to have one .txt output file for each cluster.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Dheeraj&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jun 2022 14:33:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/dataflux-How-to-split-a-file-into-multiple-txt-output-files/m-p/819329#M20390</guid>
      <dc:creator>lambad</dc:creator>
      <dc:date>2022-06-21T14:33:47Z</dc:date>
    </item>
    <item>
      <title>Re: dataflux How to split a file into multiple .txt output files</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/dataflux-How-to-split-a-file-into-multiple-txt-output-files/m-p/819517#M20392</link>
      <description>&lt;P&gt;Does this post help?&amp;nbsp;&lt;A href="https://communities.sas.com/t5/SAS-Data-Management/Split-the-data-in-Dataflux/m-p/815171#M20347" target="_blank"&gt;Split the data in Dataflux - SAS Support Communities&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2022 02:46:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/dataflux-How-to-split-a-file-into-multiple-txt-output-files/m-p/819517#M20392</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2022-06-22T02:46:32Z</dc:date>
    </item>
    <item>
      <title>Re: dataflux How to split a file into multiple .txt output files</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/dataflux-How-to-split-a-file-into-multiple-txt-output-files/m-p/819568#M20393</link>
      <description>&lt;P&gt;No Exactly helping me, i have data for example i have 100 System Data in one file, now i want to have 100 files for each one system.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2022 10:58:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/dataflux-How-to-split-a-file-into-multiple-txt-output-files/m-p/819568#M20393</guid>
      <dc:creator>lambad</dc:creator>
      <dc:date>2022-06-22T10:58:52Z</dc:date>
    </item>
    <item>
      <title>Re: dataflux How to split a file into multiple .txt output files</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/dataflux-How-to-split-a-file-into-multiple-txt-output-files/m-p/819592#M20394</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think you can use Expression Language to do this, using the Grouping functionality. &lt;BR /&gt;This requires records to be sorted on the Cluster ID first.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Add an &lt;STRONG&gt;Expression node&lt;/STRONG&gt; to your job&lt;/LI&gt;
&lt;LI&gt;In the &lt;STRONG&gt;Grouping&lt;/STRONG&gt; tab, select your cluster ID field in the "Group By" box at the top. The Expression node will now group your records by Cluster ID.&lt;/LI&gt;
&lt;LI&gt;In the &lt;STRONG&gt;Pre-group Expression&lt;/STRONG&gt; tab (=the actions that will happen before a new cluster ID group), you'll have to create a reference to the file and open it:&lt;BR /&gt;
&lt;PRE&gt;file output
string filepath

//change the filepath to the place where you want to save your files
filepath = "C:\"&amp;amp;`Cluster ID Field Name`&amp;amp;".txt"

//this opens the file in Write mode
output.open(filepath, "w")&lt;/PRE&gt;
&lt;/LI&gt;
&lt;LI&gt;In the &lt;STRONG&gt;Post-group Expression&lt;/STRONG&gt;, you will close the file:&lt;BR /&gt;
&lt;PRE&gt;output.close()&lt;/PRE&gt;
&lt;/LI&gt;
&lt;LI&gt;In the &lt;STRONG&gt;Expression&lt;/STRONG&gt; code itself, you'll write the lines to the file that was opened for this Cluster ID group:&lt;BR /&gt;
&lt;PRE&gt;output.writeline(`My Field 1`)&lt;/PRE&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;This will create as many files as Cluster ID you have, as you can see in my example screenshot below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="audrey_0-1655901103909.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/72538i85F29E2017E2305A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="audrey_0-1655901103909.png" alt="audrey_0-1655901103909.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Audrey&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2022 12:32:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/dataflux-How-to-split-a-file-into-multiple-txt-output-files/m-p/819592#M20394</guid>
      <dc:creator>audrey</dc:creator>
      <dc:date>2022-06-22T12:32:58Z</dc:date>
    </item>
    <item>
      <title>Re: dataflux How to split a file into multiple .txt output files</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/dataflux-How-to-split-a-file-into-multiple-txt-output-files/m-p/819658#M20395</link>
      <description>&lt;P&gt;Hello Audrey,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Good day!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it worked for me, made some changes now i have this error. file not opened. at once it create one file that is blank.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;could you please suggest. where i am going wrong.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lambad_0-1655910778461.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/72552i2E68FD97D35F11FD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lambad_0-1655910778461.png" alt="lambad_0-1655910778461.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2022 15:15:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/dataflux-How-to-split-a-file-into-multiple-txt-output-files/m-p/819658#M20395</guid>
      <dc:creator>lambad</dc:creator>
      <dc:date>2022-06-22T15:15:20Z</dc:date>
    </item>
    <item>
      <title>Re: dataflux How to split a file into multiple .txt output files</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/dataflux-How-to-split-a-file-into-multiple-txt-output-files/m-p/819665#M20396</link>
      <description>&lt;P&gt;Hi again,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you show me the code you currently have?&lt;BR /&gt;Seems like the file was not opened. Do you have a output.open line in the Pre-Expression?&lt;/P&gt;
&lt;P&gt;Do you have write permissions in this folder?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;BR /&gt;Audrey&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2022 15:28:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/dataflux-How-to-split-a-file-into-multiple-txt-output-files/m-p/819665#M20396</guid>
      <dc:creator>audrey</dc:creator>
      <dc:date>2022-06-22T15:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: dataflux How to split a file into multiple .txt output files</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/dataflux-How-to-split-a-file-into-multiple-txt-output-files/m-p/819875#M20397</link>
      <description>&lt;P&gt;Hola,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Really appreciate for your reply, yes i do have permission and other access.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lambad_0-1655953186650.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/72625i2C5DEBC89EA0B753/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lambad_0-1655953186650.png" alt="lambad_0-1655953186650.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2022 03:01:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/dataflux-How-to-split-a-file-into-multiple-txt-output-files/m-p/819875#M20397</guid>
      <dc:creator>lambad</dc:creator>
      <dc:date>2022-06-23T03:01:36Z</dc:date>
    </item>
    <item>
      <title>Re: dataflux How to split a file into multiple .txt output files</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/dataflux-How-to-split-a-file-into-multiple-txt-output-files/m-p/819878#M20398</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lambad_0-1655954001512.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/72626i25D1B8C083DB08B0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lambad_0-1655954001512.png" alt="lambad_0-1655954001512.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2022 03:13:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/dataflux-How-to-split-a-file-into-multiple-txt-output-files/m-p/819878#M20398</guid>
      <dc:creator>lambad</dc:creator>
      <dc:date>2022-06-23T03:13:30Z</dc:date>
    </item>
    <item>
      <title>Re: dataflux How to split a file into multiple .txt output files</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/dataflux-How-to-split-a-file-into-multiple-txt-output-files/m-p/819885#M20399</link>
      <description>&lt;P&gt;The output.close() shouldn't be in the Pre-grouping Expression. What happens here is you open the file AND close it before writting any line to it.&lt;/P&gt;
&lt;P&gt;Try to move the output.close() to the Post-Grouping Expression code box and let me know how it goes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;BR /&gt;Audrey&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2022 05:56:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/dataflux-How-to-split-a-file-into-multiple-txt-output-files/m-p/819885#M20399</guid>
      <dc:creator>audrey</dc:creator>
      <dc:date>2022-06-23T05:56:53Z</dc:date>
    </item>
    <item>
      <title>Re: dataflux How to split a file into multiple .txt output files</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/dataflux-How-to-split-a-file-into-multiple-txt-output-files/m-p/819894#M20400</link>
      <description>&lt;P&gt;Hello Audrey,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it worked successfully without error, but output is not as desired. there is just one .txt file with limited data.&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;I am very new to this tool. sorry for the silly questions&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lambad_0-1655968051882.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/72632i1AEB74BAD07507D3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lambad_0-1655968051882.png" alt="lambad_0-1655968051882.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks once again&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dheeraj Lamba&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2022 07:09:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/dataflux-How-to-split-a-file-into-multiple-txt-output-files/m-p/819894#M20400</guid>
      <dc:creator>lambad</dc:creator>
      <dc:date>2022-06-23T07:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: dataflux How to split a file into multiple .txt output files</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/dataflux-How-to-split-a-file-into-multiple-txt-output-files/m-p/819904#M20401</link>
      <description>&lt;P&gt;The fact that you have only 1 file is because you put a static name to the file in your code: "Cluster1.txt".&lt;/P&gt;
&lt;P&gt;If you look at my original code example, I was using a reference to the field name:&lt;/P&gt;
&lt;PRE&gt;filepath = "C:\"&amp;amp;`Cluster ID Field Name`&amp;amp;".txt"&lt;/PRE&gt;
&lt;P&gt;This will allow the engine to create one file for each Cluster ID value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It contains limited data, because it's opening the same file for each cluster, flushing it and writing the new lines.&lt;/P&gt;
&lt;P&gt;Once you fixed the first problem mentioned above, it should be creating multiple files with the appropriate data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you don't feel comfortable, you can send me your job, I'll take a look and make the changes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;BR /&gt;Audrey&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2022 07:44:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/dataflux-How-to-split-a-file-into-multiple-txt-output-files/m-p/819904#M20401</guid>
      <dc:creator>audrey</dc:creator>
      <dc:date>2022-06-23T07:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: dataflux How to split a file into multiple .txt output files</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/dataflux-How-to-split-a-file-into-multiple-txt-output-files/m-p/819907#M20402</link>
      <description>&lt;P&gt;Awesome !! you are great Audrey!! i have all the files as per how many cluster i have :-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lambad_0-1655971015109.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/72633i9769663457D92E93/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lambad_0-1655971015109.png" alt="lambad_0-1655971015109.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2022 07:57:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/dataflux-How-to-split-a-file-into-multiple-txt-output-files/m-p/819907#M20402</guid>
      <dc:creator>lambad</dc:creator>
      <dc:date>2022-06-23T07:57:06Z</dc:date>
    </item>
    <item>
      <title>Re: dataflux How to split a file into multiple .txt output files</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/dataflux-How-to-split-a-file-into-multiple-txt-output-files/m-p/850581#M20649</link>
      <description>Step are given below-&lt;BR /&gt;&lt;BR /&gt;Select and upload your TXT document for splitting.&lt;BR /&gt;Specify desired page numbers and click Split Now button.&lt;BR /&gt;Once your TXT document is splitted click on Download Now button.&lt;BR /&gt;Use Email button to send download link over email.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Rachel Gomez&lt;BR /&gt;</description>
      <pubDate>Wed, 21 Dec 2022 07:43:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/dataflux-How-to-split-a-file-into-multiple-txt-output-files/m-p/850581#M20649</guid>
      <dc:creator>RacheLGomez123</dc:creator>
      <dc:date>2022-12-21T07:43:12Z</dc:date>
    </item>
  </channel>
</rss>

