Sample 25554: Modifying a key map using PROC GKEYMAP
This sample is from the "SAS/GRAPH Software: Reference, Version 8", Volume 2, Chapter 18.
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: GKYMODIF |
| TITLE: GKYMODIF-Modifying a Key Map |
| PRODUCT: GRAPH |
| SYSTEM: ALL |
| KEYS: GRAPHICS GKEYMAP GOPTIONS GSLIDE |
| PROCS: GKEYMAP |
| DATA: INTERNAL |
| |
| SUPPORT: GRAPHICS STAFF UPDATE: |
| REF: SAS/GRAPH REFERENCE GUIDE |
| MISC: EDIT AND UNCOMMENT THE LIBNAME STATEMENT |
| IF THE LIBREF HAS NOT BEEN DEFINED. |
+-------------------------------------------------------------+*/
/* Specify the libref GFONT0 at the location */
/* where the font to be stored. */
libname gfont0 'SAS-data-library';
/* Set the graphics environment */
goptions reset=all gunit=pct border cback=white
colors=(black blue green red)
ftext=swissb htext=6;
/* Find the name of the current keymap */
proc goptions option=keymap;
run;
/* Convert the key map DEFAULT to the data set TEMP */
proc gkeymap name=default
out=temp;
run;
/* Create data set NEW, used to create a keymap for the */
/* character conversions */
data new;
from='@';
to='b8'x;
output;
from='*';
to='d5'x;
output;
run;
/* Sort data set NEW by the FROM variable and update */
/* the data set TEMP with the coverted characters */
proc sort data=new;
by from;
data temp;
update temp new;
by from;
run;
/* Create a new key map from the data set TEMP */
proc gkeymap name=mykeymap
data=temp
keymap;
run;
/* Specify the key map */
goptions keymap=mykeymap;
/* Print titles with the special characters */
title1 'Kaiserstra@e';
title2 'Sa*o Paulo';
footnote h=3 j=r f=swiss 'GKYMODIF ';
proc gslide;
run;
quit;

This example shows how to change multiple characters in an existing key map.
| Type: | Sample |
| Topic: | SAS Reference ==> Procedures ==> GKEYMAP
|
| Date Modified: | 2005-08-27 03:03:23 |
| Date Created: | 2005-05-23 14:15:11 |
Operating System and Release Information
| SAS System | SAS/GRAPH | All | 8 TS M0 | n/a |