<?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: Help with set proc contents default order=varnum? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Help-with-set-proc-contents-default-order-varnum/m-p/539382#M148613</link>
    <description>&lt;P&gt;You can't change this default. Happy typing!&lt;/P&gt;</description>
    <pubDate>Thu, 28 Feb 2019 17:05:42 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2019-02-28T17:05:42Z</dc:date>
    <item>
      <title>Help with set proc contents default order=varnum?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-set-proc-contents-default-order-varnum/m-p/539379#M148611</link>
      <description>&lt;P&gt;Hello does anyone know if I can set proc contents to default to&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;set proc contents default 'order=varnum'&lt;/STRONG&gt;?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think my is set to collate. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;I mean I do not want to have to type out&lt;/P&gt;
&lt;P&gt;proc contents data={myfile} order=varnum;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;but&amp;nbsp;&lt;/P&gt;
&lt;P style="background-color: transparent; color: #333333; font-family: &amp;amp;quot; helevticaneue-light&amp;amp;quot;,&amp;amp;quot;helvetica neue&amp;amp;quot;,helvetica,arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; padding: 0px; margin: 0px;"&gt;proc contents data={myfile};&lt;/P&gt;
&lt;P style="background-color: transparent; color: #333333; font-family: &amp;amp;quot; helevticaneue-light&amp;amp;quot;,&amp;amp;quot;helvetica neue&amp;amp;quot;,helvetica,arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; padding: 0px; margin: 0px;"&gt;run;&lt;/P&gt;
&lt;P style="background-color: transparent; color: #333333; font-family: &amp;amp;quot; helevticaneue-light&amp;amp;quot;,&amp;amp;quot;helvetica neue&amp;amp;quot;,helvetica,arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; padding: 0px; margin: 0px;"&gt;or&lt;/P&gt;
&lt;P style="background-color: transparent; color: #333333; font-family: &amp;amp;quot; helevticaneue-light&amp;amp;quot;,&amp;amp;quot;helvetica neue&amp;amp;quot;,helvetica,arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; padding: 0px; margin: 0px;"&gt;proc contents;run;&lt;/P&gt;
&lt;P style="background-color: transparent; color: #333333; font-family: &amp;amp;quot; helevticaneue-light&amp;amp;quot;,&amp;amp;quot;helvetica neue&amp;amp;quot;,helvetica,arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; padding: 0px; margin: 0px;"&gt;...is fine when I use it 10 -20 times a day and yes I know about abbreviations.&lt;/P&gt;
&lt;P style="background-color: transparent; color: #333333; font-family: &amp;amp;quot; helevticaneue-light&amp;amp;quot;,&amp;amp;quot;helvetica neue&amp;amp;quot;,helvetica,arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; padding: 0px; margin: 0px;"&gt;-TIA KJ&lt;/P&gt;
&lt;P style="background-color: transparent; color: #333333; font-family: &amp;amp;quot; helevticaneue-light&amp;amp;quot;,&amp;amp;quot;helvetica neue&amp;amp;quot;,helvetica,arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; padding: 0px; margin: 0px;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="background-color: transparent; color: #333333; font-family: &amp;amp;quot; helevticaneue-light&amp;amp;quot;,&amp;amp;quot;helvetica neue&amp;amp;quot;,helvetica,arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; padding: 0px; margin: 0px;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="background-color: transparent; color: #333333; font-family: &amp;amp;quot; helevticaneue-light&amp;amp;quot;,&amp;amp;quot;helvetica neue&amp;amp;quot;,helvetica,arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; padding: 0px; margin: 0px;"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Feb 2019 16:58:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-set-proc-contents-default-order-varnum/m-p/539379#M148611</guid>
      <dc:creator>kjohnsonm</dc:creator>
      <dc:date>2019-02-28T16:58:22Z</dc:date>
    </item>
    <item>
      <title>Re: Help with set proc contents default order=varnum?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-set-proc-contents-default-order-varnum/m-p/539381#M148612</link>
      <description>&lt;P&gt;Write a macro, such as&amp;nbsp;&amp;nbsp; CNTNTS below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro cntnts (data=_last_);
    proc contents data=&amp;amp;data  varnum;
    run;
%mend;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then you can type:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;%cntnts (data=mylib.mydata);
&lt;/PRE&gt;
&lt;P&gt;to get what you want for dataset mylib.mydata.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And you get the bonus of just typing:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;%cntnts;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;to report on the data set most recently created in your current sas session.&amp;nbsp; That's why I put in the automatic variable _LAST_ as the default "data=" option in the macro definition.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Feb 2019 17:05:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-set-proc-contents-default-order-varnum/m-p/539381#M148612</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2019-02-28T17:05:23Z</dc:date>
    </item>
    <item>
      <title>Re: Help with set proc contents default order=varnum?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-set-proc-contents-default-order-varnum/m-p/539382#M148613</link>
      <description>&lt;P&gt;You can't change this default. Happy typing!&lt;/P&gt;</description>
      <pubDate>Thu, 28 Feb 2019 17:05:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-set-proc-contents-default-order-varnum/m-p/539382#M148613</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2019-02-28T17:05:42Z</dc:date>
    </item>
    <item>
      <title>Re: Help with set proc contents default order=varnum?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-set-proc-contents-default-order-varnum/m-p/539539#M148677</link>
      <description>&lt;P&gt;You'll have to check this, to see whether it is still supported.&amp;nbsp; It might let you get away with typing one extra letter.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There used to be statement style macros available as part of the software.&amp;nbsp; That means you could invoke a macro just by typing the name of the macro without a percent sign:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.sascommunity.org/sugi/SUGI84/Sugi-84-179%20Henderson%20Kuhn.pdf" target="_blank"&gt;http://www.sascommunity.org/sugi/SUGI84/Sugi-84-179%20Henderson%20Kuhn.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So you could create your own statement-style macro using:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%macro contentss / stmt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;contents order=varnum&lt;/P&gt;
&lt;P&gt;%mend contentss;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then in the body of your program, you would just have to type an extra "s":&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc contentss data=mydataset;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS would automatically replace "contentss" with "contents order=varnum".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If that would be a viable solution for you, give it a try and see if it is still supported.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2019 03:53:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-set-proc-contents-default-order-varnum/m-p/539539#M148677</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2019-03-01T03:53:33Z</dc:date>
    </item>
  </channel>
</rss>

