<?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: Need to know the Logic of SAS processing for this program. in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Need-to-know-the-Logic-of-SAS-processing-for-this-program/m-p/200767#M4417</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A __default_attr="149594" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt; I am sorry for the inconvience . I think i missinterpret your earlier suggestion, as i was talking about trailing(@) and ignored the explaination of @1 point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the correction and help me to understand the whole processing of the code. Your explaination helped me alot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Ved&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Apr 2015 03:42:07 GMT</pubDate>
    <dc:creator>SASFREAK</dc:creator>
    <dc:date>2015-04-24T03:42:07Z</dc:date>
    <item>
      <title>Need to know the Logic of SAS processing for this program.</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Need-to-know-the-Logic-of-SAS-processing-for-this-program/m-p/200758#M4408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am preparing for Base SAS Certification , and need to know basic logic behind the following below question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Given the text file COLORS.TXT:&lt;/P&gt;&lt;P&gt;----+----1----+----2----+----&lt;/P&gt;&lt;P&gt;RED&amp;nbsp;&amp;nbsp;&amp;nbsp; ORANGE&amp;nbsp; YELLOW&amp;nbsp; GREEN&lt;/P&gt;&lt;P&gt;BLUE&amp;nbsp; INDIGO&amp;nbsp; PURPLE&amp;nbsp; VIOLET&lt;/P&gt;&lt;P&gt;CYAN&amp;nbsp; WHITE&amp;nbsp; FUCSIA&amp;nbsp; BLACK&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #464646; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 1.5em; background-color: #ffffff;"&gt;GRAY&amp;nbsp; BROWN&amp;nbsp; PINK&amp;nbsp;&amp;nbsp;&amp;nbsp; MAGENTA&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #464646; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 1.5em; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The following SAS program is submitted:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data WORK.COLORS;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; infile 'COLORS.TXT';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; input @1 Var1 $ @8 Var2 $ @;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; input @1 Var3 $ @8 Var4 $ @;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #464646; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 1.5em; background-color: #ffffff;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the output of the program and why. kindly give the logic behind the program output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Ved&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Apr 2015 06:26:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Need-to-know-the-Logic-of-SAS-processing-for-this-program/m-p/200758#M4408</guid>
      <dc:creator>SASFREAK</dc:creator>
      <dc:date>2015-04-21T06:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: Need to know the Logic of SAS processing for this program.</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Need-to-know-the-Logic-of-SAS-processing-for-this-program/m-p/200759#M4409</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you try running the program and looking at the output?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The key is the last @ in the first input. Look at the documentation for INPUT.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Apr 2015 23:12:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Need-to-know-the-Logic-of-SAS-processing-for-this-program/m-p/200759#M4409</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-04-21T23:12:04Z</dc:date>
    </item>
    <item>
      <title>Re: Need to know the Logic of SAS processing for this program.</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Need-to-know-the-Logic-of-SAS-processing-for-this-program/m-p/200760#M4410</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A __default_attr="260198" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt; Yes, i have runned the code and result it showing me the repeatition of the values of var1 and var2 for var3 and var4 respectively.As per 9.2 documentation @ : (trailing @) prevents SAS from automatically reading a new data record into the input buffer when a new INPUT statement is executed within the same iteration of the DATA step.&lt;/P&gt;&lt;P&gt;is that means in above code @ prevents second input statement to being read and results in repeatition of values of var1 and var2 for var3 and var4 ??&lt;/P&gt;&lt;P&gt;Please correct if i am wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds&lt;/P&gt;&lt;P&gt;ved&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2015 04:17:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Need-to-know-the-Logic-of-SAS-processing-for-this-program/m-p/200760#M4410</guid>
      <dc:creator>SASFREAK</dc:creator>
      <dc:date>2015-04-22T04:17:51Z</dc:date>
    </item>
    <item>
      <title>Re: Need to know the Logic of SAS processing for this program.</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Need-to-know-the-Logic-of-SAS-processing-for-this-program/m-p/200761#M4411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And a 2nd key is to look where the second input statement is pointing. The @, at the end of the second input statement is superfluous, but doesn't hurt anything.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But run the code and carefully compare the input file with the file that the data step creates.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2015 04:33:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Need-to-know-the-Logic-of-SAS-processing-for-this-program/m-p/200761#M4411</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2015-04-22T04:33:13Z</dc:date>
    </item>
    <item>
      <title>Re: Need to know the Logic of SAS processing for this program.</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Need-to-know-the-Logic-of-SAS-processing-for-this-program/m-p/200762#M4412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're wrong, other than your explanation of the trailing blank. Provide a different explanation of your code. Would help if you explain what the @1 does.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2015 13:08:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Need-to-know-the-Logic-of-SAS-processing-for-this-program/m-p/200762#M4412</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2015-04-22T13:08:49Z</dc:date>
    </item>
    <item>
      <title>Re: Need to know the Logic of SAS processing for this program.</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Need-to-know-the-Logic-of-SAS-processing-for-this-program/m-p/200763#M4413</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A __default_attr="149594" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt; I think the first @ trailing in input statment hold the pointer and prevent reading the next input statement. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Apr 2015 03:20:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Need-to-know-the-Logic-of-SAS-processing-for-this-program/m-p/200763#M4413</guid>
      <dc:creator>SASFREAK</dc:creator>
      <dc:date>2015-04-23T03:20:36Z</dc:date>
    </item>
    <item>
      <title>Re: Need to know the Logic of SAS processing for this program.</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Need-to-know-the-Logic-of-SAS-processing-for-this-program/m-p/200764#M4414</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't disagree with your explanation of the first trailing @. I was suggesting that you explain what the @1 and @8 do, and why the second trailing @ is irrelevant.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Apr 2015 15:11:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Need-to-know-the-Logic-of-SAS-processing-for-this-program/m-p/200764#M4414</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2015-04-23T15:11:18Z</dc:date>
    </item>
    <item>
      <title>Re: Need to know the Logic of SAS processing for this program.</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Need-to-know-the-Logic-of-SAS-processing-for-this-program/m-p/200765#M4415</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A __default_attr="149594" __jive_macro_name="user" class="jive_macro jive_macro_user" href="https://communities.sas.com/"&gt;&lt;/A&gt; i think @1 guide the pointer to read the first record(RED) for first variable i.e, Var1 and similarly @8 guide pointer to read second record(&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #ffffff;"&gt;ORANGE )&lt;/SPAN&gt;&amp;nbsp; for Var2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Apr 2015 17:23:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Need-to-know-the-Logic-of-SAS-processing-for-this-program/m-p/200765#M4415</guid>
      <dc:creator>SASFREAK</dc:creator>
      <dc:date>2015-04-23T17:23:33Z</dc:date>
    </item>
    <item>
      <title>Re: Need to know the Logic of SAS processing for this program.</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Need-to-know-the-Logic-of-SAS-processing-for-this-program/m-p/200766#M4416</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, but in an earlier response you said " &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #ffffff;"&gt;is that means in above code @ prevents second input statement to being read and results in repeatition of values of var1 and var2 for var3 and var4 ??&lt;/SPAN&gt;".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My answer is no! Think about the two input statements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; input @1 Var1 $ @8 Var2 $ @;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;@1 will read Var1 from col1, then @8 will move the pointer to col8 and input Var2. Finally, the @ will cause the pointer to not move to the next record until either the next instruction or the next iteration of the data step&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Then:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; input @1 Var3 $ @8 Var4 $ @;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;will move the pointer back to col1 and read Var3, then the @8 will cause the pointer to input Var4 from col8. &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #ffffff;"&gt;Finally, the @ will cause the pointer to not move to the next record until either the next instruction or the next iteration of the data step. There aren't any more instructions, thus it is irrelevant as the program will then move to the next iteration.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Apr 2015 19:03:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Need-to-know-the-Logic-of-SAS-processing-for-this-program/m-p/200766#M4416</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2015-04-23T19:03:11Z</dc:date>
    </item>
    <item>
      <title>Re: Need to know the Logic of SAS processing for this program.</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Need-to-know-the-Logic-of-SAS-processing-for-this-program/m-p/200767#M4417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A __default_attr="149594" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt; I am sorry for the inconvience . I think i missinterpret your earlier suggestion, as i was talking about trailing(@) and ignored the explaination of @1 point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the correction and help me to understand the whole processing of the code. Your explaination helped me alot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Ved&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Apr 2015 03:42:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Need-to-know-the-Logic-of-SAS-processing-for-this-program/m-p/200767#M4417</guid>
      <dc:creator>SASFREAK</dc:creator>
      <dc:date>2015-04-24T03:42:07Z</dc:date>
    </item>
  </channel>
</rss>

