BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Stephane
Quartz | Level 8

Hi

I generate this template that shows a boxplot on SASHELP.STOCKS and a seriesplot on SASHELP.CARS on the same graphic.

The tool indicates that SGRENDER cannot be used for that but SGDESIGN. I don't find how to call my two tables in the proc SGDESIGN. Could you help me ?


proc template;
define statgraph Graphique;
dynamic _ORIGIN _INVOICE _DATE _VOLUME;
begingraph;
   layout lattice / rowdatarange=data columndatarange=data rows=2
rowgutter=10 columngutter=10;
      layout overlay;
         boxplot x=_ORIGIN y=_INVOICE / name='box' boxwidth=0.4
groupdisplay=Cluster clusterwidth=1.0;
      endlayout;
      layout overlay;
         seriesplot x=_DATE y=_VOLUME / name='series' connectorder=xaxis;
      endlayout;
   endlayout;
endgraph;
end;
run;


/* The graph uses multiple datasets. This is not supported by PROC SGRENDER.
You need to run PROC SGDESIGN to generate the graph. */

1 ACCEPTED SOLUTION

Accepted Solutions
DanH_sas
SAS Super FREQ

The data references are maintained in the SGD file. So, if your data changes, the new proc run with pick up the new data. If the data files are in a new libname location, you can override the original libname in the SGD file with the LIBNAME option.

View solution in original post

6 REPLIES 6
DanH_sas
SAS Super FREQ

Hey Stephane,

That comment means you cannot run that example by using the template with SGRENDER. You have to run the SGD file with PROC SGDESIGN. The SGD file is the save format for the Designer application. You can still use dynamic substitution with SGDESIGN. Let me know if you have any more questions.

Thanks!
Dan

Stephane
Quartz | Level 8

Hi Dan

Thank you.

But how do you call the proc SGDESIGN with two tables ?

DanH_sas
SAS Super FREQ

The data references are maintained in the SGD file. So, if your data changes, the new proc run with pick up the new data. If the data files are in a new libname location, you can override the original libname in the SGD file with the LIBNAME option.

Stephane
Quartz | Level 8

Oh I generate the SGD file with the DESIGNER and then I call it with proc SGDESIGN ?!

DanH_sas
SAS Super FREQ

Yes. That way, you can run the graph you designed in batch. In most cases, you can either run the SGD file or grab the GTL template and use it with SGRENDER. However, in this case, you must use SGDESIGN.

Stephane
Quartz | Level 8

Oh great I did not see that. Great Dan. Thank you.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 1142 views
  • 4 likes
  • 2 in conversation