<?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: Creating a new variable based on an existing variable if it has more than a certain length in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-new-variable-based-on-an-existing-variable-if-it-has/m-p/580541#M164923</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/172057"&gt;@gsk&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Let's say I have a variable named text, and let's say it has values of some long texts for each observation.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to tell sas this: make a variable named var1 if the text variable length is greater than 1, and put the text variable's index number of 1 to 100 into var 1; make a variable named var2 if a variable length is greater than 101, and put the text variable's index number of 101 to 200 into var 2, and so forth. Could we achieve this using array?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So the resulting dataset would be:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;text&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var2&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,...,&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var10&lt;/P&gt;
&lt;P&gt;blah blah&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;blah,.,a&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;b,..b&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(may not exist if text is not long enough)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Does not make any sense.&amp;nbsp; Perhaps if you provided an example that matched the description?&lt;/P&gt;
&lt;P&gt;Note you cannot change the number of variables while a step is running.&amp;nbsp; You can either create as many variables as you could possibly need, or make a more vertical structure where the number of observations vary based on the value of the input.&lt;/P&gt;</description>
    <pubDate>Mon, 12 Aug 2019 13:27:28 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2019-08-12T13:27:28Z</dc:date>
    <item>
      <title>Creating a new variable based on an existing variable if it has more than a certain length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-new-variable-based-on-an-existing-variable-if-it-has/m-p/580540#M164922</link>
      <description>&lt;P&gt;Let's say I have a variable named text, and let's say it has values of some long texts for each observation.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to tell sas this: make a variable named var1 if the text variable length is greater than 1, and put the text variable's index number of 1 to 100 into var 1; make a variable named var2 if a variable length is greater than 101, and put the text variable's index number of 101 to 200 into var 2, and so forth. Could we achieve this using array?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So the resulting dataset would be:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;text&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var2&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,...,&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var10&lt;/P&gt;&lt;P&gt;blah blah&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;blah,.,a&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;b,..b&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(may not exist if text is not long enough)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2019 13:20:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-new-variable-based-on-an-existing-variable-if-it-has/m-p/580540#M164922</guid>
      <dc:creator>gsk</dc:creator>
      <dc:date>2019-08-12T13:20:57Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a new variable based on an existing variable if it has more than a certain length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-new-variable-based-on-an-existing-variable-if-it-has/m-p/580541#M164923</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/172057"&gt;@gsk&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Let's say I have a variable named text, and let's say it has values of some long texts for each observation.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to tell sas this: make a variable named var1 if the text variable length is greater than 1, and put the text variable's index number of 1 to 100 into var 1; make a variable named var2 if a variable length is greater than 101, and put the text variable's index number of 101 to 200 into var 2, and so forth. Could we achieve this using array?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So the resulting dataset would be:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;text&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var2&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,...,&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var10&lt;/P&gt;
