<?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 split a table/dataset in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-split-a-table-dataset/m-p/166693#M32099</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to split it for preformance/runtime issues.&amp;nbsp; The the conents of these tables are going to be run through a seperate macro...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Nov 2014 19:17:17 GMT</pubDate>
    <dc:creator>s_stef</dc:creator>
    <dc:date>2014-11-11T19:17:17Z</dc:date>
    <item>
      <title>How to split a table/dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-split-a-table-dataset/m-p/166691#M32097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a large table that I need to split into smaller ones. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The table is currently about 360,000 rows and I would like it split into tables of 100,000 rows or less.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The number of rows in the origional table varies so it could be larger or smaller at any given time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have read some info on the %split macro but I have not been able to get it to work as of yet...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2014 19:04:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-split-a-table-dataset/m-p/166691#M32097</guid>
      <dc:creator>s_stef</dc:creator>
      <dc:date>2014-11-11T19:04:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to split a table/dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-split-a-table-dataset/m-p/166692#M32098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why do you want to split the file, generally not recommended. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2014 19:09:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-split-a-table-dataset/m-p/166692#M32098</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-11-11T19:09:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to split a table/dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-split-a-table-dataset/m-p/166693#M32099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to split it for preformance/runtime issues.&amp;nbsp; The the conents of these tables are going to be run through a seperate macro...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2014 19:17:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-split-a-table-dataset/m-p/166693#M32099</guid>
      <dc:creator>s_stef</dc:creator>
      <dc:date>2014-11-11T19:17:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to split a table/dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-split-a-table-dataset/m-p/166694#M32100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;~1 million records shouldn't be an issue for most processes. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyways explain how you'd like to split your data, with equal amounts, 100K each and the remaining in one data set, by a particular variable? What do you want name the outputs?&lt;/P&gt;&lt;P&gt;What is the range in the size of your data?&lt;/P&gt;&lt;P&gt;What %split macro are you referring to?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's a reference to a few different ways:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sascommunity.org/wiki/Split_Data_into_Subsets" title="http://www.sascommunity.org/wiki/Split_Data_into_Subsets"&gt;Split Data into Subsets - sasCommunity&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2014 19:23:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-split-a-table-dataset/m-p/166694#M32100</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-11-11T19:23:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to split a table/dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-split-a-table-dataset/m-p/166695#M32101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'd like tha data split by 100k with the remaining in its own data set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So for this one it would be:&lt;/P&gt;&lt;P&gt;Main Table - 360,000 rows&lt;/P&gt;&lt;P&gt;into&lt;/P&gt;&lt;P&gt;Table1 100,000&lt;/P&gt;&lt;P&gt;Table2 100,000&lt;/P&gt;&lt;P&gt;Table3 100,000&lt;/P&gt;&lt;P&gt;Table4 60,000&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I just need it split by the number of row, variables are not driving it.&lt;/P&gt;&lt;P&gt;I wouldnt expect the Main table to get larger than 500,000 rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i was looking into this:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www2.sas.com/proceedings/sugi28/075-28.pdf"&gt;http://www2.sas.com/proceedings/sugi28/075-28.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I could not get it working...i'm sure i am missing quite a few steps, but here is what i tried:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%split(TQ_AcctNum)/* creating a dataset with 100000 observations*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data dsn;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do i= 1 to 100000;&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro split(dsn,splitby);&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;set &amp;amp;dsn nobs=num;&lt;/P&gt;&lt;P&gt;call symput('no_obs',num);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%letno_obs=&amp;amp;no_obs;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%doi= 1 %to %sysfunc(ceil(&amp;amp;no_obs/&amp;amp;splitby));&lt;/P&gt;&lt;P&gt;data dsn&amp;amp;i;&lt;/P&gt;&lt;P&gt;set &amp;amp;dsn (firstobs=%sysfunc(floor(%eval((&amp;amp;i.-1)*&amp;amp;splitby.+1))) obs=%sysfunc(ceil(%eval(&amp;amp;i * &amp;amp;splitby.))));&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%end;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%mend;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%split(dsn,10000);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2014 19:53:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-split-a-table-dataset/m-p/166695#M32101</guid>
      <dc:creator>s_stef</dc:creator>
      <dc:date>2014-11-11T19:53:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to split a table/dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-split-a-table-dataset/m-p/166696#M32102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That works for me, you just have small typo, %doi=1, there needs to be space between the do and i.&lt;/P&gt;&lt;P&gt;Your sample call is missing the second parameter, the number of records per dataset. I also changed the call symput to symputx so you can remove trailing spaces automatically, no need for the second %let statement then. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%split(TQ_ACCNUM, 100000);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/SPAN&gt; Have;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="color: #0433ff;"&gt;do&lt;/SPAN&gt; i= &lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #0433ff;"&gt;to&lt;/SPAN&gt; &lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;54000&lt;/STRONG&gt;&lt;/SPAN&gt;;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New'; color: #0433ff;"&gt;output&lt;SPAN style="color: #000000;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New'; color: #0433ff;"&gt;end&lt;SPAN style="color: #000000;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New'; color: #011993;"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;SPAN style="color: #000000;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;%macro&lt;/STRONG&gt;&lt;/SPAN&gt; split(dsn,splitby);&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;data _null_;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;set &amp;amp;dsn nobs=num;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;call symputx(&lt;SPAN style="color: #942193;"&gt;'no_obs'&lt;/SPAN&gt;,num);&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="color: #0433ff;"&gt;%put&lt;/SPAN&gt; &amp;amp;no_obs;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="color: #0433ff;"&gt;%do&lt;/SPAN&gt; i= &lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #0433ff;"&gt;%to&lt;/SPAN&gt; &lt;SPAN style="color: #0433ff;"&gt;%sysfunc&lt;/SPAN&gt;(ceil(&amp;amp;no_obs/&amp;amp;splitby));&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;data dsn&amp;amp;i;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;set &amp;amp;dsn (firstobs=&lt;SPAN style="color: #0433ff;"&gt;%sysfunc&lt;/SPAN&gt;(floor(&lt;SPAN style="color: #0433ff;"&gt;%eval&lt;/SPAN&gt;((&amp;amp;&lt;SPAN style="color: #009193;"&gt;i.&lt;/SPAN&gt;-&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;)*&amp;amp;&lt;SPAN style="color: #009193;"&gt;splitby.&lt;/SPAN&gt;+&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;))) obs=&lt;SPAN style="color: #0433ff;"&gt;%sysfunc&lt;/SPAN&gt;(ceil(&lt;SPAN style="color: #0433ff;"&gt;%eval&lt;/SPAN&gt;(&amp;amp;i * &amp;amp;&lt;SPAN style="color: #009193;"&gt;splitby.&lt;/SPAN&gt;))));&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New'; color: #0433ff;"&gt;%end&lt;SPAN style="color: #000000;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New'; color: #011993;"&gt;&lt;STRONG&gt;%mend&lt;/STRONG&gt;&lt;SPAN style="color: #000000;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;%&lt;STRONG&gt;&lt;EM&gt;split&lt;/EM&gt;&lt;/STRONG&gt;(have,&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;10000&lt;/STRONG&gt;&lt;/SPAN&gt;);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2014 20:08:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-split-a-table-dataset/m-p/166696#M32102</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-11-11T20:08:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to split a table/dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-split-a-table-dataset/m-p/166697#M32103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The following macro is based on Hash table(not vigorously tested), which natively supports dynamic splitting and supposedly more efficient (just one pass):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; Have;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;do&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; i= &lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;to&lt;/SPAN&gt; &lt;STRONG style="color: teal; background: white; font-family: 'Courier New';"&gt;54000&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; K+&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;output&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;%macro&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; split(lib=work, dsn=have, size=&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-family: 'Courier New';"&gt;10000&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;, prefix=want);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;proc sql NOPRINT;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; select quote(strip(name))&amp;nbsp; into :vname separateD by &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: purple; background: white;"&gt;','&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; from dictionary.columns where LIBNAME=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: purple; background: white;"&gt;"%upcase(&amp;amp;lib)"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; AND MEMNAME=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: purple; background: white;"&gt;"%upcase(&amp;amp;dsn)"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;QUIT;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;data _null_;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; if _n_=&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; then do;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; if &lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-family: 'Courier New';"&gt;0&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; then set have;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; declare hash h(ordered:&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: purple; background: white;"&gt;'a'&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; h.definekey(&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: purple; background: white;"&gt;'_n_'&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; h.definedata(&amp;amp;vname);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; h.definedone();&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; end;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp;&amp;nbsp; set have end=last;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; rc=h.add();&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; if last or mod(_n_,&amp;amp;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: teal; background: white;"&gt;size.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;) = &lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-family: 'Courier New';"&gt;0&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; then do;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; rc=h.output(dataset:&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: purple; background: white;"&gt;"&amp;amp;prefix"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;||strip(_n_));&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; rc=h.clear();&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;%mend&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;%&lt;STRONG&gt;&lt;EM&gt;split&lt;/EM&gt;&lt;/STRONG&gt;(size=&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-family: 'Courier New';"&gt;20000&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;,prefix=test)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; Haikuo&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Nov 2014 04:25:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-split-a-table-dataset/m-p/166697#M32103</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2014-11-12T04:25:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to split a table/dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-split-a-table-dataset/m-p/166698#M32104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How many (and what type and size) columns do you have that you get runtime issues with 360.000 rows? I've rarely used more than several seconds to process this kind of datasets.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Nov 2014 07:20:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-split-a-table-dataset/m-p/166698#M32104</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2014-11-12T07:20:55Z</dc:date>
    </item>
  </channel>
</rss>

