<?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: solutions to Chapter 21 Question 10 SAS programming by Example in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/solutions-to-Chapter-21-Question-10-SAS-programming-by-Example/m-p/767616#M243389</link>
    <description>&lt;P&gt;data sales(keep=saleDate Amount) inventory(keep=partno Quantity);&lt;BR /&gt;&amp;nbsp;infile '/home/wckwone/SASbyExample/mixed_recs.txt' truncover;&lt;BR /&gt;&amp;nbsp;input &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/274655"&gt;@16&lt;/a&gt; type 1. @;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;if type=1 then do;&lt;BR /&gt;&amp;nbsp; input @1 saleDate mmddyy10. Amount 11-15;&lt;BR /&gt;&amp;nbsp; output sales;&lt;BR /&gt;&amp;nbsp;end;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;else do;&lt;BR /&gt;&amp;nbsp; input partno $1-6 Quantity 8-11;&lt;BR /&gt;&amp;nbsp; output Inventory;&lt;BR /&gt;&amp;nbsp;end;&lt;BR /&gt;run;&lt;/P&gt;</description>
    <pubDate>Tue, 14 Sep 2021 06:27:43 GMT</pubDate>
    <dc:creator>Dennis_K</dc:creator>
    <dc:date>2021-09-14T06:27:43Z</dc:date>
    <item>
      <title>solutions to Chapter 21 Question 10 SAS programming by Example</title>
      <link>https://communities.sas.com/t5/SAS-Programming/solutions-to-Chapter-21-Question-10-SAS-programming-by-Example/m-p/767608#M243384</link>
      <description>&lt;P&gt;10. The raw data file Mixed_Recs.txt contains two types of records. Records with a 1 in Column 16&lt;BR /&gt;contain sales records with Date (in mmddyy10. form) starting in Column 1 and Amount in Columns&lt;BR /&gt;11–15 (in standard numeric form). Records with a 2 in Column 16 are inventory records and they&lt;BR /&gt;contain two values, a part number (character, 5 bytes) starting in column 1 and a quantity. These two&lt;BR /&gt;values are separated by a space. A listing of this file is shown below:&lt;BR /&gt;10/21/2005 1001&lt;BR /&gt;11/15/2005 2001&lt;BR /&gt;A13688 250 2&lt;BR /&gt;B11112 300 2&lt;BR /&gt;01/03/2005 50001&lt;BR /&gt;A88778 19 2&lt;BR /&gt;Write a DATA step to read this file and create two SAS data sets, one called Sales and the other&lt;BR /&gt;Inventory. The two data sets should look like this:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Sep 2021 05:19:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/solutions-to-Chapter-21-Question-10-SAS-programming-by-Example/m-p/767608#M243384</guid>
      <dc:creator>Dennis_K</dc:creator>
      <dc:date>2021-09-14T05:19:29Z</dc:date>
    </item>
    <item>
      <title>Re: solutions to Chapter 21 Question 10 SAS programming by Example</title>
      <link>https://communities.sas.com/t5/SAS-Programming/solutions-to-Chapter-21-Question-10-SAS-programming-by-Example/m-p/767609#M243385</link>
      <description>my code is as follows:&lt;BR /&gt;&lt;BR /&gt;data sales inventory;&lt;BR /&gt;	infile '/home/wckwone/SASbyExample/mixed_recs.txt' truncover;&lt;BR /&gt;	input &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/274655"&gt;@16&lt;/a&gt; type 1. @;&lt;BR /&gt;	&lt;BR /&gt;	if type=1 then do;&lt;BR /&gt;		keep saleDate Amount;&lt;BR /&gt;		input @1 saleDate mmddyy10. Amount 11-15;&lt;BR /&gt;		output sales;&lt;BR /&gt;		&lt;BR /&gt;		&lt;BR /&gt;	end;&lt;BR /&gt;	&lt;BR /&gt;	else do;&lt;BR /&gt;		keep partno Quantity ;&lt;BR /&gt;		&lt;BR /&gt;		output Inventory;&lt;BR /&gt;		&lt;BR /&gt;	end;&lt;BR /&gt;	&lt;BR /&gt;	drop type;&lt;BR /&gt;run;</description>
      <pubDate>Tue, 14 Sep 2021 05:30:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/solutions-to-Chapter-21-Question-10-SAS-programming-by-Example/m-p/767609#M243385</guid>
      <dc:creator>Dennis_K</dc:creator>
      <dc:date>2021-09-14T05:30:26Z</dc:date>
    </item>
    <item>
      <title>Re: solutions to Chapter 21 Question 10 SAS programming by Example</title>
      <link>https://communities.sas.com/t5/SAS-Programming/solutions-to-Chapter-21-Question-10-SAS-programming-by-Example/m-p/767612#M243387</link>
      <description>&lt;P&gt;KEEP is a declarative statement that affects&amp;nbsp;&lt;EM&gt;all&lt;/EM&gt; output datasets and is dealt with at compile time. So it is not&amp;nbsp;&lt;EM&gt;executed&lt;/EM&gt;, meaning it cannot be used conditionally.&lt;/P&gt;
