<?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: how to assign variables take from first record in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-assign-variables-take-from-first-record/m-p/493426#M129800</link>
    <description>&lt;P&gt;datastep infile&lt;/P&gt;</description>
    <pubDate>Fri, 07 Sep 2018 13:51:28 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2018-09-07T13:51:28Z</dc:date>
    <item>
      <title>how to assign variables take from first record</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-assign-variables-take-from-first-record/m-p/493407#M129790</link>
      <description>&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;a1&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;a2&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;a3&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;a4&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;a5&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;name&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;age&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;sex&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;country&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;race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&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;country&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;race&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;101&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;22&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;f&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;india&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;black&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;102&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;23&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;m&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;india&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;white&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;103&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;24&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;f&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;usa&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;black&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Sep 2018 13:57:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-assign-variables-take-from-first-record/m-p/493407#M129790</guid>
      <dc:creator>thanikondharish</dc:creator>
      <dc:date>2018-09-07T13:57:19Z</dc:date>
    </item>
    <item>
      <title>Re: how to assign variables take from first record</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-assign-variables-take-from-first-record/m-p/493411#M129791</link>
      <description>&lt;P&gt;fix import&lt;/P&gt;</description>
      <pubDate>Fri, 07 Sep 2018 13:31:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-assign-variables-take-from-first-record/m-p/493411#M129791</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-09-07T13:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: how to assign variables take from first record</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-assign-variables-take-from-first-record/m-p/493415#M129792</link>
      <description>&lt;P&gt;There is no information about "race" in the first table ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The name alone is not sufficient to create a variable, type and length are required, too. That information could be extracted for the variables a1-a4 from sashelp.vcolumn, so you don't need to provide it, if having all variables as character-vars satisfies conditions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is it really necessary to create new variables? Would renaming a1-a4 be ok?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you post the table as dataset using datalines statement, so that we have something to work with?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Sep 2018 13:38:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-assign-variables-take-from-first-record/m-p/493415#M129792</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2018-09-07T13:38:25Z</dc:date>
    </item>
    <item>
      <title>Re: how to assign variables take from first record</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-assign-variables-take-from-first-record/m-p/493425#M129799</link>
      <description>i did by using import but how to do without using proc import&lt;BR /&gt;</description>
      <pubDate>Fri, 07 Sep 2018 13:50:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-assign-variables-take-from-first-record/m-p/493425#M129799</guid>
      <dc:creator>thanikondharish</dc:creator>
      <dc:date>2018-09-07T13:50:31Z</dc:date>
    </item>
    <item>
      <title>Re: how to assign variables take from first record</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-assign-variables-take-from-first-record/m-p/493426#M129800</link>
      <description>&lt;P&gt;datastep infile&lt;/P&gt;</description>
      <pubDate>Fri, 07 Sep 2018 13:51:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-assign-variables-take-from-first-record/m-p/493426#M129800</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-09-07T13:51:28Z</dc:date>
    </item>
    <item>
      <title>Re: how to assign variables take from first record</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-assign-variables-take-from-first-record/m-p/493473#M129819</link>
      <description>&lt;P&gt;proc import............;&lt;/P&gt;
&lt;P&gt;getnames=yes;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Sep 2018 15:00:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-assign-variables-take-from-first-record/m-p/493473#M129819</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2018-09-07T15:00:45Z</dc:date>
    </item>
  </channel>
</rss>

