Problem Note 38454: Apparent invocation of macro warning when attempting to run code exported from SAS® Enterprise Guide®
Shared macro code might not be included in code exported from SAS Enterprise Guide using the Export Last Submitted Code or Export Last Submitted Code as a Step in Project features. The following error might be seen when you attempt to run the exported code in another SAS session:
Warning: Apparent invocation of macro _EG_CONDITIONAL_DROPDS not resolved.
100 %_eg_conditional_dropds(WORK.SORTTempTableSorted);
-
180
Error 180-322: Statement is not valid or it is used out of proper order.
The error can appear for any of the shared macros including, but not limited to, the _eg_conditional_dropds, and can occur in a variety of the SAS Enterprise Guide tasks.
To circumvent the problem, copy the shared macro code into the exported code before running the code. The code for _eg_conditional_dropds is as follows:
%macro _eg_conditional_dropds /parmbuff;
%let num=1;
/* flags to determine whether a PROC SQL step is needed */
/* or even started yet */
%let stepneeded=0;
%let stepstarted=0;
%let dsname=%scan(&syspbuff,&num,',()');
%do %while(&dsname ne);
%if %sysfunc(exist(&dsname)) %then %do;
%let stepneeded=1;
%if (&stepstarted eq 0) %then %do;
proc sql;
%let stepstarted=1;
%end;
drop table &dsname;
%end;
%if %sysfunc(exist(&dsname,view)) %then %do;
%let stepneeded=1;
%if (&stepstarted eq 0) %then %do;
proc sql;
%let stepstarted=1;
%end;
drop view &dsname;
%end;
%let num=%eval(&num+1);
%let dsname=%scan(&syspbuff,&num,',()');
%end;
%if &stepstarted %then %do;
quit;
%end;
%mend _eg_conditional_dropds;
For other shared macros, you can start the steps to create a stored process, and preview the code on the first step. The preview code for stored processes contains the shared macros. To preview the code in the Create New Stored Process Wizard, click the step code icon in the lower left corner of the window. You should then be able to copy and paste any of the shared macro code from there.
Operating System and Release Information
| SAS System | SAS Enterprise Guide | Microsoft® Windows® for x64 | 4.2 | 5.1 | 9.2 TS2M0 | 9.3 TS1M0 |
| Microsoft Windows Server 2003 Datacenter Edition | 4.2 | 5.1 | 9.2 TS2M0 | 9.3 TS1M0 |
| Microsoft Windows Server 2003 Enterprise Edition | 4.2 | 5.1 | 9.2 TS2M0 | 9.3 TS1M0 |
| Microsoft Windows Server 2003 Standard Edition | 4.2 | 5.1 | 9.2 TS2M0 | 9.3 TS1M0 |
| Microsoft Windows XP Professional | 4.2 | 5.1 | 9.2 TS2M0 | 9.3 TS1M0 |
| Windows Vista | 4.2 | 5.1 | 9.2 TS2M0 | 9.3 TS1M0 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
| Type: | Problem Note |
| Priority: | medium |
| Date Modified: | 2010-01-27 15:27:47 |
| Date Created: | 2010-01-21 13:46:45 |