<?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>finans_sas Tracker</title>
    <link>https://communities.sas.com/kntur85557/tracker</link>
    <description>finans_sas Tracker</description>
    <pubDate>Sat, 16 May 2026 13:17:52 GMT</pubDate>
    <dc:date>2026-05-16T13:17:52Z</dc:date>
    <item>
      <title>Re: SAS Macro &amp; Nested Do Loop to subset data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-amp-Nested-Do-Loop-to-subset-data/m-p/895347#M353746</link>
      <description>&lt;P&gt;Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/19879"&gt;@Quentin&lt;/a&gt; ! I actually ended up running the code three times (4 corvars at a time) since the computer kept running out of disk space. If I recall correctly, it was 20 billion or so for each run.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2023 20:42:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-amp-Nested-Do-Loop-to-subset-data/m-p/895347#M353746</guid>
      <dc:creator>finans_sas</dc:creator>
      <dc:date>2023-09-21T20:42:32Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Macro &amp; Nested Do Loop to subset data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-amp-Nested-Do-Loop-to-subset-data/m-p/895344#M353744</link>
      <description>&lt;P&gt;Thank you so much for this code, &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt; ! I will explore it further.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2023 20:26:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-amp-Nested-Do-Loop-to-subset-data/m-p/895344#M353744</guid>
      <dc:creator>finans_sas</dc:creator>
      <dc:date>2023-09-21T20:26:54Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Macro &amp; Nested Do Loop to subset data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-amp-Nested-Do-Loop-to-subset-data/m-p/895343#M353743</link>
      <description>&lt;P&gt;You are absolutely right, &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;.&amp;nbsp; Next time If I have another question, I will make sure to include all the important details. I sincerely apologize for this. Thank you so much for all your help and the code that your proposed. It worked like a charm.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2023 20:19:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-amp-Nested-Do-Loop-to-subset-data/m-p/895343#M353743</guid>
      <dc:creator>finans_sas</dc:creator>
      <dc:date>2023-09-21T20:19:46Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Macro &amp; Nested Do Loop to subset data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-amp-Nested-Do-Loop-to-subset-data/m-p/895153#M353617</link>
      <description>&lt;P&gt;Great question, &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt; ! This is related to the need to show that the results are robust to different ways of measuring the variable of interest and to the different subsamples. Most of them will be a footnote anyways but we need to perform them.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2023 00:20:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-amp-Nested-Do-Loop-to-subset-data/m-p/895153#M353617</guid>
      <dc:creator>finans_sas</dc:creator>
      <dc:date>2023-09-21T00:20:53Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Macro &amp; Nested Do Loop to subset data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-amp-Nested-Do-Loop-to-subset-data/m-p/895152#M353616</link>
      <description>&lt;P&gt;Thank you so much for sharing this other perspective, &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt; . I need to think about how it will work with the data. The starting dataset has around 50 million rows of data (another one that I need to apply the same code to has about 250 million).&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2023 00:15:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-amp-Nested-Do-Loop-to-subset-data/m-p/895152#M353616</guid>
      <dc:creator>finans_sas</dc:creator>
      <dc:date>2023-09-21T00:15:14Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Macro &amp; Nested Do Loop to subset data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-amp-Nested-Do-Loop-to-subset-data/m-p/895130#M353602</link>
      <description>Quick clarification: by "0 or 1" and "0,1" I meant that we include all the values where the variable is either 0 or 1, which by definition is all the observations for a given dummy variable.</description>
      <pubDate>Wed, 20 Sep 2023 20:26:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-amp-Nested-Do-Loop-to-subset-data/m-p/895130#M353602</guid>
      <dc:creator>finans_sas</dc:creator>
      <dc:date>2023-09-20T20:26:16Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Macro &amp; Nested Do Loop to subset data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-amp-Nested-Do-Loop-to-subset-data/m-p/895127#M353601</link>
      <description>&lt;P&gt;Thank you &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt; for this question. Your statement is correct. The combinations will 0, 1, and 0&amp;amp;1 together versus 0, 1, and 0&amp;amp;1 together. I have 12 variables (corvar1 through corvar12), and each corvar takes the values of 0 and 1. And the other dummy, allmdummy, takes the values of 0 and 1 too. I want to be able to run the same regression for every single combination, which amounts to 108. All the possible combinations for the first variable will look like the following:&lt;/P&gt;
