03-06-2015 10:34 AM
Hi ,
I have difficulty understanding the basic terminology in SAS
What is the difference between "SAS Catalog" and a "SAS Library"???
I have the below definition from SAS documentation and it says "Catalog is a valid SAS name for the file"?????
Could you please help me understand this???
libref:
is the logical name of the SAS library to which the catalog belongs.
is a valid SAS name for the file.
SAS(R) 9.2 Language Reference: Concepts, Second Edition
Also in the below DEF.XYZ......what is XYZ???? is it a dataset in DEF library???????
If you specify FMTSEARCH=(ABC DEF.XYZ GHI), SAS searches for requested formats or informats in this order:
03-06-2015 12:51 PM
LIBRARY.Formats is a special case for keeping track of the SAS supplied formats. You can't actually access it or add a catalog to it.
If you add a library to the FMTSEARCH and the formats are stored in a catalog other than FORMATS then they will not be found. The specific catalog name must be included.
03-06-2015 10:53 AM
Basically libraries can contain just about any SAS file, data set , data view, catalog.
Catalogs are special files that contain, generally, related items. Some of the things besides formats are menus, icons, code for applications, key definitions, GIS Layers and projects and some other specialties.
Your question about DEF.XYZ: By default if a LIBRARY is mentioned in the FMTSEARCH path then it looks for a catalog named FORMATS. But you can create a catalog with any valid catalog name and it may contain formats. So you need to reference the Library and specific catalog name. In this case the catalog containing formats is named XYZ and resides in the DEF library.
Use the SAS Explorer to open some of the catalogs in the SASHELP library and you'll see a variety of things.
03-06-2015 11:34 AM
Thanks Ballard,
That was very helpful information.
Also In the below what does he mean by LIBRARY.FORMATS???Does it mean if we mention the library and does not specify any catalog it will search for FORMATS catalog in that library????if XYZ catalog is present in that Library it will ignore since we did not specify it????
If you specify FMTSEARCH=(ABC DEF.XYZ GHI), SAS searches for requested formats or informats in this order:
03-06-2015 12:51 PM
LIBRARY.Formats is a special case for keeping track of the SAS supplied formats. You can't actually access it or add a catalog to it.
If you add a library to the FMTSEARCH and the formats are stored in a catalog other than FORMATS then they will not be found. The specific catalog name must be included.
03-06-2015 07:30 PM
LIBRARY is just a normal libref, but it has special impact on format searching because the normal default setting for the FMTSEARCH option is (WORK LIBRARY).
If you look at a SAS program from 20+ years ago you will see that the libref LIBRARY is usually assigned to find the company standard format library or perhaps a project standard format library.
Now a days you can use FMTSEARCH to point to a specific catalog (two level name like PROJECT.NEWFMTS) or libref (one level name). When you use just a one level name it is interpreted as meaning the FORMATS catalog in that libref.
Need further help from the community? Please ask a new question.