Displaying the contents of a user-defined format hasn’t
been particularly easy. You have to submit this to get the details printed
in the Output window:
proc
format
lib=library.formats
fmtlib
;
select
$fctr1l;
run;
At SUGA 2002 though, it was pointed out by the SAS techos that you can
define your own Actions for SAS Explorer objects. One obvious application
of this is to allow us to click on a format Catalog entry type to display
the format’s details.
To do this manually, make the Explorer window active; click on Tools
ŕ Options…
ŕ Explorer… Then select Catalog
Entries from the drop-down list at the top of the dialog box. A list of
catalog entry types is displayed, from where the current actions can be
altered.
This can be rather long-winded and impractical if you want a lot SAS
users to make the same change. So here is a short cut.
1. Copy and paste the following SAS Registry updates to a text
file, e.g. c:\temp\regUpdate.txt.
#--- Update registry with extra Explorer actions
[CORE\EXPLORER\MENUS\ENTRIES\FORMAT]
"1;&List"="gsubmit ""proc format lib=%b.%b
fmtlib; select %b ; run;"""
"@"="gsubmit ""proc format lib=%b.%b fmtlib;
select %b ; run;"""
[CORE\EXPLORER\MENUS\ENTRIES\FORMATC]
"1;&List"="gsubmit ""proc format lib=%b.%b
fmtlib; select $%b;run;"""
"@"="gsubmit ""proc format lib=%b.%b fmtlib;
select $%b;run;"""
[CORE\EXPLORER\MENUS\ENTRIES\INFMT]
"1;&List"="gsubmit ""proc format lib=%b.%b
fmtlib; select @%b;run;"""
"@"="gsubmit ""proc format lib=%b.%b fmtlib;
select @%b; run;"""
[CORE\EXPLORER\MENUS\ENTRIES\INFMTC]
"1;&List"="gsubmit ""proc format lib=%b.%b
fmtlib; select @$%b;run;"""
"@"="gsubmit ""proc format lib=%b.%b fmtlib;
select @$%b;run;"""
2. Submit this:
/* Change the file if necessary */
filename
regin
'c:\temp\regUpdate.txt';
proc
registry
import=regin;
run;
After this, you can just double click on a format entry
type and the default action will be to run the associated code, printing the
details in the Output window.
Now isn’t that easier.