&lt;P&gt;corvar1=0 and allmdummy=0,&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;corvar1=0 and&amp;nbsp; allmdummy=1&lt;/P&gt;
&lt;P&gt;corvar1=0 and allmdummy= 0 or 1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;corvar1=1 and allmdummy=0,&lt;/P&gt;
&lt;P&gt;corvar1=1 and allmdummy=1&lt;/P&gt;
&lt;P&gt;corvar1=1 and allmdummy= 0 or 1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;corvar1=0,1, allmdummy=0,&lt;/P&gt;
&lt;P&gt;corvar1=0,1 allmdummy=1&lt;/P&gt;
&lt;P&gt;corvar1=0,1 allmdummy= 0 or 1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ideally, I will be able to create a unique sampleid for each combination and then run proc reg and proc means command for each combination (sampleid). I hope this helps. Please let me know if you have any follow-up questions.&lt;/P&gt;
&lt;P&gt;Thank you so much!&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2023 20:23:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-amp-Nested-Do-Loop-to-subset-data/m-p/895127#M353601</guid>
      <dc:creator>finans_sas</dc:creator>
      <dc:date>2023-09-20T20:23:11Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Macro &amp; Nested Do Loop to subset data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-amp-Nested-Do-Loop-to-subset-data/m-p/895070#M353583</link>
      <description>&lt;P&gt;Thank you so much for your suggestions, &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/19879"&gt;@Quentin&lt;/a&gt; . If I could find a way to do the proc reg without splitting the dataset, that will actually be awesome since the splitting and re-combining will take a massive amount of hard disk space. The challenge I have at this point is that some observations will fall under more than one sample ID due to overlapping subsets.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2023 14:47:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-amp-Nested-Do-Loop-to-subset-data/m-p/895070#M353583</guid>
      <dc:creator>finans_sas</dc:creator>
      <dc:date>2023-09-20T14:47:33Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Macro &amp; Nested Do Loop to subset data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-amp-Nested-Do-Loop-to-subset-data/m-p/895068#M353581</link>
      <description>&lt;P&gt;Thank you so much once again for your quickly reply, &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt; . Here is my challenge: the subsets will be overlapping. For example, sampleid 111 will be a combination of 112 and 113. I could not figure out how to create sample IDs without overwriting the existing ones.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2023 14:36:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-amp-Nested-Do-Loop-to-subset-data/m-p/895068#M353581</guid>
      <dc:creator>finans_sas</dc:creator>
      <dc:date>2023-09-20T14:36:37Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Macro &amp; Nested Do Loop to subset data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-amp-Nested-Do-Loop-to-subset-data/m-p/895064#M353577</link>
      <description>&lt;P&gt;Thank you so much, &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp; for your prompt reply. You made an excellent point. It is a nice segway into my end goal. I actually want to run the following for each sampleid (assuming that wanted is the output of the prior macro). If I could find a way to incorporate the prior macro into the next one, that will indeed save me a lot of time. I will really appreciate any insight on this one.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#008000"&gt;proc reg data=wanted noprint outest=wanted2 noprint adjrsq;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;by sample id obsid;&amp;nbsp;&amp;nbsp;&amp;nbsp; /*obsid is another ID already stored in the dataset*/&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;model depvar1 = ind1 ind2 ind3 ind4 / hcc;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;run;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#008000"&gt;proc means data=wanted2;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#008000"&gt;by sampleid;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;var intercept ind1 ind2 ind3 ind4 _rsq_ _adjrsq_;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;output out=wanted3 mean = std= t= probt= / autoname;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;run;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2023 14:24:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-amp-Nested-Do-Loop-to-subset-data/m-p/895064#M353577</guid>
      <dc:creator>finans_sas</dc:creator>
      <dc:date>2023-09-20T14:24:43Z</dc:date>
    </item>
    <item>
      <title>SAS Macro &amp; Nested Do Loop to subset data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-amp-Nested-Do-Loop-to-subset-data/m-p/895061#M353575</link>
      <description>&lt;P&gt;Hello Everyone:&lt;/P&gt;
