Sample 25551: Create and import a CGM file using PROC GIMPORT
This sample first writes a CGM file to disk using the CGMOFML device driver. The code then uses the GIMPORT procedure to import the CGM file back into SAS®.
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
This sample first writes a CGM file to disk using the CGMOFML device driver. The code then uses the GIMPORT procedure to import the CGM file back into SASĀ®.
/* Assign a fileref for the graphics */
/* stream file that will be written */
/* to disk. */
filename gsasfile 'c:\temp\sastest.cgm';
/* Turn off ODS styles */
options nogstyle;
/* Use the CGMOFML device driver to write */
/* a CGM file to disk */
goptions reset=all device=CGMOFML
border cback=white
gsfname=gsasfile gsfmode=replace
hsize=8 in vsize=6 in;
/* Add titles to the graph */
title1 f=HWCGM001 h=4 'Title One is the Helvetica Font';
title2 f=HWCGM005 h=4 'Title Two is the Times New Roman Font';
title3 f=HWCGM009 h=4 'Title Three is the Courier Font';
/* Write the CGM graph to disk */
proc gslide;
run;
quit;
/* Reset the graphics environment */
goptions reset=all cback=white border htitle=12pt htext=10pt;
/* Import the GSF file created by the CGM device driver */
proc gimport fileref=gsasfile
filetype=cgm
format=binary;
run;
quit;
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
This sample first writes a CGM file to disk using the CGMOFML device driver. The code then uses the GIMPORT procedure to import the CGM file back into SAS®.
| Type: | Sample |
| Topic: | SAS Reference ==> Procedures ==> GIMPORT Third Party ==> Output ==> Device Drivers ==> CGM
|
| Date Modified: | 2011-04-05 11:12:32 |
| Date Created: | 2005-05-23 14:15:00 |
Operating System and Release Information
| SAS System | SAS/GRAPH | All | 8 TS M0 | n/a |