<?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: i am having error please help me in Programming 1 and 2</title>
    <link>https://communities.sas.com/t5/Programming-1-and-2/i-am-having-error-please-help-me/m-p/869467#M1331</link>
    <description>&lt;P&gt;You cannot just post some random code, expect someone to run it, find the error and debug it for you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please frame your questions as follows if you want help efficiently. This will allow us to help you get your problems solved.&amp;nbsp;&lt;/P&gt;
&lt;P data-unlink="true"&gt;In general, see this &lt;A href="https://communities.sas.com/t5/SAS-Support-Communities/How-to-ask-a-good-question-and-receive-a-fast-reply/ta-p/417192" target="_self"&gt;post&lt;/A&gt;&amp;nbsp;&amp;nbsp;or &lt;A href="https://stackoverflow.com/help/how-to-ask" target="_self"&gt;this post&lt;/A&gt; on how to ask good programming questions. You'll save yourself a ton of time and get your answers much faster.&lt;/P&gt;
&lt;P data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is my problem (I am trying to read in data that has two parts to a name separated by a space into one variable but it's not working correctly)&lt;/P&gt;
&lt;P&gt;What you'ved tried: This is my code so far&lt;/P&gt;
&lt;P&gt;What happens with that code:&lt;/P&gt;
&lt;P&gt;This is what it generates and this is the log.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 12 Apr 2023 20:01:07 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2023-04-12T20:01:07Z</dc:date>
    <item>
      <title>i am having error please help me</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/i-am-having-error-please-help-me/m-p/868920#M1316</link>
      <description>&lt;P&gt;data inventory;&lt;BR /&gt;retain id item price vendor;&lt;/P&gt;&lt;P&gt;input id item$ 11. price vendor$ 20.;&lt;BR /&gt;msrp=price*1.5;&lt;BR /&gt;label id ='Item Id' msrp='Max Retail price';&lt;BR /&gt;cards;&lt;BR /&gt;1 apple 2.19 walmart&lt;BR /&gt;2 grapes 1.99 shop$stop&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2023 19:34:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/i-am-having-error-please-help-me/m-p/868920#M1316</guid>
      <dc:creator>kinjal</dc:creator>
      <dc:date>2023-04-10T19:34:24Z</dc:date>
    </item>
    <item>
      <title>Re: i am having error please help me</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/i-am-having-error-please-help-me/m-p/868922#M1317</link>
      <description>&lt;P&gt;Normally when you are a having problems, you go ahead and describe the problems to us, and show us the ENTIRE log for this code. Otherwise how would we know what the error is that you are having?&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2023 19:38:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/i-am-having-error-please-help-me/m-p/868922#M1317</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-04-10T19:38:59Z</dc:date>
    </item>
    <item>
      <title>Re: i am having error please help me</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/i-am-having-error-please-help-me/m-p/868923#M1318</link>
      <description>getting dots as output in price and vendor variables</description>
      <pubDate>Mon, 10 Apr 2023 19:41:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/i-am-having-error-please-help-me/m-p/868923#M1318</guid>
      <dc:creator>kinjal</dc:creator>
      <dc:date>2023-04-10T19:41:47Z</dc:date>
    </item>
    <item>
      <title>Re: i am having error please help me</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/i-am-having-error-please-help-me/m-p/868924#M1319</link>
      <description>getting dot as output in price and vendor variable.</description>
      <pubDate>Mon, 10 Apr 2023 19:42:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/i-am-having-error-please-help-me/m-p/868924#M1319</guid>
      <dc:creator>kinjal</dc:creator>
      <dc:date>2023-04-10T19:42:42Z</dc:date>
    </item>
    <item>
      <title>Re: i am having error please help me</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/i-am-having-error-please-help-me/m-p/868926#M1320</link>
      <description>I am very new in sas programing need help&lt;BR /&gt;</description>
      <pubDate>Mon, 10 Apr 2023 19:43:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/i-am-having-error-please-help-me/m-p/868926#M1320</guid>
      <dc:creator>kinjal</dc:creator>
      <dc:date>2023-04-10T19:43:37Z</dc:date>
    </item>
    <item>
      <title>Re: i am having error please help me</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/i-am-having-error-please-help-me/m-p/868927#M1321</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;input id item : $11. price : best12. vendor : $20.;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 10 Apr 2023 19:45:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/i-am-having-error-please-help-me/m-p/868927#M1321</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2023-04-10T19:45:39Z</dc:date>
    </item>
    <item>
      <title>Re: i am having error please help me</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/i-am-having-error-please-help-me/m-p/868930#M1322</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2023 19:50:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/i-am-having-error-please-help-me/m-p/868930#M1322</guid>
      <dc:creator>kinjal</dc:creator>
      <dc:date>2023-04-10T19:50:45Z</dc:date>
    </item>
    <item>
      <title>Re: i am having error please help me</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/i-am-having-error-please-help-me/m-p/868932#M1323</link>
      <description>if you don't mind then please explain me : and best why we use here ??</description>
      <pubDate>Mon, 10 Apr 2023 19:56:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/i-am-having-error-please-help-me/m-p/868932#M1323</guid>
      <dc:creator>kinjal</dc:creator>
      <dc:date>2023-04-10T19:56:58Z</dc:date>
    </item>
    <item>
      <title>Re: i am having error please help me</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/i-am-having-error-please-help-me/m-p/868936#M1324</link>
      <description>When you specify $11 without a modifier SAS reads 11 characters. With the modifier it reads until it encounters a space is the biggest reason. &lt;BR /&gt;&lt;BR /&gt;Another way to achieve this is to specify informats not on the INPUT statement.</description>
      <pubDate>Mon, 10 Apr 2023 20:19:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/i-am-having-error-please-help-me/m-p/868936#M1324</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2023-04-10T20:19:23Z</dc:date>
    </item>
    <item>
      <title>Re: i am having error please help me</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/i-am-having-error-please-help-me/m-p/868937#M1325</link>
      <description>&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Programming/Colon-Modifier/td-p/240240" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/Colon-Modifier/td-p/240240&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;#2 here&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/resources/papers/proceedings/proceedings/sugi26/p073-26.pdf" target="_blank"&gt;https://support.sas.com/resources/papers/proceedings/proceedings/sugi26/p073-26.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2023 20:20:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/i-am-having-error-please-help-me/m-p/868937#M1325</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2023-04-10T20:20:15Z</dc:date>
    </item>
    <item>
      <title>Re: i am having error please help me</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/i-am-having-error-please-help-me/m-p/869458#M1326</link>
      <description>data food;&lt;BR /&gt;input @1Restaurant$ 11.@12NumEmploy 1. @13Location$ 20.;&lt;BR /&gt;datalines;&lt;BR /&gt;&lt;BR /&gt;burger king 5 toronto;&lt;BR /&gt;&lt;BR /&gt;run;</description>
      <pubDate>Wed, 12 Apr 2023 19:19:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/i-am-having-error-please-help-me/m-p/869458#M1326</guid>
      <dc:creator>kinjal</dc:creator>
      <dc:date>2023-04-12T19:19:03Z</dc:date>
    </item>
    <item>
      <title>Re: i am having error please help me</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/i-am-having-error-please-help-me/m-p/869460#M1327</link>
      <description>Is that a question?</description>
      <pubDate>Wed, 12 Apr 2023 19:34:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/i-am-having-error-please-help-me/m-p/869460#M1327</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2023-04-12T19:34:36Z</dc:date>
    </item>
    <item>
      <title>Re: i am having error please help me</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/i-am-having-error-please-help-me/m-p/869462#M1328</link>
      <description>&lt;P&gt;Yes, if you are having trouble, please state a clear question and describe what is wrong.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Apr 2023 19:38:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/i-am-having-error-please-help-me/m-p/869462#M1328</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-04-12T19:38:24Z</dc:date>
    </item>
    <item>
      <title>Re: i am having error please help me</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/i-am-having-error-please-help-me/m-p/869464#M1329</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/441667"&gt;@kinjal&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;if you don't mind then please explain me : and best why we use here ??&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If you use an INFORMAT in the INPUT statement then SAS will use FORMATTED MODE input for that variable.&lt;/P&gt;
&lt;P&gt;By adding the colon modifier you are telling the INPUT statement to use LIST MODE input for that variable instead.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You don't really need to include any special informats for any of your variables.&amp;nbsp; The only advantage of using an INFORMAT for ITEM or VENDOR in the INPUT statement is if you have not previously told SAS what type of variables those are.&amp;nbsp; If the first place that SAS sees the variable (at least the first place where the type of the variable is important, unlike in the RETAIN statement) is in an INPUT statement then SAS will use the width of the INFORMAT to make a GUESS about how you wanted the variable defined.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But the code will work better and be clearer if you just go ahead and DEFINE the variables before you use them in the INPUT statement.&amp;nbsp; There is also no need to tell SAS that the variable values need to be retained across iterations of the data step.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data inventory;
  length id 8 item $11 price 8 vendor $20 msrp 8;
  input id item price vendor;
  msrp=price*1.5;
  label id ='Item Id' msrp='Max Retail price';
cards;
1 apple 2.19 walmart
2 grapes 1.99 shop$stop
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Tom_0-1681328353081.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/82651i08466948930300D3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Tom_0-1681328353081.png" alt="Tom_0-1681328353081.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Apr 2023 19:41:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/i-am-having-error-please-help-me/m-p/869464#M1329</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-04-12T19:41:16Z</dc:date>
    </item>
    <item>
      <title>Re: i am having error please help me</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/i-am-having-error-please-help-me/m-p/869465#M1330</link>
      <description>Yes dear can you able to help me ??##- Please type your reply above this&lt;BR /&gt;line. No attachments. -##</description>
      <pubDate>Wed, 12 Apr 2023 19:42:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/i-am-having-error-please-help-me/m-p/869465#M1330</guid>
      <dc:creator>kinjal</dc:creator>
      <dc:date>2023-04-12T19:42:29Z</dc:date>
    </item>
    <item>
      <title>Re: i am having error please help me</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/i-am-having-error-please-help-me/m-p/869467#M1331</link>
      <description>&lt;P&gt;You cannot just post some random code, expect someone to run it, find the error and debug it for you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please frame your questions as follows if you want help efficiently. This will allow us to help you get your problems solved.&amp;nbsp;&lt;/P&gt;
&lt;P data-unlink="true"&gt;In general, see this &lt;A href="https://communities.sas.com/t5/SAS-Support-Communities/How-to-ask-a-good-question-and-receive-a-fast-reply/ta-p/417192" target="_self"&gt;post&lt;/A&gt;&amp;nbsp;&amp;nbsp;or &lt;A href="https://stackoverflow.com/help/how-to-ask" target="_self"&gt;this post&lt;/A&gt; on how to ask good programming questions. You'll save yourself a ton of time and get your answers much faster.&lt;/P&gt;
&lt;P data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is my problem (I am trying to read in data that has two parts to a name separated by a space into one variable but it's not working correctly)&lt;/P&gt;
&lt;P&gt;What you'ved tried: This is my code so far&lt;/P&gt;
&lt;P&gt;What happens with that code:&lt;/P&gt;
&lt;P&gt;This is what it generates and this is the log.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Apr 2023 20:01:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/i-am-having-error-please-help-me/m-p/869467#M1331</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2023-04-12T20:01:07Z</dc:date>
    </item>
    <item>
      <title>Re: i am having error please help me</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/i-am-having-error-please-help-me/m-p/869468#M1332</link>
      <description>Thank you. I will try better next time.</description>
      <pubDate>Wed, 12 Apr 2023 20:05:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/i-am-having-error-please-help-me/m-p/869468#M1332</guid>
      <dc:creator>kinjal</dc:creator>
      <dc:date>2023-04-12T20:05:20Z</dc:date>
    </item>
    <item>
      <title>Re: i am having error please help me</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/i-am-having-error-please-help-me/m-p/869475#M1333</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data food;
infile datalines truncover;
input @1 Restaurant $11.  @13 NumEmploy 1. @15 Location $20.;
datalines;
burger king 5 toronto
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 12 Apr 2023 20:55:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/i-am-having-error-please-help-me/m-p/869475#M1333</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2023-04-12T20:55:51Z</dc:date>
    </item>
  </channel>
</rss>

