<?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: Printing a set of observations in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Printing-a-set-of-observations/m-p/432308#M281775</link>
    <description>&lt;P&gt;So you have it licensed but not installed so your installation wasn't done correctly.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;---SAS/STAT&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;30DEC2017&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Note that this means you can't run any regression or stat procs, so it's possible it's how you're supposed to be set up but I'd question it for sure.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 30 Jan 2018 16:14:09 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2018-01-30T16:14:09Z</dc:date>
    <item>
      <title>Printing a set of observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Printing-a-set-of-observations/m-p/432250#M281768</link>
      <description>&lt;P&gt;I have a data set with an ID column, and a primary reviewer column. I've randomly assigned a second reviewer for every observation. Now what I need is a way to print out 50% of the observations from every primary reviewer. So for example if Anna is the primary reviewer for 10 ID's- I want to choose 5 of those IDs at random and print those rows. (If she has 11, then I'd want to round to the nearest whole number, so 6 in this case)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The basic framework is something like&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc print data=mydata;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;where nobs=%randbetween(1, _n_(primary_reviewer)*.5);&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Obviously there's some issues with the syntax and it doesn't run, so that's what I need some help with. The randbetween macro is something I've built already(looks like the below)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%macro RandBetween(min, max);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;(&amp;amp;min + floor((1+&amp;amp;max-&amp;amp;min)*rand("uniform")))&lt;BR /&gt;%mend;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2018 15:24:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Printing-a-set-of-observations/m-p/432250#M281768</guid>
      <dc:creator>sarabear</dc:creator>
      <dc:date>2018-01-30T15:24:07Z</dc:date>
    </item>
    <item>
      <title>Re: Printing a set of observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Printing-a-set-of-observations/m-p/432262#M281769</link>
      <description>&lt;P&gt;If this were my project I'd be very tempted to 1) sort the data by the primary reviewer and 2) use proc surveyselect with a samprate of 50 and use the&amp;nbsp;primary reviewer variable as a&amp;nbsp;STRATA variable.&lt;/P&gt;
&lt;P&gt;the output data set would contain some probability of selection and weighting variables for printing you could drop those variables and perhaps use BY&amp;nbsp;group processing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A rough example using SAShelp.class data set:&lt;/P&gt;
&lt;PRE&gt;proc sort data=sashelp.class out=work.class;
by sex;
run;

proc surveyselect data=work.class out=work.sel
   samprate=.5;
   strata sex;
run;&lt;/PRE&gt;</description>
      <pubDate>Tue, 30 Jan 2018 15:41:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Printing-a-set-of-observations/m-p/432262#M281769</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-01-30T15:41:47Z</dc:date>
    </item>
    <item>
      <title>Re: Printing a set of observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Printing-a-set-of-observations/m-p/432264#M281770</link>
      <description>&lt;P&gt;Awesome! I'm having an issue with surveyselect though(I'm not sure if my version of SAS supports that procedure)-do you know of any workarounds?&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2018 15:45:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Printing-a-set-of-observations/m-p/432264#M281770</guid>
      <dc:creator>sarabear</dc:creator>
      <dc:date>2018-01-30T15:45:17Z</dc:date>
    </item>
    <item>
      <title>Re: Printing a set of observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Printing-a-set-of-observations/m-p/432276#M281771</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/190186"&gt;@sarabear&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Awesome! I'm having an issue with surveyselect though(I'm not sure if my version of SAS supports that procedure)-do you know of any workarounds?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;What's the issue?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you don't have SURVEYSELECT you don't have SAS/STAT which would be really really rare.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2018 15:53:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Printing-a-set-of-observations/m-p/432276#M281771</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-01-30T15:53:36Z</dc:date>
    </item>
    <item>
      <title>Re: Printing a set of observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Printing-a-set-of-observations/m-p/432284#M281772</link>
      <description>&lt;P&gt;When I try to use proc surveyselect, I get an error that says "Procedure surveyselect not found"&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2018 16:00:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Printing-a-set-of-observations/m-p/432284#M281772</guid>
      <dc:creator>sarabear</dc:creator>
      <dc:date>2018-01-30T16:00:26Z</dc:date>
    </item>
    <item>
      <title>Re: Printing a set of observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Printing-a-set-of-observations/m-p/432286#M281773</link>
      <description>&lt;P&gt;What version of SAS are you using?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Run the following and post back - but remove your site number:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc product_status;run;