&lt;P&gt;I have a big dataset, and I want to create subsets from this dataset and combine all the subsets into a separate dataset. Here are more details:&lt;/P&gt;
&lt;P&gt;corvar1 through corvar12: 12 different dummy variables. Each variable takes the value of 0 or 1.&lt;/P&gt;
&lt;P&gt;allmdummy: a dummy variable that takes the value of 0 or 1.&lt;/P&gt;
&lt;P&gt;I want to create 108 different subsets. For example, for corvar1, I would like to create the following nine subsets:&lt;/P&gt;
&lt;P&gt;corvar1 &lt;FONT color="#000080"&gt;le&lt;/FONT&gt; 1 + allmdummy le 1&amp;nbsp;&amp;nbsp; (include all values of corvar1 and all values of allmdummy)&lt;/P&gt;
&lt;P&gt;corvar1 &lt;FONT color="#000080"&gt;le&lt;/FONT&gt; 1 + allmdummy eq 1&lt;/P&gt;
&lt;P&gt;corvar1 &lt;FONT color="#000080"&gt;le&lt;/FONT&gt; 1 + allmdummy lt 1&lt;/P&gt;
&lt;P&gt;corvar1 &lt;FONT color="#800000"&gt;eq&lt;/FONT&gt; 1 + allmdummy le 1&lt;/P&gt;
&lt;P&gt;corvar1 &lt;FONT color="#800000"&gt;eq&lt;/FONT&gt; 1 + allmdummy eq 1&lt;/P&gt;
&lt;P&gt;corvar1 &lt;FONT color="#800000"&gt;eq&lt;/FONT&gt; 1 + allmdummy lt 1&lt;/P&gt;
&lt;P&gt;corvar1 &lt;FONT color="#FF00FF"&gt;lt&lt;/FONT&gt; 1 + allmdummy le 1&lt;/P&gt;
&lt;P&gt;corvar1 &lt;FONT color="#FF00FF"&gt;lt&lt;/FONT&gt; 1 + allmdummy eq 1&lt;/P&gt;
&lt;P&gt;corvar1 &lt;FONT color="#FF00FF"&gt;lt&lt;/FONT&gt; 1 + allmdummy lt 1 (include only the values where corvar1=0 and allmdummy=0).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below is a rough sketch of what I would like to accomplish. I would love to have your help with improving this code.&lt;/P&gt;
&lt;P&gt;Thank you so much!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#008000"&gt;%macro groupa;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;%do cvar=1 %to 12; /*names for the variables*/&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;%do m=1 %to 3; /*for math operations*/&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;%do n=1 %to 3; /*for math operations*/&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#008000"&gt;data set&amp;amp;cvar&amp;amp;m&amp;amp;n; set regsample;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;if &amp;amp;m=1 then opa="le";&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;if &amp;amp;m=2 then opa="eq";&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;if &amp;amp;m=3 then opa="lt";&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#008000"&gt;if &amp;amp;n=1 then opb="le";&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;if &amp;amp;n=2 then opb="eq";&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;if &amp;amp;n=3 then opb="lt";&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#008000"&gt;if corvar&amp;amp;cvar opa 1 and allmdummy opb 1;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;id1=&amp;amp;cvar;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;id2=&amp;amp;m;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;id3=&amp;amp;n;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;sampleid=&amp;amp;cvar&amp;amp;m&amp;amp;n; /*create a sample ID*/&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;proc append base=wanted data=set&amp;amp;cvar&amp;amp;m&amp;amp;n; /*I want to combine all the datasets into a single one. Not sure if this syntax is right*/&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;%end;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#008000"&gt;%end;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#008000"&gt;%end;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;%mend groupa;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;%groupa&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2023 14:02:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-amp-Nested-Do-Loop-to-subset-data/m-p/895061#M353575</guid>
      <dc:creator>finans_sas</dc:creator>
      <dc:date>2023-09-20T14:02:00Z</dc:date>
    </item>
    <item>
      <title>Re: Expanding the data set for each event day</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Expanding-the-data-set-for-each-event-day/m-p/877910#M346834</link>
      <description>&lt;P&gt;Thank you so much &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt; , &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/12447"&gt;@Patrick&lt;/a&gt; , and &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/31461"&gt;@mkeintz&lt;/a&gt;&amp;nbsp; for helping me with my question. I sincerely appreciated all your help.&lt;/P&gt;
&lt;P&gt;Have a wonderful weekend!&lt;/P&gt;</description>
      <pubDate>Sun, 28 May 2023 09:53:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Expanding-the-data-set-for-each-event-day/m-p/877910#M346834</guid>
      <dc:creator>finans_sas</dc:creator>
      <dc:date>2023-05-28T09:53:58Z</dc:date>
    </item>
    <item>
      <title>Re: Expanding the data set for each event day</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Expanding-the-data-set-for-each-event-day/m-p/877809#M346782</link>
      <description>&lt;P&gt;Thank you so much &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/12447"&gt;@Patrick&lt;/a&gt; for this suggestion. When I ran it, it did not quite produce the dataset I would like to have. day_count starts for the first observation in the sample and goes all the way till the end of the sample instead of starting at each secid &amp;amp; eventday=1 pairs. Should I create an ID that combines secid and event day to accomplish this task?&lt;/P&gt;
