<?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 Accessing an element of a dataset in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Accessing-an-element-of-a-dataset/m-p/494335#M130242</link>
    <description>&lt;P&gt;I want to create a new dataset with only the element in the second row of the second column. Is there a way to do this? I would prefer not to use proc iml&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, I want to transform data1 to data2&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test1;
 input a b;
 datalines;
10 40 70
50 60 90
18 70 30 
;
run;

data test2;
input c;
datalines;
60
;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 10 Sep 2018 22:54:52 GMT</pubDate>
    <dc:creator>WhiteSquirrel</dc:creator>
    <dc:date>2018-09-10T22:54:52Z</dc:date>
    <item>
      <title>Accessing an element of a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Accessing-an-element-of-a-dataset/m-p/494335#M130242</link>
      <description>&lt;P&gt;I want to create a new dataset with only the element in the second row of the second column. Is there a way to do this? I would prefer not to use proc iml&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, I want to transform data1 to data2&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test1;
 input a b;
 datalines;
10 40 70
50 60 90
18 70 30 
;
run;

data test2;
input c;
datalines;
60
;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Sep 2018 22:54:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Accessing-an-element-of-a-dataset/m-p/494335#M130242</guid>
      <dc:creator>WhiteSquirrel</dc:creator>
      <dc:date>2018-09-10T22:54:52Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing an element of a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Accessing-an-element-of-a-dataset/m-p/494336#M130243</link>
      <description>&lt;P&gt;Pretty peculiar request:&lt;/P&gt;
&lt;P&gt;In the dataset options in the second data step FIRSTOBS= is the row number to start reading data, OBS = is the row number to stop reading data.&lt;/P&gt;
&lt;PRE&gt;data test1;
 input a b;
 datalines;
10 40 70
50 60 90
18 70 30 
;
run;

data want;
   set test1 (firstobs=2 obs=2  keep=b);
run;
&lt;/PRE&gt;
&lt;P&gt;If you really want the variable to be named C add a rename, either statement or dataset option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Sep 2018 23:01:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Accessing-an-element-of-a-dataset/m-p/494336#M130243</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-09-10T23:01:09Z</dc:date>
    </item>
  </channel>
</rss>