proc setinit;run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 30 Jan 2018 16:02:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Printing-a-set-of-observations/m-p/432286#M281773</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-01-30T16:02:34Z</dc:date>
    </item>
    <item>
      <title>Re: Printing a set of observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Printing-a-set-of-observations/m-p/432292#M281774</link>
      <description>&lt;P&gt;It's SAS 9.4. This is what the Log says&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc product_status;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For Base SAS Software ...&lt;BR /&gt;Custom version information: 9.4_M4&lt;BR /&gt;Image version information: 9.04.01M4P110916&lt;BR /&gt;For SAS/ACCESS Interface to PC Files ...&lt;BR /&gt;Custom version information: 9.4_M4&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc setinit;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Original site validation data&lt;BR /&gt;Current version: 9.04.01M4P110916&lt;/P&gt;&lt;P&gt;Product expiration dates:&lt;BR /&gt;---Base SAS Software&lt;BR /&gt;30DEC2017&lt;BR /&gt;---SAS/STAT&lt;BR /&gt;30DEC2017&lt;BR /&gt;---SAS/GRAPH&lt;BR /&gt;30DEC2017&lt;BR /&gt;---SAS/OR&lt;BR /&gt;30DEC2017&lt;BR /&gt;---SAS/GIS&lt;BR /&gt;30DEC2017&lt;BR /&gt;---SAS/Secure 168-bit&lt;BR /&gt;30DEC2017&lt;BR /&gt;---SAS/Secure Windows&lt;BR /&gt;30DEC2017&lt;BR /&gt;---SAS Enterprise Guide&lt;BR /&gt;30DEC2017&lt;BR /&gt;---OR OPT&lt;BR /&gt;30DEC2017&lt;BR /&gt;---OR PRS&lt;BR /&gt;30DEC2017&lt;BR /&gt;---OR IVS&lt;BR /&gt;30DEC2017&lt;BR /&gt;---OR LSO&lt;BR /&gt;30DEC2017&lt;BR /&gt;---SAS/ACCESS Interface to PC Files&lt;BR /&gt;30DEC2017&lt;BR /&gt;---SAS/ACCESS Interface to ODBC&lt;BR /&gt;30DEC2017&lt;BR /&gt;---SAS/ACCESS Interface to OLE DB&lt;BR /&gt;30DEC2017&lt;BR /&gt;---SAS/ACCESS Interface to Teradata&lt;BR /&gt;30DEC2017&lt;BR /&gt;---SAS Workspace Server for Local Access&lt;BR /&gt;30DEC2017&lt;BR /&gt;---High Performance Suite&lt;BR /&gt;30DEC2017&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2018 16:06:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Printing-a-set-of-observations/m-p/432292#M281774</guid>
      <dc:creator>sarabear</dc:creator>
      <dc:date>2018-01-30T16:06:47Z</dc:date>
    </item>
    <item>
      <title>Re: Printing a set of observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Printing-a-set-of-observations/m-p/432308#M281775</link>
      <description>&lt;P&gt;So you have it licensed but not installed so your installation wasn't done correctly.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;---SAS/STAT&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;30DEC2017&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Note that this means you can't run any regression or stat procs, so it's possible it's how you're supposed to be set up but I'd question it for sure.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2018 16:14:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Printing-a-set-of-observations/m-p/432308#M281775</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-01-30T16:14:09Z</dc:date>
    </item>
    <item>
      <title>Re: Printing a set of observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Printing-a-set-of-observations/m-p/432310#M281776</link>
      <description>&lt;P&gt;You are licensed for SAS/Stat (the proc setinit output)&amp;nbsp;but someone didn't install it (not in proc product_status output).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would discuss with your SAS Admin, or whoever installs the software, why that choice was made. I can see not having things like the Access to Teradata if your work doesn't require you to access that database but SAS/Stat is such a main piece of functionality the choice not to install it boggles my mind.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2018 16:17:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Printing-a-set-of-observations/m-p/432310#M281776</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-01-30T16:17:31Z</dc:date>
    </item>
    <item>
      <title>Re: Printing a set of observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Printing-a-set-of-observations/m-p/432312#M281777</link>
      <description>&lt;P&gt;OK-I'd thought it was an issue of installation. I'll check it out. Thanks!!&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2018 16:19:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Printing-a-set-of-observations/m-p/432312#M281777</guid>
      <dc:creator>sarabear</dc:creator>
      <dc:date>2018-01-30T16:19:17Z</dc:date>
    </item>
    <item>
      <title>Re: Printing a set of observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Printing-a-set-of-observations/m-p/432348#M281778</link>
      <description>&lt;P&gt;Surprised that no one mentioned it .. ALL of your SAS licenses have expired!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2018 17:21:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Printing-a-set-of-observations/m-p/432348#M281778</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2018-01-30T17:21:10Z</dc:date>
    </item>
  </channel>
</rss>