&lt;P&gt;blah blah&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;blah,.,a&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;b,..b&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(may not exist if text is not long enough)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Does not make any sense.&amp;nbsp; Perhaps if you provided an example that matched the description?&lt;/P&gt;
&lt;P&gt;Note you cannot change the number of variables while a step is running.&amp;nbsp; You can either create as many variables as you could possibly need, or make a more vertical structure where the number of observations vary based on the value of the input.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2019 13:27:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-new-variable-based-on-an-existing-variable-if-it-has/m-p/580541#M164923</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-08-12T13:27:28Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a new variable based on an existing variable if it has more than a certain length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-new-variable-based-on-an-existing-variable-if-it-has/m-p/580548#M164927</link>
      <description>&lt;P&gt;I can't follow the logic here. How do you go from the text string of "blah blah" which is 9 characters to var1 which is "&lt;SPAN&gt;blah,.,a" and var2&amp;nbsp; which is "b,..b" (I thought if text was &amp;lt; 100 characters, var2 should be empty)??&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;As requested by&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;, we need a &lt;STRONG&gt;realistic&lt;/STRONG&gt; example (of more than one record) to illustrate the desired results.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2019 14:31:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-new-variable-based-on-an-existing-variable-if-it-has/m-p/580548#M164927</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-08-12T14:31:13Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a new variable based on an existing variable if it has more than a certain length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-new-variable-based-on-an-existing-variable-if-it-has/m-p/582108#M165511</link>
      <description>&lt;P&gt;Sorry for not clarifying my question. If I have a variable with values of long sentences. For example, for an observation, let's say I have:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"SAS was re-designed in SAS 76 with an&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A title="Open architecture" href="https://en.wikipedia.org/wiki/Open_architecture" target="_blank" rel="noopener"&gt;open architecture&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;that allowed for&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A title="Compilers" href="https://en.wikipedia.org/wiki/Compilers" target="_blank" rel="noopener"&gt;compilers&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and procedures. The INPUT and INFILE statements were improved so they could read most data formats used by IBM mainframes. Generating reports was also added through the PUT and FILE statements. The ability to analyze&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A title="General linear model" href="https://en.wikipedia.org/wiki/General_linear_model" target="_blank" rel="noopener"&gt;general linear models&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;was also added&lt;A href="https://en.wikipedia.org/wiki/SAS_(software)#cite_note-27" target="_blank" rel="noopener"&gt;[27]&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;as was the FORMAT procedure, which allowed developers to customize the appearance of data.&lt;A href="https://en.wikipedia.org/wiki/SAS_(software)#cite_note-expert-23" target="_blank" rel="noopener"&gt;[23]&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;In 1979, SAS 79 added support for the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A title="Conversational Monitor System" href="https://en.wikipedia.org/wiki/Conversational_Monitor_System" target="_blank" rel="noopener"&gt;CMS operating system&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and introduced the DATASETS procedure. Three years later, SAS 82 introduced an early macro language and the APPEND procedure.&lt;A href="https://en.wikipedia.org/wiki/SAS_(software)#cite_note-expert-23" target="_blank" rel="noopener"&gt;[23]&lt;/A&gt;&lt;/P&gt;&lt;P&gt;SAS version 4 had limited features, but made SAS more accessible. Version 5 introduced a complete macro language, array subscripts, and a full-screen interactive user interface called Display Manager.&lt;A href="https://en.wikipedia.org/wiki/SAS_(software)#cite_note-expert-23" target="_blank" rel="noopener"&gt;[23]&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;In 1985, SAS was rewritten in the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A title="C programming language" href="https://en.wikipedia.org/wiki/C_programming_language" target="_blank" rel="noopener"&gt;C programming language&lt;/A&gt;. This allowed for the SAS' Multivendor Architecture that allows the software to run on&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A title="UNIX" href="https://en.wikipedia.org/wiki/UNIX" target="_blank" rel="noopener"&gt;UNIX&lt;/A&gt;,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A title="MS-DOS" href="https://en.wikipedia.org/wiki/MS-DOS" target="_blank" rel="noopener"&gt;MS-DOS&lt;/A&gt;, and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A title="Windows" href="https://en.wikipedia.org/wiki/Windows" target="_blank" rel="noopener"&gt;Windows&lt;/A&gt;. It was previously written in&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A title="PL/I" href="https://en.wikipedia.org/wiki/PL/I" target="_blank" rel="noopener"&gt;PL/I&lt;/A&gt;,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A title="Fortran" href="https://en.wikipedia.org/wiki/Fortran" target="_blank" rel="noopener"&gt;Fortran&lt;/A&gt;, and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A title="Assembly language" href="https://en.wikipedia.org/wiki/Assembly_language" target="_blank" rel="noopener"&gt;assembly language&lt;/A&gt;.&lt;A href="https://en.wikipedia.org/wiki/SAS_(software)#cite_note-timeline-19" target="_blank" rel="noopener"&gt;[19]&lt;/A&gt;&lt;A href="https://en.wikipedia.org/wiki/SAS_(software)#cite_note-expert-23" target="_blank" rel="noopener"&gt;[23]&lt;/A&gt;&lt;/P&gt;&lt;P&gt;In the 1980s and 1990s, SAS released a number of components to complement Base SAS. SAS/GRAPH, which produces graphics, was released in 1980, as well as the SAS/ETS component, which supports econometric and time series analysis. A component intended for pharmaceutical users, SAS/PH-Clinical, was released in the 1990s. The&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A title="Food and Drug Administration" href="https://en.wikipedia.org/wiki/Food_and_Drug_Administration" target="_blank" rel="noopener"&gt;Food and Drug Administration&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;standardized on SAS/PH-Clinical for new drug applications in 2002.&lt;A href="https://en.wikipedia.org/wiki/SAS_(software)#cite_note-timeline-19" target="_blank" rel="noopener"&gt;[19]&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Vertical products like SAS Financial Management and SAS Human Capital Management (then called CFO Vision and HR Vision respectively) were also introduced.&lt;A href="https://en.wikipedia.org/wiki/SAS_(software)#cite_note-28" target="_blank" rel="noopener"&gt;[28]&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A title="JMP (statistical software)" href="https://en.wikipedia.org/wiki/JMP_(statistical_software)" target="_blank" rel="noopener"&gt;JMP&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;was developed by SAS co-founder&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A title="John Sall" href="https://en.wikipedia.org/wiki/John_Sall" target="_blank" rel="noopener"&gt;John Sall&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and a team of developers to take advantage of the graphical user interface introduced in the 1984&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A title="Apple Macintosh" href="https://en.wikipedia.org/wiki/Apple_Macintosh" target="_blank" rel="noopener"&gt;Apple Macintosh&lt;/A&gt;&lt;A href="https://en.wikipedia.org/wiki/SAS_(software)#cite_note-CoxGaudard2009-29" target="_blank" rel="noopener"&gt;[29]&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and shipped for the first time in 1989.&lt;A href="https://en.wikipedia.org/wiki/SAS_(software)#cite_note-CoxGaudard2009-29" target="_blank" rel="noopener"&gt;[29]&lt;/A&gt;Updated versions of JMP were released continuously after 2002 with the most recent release being from 2016.&lt;A href="https://en.wikipedia.org/wiki/SAS_(software)#cite_note-jmpone-30" target="_blank" rel="noopener"&gt;[30]&lt;/A&gt;&lt;A href="https://en.wikipedia.org/wiki/SAS_(software)#cite_note-jumptwo-31" target="_blank" rel="noopener"&gt;[31]&lt;/A&gt;&lt;A href="https://en.wikipedia.org/wiki/SAS_(software)#cite_note-32" target="_blank" rel="noopener"&gt;[32]&lt;/A&gt;&lt;A href="https://en.wikipedia.org/wiki/SAS_(software)#cite_note-33" target="_blank" rel="noopener"&gt;[33]&lt;/A&gt;&lt;A href="https://en.wikipedia.org/wiki/SAS_(software)#cite_note-34" target="_blank" rel="noopener"&gt;[34]&lt;/A&gt;&lt;A href="https://en.wikipedia.org/wiki/SAS_(software)#cite_note-35" target="_blank" rel="noopener"&gt;[35]&lt;/A&gt;&lt;A href="https://en.wikipedia.org/wiki/SAS_(software)#cite_note-thirtyeight-36" target="_blank" rel="noopener"&gt;[36]&lt;/A&gt;&lt;/P&gt;&lt;P&gt;SAS version 6 was used throughout the 1990s and was available on a wider range of operating systems, including&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A title="Macintosh" href="https://en.wikipedia.org/wiki/Macintosh" target="_blank" rel="noopener"&gt;Macintosh&lt;/A&gt;,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A title="OS/2" href="https://en.wikipedia.org/wiki/OS/2" target="_blank" rel="noopener"&gt;OS/2&lt;/A&gt;,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A title="Silicon Graphics" href="https://en.wikipedia.org/wiki/Silicon_Graphics" target="_blank" rel="noopener"&gt;Silicon Graphics&lt;/A&gt;, and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A title="Primos" href="https://en.wikipedia.org/wiki/Primos" target="_blank" rel="noopener"&gt;Primos&lt;/A&gt;. SAS introduced new features through dot-releases. From 6.06 to 6.09, a user interface based on the windows paradigm was introduced and support for SQL&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://en.wikipedia.org/wiki/SAS_(software)#cite_note-37" target="_blank" rel="noopener"&gt;[37]&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;was added.&lt;A href="https://en.wikipedia.org/wiki/SAS_(software)#cite_note-expert-23" target="_blank" rel="noopener"&gt;[23]&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Version 7 introduced the Output Delivery System (ODS) and an improved text editor. ODS was improved upon in successive releases. For example, more output options were added in version 8. The number of operating systems that were supported was reduced to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A title="UNIX" href="https://en.wikipedia.org/wiki/UNIX" target="_blank" rel="noopener"&gt;UNIX&lt;/A&gt;,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A title="Windows" href="https://en.wikipedia.org/wiki/Windows" target="_blank" rel="noopener"&gt;Windows&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A title="Z/OS" href="https://en.wikipedia.org/wiki/Z/OS" target="_blank" rel="noopener"&gt;z/OS&lt;/A&gt;, and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A title="Linux" href="https://en.wikipedia.org/wiki/Linux" target="_blank" rel="noopener"&gt;Linux&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;was added.&lt;A href="https://en.wikipedia.org/wiki/SAS_(software)#cite_note-expert-23" target="_blank" rel="noopener"&gt;[23]&lt;/A&gt;&lt;A href="https://en.wikipedia.org/wiki/SAS_(software)#cite_note-supported_systems-38" target="_blank" rel="noopener"&gt;[38]&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;SAS version 8 and SAS Enterprise Miner were released in 1999.&lt;A href="https://en.wikipedia.org/wiki/SAS_(software)#cite_note-timeline-19" target="_blank" rel="noopener"&gt;[19]&lt;/A&gt;"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to create variables off of this variable. First derived variable would be: "SAS was re-designed in SAS 76 with an open architecture that allowed for compilers and procedures. The INPUT and INFILE statements were improved so they could read most data formats used by IBM mainfr" because that's the first 1-200 letters. Second derived variable would be: "ames. Generating reports was also added through the PUT and FILE statements. The ability to analyze general linear models was also added[27] as was the FORMAT procedure, which allowed developers to cu" because this is 201-400 letters. I want to create 9 variables off of the variable even though 9 variables might not be able to contain all the sentences.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 14:02:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-new-variable-based-on-an-existing-variable-if-it-has/m-p/582108#M165511</guid>
      <dc:creator>gsk</dc:creator>
      <dc:date>2019-08-19T14:02:23Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a new variable based on an existing variable if it has more than a certain length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-new-variable-based-on-an-existing-variable-if-it-has/m-p/582111#M165513</link>
      <description>&lt;P&gt;If you just want to split the string into smaller byte lengths it is trivial. So assume you have existing dataset named HAVE which has a long variable named SOURCE.&amp;nbsp; Here is code to generate 9 variables named SPLIT1 to SPLIT9 that are each 200 bytes long.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want ;
  set have ;
  array split [9] $200 ;
  do _n_=1 to 9;
    split[_n_]=substr(source,1+(_n_-1)*200,200);
  end;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Note that if your string has UTF-8 (or other multi-byte encoding) then you might want to add more complexity to prevent splitting a multi-byte character between two string.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 14:10:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-new-variable-based-on-an-existing-variable-if-it-has/m-p/582111#M165513</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-08-19T14:10:12Z</dc:date>
    </item>
  </channel>
</rss>

