<?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: Add data step coming from a table variable each observation (possible?) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Add-data-step-coming-from-a-table-variable-each-observation/m-p/755943#M238596</link>
    <description>&lt;P&gt;You cannot execute a variable string within the same data step; as soon as the data step starts executing, it is compiled and won't change.&lt;/P&gt;
&lt;P&gt;You can &lt;EM&gt;create the whole data step code&lt;/EM&gt; dynamically, either with CALL EXECUTE or writing to a temporary file and %INCLUDEing the temporary file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A brute force approach could be this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
set tars end=done;
if _n_ = 1
then call execute("data prep; set tars;");
call execute ("
  if _n_ = " !! put(_n_,32.) !!"
  then do;
    total_cost = " !! tariff !! ";
  end;
");
if done then call execute ("run;");
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 22 Jul 2021 13:37:21 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2021-07-22T13:37:21Z</dc:date>
    <item>
      <title>Add data step coming from a table variable each observation (possible?)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Add-data-step-coming-from-a-table-variable-each-observation/m-p/755926#M238593</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to create a data step that comes from a variable?&lt;/P&gt;&lt;P&gt;I have a table with ref, amount and tariff.&lt;/P&gt;&lt;P&gt;The total_cost must be calculated with the 'formula' provided in tariff, where the 'formula' also uses the amount in the calculation.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;(This is just an example, where the 'formula' could be anything else and also use other variables).&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I did try lots of things, like with macro variables, call execute, etc.., but no luck.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data tars;
	input REF 1-8 AMOUNT 10-11 TARIFF $ 13-34;
	datalines;
10655094 5  12+ifn(AMOUNT&amp;gt;=12,6,0)
10655234 10 16+ifn(AMOUNT&amp;gt;=10,4,0)
;
run;
data prep;
	set tars;
	CALC_STRING = cats('TOTAL_COST=',TARIFF,';');
	* &amp;gt;&amp;gt; how to 'execute' the calc_string at this point? *;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 22 Jul 2021 12:52:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Add-data-step-coming-from-a-table-variable-each-observation/m-p/755926#M238593</guid>
      <dc:creator>Dietz</dc:creator>
      <dc:date>2021-07-22T12:52:22Z</dc:date>
    </item>
    <item>
      <title>Re: Add data step coming from a table variable each observation (possible?)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Add-data-step-coming-from-a-table-variable-each-observation/m-p/755934#M238595</link>
      <description>&lt;P&gt;You can use your dataset to generate a data-step:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
   set tars end=jobDone;
   
   if _n_ = 1 then do;
      call execute('data want; set tars;');
   end;
   
   call execute(cats('total_costs=', tariff, ';'));
   
   if jobDone then do;
      call execute('run;');
   end;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 22 Jul 2021 13:25:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Add-data-step-coming-from-a-table-variable-each-observation/m-p/755934#M238595</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2021-07-22T13:25:08Z</dc:date>
    </item>
    <item>
      <title>Re: Add data step coming from a table variable each observation (possible?)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Add-data-step-coming-from-a-table-variable-each-observation/m-p/755943#M238596</link>
      <description>&lt;P&gt;You cannot execute a variable string within the same data step; as soon as the data step starts executing, it is compiled and won't change.&lt;/P&gt;
&lt;P&gt;You can &lt;EM&gt;create the whole data step code&lt;/EM&gt; dynamically, either with CALL EXECUTE or writing to a temporary file and %INCLUDEing the temporary file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A brute force approach could be this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
set tars end=done;
if _n_ = 1
then call execute("data prep; set tars;");
call execute ("
  if _n_ = " !! put(_n_,32.) !!"
  then do;
    total_cost = " !! tariff !! ";
  end;
");
if done then call execute ("run;");
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 22 Jul 2021 13:37:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Add-data-step-coming-from-a-table-variable-each-observation/m-p/755943#M238596</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-07-22T13:37:21Z</dc:date>
    </item>
    <item>
      <title>Re: Add data step coming from a table variable each observation (possible?)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Add-data-step-coming-from-a-table-variable-each-observation/m-p/755944#M238597</link>
      <description>&lt;P&gt;Hi Andreas,&lt;/P&gt;&lt;P&gt;Thanks for the example.&lt;/P&gt;&lt;P&gt;But it calculates each observation with *all* total_costs lines.&lt;/P&gt;&lt;P&gt;And the total_costs is always based on that last line and not on the one provided with each observation.&lt;/P&gt;&lt;P&gt;I'm thinking of maybe adding 'if _n_ is X then ..' (?)&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jul 2021 13:40:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Add-data-step-coming-from-a-table-variable-each-observation/m-p/755944#M238597</guid>
      <dc:creator>Dietz</dc:creator>
      <dc:date>2021-07-22T13:40:57Z</dc:date>
    </item>
    <item>
      <title>Re: Add data step coming from a table variable each observation (possible?)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Add-data-step-coming-from-a-table-variable-each-observation/m-p/755947#M238599</link>
      <description>&lt;P&gt;Hi Kurt,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!!!&lt;/P&gt;&lt;P&gt;This works perfectly.&lt;/P&gt;&lt;P&gt;And is in the line of what I was thinking in reply to Andreas.. (adding if _n_ ..)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Both thanks for the suggestions/solution!&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jul 2021 13:46:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Add-data-step-coming-from-a-table-variable-each-observation/m-p/755947#M238599</guid>
      <dc:creator>Dietz</dc:creator>
      <dc:date>2021-07-22T13:46:53Z</dc:date>
    </item>
    <item>
      <title>Re: Add data step coming from a table variable each observation (possible?)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Add-data-step-coming-from-a-table-variable-each-observation/m-p/755950#M238601</link>
      <description>&lt;P&gt;Either use the strings to generate code, see answer by&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Or if your strings follow a strict pattern like your example just parse the strings to get the values and re-create the function call.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data prep;
  set tars;
  x1=input(scan(tariff,1,'+'),32.);
  x2=input(scan(tariff,-3,',=)'),32.);
  x3=input(scan(tariff,-2,',=)'),32.);
  x4=input(scan(tariff,-1,',=)'),32.);
  TOTAL_COST=x1+ifn(AMOUNT&amp;gt;=x2,x3,4x);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or convert the value of AMOUNT to a macro variable and convert your string to macro code that references the macro variable and use RESOLVE() function. (again only if the pattern of TARIFF is well understood and consistent).&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data prep;
  set tars;
  call symputx('amount',amount);
  length macro_code $200;
  macro_code = cats('%sysevalf(',scan(tariff,1,'+'),'+%sysfunc(',scan(tariff,2,'+'),'))');
  macro_code = tranwrd(macro_code,'AMOUNT','&amp;amp;AMOUNT');
  total_cost=input(resolve(macro_code),32.);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jul 2021 14:01:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Add-data-step-coming-from-a-table-variable-each-observation/m-p/755950#M238601</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-07-22T14:01:39Z</dc:date>
    </item>
    <item>
      <title>Re: Add data step coming from a table variable each observation (possible?)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Add-data-step-coming-from-a-table-variable-each-observation/m-p/755961#M238602</link>
      <description>&lt;P&gt;Hi Tom,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for those examples.&lt;/P&gt;&lt;P&gt;But TARIFF can be any 'formula' and referencing to any variable in the table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I like the second example as I also tried to do it with macro variables.&lt;/P&gt;&lt;P&gt;Already see what I could have tried also. Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jul 2021 14:40:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Add-data-step-coming-from-a-table-variable-each-observation/m-p/755961#M238602</guid>
      <dc:creator>Dietz</dc:creator>
      <dc:date>2021-07-22T14:40:01Z</dc:date>
    </item>
    <item>
      <title>Re: Add data step coming from a table variable each observation (possible?)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Add-data-step-coming-from-a-table-variable-each-observation/m-p/755969#M238606</link>
      <description>&lt;P&gt;Note it is usually a LOT easier to use PUT to generate the code than CALL EXECUTE().&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename code temp;
data _null_;
  set tars;
  file code;
  put 'if ' _n_= 'then total_cost=' tariff ';' ;
run;

data prep;
  set tars;
%include code / source2;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;121   data prep;
122     set tars;
123   %include code / source2;
NOTE: %INCLUDE (level 1) file CODE is file C:\Users\ABERNA~1\AppData\Local\Temp\1\SAS Temporary
      Files\_TD5508_AMRL20L6F1E4992_\#LN00057.
124  +if _N_=1 then total_cost=12+ifn(AMOUNT&amp;gt;=12,6,0) ;
125  +if _N_=2 then total_cost=16+ifn(AMOUNT&amp;gt;=10,4,0) ;
NOTE: %INCLUDE (level 1) ending.
126   run;

NOTE: There were 2 observations read from the data set WORK.TARS.
NOTE: The data set WORK.PREP has 2 observations and 4 variables.
&lt;/PRE&gt;</description>
      <pubDate>Thu, 22 Jul 2021 14:58:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Add-data-step-coming-from-a-table-variable-each-observation/m-p/755969#M238606</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-07-22T14:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: Add data step coming from a table variable each observation (possible?)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Add-data-step-coming-from-a-table-variable-each-observation/m-p/756033#M238626</link>
      <description>&lt;P&gt;Hi &lt;A class="trigger-hovercard" style="color: #009999;" href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562" target="_blank" rel="noopener"&gt;KurtBremser&lt;/A&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why do you need &lt;CODE class=" language-sas"&gt;if _n_ = " !! put(_n_,32.) !!"&lt;/CODE&gt;&amp;nbsp;in&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;call execute ("
  if _n_ = " !! put(_n_,32.) !!"
  then do;
    total_cost = " !! tariff !! ";
  end;
");&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;?&lt;/P&gt;
&lt;P&gt;Wouldn't it be easier to just have:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;call execute ("total_cost = " !! tariff !! ";");&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jul 2021 20:18:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Add-data-step-coming-from-a-table-variable-each-observation/m-p/756033#M238626</guid>
      <dc:creator>LeonidBatkhan</dc:creator>
      <dc:date>2021-07-22T20:18:52Z</dc:date>
    </item>
    <item>
      <title>Re: Add data step coming from a table variable each observation (possible?)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Add-data-step-coming-from-a-table-variable-each-observation/m-p/756037#M238629</link>
      <description>&lt;P&gt;Each observation potentially wants to run a different formula.&lt;/P&gt;
&lt;P&gt;Try it yourself and see.&lt;/P&gt;
&lt;PRE&gt;137   data prep1;
138     set tars;
139   %include code / source2;
NOTE: %INCLUDE (level 1) file CODE is file C:\Users\...\#LN00058.
140  +if _N_=1 then total_cost=12+ifn(AMOUNT&amp;gt;=12,6,0) ;
141  +if _N_=2 then total_cost=16+ifn(AMOUNT&amp;gt;=10,4,0) ;
NOTE: %INCLUDE (level 1) ending.
142   run;

NOTE: There were 2 observations read from the data set WORK.TARS.
NOTE: The data set WORK.PREP1 has 2 observations and 4 variables.


151   data prep2;
152     set tars;
153   %include code / source2;
NOTE: %INCLUDE (level 1) file CODE is file C:\Users\...\#LN00059.
154  +total_cost=12+ifn(AMOUNT&amp;gt;=12,6,0) ;
155  +total_cost=16+ifn(AMOUNT&amp;gt;=10,4,0) ;
NOTE: %INCLUDE (level 1) ending.
156   run;

NOTE: There were 2 observations read from the data set WORK.TARS.
NOTE: The data set WORK.PREP2 has 2 observations and 4 variables.
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-SPOILER&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename code temp;
data _null_;
  set tars;
  file code;
  put 'if ' _n_= 'then total_cost=' tariff ';' ;
run;

data prep1;
  set tars;
%include code / source2;
run;

filename code temp;
data _null_;
  set tars;
  file code;
  put 'total_cost=' tariff ';' ;
run;

data prep2;
  set tars;
%include code / source2;
run;

proc compare data=prep1 compare=prep2;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/LI-SPOILER&gt;
&lt;PRE&gt;The COMPARE Procedure
Comparison of WORK.PREP1 with WORK.PREP2
(Method=EXACT)

Values Comparison Summary

Number of Variables Compared with All Observations Equal: 3.
Number of Variables Compared with Some Observations Unequal: 1.
Total Number of Values which Compare Unequal: 1.
Maximum Difference: 4.


Variables with Unequal Values

Variable    Type  Len  Ndif   MaxDif

total_cost  NUM     8     1    4.000



Value Comparison Results for Variables

__________________________________________________________
           ||       Base    Compare
       Obs ||  total_cos  total_cos      Diff.     % Diff
           ||          t          t
 ________  ||  _________  _________  _________  _________
           ||
        1  ||    12.0000    16.0000     4.0000    33.3333
__________________________________________________________

&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jul 2021 20:26:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Add-data-step-coming-from-a-table-variable-each-observation/m-p/756037#M238629</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-07-22T20:26:35Z</dc:date>
    </item>
    <item>
      <title>Re: Add data step coming from a table variable each observation (possible?)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Add-data-step-coming-from-a-table-variable-each-observation/m-p/756044#M238632</link>
      <description>&lt;P&gt;But that different formula is contained in the variable TARIFF which is read in with each iteration of the data step. What I suggest concurs with the solution provided by &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15475"&gt;@andreas_lds&lt;/a&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jul 2021 20:56:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Add-data-step-coming-from-a-table-variable-each-observation/m-p/756044#M238632</guid>
      <dc:creator>LeonidBatkhan</dc:creator>
      <dc:date>2021-07-22T20:56:18Z</dc:date>
    </item>
    <item>
      <title>Re: Add data step coming from a table variable each observation (possible?)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Add-data-step-coming-from-a-table-variable-each-observation/m-p/756045#M238633</link>
      <description>&lt;P&gt;Without the condition, we would have a series of &lt;EM&gt;unconditional&lt;/EM&gt; assignments in the resulting data step, and only the last would take effect. In the end, all observations would have the results of the formula from the last observation.&lt;/P&gt;
&lt;P&gt;Keep in mind that, for a dataset of n observations, we create a data step with n assignments, and the condition makes sure that each assignment is done only once, for its intended observation.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jul 2021 20:58:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Add-data-step-coming-from-a-table-variable-each-observation/m-p/756045#M238633</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-07-22T20:58:28Z</dc:date>
    </item>
    <item>
      <title>Re: Add data step coming from a table variable each observation (possible?)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Add-data-step-coming-from-a-table-variable-each-observation/m-p/756048#M238635</link>
      <description>&lt;P&gt;I also suggest you use &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;'s method of writing the code to a file and look at the resulting codes. Then you will see why I used the condition testing for _N_.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jul 2021 21:02:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Add-data-step-coming-from-a-table-variable-each-observation/m-p/756048#M238635</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-07-22T21:02:39Z</dc:date>
    </item>
    <item>
      <title>Re: Add data step coming from a table variable each observation (possible?)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Add-data-step-coming-from-a-table-variable-each-observation/m-p/756273#M238737</link>
      <description>&lt;P&gt;Thank you, &lt;A class="trigger-hovercard" style="color: #009999;" href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562" target="_blank" rel="noopener"&gt;KurtBremser&lt;/A&gt;&amp;nbsp;for the explanation. You are correct and I was not. I still don't like the fact that the generated code looks like an automated hard-coding. However, I guess until we get something like &lt;A href="https://realpython.com/python-eval-function/" target="_self"&gt;Python's eval( ) function&lt;/A&gt;&amp;nbsp;we are stuck with this method of "automated hard-coding", see also &lt;A href="https://blogs.sas.com/content/sgf/2021/06/25/how-to-evaluate-sas-expression-in-data-step-dynamically/" target="_self"&gt;How to evaluate SAS expressions in DATA Step dynamically&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jul 2021 17:24:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Add-data-step-coming-from-a-table-variable-each-observation/m-p/756273#M238737</guid>
      <dc:creator>LeonidBatkhan</dc:creator>
      <dc:date>2021-07-23T17:24:23Z</dc:date>
    </item>
    <item>
      <title>Re: Add data step coming from a table variable each observation (possible?)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Add-data-step-coming-from-a-table-variable-each-observation/m-p/756275#M238738</link>
      <description>&lt;P&gt;It is just normal data driven code generation.&amp;nbsp; Although normally you would be using some other variable instead of the observation in the data set.&amp;nbsp; For example some type of record type variable.&amp;nbsp; In which case you only need to generate one statement per possible TYPE value instead of one per observation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wouldn't call it "hard coding".&amp;nbsp; It is more of a parameter driven code.&amp;nbsp; It is just that the parameter value are code snippets.&amp;nbsp; But it does open you up for code injection attacks.&amp;nbsp; So you really need to trust the source of that variable with the code and have the proper controls in place to insure the content is valid.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jul 2021 17:46:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Add-data-step-coming-from-a-table-variable-each-observation/m-p/756275#M238738</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-07-23T17:46:10Z</dc:date>
    </item>
  </channel>
</rss>

