<?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: Select into: checking length of varible in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Select-into-checking-length-of-varible/m-p/44610#M9137</link>
    <description>Since the into: construct also does an implicit COMPBL type of compress, you have to scan each value on beforehand and calculating the real length of your macro variable. If your sample code was relevant, I think a simple data step will do the job.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
/Linus</description>
    <pubDate>Mon, 15 Jun 2009 12:00:48 GMT</pubDate>
    <dc:creator>LinusH</dc:creator>
    <dc:date>2009-06-15T12:00:48Z</dc:date>
    <item>
      <title>Select into: checking length of varible</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Select-into-checking-length-of-varible/m-p/44608#M9135</link>
      <description>Hello, anybody knows how to check if macro variable's length exceeds max length (65534) while select into runs?&lt;BR /&gt;
E.g.&lt;BR /&gt;
proc sql;&lt;BR /&gt;
select x into :y separated by " " from z;&lt;BR /&gt;
quit;&lt;BR /&gt;
Macro var Y is always created nevertheless its lenght, but when I'm trying to use it further it, of course, invokes an error if length is more than 65534</description>
      <pubDate>Mon, 15 Jun 2009 08:30:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Select-into-checking-length-of-varible/m-p/44608#M9135</guid>
      <dc:creator>attaman2008</dc:creator>
      <dc:date>2009-06-15T08:30:23Z</dc:date>
    </item>
    <item>
      <title>Re: Select into: checking length of varible</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Select-into-checking-length-of-varible/m-p/44609#M9136</link>
      <description>You may want to explore using the DICTIONARY TABLES and SAS-maintained member/view DICTIONARY.COLUMNS to at least verify the incoming data column/variable length before proceeding with another SELECT.&lt;BR /&gt;
&lt;BR /&gt;
Search the SAS support  &lt;A href="http://support.sas.com/" target="_blank"&gt;http://support.sas.com/&lt;/A&gt;  website using this Google advanced argument or with using the SAS support website search:&lt;BR /&gt;
&lt;BR /&gt;
dictionary columns variable length site:sas.com&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Mon, 15 Jun 2009 11:04:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Select-into-checking-length-of-varible/m-p/44609#M9136</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-06-15T11:04:19Z</dc:date>
    </item>
    <item>
      <title>Re: Select into: checking length of varible</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Select-into-checking-length-of-varible/m-p/44610#M9137</link>
      <description>Since the into: construct also does an implicit COMPBL type of compress, you have to scan each value on beforehand and calculating the real length of your macro variable. If your sample code was relevant, I think a simple data step will do the job.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
/Linus</description>
      <pubDate>Mon, 15 Jun 2009 12:00:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Select-into-checking-length-of-varible/m-p/44610#M9137</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2009-06-15T12:00:48Z</dc:date>
    </item>
    <item>
      <title>Re: Select into: checking length of varible</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Select-into-checking-length-of-varible/m-p/44611#M9138</link>
      <description>Try to check the variable lenght with a CASE WHEN END statement.&lt;BR /&gt;
&lt;BR /&gt;
proc sql;&lt;BR /&gt;
select case when length(x) &amp;gt; 65534 then '' else x end into :y separated by " " from z;&lt;BR /&gt;
quit;&lt;BR /&gt;
&lt;BR /&gt;
Cheers from Portugal.&lt;BR /&gt;
&lt;BR /&gt;
Daniel Santos @ &lt;A href="http://www.cgd.pt" target="_blank"&gt;www.cgd.pt&lt;/A&gt;</description>
      <pubDate>Tue, 16 Jun 2009 15:04:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Select-into-checking-length-of-varible/m-p/44611#M9138</guid>
      <dc:creator>DanielSantos</dc:creator>
      <dc:date>2009-06-16T15:04:16Z</dc:date>
    </item>
  </channel>
</rss>

