<?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 change the observation/row order in SAS dataset containing blanks in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-change-the-observation-row-order-in-SAS-dataset/m-p/694478#M211800</link>
    <description>&lt;P&gt;Then what is the "requirement"?&lt;/P&gt;
&lt;P&gt;Keep in mind that coding means algorithm, which is defined as a sequence of clearly defined instructions. Without knowing such instructions, no code can be&amp;nbsp;made.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 27 Oct 2020 10:37:02 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2020-10-27T10:37:02Z</dc:date>
    <item>
      <title>How to change the observation/row order in SAS dataset containing blanks</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-change-the-observation-row-order-in-SAS-dataset/m-p/694472#M211795</link>
      <description>&lt;P&gt;Dataset : Have (It contains two blanks observation)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;A B C D&lt;/P&gt;&lt;P&gt;1 A 1 1 1&lt;/P&gt;&lt;P&gt;2 B 2 2 2&amp;nbsp;&lt;/P&gt;&lt;P&gt;3 C 2 2 2&lt;/P&gt;&lt;P&gt;4 D 4 5 5&lt;/P&gt;&lt;P&gt;5 E 8 8 8&lt;/P&gt;&lt;P&gt;6 F 8 8 8&lt;/P&gt;&lt;P&gt;7&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;8 J 8 8 8&lt;/P&gt;&lt;P&gt;9&lt;/P&gt;&lt;P&gt;10 K 7 7 7&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dataset, Want&lt;/P&gt;&lt;P&gt;4 D 4 5 5&lt;/P&gt;&lt;P&gt;5 E 8 8 8&lt;/P&gt;&lt;P&gt;6 F 8 8 8&lt;/P&gt;&lt;P&gt;9&lt;/P&gt;&lt;P&gt;10 K 7 7 7&lt;/P&gt;&lt;P&gt;8 J 8 8 8&lt;/P&gt;&lt;P&gt;1 A 1 1 1&lt;/P&gt;&lt;P&gt;3 C 2 2 2&lt;/P&gt;&lt;P&gt;7&lt;/P&gt;&lt;P&gt;2 B 2 2 2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please help me in output&lt;/P&gt;&lt;DIV class=" dgrid-row dgrid-row-even ui-state-default dgrid-selected ui-state-active"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=" dgrid-row dgrid-row-odd ui-state-default"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Tue, 27 Oct 2020 10:17:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-change-the-observation-row-order-in-SAS-dataset/m-p/694472#M211795</guid>
      <dc:creator>Jannet</dc:creator>
      <dc:date>2020-10-27T10:17:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the observation/row order in SAS dataset containing blanks</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-change-the-observation-row-order-in-SAS-dataset/m-p/694473#M211796</link>
      <description>&lt;P&gt;So what is the rule that guides the re-ordering?&lt;/P&gt;</description>
      <pubDate>Tue, 27 Oct 2020 10:28:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-change-the-observation-row-order-in-SAS-dataset/m-p/694473#M211796</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-10-27T10:28:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the observation/row order in SAS dataset containing blanks</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-change-the-observation-row-order-in-SAS-dataset/m-p/694474#M211797</link>
      <description>&lt;P&gt;What is the logic here? Seems like just a random shuffle of the data?&lt;/P&gt;</description>
      <pubDate>Tue, 27 Oct 2020 10:31:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-change-the-observation-row-order-in-SAS-dataset/m-p/694474#M211797</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2020-10-27T10:31:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the observation/row order in SAS dataset containing blanks</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-change-the-observation-row-order-in-SAS-dataset/m-p/694475#M211798</link>
      <description>&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;, there s no such rule...i want to break or give space between few observations. So i added two extra rows with blanks to the dataset but now i am struggling to rearrange as per my requirement</description>
      <pubDate>Tue, 27 Oct 2020 10:31:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-change-the-observation-row-order-in-SAS-dataset/m-p/694475#M211798</guid>
      <dc:creator>Jannet</dc:creator>
      <dc:date>2020-10-27T10:31:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the observation/row order in SAS dataset containing blanks</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-change-the-observation-row-order-in-SAS-dataset/m-p/694477#M211799</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/31304"&gt;@PeterClemmensen&lt;/a&gt;&amp;nbsp;yes...actually this is dummy dataset which i created...i want to give blank line between few observation&lt;/P&gt;</description>
      <pubDate>Tue, 27 Oct 2020 10:34:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-change-the-observation-row-order-in-SAS-dataset/m-p/694477#M211799</guid>
      <dc:creator>Jannet</dc:creator>
      <dc:date>2020-10-27T10:34:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the observation/row order in SAS dataset containing blanks</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-change-the-observation-row-order-in-SAS-dataset/m-p/694478#M211800</link>
      <description>&lt;P&gt;Then what is the "requirement"?&lt;/P&gt;
