<?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 the values in different columns in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Split-the-values-in-different-columns/m-p/566250#M159100</link>
    <description>&lt;P&gt;You could use the LENGTH function to find the length of a character string in each observation, that way you will know how many blocks of 500 characters are needed. Then you can create a loop using the SUBSTR function to extract characters 1 to 500 and then 501 to 1000 and so on.&lt;/P&gt;</description>
    <pubDate>Fri, 14 Jun 2019 17:55:22 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2019-06-14T17:55:22Z</dc:date>
    <item>
      <title>Split the values in different columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Split-the-values-in-different-columns/m-p/566249#M159099</link>
      <description>I have a SAS dataset with a column main_col that might have values of any length. I need to split the main_col into multiple columns col1-col10. Each column should be of length $500.&lt;BR /&gt;&lt;BR /&gt;What can be the best way to do that?&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Fri, 14 Jun 2019 17:53:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Split-the-values-in-different-columns/m-p/566249#M159099</guid>
      <dc:creator>nickspencer</dc:creator>
      <dc:date>2019-06-14T17:53:46Z</dc:date>
    </item>
    <item>
      <title>Re: Split the values in different columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Split-the-values-in-different-columns/m-p/566250#M159100</link>
      <description>&lt;P&gt;You could use the LENGTH function to find the length of a character string in each observation, that way you will know how many blocks of 500 characters are needed. Then you can create a loop using the SUBSTR function to extract characters 1 to 500 and then 501 to 1000 and so on.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jun 2019 17:55:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Split-the-values-in-different-columns/m-p/566250#M159100</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-06-14T17:55:22Z</dc:date>
    </item>
    <item>
      <title>Re: Split the values in different columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Split-the-values-in-different-columns/m-p/566281#M159112</link>
      <description>Depends on how it's delimited. Use COUNTW() to get the number of words, use SCAN() and a DO loop to go through and parse it. There's lots of examples on here that you can reference  - check the related topics side bar on the right hand side of the page.</description>
      <pubDate>Fri, 14 Jun 2019 20:28:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Split-the-values-in-different-columns/m-p/566281#M159112</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-06-14T20:28:01Z</dc:date>
    </item>
  </channel>
</rss>

