<?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 Using array and order, no error messages, but output is strange in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Using-array-and-order-no-error-messages-but-output-is-strange/m-p/52443#M14425</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you need an output statement. try the code below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data all_year;&lt;/P&gt;&lt;P&gt;input OBTN1 OBTN2 OBTN3 OBTN4 OBTN5;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;1 2 3 4 5&lt;/P&gt;&lt;P&gt;6 7 8 9 10&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;data all_year2;&lt;/P&gt;&lt;P&gt;set all_year;&lt;/P&gt;&lt;P&gt;array obt [5] OBTN1 OBTN2 OBTN3 OBTN4 OBTN5;&lt;/P&gt;&lt;P&gt;do order=1 to 5;&lt;/P&gt;&lt;P&gt;obtain=obt [order];&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc print;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Linlin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 Apr 2012 02:37:16 GMT</pubDate>
    <dc:creator>Linlin</dc:creator>
    <dc:date>2012-04-02T02:37:16Z</dc:date>
    <item>
      <title>Using array and order, no error messages, but output is strange</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Using-array-and-order-no-error-messages-but-output-is-strange/m-p/52442#M14424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am doing a simple array procedure to shape a series of wide variables into one long variable. The interesting variable is obtn1, obtn2, obtn3, obtn4, obtn5. After I run the following codes, I got a dataset with a new variable "order=6" for all observations. I have no idea where the '6' came from. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And the new variable obt is almost all " . " even when the original obtn1-obtn5 were quite well filled. Anyone knows what happened here?&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data all_year2;&lt;/P&gt;&lt;P&gt;set all_year;&lt;/P&gt;&lt;P&gt;array obt [5] OBTN1 OBTN2 OBTN3 OBTN4 OBTN5;&lt;/P&gt;&lt;P&gt;do order=1 to 5;&lt;/P&gt;&lt;P&gt;obtain=obt [order];&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;obtn1-obtn5 are numerical variables. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Apr 2012 02:21:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Using-array-and-order-no-error-messages-but-output-is-strange/m-p/52442#M14424</guid>
      <dc:creator>wendy_sasuser</dc:creator>
      <dc:date>2012-04-02T02:21:39Z</dc:date>
    </item>
    <item>
      <title>Using array and order, no error messages, but output is strange</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Using-array-and-order-no-error-messages-but-output-is-strange/m-p/52443#M14425</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you need an output statement. try the code below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data all_year;&lt;/P&gt;&lt;P&gt;input OBTN1 OBTN2 OBTN3 OBTN4 OBTN5;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;1 2 3 4 5&lt;/P&gt;&lt;P&gt;6 7 8 9 10&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;data all_year2;&lt;/P&gt;&lt;P&gt;set all_year;&lt;/P&gt;&lt;P&gt;array obt [5] OBTN1 OBTN2 OBTN3 OBTN4 OBTN5;&lt;/P&gt;&lt;P&gt;do order=1 to 5;&lt;/P&gt;&lt;P&gt;obtain=obt [order];&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc print;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Linlin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Apr 2012 02:37:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Using-array-and-order-no-error-messages-but-output-is-strange/m-p/52443#M14425</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2012-04-02T02:37:16Z</dc:date>
    </item>
  </channel>
</rss>

