<?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: Split Tables not functioning in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Split-Tables-not-functioning/m-p/461681#M20945</link>
    <description>&lt;P&gt;The solution at &lt;A href="https://communities.sas.com/t5/Base-SAS-Programming/SAS-query-How-to-split-one-dataset-to-many/td-p/231474" target="_self"&gt;https://communities.sas.com/t5/Base-SAS-Programming/SAS-query-How-to-split-one-dataset-to-many/td-p/231474&lt;/A&gt;&amp;nbsp;may work for you.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 11 May 2018 19:47:16 GMT</pubDate>
    <dc:creator>SuzanneDorinski</dc:creator>
    <dc:date>2018-05-11T19:47:16Z</dc:date>
    <item>
      <title>Split Tables not functioning</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Split-Tables-not-functioning/m-p/461663#M20943</link>
      <description>&lt;P&gt;Hi there - I've been using a piece of code I obtained from the SAS Blog for quite a while - it functions to split a data set into multiple sets per a column's value. I know this isn't always considered efficient by many people, but it's a final output and the nature of my work requires it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As I mentioned, I've been using this successfully for at least a year, but for the first time, it's not functioning, and I'm having a hard time deciphering the warning notes to determine why. I'm very gradually self-teaching and I appreciate any insight from those more experienced than I am.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Here's the code:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;%let SOURCETABLE=XXXX;&lt;BR /&gt;%let COLUMN=COLUMN; /*4 character value*/&lt;BR /&gt;%let LABEL=IMPACT_;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql noprint;&lt;BR /&gt;/* build a mini program for each value */&lt;BR /&gt;/* create a table with valid chars from data value */&lt;BR /&gt;select distinct&lt;BR /&gt;cat("&amp;amp;LABEL",compress(&amp;amp;COLUMN.,,'kad'),"(where=(&amp;amp;COLUMN.=",quote(&amp;amp;COLUMN.),"))") into :allsteps separated by ' '&lt;BR /&gt;from &amp;amp;SOURCETABLE.;&lt;BR /&gt;quit;&lt;BR /&gt;&lt;BR /&gt;%put NOTE: &amp;amp;allsteps.;&lt;BR /&gt;data &amp;amp;allsteps.;&lt;BR /&gt;set &amp;amp;sourcetable;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Here's what's supposed to happen&lt;/STRONG&gt; (this is what it looks like when I run the code with a different value than the one I need). The 69,267 rows are being split into two tables:&lt;/P&gt;&lt;P&gt;NOTE: There were 69267 observations read from the data set XXXX.&lt;BR /&gt;NOTE: The data set WORK.IMPACT_F has 37288 observations and 29 variables.&lt;BR /&gt;NOTE: The data set WORK.IMPACT_M has 31979 observations and 29 variables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Here's what's actually happening&lt;/STRONG&gt; when I run the code for the value that I need. There's a single table that's being generated with all values and the split isn't happening:&lt;/P&gt;&lt;P&gt;NOTE: There were 69267 observations read from the data set XXXX.&lt;BR /&gt;NOTE: The data set WORK.DATA7 has 69267 observations and 29 variables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Here's the warning I'm receiving:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;NOTE: Invalid argument to function QUOTE. Missing values may be generated.&lt;BR /&gt;WARNING: In a call to the CAT function, the buffer allocated for the result was not long enough to contain the concatenation of all&lt;BR /&gt;the arguments. The correct result would contain 229 characters, but the actual result might either be truncated to 200&lt;BR /&gt;character(s) or be completely blank, depending on the calling environment. The following note indicates the left-most&lt;BR /&gt;argument that caused truncation.&lt;BR /&gt;NOTE: Invalid argument 4 to function CAT. Missing values may be generated.&lt;BR /&gt;WARNING: In a call to the CAT function, the buffer allocated for the result was not long enough to contain the concatenation of all&lt;BR /&gt;the arguments. The correct result would contain 229 characters, but the actual result might either be truncated to 200&lt;BR /&gt;character(s) or be completely blank, depending on the calling environment. The following note indicates the left-most&lt;BR /&gt;argument that caused truncation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 May 2018 18:34:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Split-Tables-not-functioning/m-p/461663#M20943</guid>
      <dc:creator>AnissaG</dc:creator>
      <dc:date>2018-05-11T18:34:44Z</dc:date>
    </item>
    <item>
      <title>Re: Split Tables not functioning</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Split-Tables-not-functioning/m-p/461679#M20944</link>
      <description>&lt;P&gt;It appears that the value of the variable identified by &amp;amp;column is missing for some records in your data.&lt;/P&gt;
&lt;P&gt;where=(&amp;amp;COLUMN.=",quote(&lt;STRONG&gt;&lt;FONT color="#ff0000"&gt;&amp;amp;COLUMN&lt;/FONT&gt;&lt;/STRONG&gt;.),&lt;/P&gt;
&lt;P&gt;where used by the quote function&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would run proc freq on your data set XXXX for variable Column and see what you get.&lt;/P&gt;</description>
      <pubDate>Fri, 11 May 2018 19:42:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Split-Tables-not-functioning/m-p/461679#M20944</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-05-11T19:42:29Z</dc:date>
    </item>
    <item>
      <title>Re: Split Tables not functioning</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Split-Tables-not-functioning/m-p/461681#M20945</link>
      <description>&lt;P&gt;The solution at &lt;A href="https://communities.sas.com/t5/Base-SAS-Programming/SAS-query-How-to-split-one-dataset-to-many/td-p/231474" target="_self"&gt;https://communities.sas.com/t5/Base-SAS-Programming/SAS-query-How-to-split-one-dataset-to-many/td-p/231474&lt;/A&gt;&amp;nbsp;may work for you.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 May 2018 19:47:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Split-Tables-not-functioning/m-p/461681#M20945</guid>
      <dc:creator>SuzanneDorinski</dc:creator>
      <dc:date>2018-05-11T19:47:16Z</dc:date>
    </item>
    <item>
      <title>Re: Split Tables not functioning</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Split-Tables-not-functioning/m-p/461719#M20947</link>
      <description>&lt;P&gt;Hi ballardw, thanks for replying. I had thought that was the case too, but when I check there are no missing variables - every row of data has a value for that column. But thanks for the suggestion!&lt;/P&gt;</description>
      <pubDate>Fri, 11 May 2018 22:21:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Split-Tables-not-functioning/m-p/461719#M20947</guid>
      <dc:creator>AnissaG</dc:creator>
      <dc:date>2018-05-11T22:21:40Z</dc:date>
    </item>
  </channel>
</rss>

