<?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: Extract value when preceding variable has a specific value in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Extract-value-when-preceding-variable-has-a-specific-value/m-p/812081#M320385</link>
    <description>&lt;P&gt;Please post data in usable from (data step with datalines) and the expected result.&lt;/P&gt;
&lt;P&gt;It is not clear what you want to create, maybe the MET-variables?&lt;/P&gt;
&lt;P&gt;If that is the case, using compress to remove non-digits and input to create numbers seem to be a good choice.&lt;/P&gt;</description>
    <pubDate>Mon, 09 May 2022 06:13:13 GMT</pubDate>
    <dc:creator>andreas_lds</dc:creator>
    <dc:date>2022-05-09T06:13:13Z</dc:date>
    <item>
      <title>Extract value when preceding variable has a specific value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Extract-value-when-preceding-variable-has-a-specific-value/m-p/812023#M320355</link>
      <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;&lt;SPAN&gt;Can someone help me with a SAS code where a variable,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;MET, extract the numbers of the second variable, if one of the variables CODE_1-CODE_44 contains one of several codes (T1b, T4a, T3a) and that the first subsequent variable (of CODE_1-CODE_44) contains a 6-character code&amp;nbsp; that starts with "LND" (LND001-LND200).&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;CODE_1&amp;nbsp; CODE_2 CODE_3 CODE_4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CODE_5&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MET.1&amp;nbsp; MET.2&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;T1b&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;LND022&amp;nbsp; &amp;nbsp; &amp;nbsp;C2a&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;P4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; T6B&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;22&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;T4a&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;M4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; C2a&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;T4a&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LND020&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 20&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;T4a&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;LND001&amp;nbsp; &amp;nbsp; &amp;nbsp;T1b&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;LND044&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;LND032&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 44&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sun, 08 May 2022 18:30:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Extract-value-when-preceding-variable-has-a-specific-value/m-p/812023#M320355</guid>
      <dc:creator>MABRINCH</dc:creator>
      <dc:date>2022-05-08T18:30:19Z</dc:date>
    </item>
    <item>
      <title>Re: Extract value when preceding variable has a specific value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Extract-value-when-preceding-variable-has-a-specific-value/m-p/812081#M320385</link>
      <description>&lt;P&gt;Please post data in usable from (data step with datalines) and the expected result.&lt;/P&gt;
&lt;P&gt;It is not clear what you want to create, maybe the MET-variables?&lt;/P&gt;
&lt;P&gt;If that is the case, using compress to remove non-digits and input to create numbers seem to be a good choice.&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2022 06:13:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Extract-value-when-preceding-variable-has-a-specific-value/m-p/812081#M320385</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2022-05-09T06:13:13Z</dc:date>
    </item>
  </channel>
</rss>

