<?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: It is a basic question. But I don't know. in SAS News and Q&amp;A</title>
    <link>https://communities.sas.com/t5/SAS-News-and-Q-A/It-is-a-basic-question-But-I-don-t-know/m-p/735004#M47</link>
    <description>&lt;P&gt;Thank you for your help! Your answer is magic to me!&lt;/P&gt;</description>
    <pubDate>Sun, 18 Apr 2021 02:12:16 GMT</pubDate>
    <dc:creator>Minho_Kang</dc:creator>
    <dc:date>2021-04-18T02:12:16Z</dc:date>
    <item>
      <title>It is a basic question. But I don't know.</title>
      <link>https://communities.sas.com/t5/SAS-News-and-Q-A/It-is-a-basic-question-But-I-don-t-know/m-p/734113#M42</link>
      <description>&lt;P&gt;There is a data like below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1 2 3 4 5 6 7 8 9 10&lt;/P&gt;&lt;P&gt;11 12 13 14 15 16 17 18 19 20&lt;/P&gt;&lt;P&gt;21 22 23 24 25 26 27 28 29 30&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And using variables x1, x2, x3, I want to assign values of each row of data above. I mean 1-10 is assigned to x1, 11-20 to x2, 21-30 to x3. but I don't know how to do. I tried using&amp;nbsp;@@, but that wasn't what i want to get.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you explain a method?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Nov 2021 16:11:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-News-and-Q-A/It-is-a-basic-question-But-I-don-t-know/m-p/734113#M42</guid>
      <dc:creator>Minho_Kang</dc:creator>
      <dc:date>2021-11-09T16:11:03Z</dc:date>
    </item>
    <item>
      <title>Re: It is a basic question. But I don't know.</title>
      <link>https://communities.sas.com/t5/SAS-News-and-Q-A/It-is-a-basic-question-But-I-don-t-know/m-p/734135#M43</link>
      <description>&lt;P&gt;I don't know how to solve the problem in one data step, but with proc transpose after reading the data:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;    
   input z1-z10;

   datalines;
1 2 3 4 5 6 7 8 9 10
11 12 13 14 15 16 17 18 19 20
21 22 23 24 25 26 27 28 29 30
;

proc transpose data=have out=want(drop=_name_) prefix=x;
   var z1-z10;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 15 Apr 2021 07:06:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-News-and-Q-A/It-is-a-basic-question-But-I-don-t-know/m-p/734135#M43</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2021-04-15T07:06:57Z</dc:date>
    </item>
    <item>
      <title>Re: It is a basic question. But I don't know.</title>
      <link>https://communities.sas.com/t5/SAS-News-and-Q-A/It-is-a-basic-question-But-I-don-t-know/m-p/734137#M44</link>
      <description>&lt;P&gt;It is difficult to give a complete explanation, but in this case, the structure of the observations and the structure of the variables are transposed, so it would be difficult to import them directly in sas.&lt;/P&gt;
&lt;P&gt;It is true that the postposition @@ is used when a single input row contains the values of multiple observations, but it is assumed that the combination of variables is also lined up horizontally.&lt;/P&gt;
&lt;P&gt;It is easy to visualize this by executing the following&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  input x1 x2 x3 @@;
datalines;
1 2 3 4 5 6 7 8 9 10
11 12 13 14 15 16 17 18 19 20
21 22 23 24 25 26 27 28 29 30
;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It might be possible to combine line pointer control and column pointer control (I couldn't do it), but I think it would be quite complicated, so it would be more reliable and easier to execute transpose after inputting as follows.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  input x1-x10;
datalines;
1 2 3 4 5 6 7 8 9 10
11 12 13 14 15 16 17 18 19 20
21 22 23 24 25 26 27 28 29 30
;
run;

proc transpose data=have out=want(drop=_name_) prefix=x;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Apr 2021 07:19:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-News-and-Q-A/It-is-a-basic-question-But-I-don-t-know/m-p/734137#M44</guid>
      <dc:creator>japelin</dc:creator>
      <dc:date>2021-04-15T07:19:10Z</dc:date>
    </item>
    <item>
      <title>Re: It is a basic question. But I don't know.</title>
      <link>https://communities.sas.com/t5/SAS-News-and-Q-A/It-is-a-basic-question-But-I-don-t-know/m-p/734141#M45</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/378406"&gt;@Minho_Kang&lt;/a&gt;&amp;nbsp;and welcome to the SAS Support Communities!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can also use an array:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want(drop=t: j);
array t[3,10];
input t[*];
do j=1 to dim2(t);
  x1=t[1,j];
  x2=t[2,j];
  x3=t[3,j];
  output;
end;
cards;
1 2 3 4 5 6 7 8 9 10
11 12 13 14 15 16 17 18 19 20
21 22 23 24 25 26 27 28 29 30
;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 15 Apr 2021 08:22:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-News-and-Q-A/It-is-a-basic-question-But-I-don-t-know/m-p/734141#M45</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2021-04-15T08:22:56Z</dc:date>
    </item>
    <item>
      <title>Re: It is a basic question. But I don't know.</title>
      <link>https://communities.sas.com/t5/SAS-News-and-Q-A/It-is-a-basic-question-But-I-don-t-know/m-p/734274#M46</link>
      <description>&lt;P&gt;It sounds like you are trying to get SAS to operate differently, functioning like a vector-based language such as Python.&amp;nbsp; Base SAS software won't work well in that way.&amp;nbsp; I can give you two suggestions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First, take a look at SAS IML.&amp;nbsp; It is probably exactly what you are looking for.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Second, give us more detail about how this data transformation would help you.&amp;nbsp; What would you do next?&amp;nbsp; You will probably get tons of suggestions about how you can get to your final destination using a totally different route than you are anticipating.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Apr 2021 13:27:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-News-and-Q-A/It-is-a-basic-question-But-I-don-t-know/m-p/734274#M46</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2021-04-15T13:27:36Z</dc:date>
    </item>
    <item>
      <title>Re: It is a basic question. But I don't know.</title>
      <link>https://communities.sas.com/t5/SAS-News-and-Q-A/It-is-a-basic-question-But-I-don-t-know/m-p/735004#M47</link>
      <description>&lt;P&gt;Thank you for your help! Your answer is magic to me!&lt;/P&gt;</description>
      <pubDate>Sun, 18 Apr 2021 02:12:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-News-and-Q-A/It-is-a-basic-question-But-I-don-t-know/m-p/735004#M47</guid>
      <dc:creator>Minho_Kang</dc:creator>
      <dc:date>2021-04-18T02:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: It is a basic question. But I don't know.</title>
      <link>https://communities.sas.com/t5/SAS-News-and-Q-A/It-is-a-basic-question-But-I-don-t-know/m-p/735005#M48</link>
      <description>&lt;P&gt;Thank you for your detail answer. And I appreciate for your endeavor to help me!&lt;/P&gt;</description>
      <pubDate>Sun, 18 Apr 2021 02:15:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-News-and-Q-A/It-is-a-basic-question-But-I-don-t-know/m-p/735005#M48</guid>
      <dc:creator>Minho_Kang</dc:creator>
      <dc:date>2021-04-18T02:15:02Z</dc:date>
    </item>
  </channel>
</rss>

