<?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: Getting value from first column first row without knowing the variable name? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Getting-value-from-first-column-first-row-without-knowing-the/m-p/23707#M5281</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's a way using the DATA step:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Courier New; color: #0000ff;"&gt;&lt;SPAN style="color: #000080;"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;_null_&lt;SPAN style="color: #000000;"&gt; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Courier New;"&gt;&lt;SPAN style="color: #0000ff;"&gt;set&lt;/SPAN&gt; sashelp.shoes ;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Courier New;"&gt;&lt;SPAN style="color: #0000ff;"&gt;length&lt;/SPAN&gt; __name $&lt;SPAN style="color: #008080;"&gt;&lt;STRONG&gt;32&lt;/STRONG&gt;&lt;/SPAN&gt; ;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Courier New;"&gt;&lt;SPAN style="color: #0000ff;"&gt;call&lt;/SPAN&gt; vnext(__name);&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Courier New;"&gt;r1c1 = vvalue(__name) ;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Courier New;"&gt;&lt;SPAN style="color: #0000ff;"&gt;put&lt;/SPAN&gt; r1c1= ;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Courier New; color: #0000ff;"&gt;stop&lt;SPAN style="color: #000000;"&gt; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Courier New; color: #000080;"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;SPAN style="color: #000000;"&gt; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;&lt;P&gt;jerry898969 wrote:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to get the value of the first variable first row of a data set without knowing the variable name.&amp;nbsp; &lt;/P&gt;&lt;P&gt;The reason for this is I have to create a macro that will loop through many datasets and look at the first variable first row's value.&amp;nbsp; Each data set has a different name for the first variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Jul 2011 01:18:55 GMT</pubDate>
    <dc:creator>Howles</dc:creator>
    <dc:date>2011-07-04T01:18:55Z</dc:date>
    <item>
      <title>Getting value from first column first row without knowing the variable name?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Getting-value-from-first-column-first-row-without-knowing-the/m-p/23703#M5277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to get the value of the first variable first row of a data set without knowing the variable name.&amp;nbsp; &lt;/P&gt;&lt;P&gt;The reason for this is I have to create a macro that will loop through many datasets and look at the first variable first row's value.&amp;nbsp; Each data set has a different name for the first variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jun 2011 15:52:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Getting-value-from-first-column-first-row-without-knowing-the/m-p/23703#M5277</guid>
      <dc:creator>jerry898969</dc:creator>
      <dc:date>2011-06-30T15:52:03Z</dc:date>
    </item>
    <item>
      <title>Getting value from first column first row without knowing the variable name?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Getting-value-from-first-column-first-row-without-knowing-the/m-p/23704#M5278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;proc sql noprint;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;select name into :firstvar from dictionary.columns where libname='SASHELP' and memname='CLASS'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;and varnum=1;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc print data=sashelp.class (obs=1);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var &amp;amp;firstvar;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jun 2011 17:15:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Getting-value-from-first-column-first-row-without-knowing-the/m-p/23704#M5278</guid>
      <dc:creator>NickR</dc:creator>
      <dc:date>2011-06-30T17:15:24Z</dc:date>
    </item>
    <item>
      <title>Re: Getting value from first column first row without knowing the variable name?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Getting-value-from-first-column-first-row-without-knowing-the/m-p/23705#M5279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A slight variation on NickR's method.&amp;nbsp; This gets a list of MEMNAMEs and variables NAMEs you can create a data table to run a macro or other code generator.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;sql&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;select&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; name, memname &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;from&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; dictionary.columns&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;where&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; libname eq &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: purple; font-family: 'Courier New'; background-color: white;"&gt;'SASHELP'&lt;/SPAN&gt; &lt;SPAN style="font-size: 10pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; memtype &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;in&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: purple; font-family: 'Courier New'; background-color: white;"&gt;'DATA'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; varnum eq &lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;STRONG style="color: navy; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;quit&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;STRONG style="color: navy; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jun 2011 17:36:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Getting-value-from-first-column-first-row-without-knowing-the/m-p/23705#M5279</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2011-06-30T17:36:23Z</dc:date>
    </item>
    <item>
      <title>Re: Getting value from first column first row without knowing the variable name?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Getting-value-from-first-column-first-row-without-knowing-the/m-p/23706#M5280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi. I found this can be achieve by proc sql. It is very interesting, but there a Warning message&lt;/P&gt;&lt;P&gt;in log , If you do not care about it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;proc sql noprint;
 select *
