'Can we rename formats Catalog in sas?
I have a requirement to change formats.sas7bcat file to forms.sas7bcat I am wondering, if it is possible? If yes, then how should I do that? Either manually or with coding?
Thanks for your Help!
Solution 1:[1]
You can use PROC DATASETS to rename catalogs in addition to renaming datasets. To make sure it finds the catalog named FORMATS instead of a dataset named FORMATS use the MEMTYPE= option.
So if the catalog is in the libref MYLIB then the code would look like:
proc datasets nolist lib=MYLIB memtype=catalog;
change formats=forms ;
run;
quit;
Solution 2:[2]
The formats.sas7bcat file is a file on disk, so you certainly could rename it using windows techniques (or linux or whatnot).
You also can create it with the desired name when you create your formats, by using:
proc format library=yourlib.forms;
[whatever format code you are using]
run;
Then you can use options fmtsearch=(yourlib.forms work); or similar to make sure it is looking at that format catalog for formats.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Tom |
| Solution 2 | Joe |
