Desktop productivity for business analysts and programmers

What's Missing? Macro _EG_CONDITIONAL_DROPDS not resolved

Reply
Contributor
Posts: 38

What's Missing? Macro _EG_CONDITIONAL_DROPDS not resolved

I used EG 4.2 to create a sas program by selecting FILE->Export All Code. I then created a Stored Process by using the wizard. I have selected "STORED PROCESS MACROS", "Global Macro variables" and "Libname references" under "Include Code For".

This is the error:

WARNING: Apparent invocation of macro _EG_CONDITIONAL_DROPDS not resolved.

165 +/* -------------------------------------------------------------------
166 + End of task code.
167 + ------------------------------------------------------------------- */
168 +RUN; QUIT;
169 +%_eg_conditional_dropds(WORK.SORTTempTableSorted);
_
180

ERROR 180-322: Statement is not valid or it is used out of proper order.


This is the log:

1 The SAS System 10:56 Thursday, September 16, 2010

NOTE: Copyright (c) 2002-2008 by SAS Institute Inc., Cary, NC, USA.
NOTE: SAS (r) Proprietary Software 9.2 (TS2M3)
Licensed to SOCIAL SERVICES COORDINATORS/MAINLINE INFO, Site 70067395.
NOTE: This session is executing on the X64_SRV08 platform.



NOTE: SAS Initialization used (Total process time):
real time 0.00 seconds
cpu time 0.01 seconds

