title: Unable to run Call Execute within a Data Step
body: <p>I am trying to run an insert statement within a data step to populate a table. I get the following error while running the code ERROR: Domain error. There is no other information on this error i the logs.</p>
  
  <p>The sample code which I am implementing is :</p>
  
  <pre><code>  DATA _NULL_;
    SET DataSetA;
  
   Call Execute ('Proc Sql; Insert Into TableA Select col1,col2,c.Col2 From Table B Inner        Join ( Select col1,' || Datasetcol1 || ' As col2, ' || Datasetcol2 || ' as Col3 FROM ' || Datasetcol3 || ' ) c On b.Col1=c.col1;quit;');
  
   run;
  </code></pre>
  
  <p>This code runs okay if there are 2000 records but now I have 10000 records and throws me that error. Datasetcol1 and Datasetcol2 are values from the dataset which I am using in the query.</p>
  
  <p>I have no idea why this error occurs. Initially, I thought it could be because of the processor having too much work, I put in a wait by using sleep and wakeup , however, I still get the error. Also, I dont get this error always. It happens sometimes and sometimes it doesnt.</p>