&lt;P&gt;Thank you so much&lt;/P&gt;</description>
      <pubDate>Sat, 27 May 2023 00:24:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Expanding-the-data-set-for-each-event-day/m-p/877809#M346782</guid>
      <dc:creator>finans_sas</dc:creator>
      <dc:date>2023-05-27T00:24:04Z</dc:date>
    </item>
    <item>
      <title>Re: Expanding the data set for each event day</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Expanding-the-data-set-for-each-event-day/m-p/877803#M346778</link>
      <description>&lt;P&gt;Thank you so much &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp; and &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/31461"&gt;@mkeintz&lt;/a&gt; for helping me with my inquiry. I really appreciated it. My data set extremely large, so perhaps the data step solution may work better for me. Please accept my apologies. The data set does have IDs, and I need to ensure that these steps are executed within the same IDs only.&amp;nbsp; I did not work with hash operators before. How should I go about bringing in the IDs? I attempted below (bold line), but ended up getting something different.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also: I opted for 180 days instead of 6 months since I need to have 180 observations for each event, and the 6-month cutoff may not necessarily produce 180 observations. If for some events, I have fewer than 180 observations (due to data limitations), this will be fine. I will first run the estimations with only those with 180 observations first, and later I will include all of them (even those with fewer than 180 observations).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data have;;&lt;BR /&gt;input secid obs_date :mmddyy10. event value;&lt;BR /&gt;format obs_date mmddyy10.;&lt;BR /&gt;datalines;&lt;BR /&gt;1 1/1/2020 0 0.003918297&lt;BR /&gt;1 1/2/2020 0 0.294439369&lt;BR /&gt;1 1/4/2020 1 0.048466828&lt;BR /&gt;1 1/5/2020 0 0.718177034&lt;BR /&gt;1 1/6/2020 0 0.001364211&lt;BR /&gt;1 1/7/2020 0 0.440971903&lt;BR /&gt;1 1/8/2020 0 0.55962246&lt;BR /&gt;1 1/9/2020 0 0.821105414&lt;BR /&gt;1 1/10/2020 1 0.332539126&lt;BR /&gt;1 1/11/2020 0 0.289808782&lt;BR /&gt;1 1/12/2020 0 0.911322784&lt;BR /&gt;1 1/18/2020 0 0.896737429&lt;BR /&gt;1 1/19/2020 0 0.333353538&lt;BR /&gt;1 1/20/2020 0 0.19605047&lt;BR /&gt;1 1/21/2020 0 0.60689124&lt;BR /&gt;1 1/22/2020 1 0.439833751&lt;BR /&gt;1 1/23/2020 0 0.896841702&lt;BR /&gt;1 1/24/2020 0 0.147458515&lt;BR /&gt;1 1/25/2020 0 0.923237859&lt;BR /&gt;1 1/26/2020 0 0.394894147&lt;BR /&gt;1 1/27/2020 0 0.935664763&lt;BR /&gt;1 1/28/2020 0 0.667981258&lt;BR /&gt;1 1/29/2020 1 0.872639458&lt;BR /&gt;1 1/30/2020 0 0.064826005&lt;BR /&gt;1 1/31/2020 0 0.109456422&lt;BR /&gt;1 2/1/2020 0 0.386348541&lt;BR /&gt;1 2/2/2020 0 0.732321068&lt;BR /&gt;1 2/3/2020 0 0.503449099&lt;BR /&gt;2 1/1/2020 0 0.003918297&lt;BR /&gt;2 1/2/2020 0 0.294439369&lt;BR /&gt;2 1/4/2020 1 0.048466828&lt;BR /&gt;2 1/5/2020 0 0.718177034&lt;BR /&gt;2 1/6/2020 0 0.001364211&lt;BR /&gt;2 1/7/2020 0 0.440971903&lt;BR /&gt;2 1/8/2020 0 0.55962246&lt;BR /&gt;2 1/9/2020 0 0.821105414&lt;BR /&gt;2 1/10/2020 1 0.332539126&lt;BR /&gt;2 1/11/2020 0 0.289808782&lt;BR /&gt;2 1/12/2020 0 0.911322784&lt;BR /&gt;2 1/18/2020 0 0.896737429&lt;BR /&gt;2 1/19/2020 0 0.333353538&lt;BR /&gt;2 1/20/2020 0 0.19605047&lt;BR /&gt;2 1/21/2020 0 0.60689124&lt;BR /&gt;2 1/22/2020 1 0.439833751&lt;BR /&gt;2 1/23/2020 0 0.896841702&lt;BR /&gt;2 1/24/2020 0 0.147458515&lt;BR /&gt;2 1/25/2020 0 0.923237859&lt;BR /&gt;2 1/26/2020 0 0.394894147&lt;BR /&gt;2 1/27/2020 0 0.935664763&lt;BR /&gt;2 1/28/2020 0 0.667981258&lt;BR /&gt;2 1/29/2020 1 0.872639458&lt;BR /&gt;2 1/30/2020 0 0.064826005&lt;BR /&gt;2 1/31/2020 0 0.109456422&lt;BR /&gt;2 2/1/2020 0 0.386348541&lt;BR /&gt;2 2/2/2020 0 0.732321068&lt;BR /&gt;2 2/3/2020 0 0.503449099&lt;BR /&gt;2 2/4/2020 0 0.60689124&lt;BR /&gt;2 2/5/2020 0 0.439833751&lt;BR /&gt;2 2/6/2020 0 0.896841702&lt;BR /&gt;2 2/7/2020 0 0.147458515&lt;BR /&gt;2 2/8/2020 0 0.923237859&lt;BR /&gt;;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;data want (drop=event);&lt;BR /&gt;set have (where=(event=1));&lt;BR /&gt;&lt;STRONG&gt;by secid;&lt;/STRONG&gt;&lt;BR /&gt;if _n_=1 then do;&lt;BR /&gt;declare hash h (dataset:'have (drop=event)',ordered:'a');&lt;BR /&gt;h.definekey('obs_date');&lt;BR /&gt;h.definedata(all:'Y');&lt;BR /&gt;h.definedone();&lt;BR /&gt;declare hiter hi ('h');&lt;BR /&gt;h.output(dataset:'h');&lt;BR /&gt;end;&lt;/P&gt;