NOTE: The autoexec file, C:\SAS\SASEBI\Lev1\SASMain\StoredProcessServer\autoexec.sas, was executed at server initialization. No server log was specified. Add the log option to the server startup command to see details of the autoexec execution (refer to
"Specifying Logging Options" under "Server Startup Command" in the Server Administrator's Guide).

>>> SAS Macro Variables:

PROMPT_COUNTY=Boulder
PROMPT_COUNTY_COUNT=1
PROMPT_STATE=Colorado
SYSDBMSG=
SYSDBRC=0
_APSLIST=PROMPT_STATE,PROMPT_COUNTY,PROMPT_COUNTY_COUNT,_RESULT,_ODSSTYLE,_ENCODING,_CLIENTNAME,_ODSDEST,_ODSSTYLESHEET,_GOPT_DEVICE,_METAPERSON,_ODSOPTIONS,_METAFOLDER,_METAUSER,_PROGRAM,_CLIENT,_USERNAME,_SECUREUSERNAME
_CLIENT=SAS Enterprise Guide; CLR 2.0.50727.3615; Microsoft Windows NT 5.1.2600 Service Pack 3
_CLIENTNAME=SAS Enterprise Guide
_ENCODING=utf-8
_GOPT_DEVICE=ACTIVEX
_METAFOLDER=/SSC Analytics/Test/
_METAPERSON=James Baillie
_METAUSER=jbaillie@SSC
_ODSDEST=HTML
_ODSOPTIONS=ATTRIBUTES=("CODEBASE"="http://www2.sas.com/codebase/graph/v92/sasgraph.exe#version=9,2")
_ODSSTYLE=Analysis
_ODSSTYLESHEET=(URL="file:///C:/Program%20Files/SAS/SharedFiles/BIClientStyles/4.2/Analysis.css")
_PROGRAM=/SSC Analytics/Test/Cascading_Prompts_sp
_REPLAY="&_URL?_sessionid=70855404-FC01-47D9-8B49-756E71CECF83&_program=replay&_entry=&_TMPCAT.."
_RESULT=STREAM
_SECUREUSERNAME=jbaillie
_TMPCAT=APSWORK.TCAT004C
_USERNAME=jbaillie

1 options nosource source2 center notes nodate nonumber ls=195 formchar='|----|+|---+=|-/\<>*' pagesize=40 noovp nomprint nomlogic nosymbolgen; title; footnote;
The SAS System

NOTE: %INCLUDE (level 1) file D:\SSC\SAS Source Code\SSC_Op_Analysis_Dev\Test\Cascading_Prompts_sp.sas is file D:\SSC\SAS Source Code\SSC_Op_Analysis_Dev\Test\Cascading_Prompts_sp.sas.
3 +* Begin EG generated code (do not edit this line);
4 +*
5 +* Stored process registered by
6 +* Enterprise Guide Stored Process Manager V4.2
7 +*
8 +* ====================================================================
9 +* Stored process name: Cascading_Prompts_sp
10 +*
11 +* Keywords: dynamic cascading prompt
12 +* ====================================================================
13 +*
14 +* Stored process prompt dictionary:
15 +* ____________________________________
16 +* PROMPT_COUNTY
17 +* Type: Text
18 +* Label: Select a County:
19 +* Attr: Visible
20 +* ____________________________________
21 +* PROMPT_STATE
22 +* Type: Text
23 +* Label: Select a State:
24 +* Attr: Visible, Required
25 +* ____________________________________
26 +*;
27 +
28 +
29 +*ProcessBody;
30 +
31 +%global PROMPT_COUNTY
32 + PROMPT_STATE;
33 +
34 +%STPBEGIN;
35 +
36 +OPTIONS VALIDVARNAME=ANY;
37 +
38 +%LET _SASSERVERNAME=%NRBQUOTE(SASMain - Logical Stored Process Server);
39 +
The SAS System

40 +* End EG generated code (do not edit this line);
41 +
42 +/* ----------------------------------------
43 +Code exported from SAS Enterprise Guide
44 +DATE: Wednesday, September 15, 2010 TIME: 2:10:24 PM
45 +PROJECT: Project
46 +PROJECT PATH:
47 +---------------------------------------- */
48 +
49 +/* ---------------------------------- */
50 +/* MACRO: enterpriseguide */
51 +/* PURPOSE: define a macro variable */
52 +/* that contains the file system */
53 +/* path of the WORK library on the */
54 +/* server. Note that different */
55 +/* logic is needed depending on the */
56 +/* server type. */
57 +/* ---------------------------------- */
58 +%macro enterpriseguide;
59 +%global sasworklocation;
60 +%if &sysscp=OS %then %do; /* MVS Server */
61 + %if %sysfunc(getoption(filesystem))=MVS %then %do;
62 + /* By default, physical file name will be considered a classic MVS data
63 + set. */
64 + /* Construct dsn that will be unique for each concurrent session under a
65 + particular account: */
66 + filename egtemp '&egtemp' disp=(new,delete); /* create a temporary data set */
67 + %let tempdsn=%sysfunc(pathname(egtemp)); /* get dsn */
68 + filename egtemp clear; /* get rid of data set - we only wanted its name */
69 + %let unique_dsn=".EGTEMP.%substr(&tempdsn, 1, 16).PDSE";
70 + filename egtmpdir &unique_dsn
71 + disp=(new,delete,delete) space=(cyl,(5,5,50))
72 + dsorg=po dsntype=library recfm=vb
73 + lrecl=8000 blksize=8004 ;
74 + options fileext=ignore ;
75 + %end;
76 + %else %do;
77 + /*
The SAS System

78 + By default, physical file name will be considered an HFS
79 + (hierarchical file system) file.
80 + Note: This does NOT support users who do not have an HFS home directory.
81 + It also may not support multiple simultaneous sessions under the same account.
82 + */
83 + filename egtmpdir './';
84 + %end;
85 + %let path=%sysfunc(pathname(egtmpdir));
86 + %let sasworklocation=%sysfunc(quote(&path));
87 +%end; /* MVS Server */
88 +%else %do;
89 + %let sasworklocation = "%sysfunc(getoption(work))/";
90 +%end;
91 +%if &sysscp=VMS_AXP %then %do; /* Alpha VMS server */
92 + %let sasworklocation = "%sysfunc(getoption(work))";
93 +%end;
94 +%if &sysscp=CMS %then %do;
95 + %let path = %sysfunc(getoption(work));
96 + %let sasworklocation = "%substr(&path, %index(&path,%str( )))";
97 +%end;
98 +%mend enterpriseguide;
99 +
100 +%enterpriseguide
101 +
102 +ODS PROCTITLE;
103 +OPTIONS DEV=ACTIVEX;
NOTE: Procedures may not support all options or statements for all devices. For details, see the documentation for each procedure.
104 +GOPTIONS XPIXELS=0 YPIXELS=0;
105 +FILENAME EGSRX TEMP;
106 +ODS tagsets.sasreport12(ID=EGSRX) FILE=EGSRX STYLE=sasweb STYLESHEET=(URL=
107 +"file:///C:/Program%20Files/SAS/SharedFiles/BIClientStyles/4.2/sasweb.css")
108 + NOGTITLE NOGFOOTNOTE GPATH=&sasworklocation ENCODING=UTF8 options(rolap="on");
NOTE: Writing TAGSETS.SASREPORT12(EGSRX) Body file: EGSRX
109 +
110 +/* START OF NODE: List Data */
111 +%LET _CLIENTTASKLABEL='List Data';
112 +%LET _CLIENTPROJECTPATH='';
113 +%LET _CLIENTPROJECTNAME='';
The SAS System

114 +
115 +GOPTIONS ACCESSIBLE;
116 +/* -------------------------------------------------------------------
117 + Code generated by SAS Task
118 +
119 + Generated on: Wednesday, September 15, 2010 at 2:02:26 PM
120 + By task: List Data
121 +
122 + Input Data: SASHELP.ZIPCODE
123 + Server: SASMain
124 + ------------------------------------------------------------------- */
125 +
126 +*%_eg_conditional_dropds(WORK.SORTTempTableSorted);
127 +/* -------------------------------------------------------------------
128 + Sort data set SASHELP.ZIPCODE
129 + ------------------------------------------------------------------- */
130 +
131 +PROC SQL;
132 + CREATE VIEW WORK.SORTTempTableSorted AS
133 + SELECT T.ZIP, T.CITY, T.STATENAME, T.COUNTYNM, T.COUNTY, T.AREACODE
134 + FROM SASHELP.ZIPCODE as T
135 + ORDER BY 2,4,3
136 +;
NOTE: SQL view WORK.SORTTEMPTABLESORTED has been defined.
137 +QUIT;
NOTE: PROCEDURE SQL used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds


138 +TITLE;
139 +TITLE1 "Report Listing";
140 +FOOTNOTE;
141 +FOOTNOTE1
142 +"Generated by the SAS System (&_SASSERVERNAME, &SYSSCPL) on %TRIM(%QSYSFUNC(DATE(), NLDATE20.)) at %TRIM(%SYSFUNC(TIME(), NLTIMAP20.))";
143 +
144 +%global PROMPT_COUNTY_COUNT PROMPT_COUNTY;
145 +%let COUNTY_WHERE_CLAUSE=; *Initialize our new where clause to missing;
The SAS System

146 +data _null_;
147 +length COUNTY_LIST $10000; *long enough to hold all counties in a state;
148 +if symget('PROMPT_COUNTY_COUNT')=1 then COUNTY_LIST=quote(trim(symget('PROMPT_COUNTY')));
149 +else do i=1 to symget('PROMPT_COUNTY_COUNT');
150 +COUNTY_LIST=
151 +catx(' ' ,COUNTY_LIST, quote(trim(symget(cats('PROMPT_COUNTY',i)))));
152 +end;
153 +*if at least one county selected, write to COUNTY_WHERE_CLAUSE macro value;
154 +if missing(COUNTY_LIST)=0 then
155 +call symputx('COUNTY_WHERE_CLAUSE',cats('and COUNTYNM in (',COUNTY_LIST,')'));
156 +run;

NOTE: Character values have been converted to numeric values at the places given by: (Line)Smiley SadColumn).
148:4 149:16
NOTE: DATA statement used (Total process time):
real time 0.04 seconds
cpu time 0.00 seconds


