Chapter Contents |
Previous |
Next |
SAS/GRAPH Software: Reference |
You can use the following methods to transport and convert graphics output within the SAS System:
Transporting Catalogs across Operating Environments |
To transport catalog entries that contain graphics output (catalog entries of type GRSEG), follow these steps:
To retain the original order of the GRSEG entries in the catalog, use SELECT= in the PROC CPORT statement to export individual graphs in the order they were created. Otherwise, when you use the GREPLAY procedure to list the graphics entries in the imported catalog, the procedure will list the entries in alphabetical order, rather than the order in which they were created. Note: Only the GREPLAY procedure can list catalog entries in the order they were created. All other procedures list entries in alphabetical order.
To export a catalog that contains groups of entries created using the GREPLAY procedure, you must use SELECT= in the PROC CPORT statement to select the names of the groups, rather than the names of individual graphs, to be included in the transport file. If you export the entire catalog without using SELECT=, the groups are not maintained in the catalog created when you import the transport file in the new host environment.
When you use the CPORT procedure, messages in the SAS log identify the catalog entries that have been placed in the transport file. If the catalog entry was created by replaying several graphs into a template, the log messages list the names of all of the entries that contributed to the templated graph.
Operating Environment Information: Use communications software or tape to move the transport file. Refer to the documentation for your network or standard procedures for using tape files.
The SELECT= option in the PROC CIMPORT statement does not affect the order of the imported entries.
Note: You must use the CIMPORT procedure
from the current version of the SAS System. The CIMPORT procedure in a previous
release cannot read a transport file created by the CPORT procedure in the
current version. For details on using the CPORT and CIMPORT procedures, see
the SAS Procedures Guide.
This example shows how to port three entries from the catalog MYLIB.GRAPHS.
First, the CPORT procedure writes selected graphs from MYLIB.GRAPHS to the transport file TRANFILE. The SELECT option names the graphs to be ported.
libname mylib 'SAS-data-library'; filename tranfile 'external-file'; proc cport file=tranfile catalog=mylib.graphs select=(GPLOT.GRSEG, GPLOT1.GRSEG, GPLOT3.GRSEG); run;
Once the transport file has been moved to the new host environment using communications software or tape, the CIMPORT procedure creates a new catalog called MYLIB.GRAPHS on the new machine.
libname mylib 'SAS-data-library'; filename tranfile 'external-file'; proc cimport catalog=mylib.graphs infile=tranfile select=(GPLOT.GRSEG, GPLOT1.GRSEG, GPLOT3.GRSEG); run;
filename tranfile 'external-file'; libname newlib 'SAS-data-library'; proc cport file=tranfile catalog=newlib.cmaps select=(mymap.cmap); run;
After moving the transport file to the new host environment, you can import the color map using the following statements:
filename tranfile 'external-file'; libname newlib 'SAS-data-library'; proc cimport infile=tranfile catalog=newlib.cmaps; run;
filename tranfile 'external-file'; libname gfont0 'SAS-data-library'; proc cport file=tranfile catalog=gfont0.fonts select=(figures.font); run;
After moving the transport file to the new host environment, you can import the font using the following statements:
filename tranfile 'external-file'; libname gfont0 'SAS-data-library'; proc cimport infile=tranfile catalog=gfont0.fonts; run;
filename tranfile 'external-file'; libname gdevice0 'SAS-data-library'; proc cport file=tranfile catalog=gdevice0.devices select=(cgm.dev); run;
After moving the transport file to the new host environment, you can import the device entry using the following statements:
filename tranfile 'external-file'; libname gdevice0 'SAS-data-library'; proc cimport infile=tranfile catalog=gdevice0.devices; run;
Converting Catalogs to a Different Version of SAS |
Note: You will not be able to use your old catalogs without
transporting them first.
Before using PROC CATALOG, you must assign librefs to both catalogs and specify the Version 6 Compatibility Engine (saseb) on the input catalog libname. Then use PROC CATALOG with a COPY statement to convert a catalog from Version 6 to Version 7 or Version 8. For details on using the CATALOG procedure, see the SAS Procedures Guide.
For example, the following statements can be submitted from Version 8 to assign the Version 6 Compatibility Engine and convert a catalog from Version 6 to Version 8.
libname v6lib saseb 'SAS-data-library'; libname v8lib 'SAS-data-library'; proc catalog catalog=v6lib.v6cat; copy out=v8lib.v8cat; run;
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.