&lt;P&gt;Use KEEP= dataset options in the DATA statement instead.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Sep 2021 06:09:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/solutions-to-Chapter-21-Question-10-SAS-programming-by-Example/m-p/767612#M243387</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-09-14T06:09:40Z</dc:date>
    </item>
    <item>
      <title>Re: solutions to Chapter 21 Question 10 SAS programming by Example</title>
      <link>https://communities.sas.com/t5/SAS-Programming/solutions-to-Chapter-21-Question-10-SAS-programming-by-Example/m-p/767616#M243389</link>
      <description>&lt;P&gt;data sales(keep=saleDate Amount) inventory(keep=partno Quantity);&lt;BR /&gt;&amp;nbsp;infile '/home/wckwone/SASbyExample/mixed_recs.txt' truncover;&lt;BR /&gt;&amp;nbsp;input &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/274655"&gt;@16&lt;/a&gt; type 1. @;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;if type=1 then do;&lt;BR /&gt;&amp;nbsp; input @1 saleDate mmddyy10. Amount 11-15;&lt;BR /&gt;&amp;nbsp; output sales;&lt;BR /&gt;&amp;nbsp;end;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;else do;&lt;BR /&gt;&amp;nbsp; input partno $1-6 Quantity 8-11;&lt;BR /&gt;&amp;nbsp; output Inventory;&lt;BR /&gt;&amp;nbsp;end;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Sep 2021 06:27:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/solutions-to-Chapter-21-Question-10-SAS-programming-by-Example/m-p/767616#M243389</guid>
      <dc:creator>Dennis_K</dc:creator>
      <dc:date>2021-09-14T06:27:43Z</dc:date>
    </item>
    <item>
      <title>Re: solutions to Chapter 21 Question 10 SAS programming by Example</title>
      <link>https://communities.sas.com/t5/SAS-Programming/solutions-to-Chapter-21-Question-10-SAS-programming-by-Example/m-p/767621#M243390</link>
      <description>&lt;P&gt;So what is your question now?&lt;/P&gt;
&lt;P&gt;If you receive messages in the log that puzzle you, or the result does not match your expectations, post the&amp;nbsp;&lt;EM&gt;complete&lt;/EM&gt; log by copy/pasting it into a window opened with this button:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/54552i914D97BE1B0F21E5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" alt="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Similarly, post a few lines of your input data, using the same method.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Sep 2021 06:44:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/solutions-to-Chapter-21-Question-10-SAS-programming-by-Example/m-p/767621#M243390</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-09-14T06:44:03Z</dc:date>
    </item>
    <item>
      <title>Re: solutions to Chapter 21 Question 10 SAS programming by Example</title>
      <link>https://communities.sas.com/t5/SAS-Programming/solutions-to-Chapter-21-Question-10-SAS-programming-by-Example/m-p/767633#M243395</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;Initially, I have problems dropping the unnecessary columns. Your Suggestion have solve the issue.&lt;/P&gt;
&lt;P&gt;Thanks a lot.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Sep 2021 09:02:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/solutions-to-Chapter-21-Question-10-SAS-programming-by-Example/m-p/767633#M243395</guid>
      <dc:creator>Dennis_K</dc:creator>
      <dc:date>2021-09-14T09:02:48Z</dc:date>
    </item>
  </channel>
</rss>

