<?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 GET INPUT ORDER OF VARIABLE IN ASCENDING ORDER? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/HOW-TO-GET-INPUT-ORDER-OF-VARIABLE-IN-ASCENDING-ORDER/m-p/613719#M179277</link>
    <description>CAN I GET THE CODE FOR THAT AND IF THERE ARE 100 VARIBLES IN INPUT ORDER&lt;BR /&gt;MANY THANKS</description>
    <pubDate>Tue, 24 Dec 2019 11:42:47 GMT</pubDate>
    <dc:creator>Saikiran_Mamidi</dc:creator>
    <dc:date>2019-12-24T11:42:47Z</dc:date>
    <item>
      <title>HOW TO GET INPUT ORDER OF VARIABLE IN ASCENDING ORDER?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/HOW-TO-GET-INPUT-ORDER-OF-VARIABLE-IN-ASCENDING-ORDER/m-p/613715#M179273</link>
      <description>&lt;P&gt;DATA HAVE;&lt;/P&gt;&lt;P&gt;INPUT&amp;nbsp; &amp;nbsp;B&amp;nbsp; A&amp;nbsp; D&amp;nbsp; C&amp;nbsp; E;&lt;/P&gt;&lt;P&gt;CARDS;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;HERE, I WANT TO CHANGE&amp;nbsp; INPUT ORDER OF VARIABLE IN ASCENDING OR DESCENDING ORDER&lt;/P&gt;&lt;P&gt;i.e&amp;nbsp; A&amp;nbsp; B&amp;nbsp; C&amp;nbsp; D&amp;nbsp; E&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Dec 2019 11:04:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/HOW-TO-GET-INPUT-ORDER-OF-VARIABLE-IN-ASCENDING-ORDER/m-p/613715#M179273</guid>
      <dc:creator>Saikiran_Mamidi</dc:creator>
      <dc:date>2019-12-24T11:04:20Z</dc:date>
    </item>
    <item>
      <title>Re: HOW TO GET INPUT ORDER OF VARIABLE IN ASCENDING ORDER?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/HOW-TO-GET-INPUT-ORDER-OF-VARIABLE-IN-ASCENDING-ORDER/m-p/613717#M179275</link>
      <description>&lt;P&gt;My usual opinion is that re-ordering variables in a data set is pointless.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You usually only need to re-order the data sets upon output, and then PROC PRINT and PROC REPORT and most other display procedures allow you to produce results with the columns in the desired order.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Dec 2019 11:36:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/HOW-TO-GET-INPUT-ORDER-OF-VARIABLE-IN-ASCENDING-ORDER/m-p/613717#M179275</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-12-24T11:36:22Z</dc:date>
    </item>
    <item>
      <title>Re: HOW TO GET INPUT ORDER OF VARIABLE IN ASCENDING ORDER?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/HOW-TO-GET-INPUT-ORDER-OF-VARIABLE-IN-ASCENDING-ORDER/m-p/613719#M179277</link>
      <description>CAN I GET THE CODE FOR THAT AND IF THERE ARE 100 VARIBLES IN INPUT ORDER&lt;BR /&gt;MANY THANKS</description>
      <pubDate>Tue, 24 Dec 2019 11:42:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/HOW-TO-GET-INPUT-ORDER-OF-VARIABLE-IN-ASCENDING-ORDER/m-p/613719#M179277</guid>
      <dc:creator>Saikiran_Mamidi</dc:creator>
      <dc:date>2019-12-24T11:42:47Z</dc:date>
    </item>
    <item>
      <title>Re: HOW TO GET INPUT ORDER OF VARIABLE IN ASCENDING ORDER?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/HOW-TO-GET-INPUT-ORDER-OF-VARIABLE-IN-ASCENDING-ORDER/m-p/613724#M179282</link>
      <description>&lt;P&gt;Please do not type in ALL CAPITAL LETTERS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This seems like a pointless thing to do, print results with column names in alphabetical order, except if the names have a numeric suffix, such as x1-x100. Then you could simply use x1-x100 to obtain your ordering.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Otherwise:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc print data=mydataset;
     var baboon elephant giraffe gorilla sandhillcrane snake ... ;
     /* You have to type all of your variables here */
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you don't want to type all of your 100 variables (a natural desire), this would work:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql noprint;
     select distinct names into :names separated by ' ' from sashelp.vcolumn
        where libname='WORK' and memname='MYDATASETNAME';
