Sample 25551: Creating and importing a CGM using PROC GIMPORT
This sample is from the "SAS/GRAPH Software: Reference, Version 8", Volume 2, Chapter 17.
For additional information on the sample refer to this book.
/*+-------------------------------------------------------------+
| S A S S A M P L E L I B R A R Y |
| |
| NAME: GIPCRCGM |
| TITLE: GIPCRCGM-Creating and Importing a CGM |
| PRODUCT: GRAPH |
| SYSTEM: ALL |
| KEYS: GRAPHICS GIMPORT GSLIDE |
| PROCS: GIMPORT |
| DATA: INTERNAL |
| |
| SUPPORT: GRAPHICS STAFF UPDATE: |
| REF: SAS/GRAPH REFERENCE GUIDE |
| MISC: CHANGE external-file IN FILENAME STATEMENT BELOW. |
| |
+-------------------------------------------------------------+*/
/* Assign a fileref for a GSF file */
filename gsasfile 'external-file';
/* Set the graphics environment, set */
/* graphics stream file characteristics, */
/* and select CGM device driver for */
/* binary CGM */
goptions reset=all gunit=pct border cback=white
colors=(black)
gaccess=gsasfile gsfmode=replace
noprompt device=cgm
hsize=7 in vsize=5 in
vpos=60 hpos=150;
/* Define titles and footnote for slide */
title1 f=script h=7 'Title One is SCRIPT Font';
title2 f=centb h=5 'Title Two is CENTB Font';
title3 f=zapf h=5 'Title Three is ZAPF Font';
footnote h=3 f=swiss j=r 'GIPCRCGM ';
/* Generate a slide and store the graphics */
/* output in the GSF file */
proc gslide;
run;
quit;
/* Reset the graphics environment */
goptions reset=goptions border cback=white
colors=(black);
/* Import the GSF file created by the CGM device driver */
proc gimport fileref=gsasfile
filetype=cgm
format=binary;
run;
quit;

This example creates a CGM in binary format by directing SAS/GRAPH output to a graphics stream file (GSF) and using a CGM device driver. It uses the GIMPORT procedure to import the resulting CGM into SAS/GRAPH where it can be viewed and stored in a catalog.
| Type: | Sample |
| Topic: | SAS Reference ==> Procedures ==> GIMPORT Third Party ==> Output ==> Device Drivers ==> CGM
|
| Date Modified: | 2005-08-27 03:03:22 |
| Date Created: | 2005-05-23 14:15:00 |
Operating System and Release Information
| SAS System | SAS/GRAPH | All | 8 TS M0 | n/a |