<?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: Data _null_ in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Data-null/m-p/111452#M30899</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In a Put statement think of @ as "at", in you example it is writing the value of Age starting "at" column 5, which is overwriting name. You may want to be using "+5 Age" to write age starting at 5 columns past the end of the previous variable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Aug 2013 20:25:55 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2013-08-14T20:25:55Z</dc:date>
    <item>
      <title>Data _null_</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Data-null/m-p/111451#M30898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data Data;&lt;/P&gt;&lt;P&gt;infile datalines;&lt;/P&gt;&lt;P&gt;input name $ age;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;Sid 14&lt;/P&gt;&lt;P&gt;Alice 13&lt;/P&gt;&lt;P&gt;Barbara 13&lt;/P&gt;&lt;P&gt;Carol 13&lt;/P&gt;&lt;P&gt;Aalfred 13&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;set Data;&lt;/P&gt;&lt;P&gt;file 'C:\Documents and Settings\Desktop\Input\test.txt';&lt;/P&gt;&lt;P&gt;put name $15 @5 age 2.;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The output is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 14&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; S&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 13&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 13&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; B&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 13&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; C&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 13&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do not understand how - put statement with @ in the above data _null_works? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please advise&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Aug 2013 20:21:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Data-null/m-p/111451#M30898</guid>
      <dc:creator>Siddharth123</dc:creator>
      <dc:date>2013-08-14T20:21:02Z</dc:date>
    </item>
    <item>
      <title>Re: Data _null_</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Data-null/m-p/111452#M30899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In a Put statement think of @ as "at", in you example it is writing the value of Age starting "at" column 5, which is overwriting name. You may want to be using "+5 Age" to write age starting at 5 columns past the end of the previous variable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Aug 2013 20:25:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Data-null/m-p/111452#M30899</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2013-08-14T20:25:55Z</dc:date>
    </item>
    <item>
      <title>Re: Data _null_</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Data-null/m-p/111453#M30900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you. But I am still unsure why name doesnt start from the first column and I would expect that all the all values for name should occupy 1-4 columns and from 5th column the code would read age.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Aug 2013 20:32:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Data-null/m-p/111453#M30900</guid>
      <dc:creator>Siddharth123</dc:creator>
      <dc:date>2013-08-14T20:32:06Z</dc:date>
    </item>
    <item>
      <title>Re: Data _null_</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Data-null/m-p/111454#M30901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The "@" symbol in this context is a column pointer control. You've instructed SAS to write the AGE variable at column 5 -- which just so happens to overlap with the values in the NAME variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this instead.&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;set Data;&lt;/P&gt;&lt;P&gt;file ''C:\Documents and Settings\Desktop\Input\test.txt';&lt;/P&gt;&lt;P&gt;put name @20 age 2.;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Aug 2013 20:35:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Data-null/m-p/111454#M30901</guid>
      <dc:creator>Fugue</dc:creator>
      <dc:date>2013-08-14T20:35:32Z</dc:date>
    </item>
    <item>
      <title>Re: Data _null_</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Data-null/m-p/111455#M30902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry ballardw, your post wasn't there when I hit submit. Your solution also works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Aug 2013 20:37:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Data-null/m-p/111455#M30902</guid>
      <dc:creator>Fugue</dc:creator>
      <dc:date>2013-08-14T20:37:32Z</dc:date>
    </item>
    <item>
      <title>Re: Data _null_</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Data-null/m-p/111456#M30903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is another defect in your program ... the instructions for writing NAME.&amp;nbsp; The instruction $15 says to write it in column 15.&amp;nbsp; If you meant to say it should occupy 15 characters, there should be a dot&amp;nbsp;&amp;nbsp; $15.&amp;nbsp;&amp;nbsp; added to the instructions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Aug 2013 21:15:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Data-null/m-p/111456#M30903</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2013-08-14T21:15:33Z</dc:date>
    </item>
  </channel>
</rss>

