<?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 holding SAS value using @ in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/holding-SAS-value-using/m-p/109117#M30415</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sometimes when I hold the value of a variabe in SAS, I am unsure where to use the trailing @ as I get an error when reading other variables. I use this as an example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose I want to read this text tab delimited file:&lt;/P&gt;&lt;P&gt;Andrew Rapayer 45 61&lt;/P&gt;&lt;P&gt;Abbey Murrey 10 9&lt;/P&gt;&lt;P&gt;Tina Amber 10 20&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I should hold the value of Andrew Rapayer and then read off the next two values using @. The code I use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data test;&lt;/P&gt;&lt;P&gt;infile "C:\SAS\test.txt" dlm = ' ';&lt;/P&gt;&lt;P&gt;input Name &amp;amp; : $15. @&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Age : 2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Height : 2.&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;Since I am using dlm ='' option so each value is seperated by a space so when I read first obs from text file it would treat Andrew &amp;amp; Rapayer as seperate values but I want to input that as Name so I am using &amp;amp; to read this and then hold the value using @ but I get an error when reading the Age:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ERROR 22-232 : Expecting a Name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly advise what is the missing link.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind 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>Tue, 13 Aug 2013 05:05:35 GMT</pubDate>
    <dc:creator>Siddharth123</dc:creator>
    <dc:date>2013-08-13T05:05:35Z</dc:date>
    <item>
      <title>holding SAS value using @</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/holding-SAS-value-using/m-p/109117#M30415</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sometimes when I hold the value of a variabe in SAS, I am unsure where to use the trailing @ as I get an error when reading other variables. I use this as an example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose I want to read this text tab delimited file:&lt;/P&gt;&lt;P&gt;Andrew Rapayer 45 61&lt;/P&gt;&lt;P&gt;Abbey Murrey 10 9&lt;/P&gt;&lt;P&gt;Tina Amber 10 20&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I should hold the value of Andrew Rapayer and then read off the next two values using @. The code I use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data test;&lt;/P&gt;&lt;P&gt;infile "C:\SAS\test.txt" dlm = ' ';&lt;/P&gt;&lt;P&gt;input Name &amp;amp; : $15. @&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Age : 2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Height : 2.&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;Since I am using dlm ='' option so each value is seperated by a space so when I read first obs from text file it would treat Andrew &amp;amp; Rapayer as seperate values but I want to input that as Name so I am using &amp;amp; to read this and then hold the value using @ but I get an error when reading the Age:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ERROR 22-232 : Expecting a Name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly advise what is the missing link.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind 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>Tue, 13 Aug 2013 05:05:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/holding-SAS-value-using/m-p/109117#M30415</guid>
      <dc:creator>Siddharth123</dc:creator>
      <dc:date>2013-08-13T05:05:35Z</dc:date>
    </item>
    <item>
      <title>Re: holding SAS value using @</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/holding-SAS-value-using/m-p/109118#M30416</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From what I understand, using the ampersand special character/modifier won't help you anyway.&amp;nbsp; When using this modifier SAS treats two or more spaces as the end of the string, which you don't have in your sample data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Aug 2013 05:51:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/holding-SAS-value-using/m-p/109118#M30416</guid>
      <dc:creator>Scott_Mitchell</dc:creator>
      <dc:date>2013-08-13T05:51:55Z</dc:date>
    </item>
  </channel>
</rss>