157 +
158 +PROC PRINT DATA=WORK.SORTTempTableSorted
159 + OBS="Row number"
160 + LABEL
161 + ;
162 + VAR ZIP CITY COUNTYNM STATENAME AREACODE;
163 + where STATENAME="&Prompt_State" &COUNTY_WHERE_CLAUSE;
164 +RUN;

NOTE: There were 32 observations read from the data set SASHELP.ZIPCODE.
WHERE (STATENAME='Colorado') and (COUNTYNM='Boulder');
NOTE: There were 32 observations read from the data set WORK.SORTTEMPTABLESORTED.
WHERE (STATENAME='Colorado') and (COUNTYNM='Boulder');
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.40 seconds
cpu time 0.06 seconds


WARNING: Apparent invocation of macro _EG_CONDITIONAL_DROPDS not resolved.
The SAS System

165 +/* -------------------------------------------------------------------
166 + End of task code.
167 + ------------------------------------------------------------------- */
168 +RUN; QUIT;
169 +%_eg_conditional_dropds(WORK.SORTTempTableSorted);
_
180

ERROR 180-322: Statement is not valid or it is used out of proper order.

170 +TITLE; FOOTNOTE;
171 +
172 +
173 +GOPTIONS NOACCESSIBLE;
174 +%LET _CLIENTTASKLABEL=;
175 +%LET _CLIENTPROJECTPATH=;
176 +%LET _CLIENTPROJECTNAME=;
177 +
178 +;*';*";*/;quit;run;
179 +ODS _ALL_ CLOSE;
180 +
181 +* Begin EG generated code (do not edit this line);
182 +;*';*";*/;quit;
183 +%STPEND;
184 +
185 +* End EG generated code (do not edit this line);
NOTE: %INCLUDE (level 1) ending.
Community Manager
Posts: 2,697

Re: What's Missing? Macro _EG_CONDITIONAL_DROPDS not resolved

The _eg_conditional_dropds macro *should* have been included in your Export to a SAS program, but it looks like it was left out.

I've attached the content of that macro to this message. If you copy/paste this to the beginning of the SAS program, things should work.

Another path might be to use the Create Stored Process feature from SAS Enterprise Guide (skipping the export), which should include all of the necessary code.

Chris
Contributor
Posts: 38

Re: What's Missing? Macro _EG_CONDITIONAL_DROPDS not resolved

Dropped it in and it worked great! Thanks Chris - Luv SAS!!!
Ask a Question
Discussion stats
  • 2 replies
  • 3557 views
  • 0 likes
  • 2 in conversation