&lt;P&gt;Keep in mind that coding means algorithm, which is defined as a sequence of clearly defined instructions. Without knowing such instructions, no code can be&amp;nbsp;made.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Oct 2020 10:37:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-change-the-observation-row-order-in-SAS-dataset/m-p/694478#M211800</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-10-27T10:37:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the observation/row order in SAS dataset containing blanks</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-change-the-observation-row-order-in-SAS-dataset/m-p/694479#M211801</link>
      <description>&lt;P&gt;I see very little reason to do this. However, see if this helps you...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
   set sashelp.class;
   if _N_ in (5, 10) then do;
      output;
      call missing(of _ALL_);
      output;
   end;
   else output;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 27 Oct 2020 10:40:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-change-the-observation-row-order-in-SAS-dataset/m-p/694479#M211801</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2020-10-27T10:40:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the observation/row order in SAS dataset containing blanks</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-change-the-observation-row-order-in-SAS-dataset/m-p/694481#M211803</link>
      <description>&lt;P&gt;If you just want a random shuffle, create a random variable, and sort by it:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
infile datalines truncover;
input A $ B C D;
datalines;
A 1 1 1
B 2 2 2 
C 2 2 2
D 4 5 5
E 8 8 8
F 8 8 8
        
J 8 8 8

K 7 7 7
;

data rand;
setbhave;
x = rand('uniform');
run;

proc sort
  data=rand
  out=want (drop=x)
;
by x;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 27 Oct 2020 10:41:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-change-the-observation-row-order-in-SAS-dataset/m-p/694481#M211803</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-10-27T10:41:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the observation/row order in SAS dataset containing blanks</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-change-the-observation-row-order-in-SAS-dataset/m-p/694485#M211805</link>
      <description>&lt;P&gt;Actually, i am creating demographic table for the first time and got the following output.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Jannet_0-1603795377109.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/51104i42869367361A7D57/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Jannet_0-1603795377109.png" alt="Jannet_0-1603795377109.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;so now, i want to rearrange the order of the rows as per the below and give the break between the observations&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Jannet_1-1603795428889.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/51105i6EFFDAC307FCC043/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Jannet_1-1603795428889.png" alt="Jannet_1-1603795428889.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Oct 2020 10:44:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-change-the-observation-row-order-in-SAS-dataset/m-p/694485#M211805</guid>
      <dc:creator>Jannet</dc:creator>
      <dc:date>2020-10-27T10:44:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the observation/row order in SAS dataset containing blanks</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-change-the-observation-row-order-in-SAS-dataset/m-p/694486#M211806</link>
      <description>&lt;P&gt;Please supply the dataset in your picture in usable form (data step with datalines, &lt;STRONG&gt;do not skip this!&lt;/STRONG&gt;), so we can exactly see what is in the data and provide code for that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Basically, I would create a new group variable that selects the three sub-reports and use a break in PROC REPORT to create the empty space.&lt;/P&gt;
&lt;P&gt;In fact, one might be able to do that from the original raw data, so you should include an example for that also.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Oct 2020 10:53:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-change-the-observation-row-order-in-SAS-dataset/m-p/694486#M211806</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-10-27T10:53:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the observation/row order in SAS dataset containing blanks</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-change-the-observation-row-order-in-SAS-dataset/m-p/694617#M211845</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/335576"&gt;@Jannet&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;, there s no such rule...i want to break or give space between few observations. So i added two extra rows with blanks to the dataset but now i am struggling to rearrange as per my requirement&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Generally not a good idea to create data that way. Such "rows" can seriously affect the results of statistical computations and become very "fragile" when other data manipulation must be done when you get into "do this except for ... rows".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Report procedure can do things like insert blank lines between groups of values IF there can be a rule applied to create the group. Computer code works on rules, not "because I say so". You have to express the rule in terms a computer understands.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Oct 2020 15:41:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-change-the-observation-row-order-in-SAS-dataset/m-p/694617#M211845</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-10-27T15:41:24Z</dc:date>
    </item>
  </channel>
</rss>

