<?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: Macro variable - Urgent Help in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Macro-variable-Urgent-Help/m-p/57185#M12310</link>
    <description>proc optmodel ; &lt;BR /&gt;
var c1 init - 3 &amp;gt;= - 3 &amp;lt;= 2.93;&lt;BR /&gt;
var c2 init - 3 &amp;gt;= - 3 &amp;lt;= 8.86; &lt;BR /&gt;
number a; set R= 1..20; number aval{i in R} = i/20;  number c1val{i in R}, c2val{i in R}, c3val{i in R}; number sensval{i in R};&lt;BR /&gt;
max Sensitivity = 1-probbnrm((c1-1.43)/.5,(c2-2.86)/2, 0);&lt;BR /&gt;
con FPF: 1-probbnrm((c1-0)/1,(c2-0)/1, 0) &amp;lt;= a;  &lt;BR /&gt;
for {i in R} do;&lt;BR /&gt;
   a = aval&lt;I&gt;;&lt;BR /&gt;
   solve with IPNLP / MAXTIME=14400 MAXITER=100000 printfreq = 0 ;  &lt;BR /&gt;
   c1val&lt;I&gt; = c1;&lt;BR /&gt;
   c2val&lt;I&gt; = c2;&lt;BR /&gt;
   sensval&lt;I&gt; = Sensitivity;&lt;BR /&gt;
 end;&lt;BR /&gt;
create data mrocBP from &lt;I&gt; FPR=aval c1=c1val c2=c2val MTPR=sensval ; &lt;BR /&gt;
quit ;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;</description>
    <pubDate>Wed, 22 Jul 2009 01:54:30 GMT</pubDate>
    <dc:creator>1234567</dc:creator>
    <dc:date>2009-07-22T01:54:30Z</dc:date>
    <item>
      <title>Macro variable - Urgent Help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-variable-Urgent-Help/m-p/57184#M12309</link>
      <description>Proc optmodel run 20 different optimizations and results were saved in sas dataset. I want to save c1 and c2 from the previous results as a macro variable and then pass them back to PROC OPTMODEL for the next optimization. So by doing this the previous results of c1 and c2 will be used as starting values for the next run. Thanks..</description>
      <pubDate>Wed, 22 Jul 2009 01:48:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-variable-Urgent-Help/m-p/57184#M12309</guid>
      <dc:creator>1234567</dc:creator>
      <dc:date>2009-07-22T01:48:37Z</dc:date>
    </item>
    <item>
      <title>Re: Macro variable - Urgent Help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-variable-Urgent-Help/m-p/57185#M12310</link>
      <description>proc optmodel ; &lt;BR /&gt;
var c1 init - 3 &amp;gt;= - 3 &amp;lt;= 2.93;&lt;BR /&gt;
var c2 init - 3 &amp;gt;= - 3 &amp;lt;= 8.86; &lt;BR /&gt;
number a; set R= 1..20; number aval{i in R} = i/20;  number c1val{i in R}, c2val{i in R}, c3val{i in R}; number sensval{i in R};&lt;BR /&gt;
max Sensitivity = 1-probbnrm((c1-1.43)/.5,(c2-2.86)/2, 0);&lt;BR /&gt;
con FPF: 1-probbnrm((c1-0)/1,(c2-0)/1, 0) &amp;lt;= a;  &lt;BR /&gt;
for {i in R} do;&lt;BR /&gt;
   a = aval&lt;I&gt;;&lt;BR /&gt;
   solve with IPNLP / MAXTIME=14400 MAXITER=100000 printfreq = 0 ;  &lt;BR /&gt;
   c1val&lt;I&gt; = c1;&lt;BR /&gt;
   c2val&lt;I&gt; = c2;&lt;BR /&gt;
   sensval&lt;I&gt; = Sensitivity;&lt;BR /&gt;
 end;&lt;BR /&gt;
create data mrocBP from &lt;I&gt; FPR=aval c1=c1val c2=c2val MTPR=sensval ; &lt;BR /&gt;
quit ;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;</description>
      <pubDate>Wed, 22 Jul 2009 01:54:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-variable-Urgent-Help/m-p/57185#M12310</guid>
      <dc:creator>1234567</dc:creator>
      <dc:date>2009-07-22T01:54:30Z</dc:date>
    </item>
    <item>
      <title>Re: Macro variable - Urgent Help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-variable-Urgent-Help/m-p/57186#M12311</link>
      <description>Can't put all the sas code!</description>
      <pubDate>Wed, 22 Jul 2009 01:56:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-variable-Urgent-Help/m-p/57186#M12311</guid>
      <dc:creator>1234567</dc:creator>
      <dc:date>2009-07-22T01:56:28Z</dc:date>
    </item>
    <item>
      <title>Re: Macro variable - Urgent Help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-variable-Urgent-Help/m-p/57187#M12312</link>
      <description>Chris@NewZealand&lt;BR /&gt;
and&lt;BR /&gt;
Daniel Santos &lt;BR /&gt;
&lt;BR /&gt;
Please your help</description>
      <pubDate>Wed, 22 Jul 2009 02:04:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-variable-Urgent-Help/m-p/57187#M12312</guid>
      <dc:creator>1234567</dc:creator>
      <dc:date>2009-07-22T02:04:41Z</dc:date>
    </item>
    <item>
      <title>Re: Macro variable - Urgent Help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-variable-Urgent-Help/m-p/57188#M12313</link>
      <description>Hello.&lt;BR /&gt;
&lt;BR /&gt;
I'm not sure I got this right...&lt;BR /&gt;
&lt;BR /&gt;
You just need to call proc optmodel several times (at leas 2 times) feeding the output of the previous iterations (CREATE DATA OUT)  to the input of the next (READ DATA IN). Is this right?&lt;BR /&gt;
&lt;BR /&gt;
How is your code structured? Are we talking about a single script?&lt;BR /&gt;
And is it a single call to the optmodel procedure per script, or is it possible to have more than one call in same script?&lt;BR /&gt;
&lt;BR /&gt;
Finally, how many iterations do need?&lt;BR /&gt;
&lt;BR /&gt;
Cheers from Portugal.&lt;BR /&gt;
&lt;BR /&gt;
Daniel Santos @ &lt;A href="http://www.cgd.pt" target="_blank"&gt;www.cgd.pt&lt;/A&gt;.</description>
      <pubDate>Wed, 22 Jul 2009 07:35:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-variable-Urgent-Help/m-p/57188#M12313</guid>
      <dc:creator>DanielSantos</dc:creator>
      <dc:date>2009-07-22T07:35:13Z</dc:date>
    </item>
    <item>
      <title>Re: Macro variable - Urgent Help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-variable-Urgent-Help/m-p/57189#M12314</link>
      <description>An intermediate DATA step using CALL SYMPUT will allow you to capture a SAS variable value and place it in a SAS global/local macro variable, for later use.  If you are working with a macro and a %DO / %END loop, you can declare the macro variable up-front using %LOCAL or %GLOBAL, and then use an %IF %THEN testing the %LENGTH(&lt;YOURMACROVAR&gt;) to determine the first execution and then don't do something on the first DO loop execution (there are also other techniques as well).&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;/YOURMACROVAR&gt;</description>
      <pubDate>Wed, 22 Jul 2009 14:18:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-variable-Urgent-Help/m-p/57189#M12314</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-07-22T14:18:18Z</dc:date>
    </item>
  </channel>
</rss>

