<?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 creating macro variables from array with call symput function in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/creating-macro-variables-from-array-with-call-symput-function/m-p/136128#M27587</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12pt;"&gt;I'm having trouble creating macro variables from an array with the call symputx function.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;After creating a dataset containing the coefficients from proc reg run on the following fitness dataset, I'd like to assign each of the 6 coeffcients to macro variables p1-p6.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;The code runs without error, however when I attempt to view the values of p1-p6 SAS doesn't recognize the macro variables:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;%put&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; &amp;amp;p1 &amp;amp;p2 &amp;amp;p3 &amp;amp;p4 &amp;amp;p5 &amp;amp;p6;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;711 %put &amp;amp;p1 &amp;amp;p2 &amp;amp;p3 &amp;amp;p4 &amp;amp;p5 &amp;amp;p6;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WARNING: Apparent symbolic reference P1 not resolved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WARNING: Apparent symbolic reference P2 not resolved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WARNING: Apparent symbolic reference P3 not resolved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WARNING: Apparent symbolic reference P4 not resolved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WARNING: Apparent symbolic reference P5 not resolved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WARNING: Apparent symbolic reference P6 not resolved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;p1 &amp;amp;p2 &amp;amp;p3 &amp;amp;p4 &amp;amp;p5 &amp;amp;p6&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas what I'm doing wrong? Thanks much!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; fitness;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; Age Weight Oxygen RunTime RestPulse RunPulse MaxPulse @@;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;datalines&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; 44 89.47 44.609 11.37 62 178 182&amp;nbsp;&amp;nbsp; 40 75.07 45.313 10.07 62 185 185&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; 44 85.84 54.297&amp;nbsp; 8.65 45 156 168&amp;nbsp;&amp;nbsp; 42 68.15 59.571&amp;nbsp; 8.17 40 166 172&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; 38 89.02 49.874&amp;nbsp; 9.22 55 178 180&amp;nbsp;&amp;nbsp; 47 77.45 44.811 11.63 58 176 176&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; 40 75.98 45.681 11.95 70 176 180&amp;nbsp;&amp;nbsp; 43 81.19 49.091 10.85 64 162 170&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; 44 81.42 39.442 13.08 63 174 176&amp;nbsp;&amp;nbsp; 38 81.87 60.055&amp;nbsp; 8.63 48 170 186&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; 44 73.03 50.541 10.13 45 168 168&amp;nbsp;&amp;nbsp; 45 87.66 37.388 14.03 56 186 192&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; 45 66.45 44.754 11.12 51 176 176&amp;nbsp;&amp;nbsp; 47 79.15 47.273 10.60 47 162 164&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; 54 83.12 51.855 10.33 50 166 170&amp;nbsp;&amp;nbsp; 49 81.42 49.156&amp;nbsp; 8.95 44 180 185&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; 51 69.63 40.836 10.95 57 168 172&amp;nbsp;&amp;nbsp; 51 77.91 46.672 10.00 48 162 168&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; 48 91.63 46.774 10.25 48 162 164&amp;nbsp;&amp;nbsp; 49 73.37 50.388 10.08 67 168 168&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; 57 73.37 39.407 12.63 58 174 176&amp;nbsp;&amp;nbsp; 54 79.38 46.080 11.17 62 156 165&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; 52 76.32 45.441&amp;nbsp; 9.63 48 164 166&amp;nbsp;&amp;nbsp; 50 70.87 54.625&amp;nbsp; 8.92 48 146 155&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; 51 67.25 45.118 11.08 48 172 172&amp;nbsp;&amp;nbsp; 54 91.63 39.203 12.88 44 168 172&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; 51 73.71 45.790 10.47 59 186 188&amp;nbsp;&amp;nbsp; 57 59.08 50.545&amp;nbsp; 9.93 49 148 155&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; 49 76.32 48.673&amp;nbsp; 9.40 56 186 188&amp;nbsp;&amp;nbsp; 48 61.24 47.920 11.50 52 170 176&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; 52 82.78 47.467 10.50 53 170 172&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;reg&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;=fitness &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;outest&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;=params;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;model&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; Oxygen=Age Weight RunTime RunPulse RestPulse MaxPulse;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;quit&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;%macro&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; assignparm(k);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;data _null_; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;set params;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;array x[&amp;amp;k] Age Weight RunTime RunPulse RestPulse MaxPulse;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;%do&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; i=&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;%to&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; &amp;amp;k;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; call symputx(cats(&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: purple; font-size: 10pt;"&gt;"p"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;,&amp;amp;i),x[&amp;amp;i]);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;%end&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;%mend&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;%&lt;STRONG&gt;&lt;EM&gt;assignparm&lt;/EM&gt;&lt;/STRONG&gt;(&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;6&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;%put&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; &amp;amp;p1 &amp;amp;p2 &amp;amp;p3 &amp;amp;p4 &amp;amp;p5 &amp;amp;p6;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Mar 2014 22:18:15 GMT</pubDate>
    <dc:creator>RobF</dc:creator>
    <dc:date>2014-03-06T22:18:15Z</dc:date>
    <item>
      <title>creating macro variables from array with call symput function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-macro-variables-from-array-with-call-symput-function/m-p/136128#M27587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12pt;"&gt;I'm having trouble creating macro variables from an array with the call symputx function.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;After creating a dataset containing the coefficients from proc reg run on the following fitness dataset, I'd like to assign each of the 6 coeffcients to macro variables p1-p6.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;The code runs without error, however when I attempt to view the values of p1-p6 SAS doesn't recognize the macro variables:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;%put&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; &amp;amp;p1 &amp;amp;p2 &amp;amp;p3 &amp;amp;p4 &amp;amp;p5 &amp;amp;p6;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;711 %put &amp;amp;p1 &amp;amp;p2 &amp;amp;p3 &amp;amp;p4 &amp;amp;p5 &amp;amp;p6;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WARNING: Apparent symbolic reference P1 not resolved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WARNING: Apparent symbolic reference P2 not resolved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WARNING: Apparent symbolic reference P3 not resolved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WARNING: Apparent symbolic reference P4 not resolved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WARNING: Apparent symbolic reference P5 not resolved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WARNING: Apparent symbolic reference P6 not resolved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;p1 &amp;amp;p2 &amp;amp;p3 &amp;amp;p4 &amp;amp;p5 &amp;amp;p6&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas what I'm doing wrong? Thanks much!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; fitness;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; Age Weight Oxygen RunTime RestPulse RunPulse MaxPulse @@;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;datalines&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; 44 89.47 44.609 11.37 62 178 182&amp;nbsp;&amp;nbsp; 40 75.07 45.313 10.07 62 185 185&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; 44 85.84 54.297&amp;nbsp; 8.65 45 156 168&amp;nbsp;&amp;nbsp; 42 68.15 59.571&amp;nbsp; 8.17 40 166 172&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; 38 89.02 49.874&amp;nbsp; 9.22 55 178 180&amp;nbsp;&amp;nbsp; 47 77.45 44.811 11.63 58 176 176&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; 40 75.98 45.681 11.95 70 176 180&amp;nbsp;&amp;nbsp; 43 81.19 49.091 10.85 64 162 170&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; 44 81.42 39.442 13.08 63 174 176&amp;nbsp;&amp;nbsp; 38 81.87 60.055&amp;nbsp; 8.63 48 170 186&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; 44 73.03 50.541 10.13 45 168 168&amp;nbsp;&amp;nbsp; 45 87.66 37.388 14.03 56 186 192&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; 45 66.45 44.754 11.12 51 176 176&amp;nbsp;&amp;nbsp; 47 79.15 47.273 10.60 47 162 164&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; 54 83.12 51.855 10.33 50 166 170&amp;nbsp;&amp;nbsp; 49 81.42 49.156&amp;nbsp; 8.95 44 180 185&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; 51 69.63 40.836 10.95 57 168 172&amp;nbsp;&amp;nbsp; 51 77.91 46.672 10.00 48 162 168&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; 48 91.63 46.774 10.25 48 162 164&amp;nbsp;&amp;nbsp; 49 73.37 50.388 10.08 67 168 168&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; 57 73.37 39.407 12.63 58 174 176&amp;nbsp;&amp;nbsp; 54 79.38 46.080 11.17 62 156 165&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; 52 76.32 45.441&amp;nbsp; 9.63 48 164 166&amp;nbsp;&amp;nbsp; 50 70.87 54.625&amp;nbsp; 8.92 48 146 155&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; 51 67.25 45.118 11.08 48 172 172&amp;nbsp;&amp;nbsp; 54 91.63 39.203 12.88 44 168 172&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; 51 73.71 45.790 10.47 59 186 188&amp;nbsp;&amp;nbsp; 57 59.08 50.545&amp;nbsp; 9.93 49 148 155&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; 49 76.32 48.673&amp;nbsp; 9.40 56 186 188&amp;nbsp;&amp;nbsp; 48 61.24 47.920 11.50 52 170 176&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; 52 82.78 47.467 10.50 53 170 172&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;reg&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;=fitness &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;outest&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;=params;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;model&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; Oxygen=Age Weight RunTime RunPulse RestPulse MaxPulse;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;quit&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;%macro&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; assignparm(k);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;data _null_; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;set params;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;array x[&amp;amp;k] Age Weight RunTime RunPulse RestPulse MaxPulse;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;%do&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; i=&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;%to&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; &amp;amp;k;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; call symputx(cats(&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: purple; font-size: 10pt;"&gt;"p"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;,&amp;amp;i),x[&amp;amp;i]);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;%end&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;%mend&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;%&lt;STRONG&gt;&lt;EM&gt;assignparm&lt;/EM&gt;&lt;/STRONG&gt;(&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;6&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;%put&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; &amp;amp;p1 &amp;amp;p2 &amp;amp;p3 &amp;amp;p4 &amp;amp;p5 &amp;amp;p6;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Mar 2014 22:18:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-macro-variables-from-array-with-call-symput-function/m-p/136128#M27587</guid>
      <dc:creator>RobF</dc:creator>
      <dc:date>2014-03-06T22:18:15Z</dc:date>
    </item>
    <item>
      <title>Re: creating macro variables from array with call symput function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-macro-variables-from-array-with-call-symput-function/m-p/136129#M27588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have a scope issue. The macro variables are created as local variables and are gone once the macro is run. &lt;/P&gt;&lt;P&gt;Change them to global macro variables instead.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Mar 2014 22:21:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-macro-variables-from-array-with-call-symput-function/m-p/136129#M27588</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-03-06T22:21:39Z</dc:date>
    </item>
    <item>
      <title>Re: creating macro variables from array with call symput function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-macro-variables-from-array-with-call-symput-function/m-p/136130#M27589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;as Reeza pointed out, this is a scope issue&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;%do&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; i=&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;%to&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; &amp;amp;k;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; %global p&amp;amp;i;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; *&amp;nbsp; you can avoid the cats function call;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; *&amp;nbsp; call symputx(cats(&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: purple; font-size: 10pt;"&gt;"p"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;,&amp;amp;i),x[&amp;amp;i]);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; call symputx(&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: purple; font-size: 10pt;"&gt;"p&amp;amp;i"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;,x[&amp;amp;i]);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;%end&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;Ron Fehd&amp;nbsp; macro maven&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Mar 2014 22:28:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-macro-variables-from-array-with-call-symput-function/m-p/136130#M27589</guid>
      <dc:creator>Ron_MacroMaven</dc:creator>
      <dc:date>2014-03-06T22:28:11Z</dc:date>
    </item>
    <item>
      <title>Re: creating macro variables from array with call symput function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-macro-variables-from-array-with-call-symput-function/m-p/136131#M27590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Also note that CALL SYMPUTX permits you to specify a third parameter to designate the created variables as being global:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Mar 2014 23:36:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-macro-variables-from-array-with-call-symput-function/m-p/136131#M27590</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2014-03-06T23:36:13Z</dc:date>
    </item>
    <item>
      <title>Re: creating macro variables from array with call symput function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-macro-variables-from-array-with-call-symput-function/m-p/136132#M27591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your macro serves no purpose in the given scenario.&amp;nbsp; As others have mentioned, you have a scope issue with your variables.&amp;nbsp; You can use call symputx to set scope to global if there is some other reason to having this datastep in a macro.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*in open code;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;set params;&lt;/P&gt;&lt;P&gt;array x&lt;LI&gt; Age Weight RunTime RunPulse RestPulse MaxPulse;&lt;/LI&gt;&lt;/P&gt;&lt;P&gt;do _n_ = 1 to dim(x);&lt;/P&gt;&lt;P&gt;call symputx( cats( 'p' , _n_ ) , x[_n_] );&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*utilizing macro for do loop;&lt;/P&gt;&lt;P&gt;%macro assignparm(k);&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;set params;&lt;/P&gt;&lt;P&gt;array x&lt;LI&gt; Age Weight RunTime RunPulse RestPulse MaxPulse;&lt;/LI&gt;&lt;/P&gt;&lt;P&gt;%do i = 1 %to &amp;amp;k;&lt;/P&gt;&lt;P&gt;call symputx( "p&amp;amp;k" , x[&amp;amp;i] , 'g' ); *set macro variable in global scope;&lt;/P&gt;&lt;P&gt;%end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;%mend;&lt;/P&gt;&lt;P&gt;%assignparm(6)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Mar 2014 04:23:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-macro-variables-from-array-with-call-symput-function/m-p/136132#M27591</guid>
      <dc:creator>FriedEgg</dc:creator>
      <dc:date>2014-03-07T04:23:11Z</dc:date>
    </item>
    <item>
      <title>Re: creating macro variables from array with call symput function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-macro-variables-from-array-with-call-symput-function/m-p/136133#M27592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Fantastic, thank you gentlemen for the very helpful comments!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Mar 2014 14:00:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-macro-variables-from-array-with-call-symput-function/m-p/136133#M27592</guid>
      <dc:creator>RobF</dc:creator>
      <dc:date>2014-03-07T14:00:16Z</dc:date>
    </item>
  </channel>
</rss>