quit;

proc print data=mydataset;
    var &amp;amp;names;
run;&lt;/CODE&gt;&lt;/PRE&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, 24 Dec 2019 11:58:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/HOW-TO-GET-INPUT-ORDER-OF-VARIABLE-IN-ASCENDING-ORDER/m-p/613724#M179282</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-12-24T11:58:15Z</dc:date>
    </item>
    <item>
      <title>Re: HOW TO GET INPUT ORDER OF VARIABLE IN ASCENDING ORDER?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/HOW-TO-GET-INPUT-ORDER-OF-VARIABLE-IN-ASCENDING-ORDER/m-p/613731#M179286</link>
      <description>&lt;P&gt;Check your keyboard, your Capslock is stuck.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Dec 2019 13:12:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/HOW-TO-GET-INPUT-ORDER-OF-VARIABLE-IN-ASCENDING-ORDER/m-p/613731#M179286</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-12-24T13:12:26Z</dc:date>
    </item>
    <item>
      <title>Re: HOW TO GET INPUT ORDER OF VARIABLE IN ASCENDING ORDER?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/HOW-TO-GET-INPUT-ORDER-OF-VARIABLE-IN-ASCENDING-ORDER/m-p/613737#M179287</link>
      <description>&lt;P&gt;What do you mean?&amp;nbsp; Are you saying want to change the INPUT statement?&amp;nbsp; Are you saying you want to check the order that the variables appear in the dataset to be different than they appear in the INPUT statement?&amp;nbsp; Do you want to do it as part of that same step? Or as an additional step that you run after the data set is run.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Dec 2019 14:37:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/HOW-TO-GET-INPUT-ORDER-OF-VARIABLE-IN-ASCENDING-ORDER/m-p/613737#M179287</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-12-24T14:37:08Z</dc:date>
    </item>
    <item>
      <title>Re: HOW TO GET INPUT ORDER OF VARIABLE IN ASCENDING ORDER?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/HOW-TO-GET-INPUT-ORDER-OF-VARIABLE-IN-ASCENDING-ORDER/m-p/613763#M179298</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/304446"&gt;@Saikiran_Mamidi&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;DATA HAVE;&lt;/P&gt;
&lt;P&gt;INPUT&amp;nbsp; &amp;nbsp;B&amp;nbsp; A&amp;nbsp; D&amp;nbsp; C&amp;nbsp; E;&lt;/P&gt;
&lt;P&gt;CARDS;&lt;/P&gt;
&lt;P&gt;RUN;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HERE, I WANT TO CHANGE&amp;nbsp; INPUT ORDER OF VARIABLE IN ASCENDING OR DESCENDING ORDER&lt;/P&gt;
&lt;P&gt;i.e&amp;nbsp; A&amp;nbsp; B&amp;nbsp; C&amp;nbsp; D&amp;nbsp; E&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;A mentioned likely not worth a lot of time.&lt;/P&gt;
&lt;P&gt;Provide actual example data that you expect to read.&lt;/P&gt;
&lt;P&gt;There are ways to read data other than left to right &lt;STRONG&gt;but&lt;/STRONG&gt; the actual content of the values determines which of the methods is possible.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the data is in a fixed column layout where variable B&amp;nbsp;&lt;STRONG&gt;always&lt;/STRONG&gt; occupies columns 1-3 and variable A &lt;STRONG&gt;always &lt;/STRONG&gt;occupies columns 4-8 then column input can be used.&lt;/P&gt;
&lt;P&gt;Your extremely limited input statement though implies list input which requires knowledge of the actual values to parse an input line. Likely involving :&lt;/P&gt;
&lt;P&gt;An input @&lt;/P&gt;
&lt;P&gt;A do loop&lt;/P&gt;
&lt;P&gt;An array&lt;/P&gt;
&lt;P&gt;Scan function&lt;/P&gt;
&lt;P&gt;Explicit conversion from character to numeric.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If that sounds like more work than you want to maintain....&lt;/P&gt;</description>
      <pubDate>Tue, 24 Dec 2019 17:24:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/HOW-TO-GET-INPUT-ORDER-OF-VARIABLE-IN-ASCENDING-ORDER/m-p/613763#M179298</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-12-24T17:24:11Z</dc:date>
    </item>
  </channel>
</rss>

