Dan -
Thank you for the reply.
Just to give a quick background - i have a Stored process where i want to graph two variables on a graph and one on a line. When i query up the data sets, and have the ouptput data set which i want to graph in said format, i insert code in there
and it gives me the following errors; I am pasting the whole log here - apologies on the long post;
1 The SAS System 16:25 Tuesday, May 31, 2011
1 ;*';*";*/;quit;run;
2 OPTIONS PAGENO=MIN;
3 %LET _CLIENTTASKLABEL='Program';
4 %LET _CLIENTPROJECTPATH='/Libraries/SASLibraries/AceTest/edited Workquery
4 ! Ace SAS Graph.egp';
5 %LET _CLIENTPROJECTNAME='Edited edited Workquery Ace SAS Graph.egp';
6 %LET _SASPROGRAMFILE=;
7
8 ODS _ALL_ CLOSE;
9 OPTIONS DEV=ACTIVEX;
NOTE: Procedures may not support all options or statements for all devices. For details, see the
documentation for each procedure.
10 GOPTIONS XPIXELS=0 YPIXELS=0;
11 FILENAME EGSR TEMP;
12 ODS tagsets.sasreport12(ID=EGSR) FILE=EGSR STYLE=Copy_of_Analysis
12 ! STYLESHEET=(URL="file:///C:/Documents%20and%20Settings/ace/Desktop/Copy%20of%20Analysis.cs
12 ! s") NOGTITLE NOGFOOTNOTE GPATH=&sasworklocation ENCODING=UTF8 options(rolap="on");
WARNING: Style COPY_OF_ANALYSIS not found; Default style will be used instead.
NOTE: Writing TAGSETS.SASREPORT12(EGSR) Body file: EGSR
13
14 GOPTIONS ACCESSIBLE;
15
16 /* -------------------------------------------------------------------
17 Code generated by SAS Task
18
19 Generated on: Tuesday, May 31, 2011 at 3:07:11 PM
20 By task: Test graph
21
22 Input Data: WORK.QUERY_FOR_COMBINED_FILE_DUM_0015
23 Server: SASApp
24 ------------------------------------------------------------------- */
25
26 %_eg_conditional_dropds(WORK.SORTTempTableSorted);
27 /* -------------------------------------------------------------------
28 Sort data set WORK.QUERY_FOR_COMBINED_FILE_DUM_0015
29 ------------------------------------------------------------------- */
30
31
32 data WORK.QUERY_FOR_COMBINED_FILE_DUM_0015;
33 input month $ Calculation2 metric_b SUM_of_random;
34 datalines;
NOTE: The data set WORK.QUERY_FOR_COMBINED_FILE_DUM_0015 has 5 observations and 4 variables.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
40 ;
41 run;
42 proc template;
43 define statgraph bars;
2 The SAS System 16:25 Tuesday, May 31, 2011
44 begingraph;
45 entrytitle "test three Variable Graph";
46 layout overlay / yaxisopts=(offsetmin=0);
47 barchart x=month y=Calculation2 / discreteoffset=-0.2 barwidth=0.4 fillattrs=graphdata1
47 ! name='a';
48 barchart x=month y=metric_b / discreteoffset= 0.2 barwidth=0.4 fillattrs=graphdata2 name='b';
49 seriesplot x=age y=SUM_of_random / lineattrs=graphdata3(pattern=solid thickness=4)
49 ! yaxis=y2 name='c';
50 discretelegend 'a' 'b' 'c';
51 endlayout;
52 endgraph;a
_
180
ERROR 180-322: Statement is not valid or it is used out of proper order.
53 end;
54 run;
NOTE: PROCEDURE TEMPLATE used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
ERROR: Parse environments were left open. You may be missing an END statement.
NOTE: The SAS System stopped processing this step because of errors.
55
56 ods graphics / width=4in height=3in imagename='BarsGTL';
57 proc sgrender data=WORK.QUERY_FOR_COMBINED_FILE_DUM_0015 template=bars;
58 run;
ERROR: Unable to restore 'bars' from template store!
NOTE: The SAS System stopped processing this step because of errors.
NOTE: There were 5 observations read from the data set WORK.QUERY_FOR_COMBINED_FILE_DUM_0015.
NOTE: PROCEDURE SGRENDER used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
59
60
61
62 GOPTIONS NOACCESSIBLE;
63 %LET _CLIENTTASKLABEL=;
64 %LET _CLIENTPROJECTPATH=;
65 %LET _CLIENTPROJECTNAME=;
66 %LET _SASPROGRAMFILE=;
67
68 ;*';*";*/;quit;run;
69 ODS _ALL_ CLOSE;
70
71
72 QUIT; RUN;
73