<?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: SAS® Programming 2: Data Manipulation Techniques Lesson 6 Practice Challenge in Programming 1 and 2</title>
    <link>https://communities.sas.com/t5/Programming-1-and-2/SAS-Programming-2-Data-Manipulation-Techniques-Lesson-6-Practice/m-p/976331#M1554</link>
    <description>&lt;P&gt;You are asked to change from a DO-loop with incremented numeric year, to create a character value like "Year 1", "Year 2" etc.&lt;/P&gt;
&lt;P&gt;This can be done with a DO-loop like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do Year = "Year 1", "Year 2" etc.&lt;/P&gt;</description>
    <pubDate>Fri, 03 Oct 2025 14:33:56 GMT</pubDate>
    <dc:creator>OleSteen</dc:creator>
    <dc:date>2025-10-03T14:33:56Z</dc:date>
    <item>
      <title>SAS® Programming 2: Data Manipulation Techniques Lesson 6 Practice Challenge</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/SAS-Programming-2-Data-Manipulation-Techniques-Lesson-6-Practice/m-p/962347#M1539</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Modify the DO statement to produce the following results. The DO statement will now be based on a list of values instead of a value that is incremented.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;An alternate solution instead of:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-SPOILER&gt;typing out the Year 1, Year 2... manually which the solution suggests, could use&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;YearZ=cat('Year ', Year);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data IncMPG;
    set sashelp.cars;
    MPG=mean(MPG_City, MPG_Highway);

DO Year = 1 to 5; 
MPG=sum(MPG*1.03);
YearZ=cat('Year ', Year);
output;
end;
run;

title 'Projected Fuel Efficiency with 3% Annual Increase';
proc print data=IncMPG;
    var Make Model YearZ MPG;
	format MPG 4.1;
run;
title;
&lt;/CODE&gt;&lt;/PRE&gt;
Which gives the same end result.&amp;nbsp;&lt;/LI-SPOILER&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2025 21:48:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/SAS-Programming-2-Data-Manipulation-Techniques-Lesson-6-Practice/m-p/962347#M1539</guid>
      <dc:creator>coder1234</dc:creator>
      <dc:date>2025-03-20T21:48:35Z</dc:date>
    </item>
    <item>
      <title>Re: SAS® Programming 2: Data Manipulation Techniques Lesson 6 Practice Challenge</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/SAS-Programming-2-Data-Manipulation-Techniques-Lesson-6-Practice/m-p/976331#M1554</link>
      <description>&lt;P&gt;You are asked to change from a DO-loop with incremented numeric year, to create a character value like "Year 1", "Year 2" etc.&lt;/P&gt;
&lt;P&gt;This can be done with a DO-loop like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do Year = "Year 1", "Year 2" etc.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Oct 2025 14:33:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/SAS-Programming-2-Data-Manipulation-Techniques-Lesson-6-Practice/m-p/976331#M1554</guid>
      <dc:creator>OleSteen</dc:creator>
      <dc:date>2025-10-03T14:33:56Z</dc:date>
    </item>
  </channel>
</rss>