&lt;P&gt;day=0;&lt;BR /&gt;eventday=obs_date;&lt;BR /&gt;format eventday date9.;&lt;BR /&gt;output;&lt;BR /&gt;hi.setcur(); /*Point hash iterator at hash dataitem for event date */&lt;BR /&gt;do day=1 to 180 while (hi.next()=0);&lt;BR /&gt;output;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 May 2023 22:42:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Expanding-the-data-set-for-each-event-day/m-p/877803#M346778</guid>
      <dc:creator>finans_sas</dc:creator>
      <dc:date>2023-05-26T22:42:49Z</dc:date>
    </item>
    <item>
      <title>Expanding the data set for each event day</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Expanding-the-data-set-for-each-event-day/m-p/877787#M346767</link>
      <description>&lt;P&gt;Hello Everyone:&lt;/P&gt;
&lt;P&gt;I have a dataset similar to the one that I provided below:&lt;/P&gt;
&lt;TABLE width="196"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="68"&gt;obs_date&lt;/TD&gt;
&lt;TD width="64"&gt;event&lt;/TD&gt;
&lt;TD width="64"&gt;value&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;1/1/2020&lt;/TD&gt;
&lt;TD&gt;0&lt;/TD&gt;
&lt;TD&gt;0.003918&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;1/2/2020&lt;/TD&gt;
&lt;TD&gt;0&lt;/TD&gt;
&lt;TD&gt;0.294439&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;1/4/2020&lt;/TD&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;0.048467&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;1/5/2020&lt;/TD&gt;
&lt;TD&gt;0&lt;/TD&gt;
&lt;TD&gt;0.718177&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;1/6/2020&lt;/TD&gt;
&lt;TD&gt;0&lt;/TD&gt;
&lt;TD&gt;0.001364&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;1/7/2020&lt;/TD&gt;
&lt;TD&gt;0&lt;/TD&gt;
&lt;TD&gt;0.440972&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;1/8/2020&lt;/TD&gt;
&lt;TD&gt;0&lt;/TD&gt;
&lt;TD&gt;0.559622&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;1/9/2020&lt;/TD&gt;
&lt;TD&gt;0&lt;/TD&gt;
&lt;TD&gt;0.821105&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;1/10/2020&lt;/TD&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;0.332539&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;1/11/2020&lt;/TD&gt;
&lt;TD&gt;0&lt;/TD&gt;
&lt;TD&gt;0.289809&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;1/12/2020&lt;/TD&gt;
&lt;TD&gt;0&lt;/TD&gt;
&lt;TD&gt;0.911323&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;1/18/2020&lt;/TD&gt;
&lt;TD&gt;0&lt;/TD&gt;
&lt;TD&gt;0.896737&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;1/19/2020&lt;/TD&gt;
&lt;TD&gt;0&lt;/TD&gt;
&lt;TD&gt;0.333354&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;1/20/2020&lt;/TD&gt;
&lt;TD&gt;0&lt;/TD&gt;
&lt;TD&gt;0.19605&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;1/21/2020&lt;/TD&gt;
&lt;TD&gt;0&lt;/TD&gt;
&lt;TD&gt;0.606891&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;1/22/2020&lt;/TD&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;0.439834&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;1/23/2020&lt;/TD&gt;
&lt;TD&gt;0&lt;/TD&gt;
&lt;TD&gt;0.896842&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;1/24/2020&lt;/TD&gt;
&lt;TD&gt;0&lt;/TD&gt;
&lt;TD&gt;0.147459&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;.....&lt;/P&gt;
&lt;P&gt;My objective is to retain the next 180 observations of "value" every time event=1 (days do not have to be consecutive). At the end, I would like to have the following dataset:&lt;/P&gt;
&lt;TABLE width="271"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="88.4833px" height="30px"&gt;obs_date&lt;/TD&gt;
&lt;TD width="85.6833px" height="30px"&gt;eventday&lt;/TD&gt;
&lt;TD width="81.3px" height="30px"&gt;value&lt;/TD&gt;
&lt;TD width="84.5px" height="30px"&gt;day_count&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="88.4833px" height="30px"&gt;1/4/2020&lt;/TD&gt;
&lt;TD width="85.6833px" height="30px"&gt;1/4/2020&lt;/TD&gt;
&lt;TD width="81.3px" height="30px"&gt;0.048467&lt;/TD&gt;
&lt;TD width="84.5px" height="30px"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="88.4833px" height="30px"&gt;1/5/2020&lt;/TD&gt;
&lt;TD width="85.6833px" height="30px"&gt;1/4/2020&lt;/TD&gt;
&lt;TD width="81.3px" height="30px"&gt;0.718177&lt;/TD&gt;
&lt;TD width="84.5px" height="30px"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="88.4833px" height="30px"&gt;1/6/2020&lt;/TD&gt;
&lt;TD width="85.6833px" height="30px"&gt;1/4/2020&lt;/TD&gt;
&lt;TD width="81.3px" height="30px"&gt;0.001364&lt;/TD&gt;
&lt;TD width="84.5px" height="30px"&gt;2&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="88.4833px" height="30px"&gt;1/7/2020&lt;/TD&gt;
&lt;TD width="85.6833px" height="30px"&gt;1/4/2020&lt;/TD&gt;
&lt;TD width="81.3px" height="30px"&gt;0.440972&lt;/TD&gt;
&lt;TD width="84.5px" height="30px"&gt;3&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="88.4833px" height="30px"&gt;1/8/2020&lt;/TD&gt;
&lt;TD width="85.6833px" height="30px"&gt;1/4/2020&lt;/TD&gt;
&lt;TD width="81.3px" height="30px"&gt;0.559622&lt;/TD&gt;
&lt;TD width="84.5px" height="30px"&gt;4&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="88.4833px" height="30px"&gt;1/9/2020&lt;/TD&gt;
&lt;TD width="85.6833px" height="30px"&gt;1/4/2020&lt;/TD&gt;
&lt;TD width="81.3px" height="30px"&gt;0.821105&lt;/TD&gt;
&lt;TD width="84.5px" height="30px"&gt;5&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="88.4833px" height="30px"&gt;1/10/2020&lt;/TD&gt;
&lt;TD width="85.6833px" height="30px"&gt;1/4/2020&lt;/TD&gt;
&lt;TD width="81.3px" height="30px"&gt;0.332539&lt;/TD&gt;
&lt;TD width="84.5px" height="30px"&gt;6&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="88.4833px" height="30px"&gt;1/11/2020&lt;/TD&gt;
&lt;TD width="85.6833px" height="30px"&gt;1/4/2020&lt;/TD&gt;
&lt;TD width="81.3px" height="30px"&gt;0.289809&lt;/TD&gt;
&lt;TD width="84.5px" height="30px"&gt;7&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="88.4833px" height="30px"&gt;1/12/2020&lt;/TD&gt;
&lt;TD width="85.6833px" height="30px"&gt;1/4/2020&lt;/TD&gt;
&lt;TD width="81.3px" height="30px"&gt;0.911323&lt;/TD&gt;
&lt;TD width="84.5px" height="30px"&gt;8&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="88.4833px" height="30px"&gt;1/18/2020&lt;/TD&gt;
&lt;TD width="85.6833px" height="30px"&gt;1/4/2020&lt;/TD&gt;
&lt;TD width="81.3px" height="30px"&gt;0.896737&lt;/TD&gt;
&lt;TD width="84.5px" height="30px"&gt;9&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="88.4833px" height="30px"&gt;1/19/2020&lt;/TD&gt;
&lt;TD width="85.6833px" height="30px"&gt;1/4/2020&lt;/TD&gt;
&lt;TD width="81.3px" height="30px"&gt;0.333354&lt;/TD&gt;
&lt;TD width="84.5px" height="30px"&gt;10&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="88.4833px" height="30px"&gt;…&lt;/TD&gt;
&lt;TD width="85.6833px" height="30px"&gt;1/4/2020&lt;/TD&gt;
&lt;TD width="81.3px" height="30px"&gt;....&lt;/TD&gt;
&lt;TD width="84.5px" height="30px"&gt;…&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="88.4833px" height="30px"&gt;…&lt;/TD&gt;
&lt;TD width="85.6833px" height="30px"&gt;1/4/2020&lt;/TD&gt;
&lt;TD width="81.3px" height="30px"&gt;....&lt;/TD&gt;
&lt;TD width="84.5px" height="30px"&gt;180&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="88.4833px" height="30px"&gt;1/10/2020&lt;/TD&gt;
&lt;TD width="85.6833px" height="30px"&gt;1/10/2020&lt;/TD&gt;
&lt;TD width="81.3px" height="30px"&gt;0.332539&lt;/TD&gt;
&lt;TD width="84.5px" height="30px"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="88.4833px" height="30px"&gt;1/11/2020&lt;/TD&gt;
&lt;TD width="85.6833px" height="30px"&gt;1/10/2020&lt;/TD&gt;
&lt;TD width="81.3px" height="30px"&gt;0.289809&lt;/TD&gt;
&lt;TD width="84.5px" height="30px"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="88.4833px" height="30px"&gt;1/12/2020&lt;/TD&gt;
&lt;TD width="85.6833px" height="30px"&gt;1/10/2020&lt;/TD&gt;
&lt;TD width="81.3px" height="30px"&gt;0.911323&lt;/TD&gt;
&lt;TD width="84.5px" height="30px"&gt;2&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="88.4833px" height="30px"&gt;1/18/2020&lt;/TD&gt;
&lt;TD width="85.6833px" height="30px"&gt;1/10/2020&lt;/TD&gt;
&lt;TD width="81.3px" height="30px"&gt;0.896737&lt;/TD&gt;
&lt;TD width="84.5px" height="30px"&gt;3&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="88.4833px" height="30px"&gt;1/19/2020&lt;/TD&gt;
&lt;TD width="85.6833px" height="30px"&gt;1/10/2020&lt;/TD&gt;
&lt;TD width="81.3px" height="30px"&gt;0.333354&lt;/TD&gt;
&lt;TD width="84.5px" height="30px"&gt;4&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="88.4833px" height="30px"&gt;1/20/2020&lt;/TD&gt;
&lt;TD width="85.6833px" height="30px"&gt;1/10/2020&lt;/TD&gt;
&lt;TD width="81.3px" height="30px"&gt;0.19605&lt;/TD&gt;
&lt;TD width="84.5px" height="30px"&gt;5&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="88.4833px" height="30px"&gt;1/21/2020&lt;/TD&gt;
&lt;TD width="85.6833px" height="30px"&gt;1/10/2020&lt;/TD&gt;
&lt;TD width="81.3px" height="30px"&gt;0.606891&lt;/TD&gt;
&lt;TD width="84.5px" height="30px"&gt;6&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="88.4833px" height="30px"&gt;1/22/2020&lt;/TD&gt;
&lt;TD width="85.6833px" height="30px"&gt;1/10/2020&lt;/TD&gt;
&lt;TD width="81.3px" height="30px"&gt;0.439834&lt;/TD&gt;
&lt;TD width="84.5px" height="30px"&gt;7&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="88.4833px" height="30px"&gt;1/23/2020&lt;/TD&gt;
&lt;TD width="85.6833px" height="30px"&gt;1/10/2020&lt;/TD&gt;
&lt;TD width="81.3px" height="30px"&gt;0.896842&lt;/TD&gt;
&lt;TD width="84.5px" height="30px"&gt;8&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="88.4833px" height="30px"&gt;1/24/2020&lt;/TD&gt;
&lt;TD width="85.6833px" height="30px"&gt;1/10/2020&lt;/TD&gt;
&lt;TD width="81.3px" height="30px"&gt;0.147459&lt;/TD&gt;
&lt;TD width="84.5px" height="30px"&gt;9&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="88.4833px" height="30px"&gt;1/25/2020&lt;/TD&gt;
&lt;TD width="85.6833px" height="30px"&gt;1/10/2020&lt;/TD&gt;
&lt;TD width="81.3px" height="30px"&gt;0.923238&lt;/TD&gt;
&lt;TD width="84.5px" height="30px"&gt;10&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="88.4833px" height="30px"&gt;…&lt;/TD&gt;
&lt;TD width="85.6833px" height="30px"&gt;1/10/2020&lt;/TD&gt;
&lt;TD width="81.3px" height="30px"&gt;...&lt;/TD&gt;
&lt;TD width="84.5px" height="30px"&gt;…&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="88.4833px" height="30px"&gt;…&lt;/TD&gt;
&lt;TD width="85.6833px" height="30px"&gt;1/10/2020&lt;/TD&gt;
&lt;TD width="81.3px" height="30px"&gt;...&lt;/TD&gt;
&lt;TD width="84.5px" height="30px"&gt;180&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I could not figure out how to perform this data step. I would love to get your suggestions on it. Thank you so much for your help in advance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 May 2023 20:52:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Expanding-the-data-set-for-each-event-day/m-p/877787#M346767</guid>
      <dc:creator>finans_sas</dc:creator>
      <dc:date>2023-05-26T20:52:33Z</dc:date>
    </item>
    <item>
      <title>Re: Remove extra spaces and combine letters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Remove-extra-spaces-and-combine-letters/m-p/751342#M236507</link>
      <description>&lt;P&gt;Thank you so much for your help, Ksharp! I will try your suggestion.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jun 2021 18:53:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Remove-extra-spaces-and-combine-letters/m-p/751342#M236507</guid>
      <dc:creator>finans_sas</dc:creator>
      <dc:date>2021-06-30T18:53:22Z</dc:date>
    </item>
    <item>
      <title>Re: Remove extra spaces and combine letters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Remove-extra-spaces-and-combine-letters/m-p/751341#M236506</link>
      <description>&lt;P&gt;Thank you so much for your help, Patrick! I will try your suggestion.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jun 2021 18:52:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Remove-extra-spaces-and-combine-letters/m-p/751341#M236506</guid>
      <dc:creator>finans_sas</dc:creator>
      <dc:date>2021-06-30T18:52:21Z</dc:date>
    </item>
    <item>
      <title>Re: Remove extra spaces and combine letters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Remove-extra-spaces-and-combine-letters/m-p/751338#M236503</link>
      <description>&lt;P&gt;Thank you so much, ChrisNZ for this code! I really appreciate it. When I used it, it was able to combine the letters the way I wanted, but it produces errors when I have names that do not need to be modified. For example, it converts "ABC Supply" to "ABCSupply ABC Supply" whereas the desired outcome here is the same as the actual outcome (ABC Supply). Is there a way to remedy this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;On a separate note, sometimes I have single letters in different parts of the names such as ABC U S Supply, which should be changed to ABC US Supply. However, there are not many of those.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you so much!&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jun 2021 18:45:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Remove-extra-spaces-and-combine-letters/m-p/751338#M236503</guid>
      <dc:creator>finans_sas</dc:creator>
      <dc:date>2021-06-30T18:45:31Z</dc:date>
    </item>
    <item>
      <title>Remove extra spaces and combine letters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Remove-extra-spaces-and-combine-letters/m-p/751065#M236364</link>
      <description>&lt;P&gt;Hello Everyone:&lt;/P&gt;
