Desktop productivity for business analysts and programmers

Displaying SAS Graph in EG

Reply
New Contributor
Posts: 3

Displaying SAS Graph in EG

I am running a GMAP procedure in SAS EG, but it looks like the graph is being displayed in the SAS WORK location on Unix.  I see this NOTE in the SAS log:

 

NOTE: 2 records written to /saswork/SAS_workC019018701E0_vaathmr1398/SAS_workAFC6018701E0_vaathmr1398/gmap1.png.

Here is what I have for code:

proc gmap map = maps.usconty data=areax;

id state county;

choro ventiles / cdefault=yellow;

run;

quit;

Does anyone know what options/paramters to change in order to get the graph to display in EG?  Thanks.

Community Manager
Posts: 2,697

Re: Displaying SAS Graph in EG

Cyndy,

By default, SAS Enterprise Guide generates the ODS statements that direct all output, including graphs, back into your SAS Enterprise Guide project.  The default ODS destination is SAS Report, but you can change to another format, such as HTML.

SAS WORK is the default destination for graph content, but SAS Enterprise Guide should assemble the results and bring them into your project for viewing.  If that's not happening, there could be something else going on.  Is your program running on the SAS server that SAS Enterprise Guide is connected to?  Or is there perhaps another session (via SAS Grid Computing or SAS/CONNECT) where this segment of code might be running?

You can also specify your own ODS destinations and exert more control over where the result content is sent.  Did you do that within your program or are you relying on the SAS Enterprise Guide behavior?

Here's a blog post about doing more with ODS:

Take control of ODS results in SAS Enterprise Guide - The SAS Dummy

Chris

Valued Guide
Posts: 3,206

Re: Displaying SAS Graph in EG

With more modern releases SAS is moving from the old SAS/graph procedures to the ODS graphics ones.
The ODS graphics is mostly displaying automatic in Eguide where the old SAS/Graph are creating image files in a classic way.

Some background: SAS/GRAPH(R) 9.3: Reference, Third Edition  showing the use of graphics and html.  
Html usage is needing a storage location for images, SAS/STAT(R) 9.2 User's Guide, Second Edition (Saving Graphics Image Files). This is what you are seeing is happening

---->-- ja karman --<-----
Community Manager
Posts: 2,697

Re: Displaying SAS Graph in EG

The original poster included an example of PROC GMAP, which is part of SAS/GRAPH and doesn't have an ODS Graphics equivalent.  But even the SAS/GRAPH procedures can produce PNG files (as in the provided example), which SAS Enterprise Guide should bring back into your project automatically. 

It does this by parsing the HTML (or SAS Report), finding the original location of the image in your WORK folder, and downloading the image while fixing the HTML reference to render properly in your project.  If it's not happening properly in your case, we'll need to look more closely at the ODS statements that are in place while the program is running.

Chris

Valued Guide
Posts: 3,206

Re: Displaying SAS Graph in EG

Yep Chris, that should work bringing it back to Eguide in a modified setting, unless disabled.

The only thing we are seeing is the creation of the png file in a location that all makes sense in the sas-log.
We are missing all information around what is happening The ODS statements, may be an error in a next step stopping displaying the output/results.    

---->-- ja karman --<-----
Ask a Question
Discussion stats
  • 4 replies
  • 439 views
  • 0 likes
  • 3 in conversation