<?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: DATA ORGANIZATION in SAS Users Group in Israel</title>
    <link>https://communities.sas.com/t5/SAS-Users-Group-in-Israel/DATA-ORGANIZATION/m-p/936785#M316</link>
    <description>&lt;P&gt;thank you very much&lt;/P&gt;</description>
    <pubDate>Tue, 23 Jul 2024 15:04:14 GMT</pubDate>
    <dc:creator>meiryem</dc:creator>
    <dc:date>2024-07-23T15:04:14Z</dc:date>
    <item>
      <title>DATA ORGANIZATION</title>
      <link>https://communities.sas.com/t5/SAS-Users-Group-in-Israel/DATA-ORGANIZATION/m-p/936727#M313</link>
      <description>HELLOW I HAVE A DATA WITH 150 VARIABLES: A1-A50 C1-C50 E1-E50 AND I WANT TO CREATE A NEW DATA THAT LOOK LIKE THAT: A1 C1 E1 A2 C2 E2......A50 C50 E50 THANKS FOR YOUR HELP MEIR</description>
      <pubDate>Tue, 23 Jul 2024 08:52:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Users-Group-in-Israel/DATA-ORGANIZATION/m-p/936727#M313</guid>
      <dc:creator>meiryem</dc:creator>
      <dc:date>2024-07-23T08:52:41Z</dc:date>
    </item>
    <item>
      <title>Re: DATA ORGANIZATION</title>
      <link>https://communities.sas.com/t5/SAS-Users-Group-in-Israel/DATA-ORGANIZATION/m-p/936729#M314</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/330127"&gt;@meiryem&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you explain&amp;nbsp;&lt;EM&gt;why&amp;nbsp;&lt;/EM&gt; the order of the variables matters to you, i.e. why do you want the variables in a specific order? In general the variables' order does not matter for processing the dataset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2024 09:00:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Users-Group-in-Israel/DATA-ORGANIZATION/m-p/936729#M314</guid>
      <dc:creator>EyalGonen</dc:creator>
      <dc:date>2024-07-23T09:00:31Z</dc:date>
    </item>
    <item>
      <title>Re: DATA ORGANIZATION</title>
      <link>https://communities.sas.com/t5/SAS-Users-Group-in-Israel/DATA-ORGANIZATION/m-p/936743#M315</link>
      <description>&lt;P&gt;Why do you have such numbered variables in the first place?&lt;/P&gt;
&lt;P&gt;Transpose to a long dataset, extract the sequence number and basename from the _NAME_ variable, and you can then set up any order and combination/order you like, e.g. in PROC REPORT.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2024 05:48:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Users-Group-in-Israel/DATA-ORGANIZATION/m-p/936743#M315</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2024-07-25T05:48:42Z</dc:date>
    </item>
    <item>
      <title>Re: DATA ORGANIZATION</title>
      <link>https://communities.sas.com/t5/SAS-Users-Group-in-Israel/DATA-ORGANIZATION/m-p/936785#M316</link>
      <description>&lt;P&gt;thank you very much&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2024 15:04:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Users-Group-in-Israel/DATA-ORGANIZATION/m-p/936785#M316</guid>
      <dc:creator>meiryem</dc:creator>
      <dc:date>2024-07-23T15:04:14Z</dc:date>
    </item>
    <item>
      <title>Re: DATA ORGANIZATION</title>
      <link>https://communities.sas.com/t5/SAS-Users-Group-in-Israel/DATA-ORGANIZATION/m-p/936786#M317</link>
      <description>&lt;P&gt;only for visual reason to show to my maneger&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2024 15:06:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Users-Group-in-Israel/DATA-ORGANIZATION/m-p/936786#M317</guid>
      <dc:creator>meiryem</dc:creator>
      <dc:date>2024-07-23T15:06:59Z</dc:date>
    </item>
    <item>
      <title>Re: DATA ORGANIZATION</title>
      <link>https://communities.sas.com/t5/SAS-Users-Group-in-Israel/DATA-ORGANIZATION/m-p/936802#M318</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/330127"&gt;@meiryem&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;only for visual reason to show to my maneger&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If you need a REPORT or an EXCEL file, you can use PROC REPORT or PROC TABULATE or PROC PRINT to change the order of the variables in the output. You do NOT need to re-arrange the columns in the DATA set.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2024 15:24:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Users-Group-in-Israel/DATA-ORGANIZATION/m-p/936802#M318</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-07-23T15:24:58Z</dc:date>
    </item>
    <item>
      <title>Re: DATA ORGANIZATION</title>
      <link>https://communities.sas.com/t5/SAS-Users-Group-in-Israel/DATA-ORGANIZATION/m-p/936816#M319</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/330127"&gt;@meiryem&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;only for visual reason to show to my maneger&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;So perhaps just make a list of the variables in the order you want and use that list to make the report.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you know the prefixes then just generate the list of names.&amp;nbsp; For example write them to the SAS log.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_:
  do i=1 to 50;
    put 'A' i ' B' i ' C' i;
  end;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then copy and paste them into your report code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc print data=have;
  var id &amp;lt;paste list here&amp;gt;
  ;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 23 Jul 2024 17:01:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Users-Group-in-Israel/DATA-ORGANIZATION/m-p/936816#M319</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-07-23T17:01:23Z</dc:date>
    </item>
    <item>
      <title>Re: DATA ORGANIZATION</title>
      <link>https://communities.sas.com/t5/SAS-Users-Group-in-Israel/DATA-ORGANIZATION/m-p/936830#M320</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can try this code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;* Create sample data;
data UNORDERED(drop=i j);
	length 
		A1-A50 
		C1-C50
		E1-E50	8;

	array cols {*} A1-A50 C1-C50 E1-E50;
	do i=1 to 1000;
		do j=1 to 150;
			cols[j]=rand('UNIFORM');
		end;
		output;
	end;
run;

* Using the COLUMNS dictionary table to get all the columns and sort them as needed;
proc sql noprint;
	create table COLUMNS as
	select 
		name,
		substr(name,1,1) as Prefix length=1,
		input(substr(name, 2), 2.) as Suffix
	from 
		DICTIONARY.COLUMNS 
	where 
		libname='WORK' and memname='UNORDERED'
	order by 
		3,2;
quit;

* Generating proc sql code to re-arrange the columns;
filename sascode temp;

data _null_;
	set COLUMNS end=last;
	file sascode;
	if _n_=1 then do;
		put 'proc sql noprint;';
		put 'create table ORDERED as ';
		put 'select ';
	end;
	put name @;
	if ^last then put ',';
	if last then do;
		put 'from UNORDERED;';
		put 'quit;';
	end;
run;
%include sascode;

filename sascode clear;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Hagay&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2024 17:58:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Users-Group-in-Israel/DATA-ORGANIZATION/m-p/936830#M320</guid>
      <dc:creator>Hagay</dc:creator>
      <dc:date>2024-07-23T17:58:36Z</dc:date>
    </item>
  </channel>
</rss>