&lt;P&gt;I have a column with names, but there are extra spaces in the names. I provided a sample dataset below. My goal is to remove the space between single letters and combine them into one word. However, I do not want to merge the single-letters with multi-letter words. Is it possible to write a script such that if it will search in a string and stop where a multi-letter word first appears (for example, the word &lt;EM&gt;Supply&lt;/EM&gt; in the first case) and it will merge all the letters to the left of it? I would really appreciate your help with step.&lt;/P&gt;
&lt;P&gt;Thank you so much&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE width="290"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="145"&gt;&lt;STRONG&gt;Actual&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="145"&gt;&lt;STRONG&gt;Desired&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;A B Supply Inc&lt;/TD&gt;
&lt;TD&gt;AB Supply Inc&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;A B C Machines Inc&lt;/TD&gt;
&lt;TD&gt;ABC Machines Inc&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;A B C D Operations Inc&lt;/TD&gt;
&lt;TD&gt;ABCD Operations Inc&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;A B C D E US Inc&lt;/TD&gt;
&lt;TD&gt;ABCDE US Inc&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jun 2021 20:56:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Remove-extra-spaces-and-combine-letters/m-p/751065#M236364</guid>
      <dc:creator>finans_sas</dc:creator>
      <dc:date>2021-06-29T20:56:41Z</dc:date>
    </item>
    <item>
      <title>Re: Help with running a SAS macro (no output is generated)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-running-a-SAS-macro-no-output-is-generated/m-p/751062#M236362</link>
      <description>Thank you so much, Reeza!</description>
      <pubDate>Tue, 29 Jun 2021 20:45:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-running-a-SAS-macro-no-output-is-generated/m-p/751062#M236362</guid>
      <dc:creator>finans_sas</dc:creator>
      <dc:date>2021-06-29T20:45:09Z</dc:date>
    </item>
  </channel>
</rss>