&amp;nbsp; into : first_value1 
&amp;nbsp;&amp;nbsp; from sashelp.class;

 select *
&amp;nbsp; into : first_value2
&amp;nbsp;&amp;nbsp; from sashelp.air;

quit;
%put &amp;amp;first_value1 &amp;amp;first_value2;






proc sql noprint;
 select *
&amp;nbsp; into : first_value1 
&amp;nbsp;&amp;nbsp; from sashelp.class;

 select *
&amp;nbsp; into : first_value2
&amp;nbsp;&amp;nbsp; from sashelp.air;

quit;
%put &amp;amp;first_value1 &amp;amp;first_value2;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jul 2011 08:49:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Getting-value-from-first-column-first-row-without-knowing-the/m-p/23706#M5280</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-07-01T08:49:47Z</dc:date>
    </item>
    <item>
      <title>Re: Getting value from first column first row without knowing the variable name?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Getting-value-from-first-column-first-row-without-knowing-the/m-p/23707#M5281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's a way using the DATA step:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Courier New; color: #0000ff;"&gt;&lt;SPAN style="color: #000080;"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;_null_&lt;SPAN style="color: #000000;"&gt; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Courier New;"&gt;&lt;SPAN style="color: #0000ff;"&gt;set&lt;/SPAN&gt; sashelp.shoes ;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Courier New;"&gt;&lt;SPAN style="color: #0000ff;"&gt;length&lt;/SPAN&gt; __name $&lt;SPAN style="color: #008080;"&gt;&lt;STRONG&gt;32&lt;/STRONG&gt;&lt;/SPAN&gt; ;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Courier New;"&gt;&lt;SPAN style="color: #0000ff;"&gt;call&lt;/SPAN&gt; vnext(__name);&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Courier New;"&gt;r1c1 = vvalue(__name) ;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Courier New;"&gt;&lt;SPAN style="color: #0000ff;"&gt;put&lt;/SPAN&gt; r1c1= ;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Courier New; color: #0000ff;"&gt;stop&lt;SPAN style="color: #000000;"&gt; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Courier New; color: #000080;"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;SPAN style="color: #000000;"&gt; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;&lt;P&gt;jerry898969 wrote:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to get the value of the first variable first row of a data set without knowing the variable name.&amp;nbsp; &lt;/P&gt;&lt;P&gt;The reason for this is I have to create a macro that will loop through many datasets and look at the first variable first row's value.&amp;nbsp; Each data set has a different name for the first variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jul 2011 01:18:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Getting-value-from-first-column-first-row-without-knowing-the/m-p/23707#M5281</guid>
      <dc:creator>Howles</dc:creator>
      <dc:date>2011-07-04T01:18:55Z</dc:date>
    </item>
    <item>
      <title>Re: Getting value from first column first row without knowing the variable name?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Getting-value-from-first-column-first-row-without-knowing-the/m-p/23708#M5282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;H. &lt;A _jive_internal="true" class="jiveTT-hover-user jive-username-link" href="https://communities.sas.com/people/Howles" id="jive-27435410246544876816803"&gt;Howles&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Maybe it should be vvaluex()?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jul 2011 06:04:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Getting-value-from-first-column-first-row-without-knowing-the/m-p/23708#M5282</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-07-04T06:04:32Z</dc:date>
    </item>
  </channel>
</rss>

