1(FORMATS) 0GENERATING SAS FORMAT CODES --------------------------- Census and other public data files make heavy use of codes to identify geographic areas and other categorical information such as industrial codes (SICs) and occupation codes. On most 1980 and later files from the Census Bureau there are separate fields which provide the area names to be associated with geographic codes. This is a considerable convenience for many users. In some cases, however, the labels that are to be associated with codes are not present in the dataset. They may be presented in a separate file (for example, the SIC code labels come as a separate file on the County Business Patterns tape), or they may only be available in printed form in a codebook. In any case, it is often very convenient when storing and displaying files involving such codes to be able to take advantage of the SAS custom formatting feature as implemented via PROC FORMAT. 0 A special setup in the SCADS job library (member FORMATS) shows a technique for automating the generation of SAS format codes from a SAS dataset that contains both the codes and the associated labels stored as variables. The resulting format codes can be stored in a permanent format load module library, where they can be used for many applications. While the most common use is for labeling of printed output, format codes can also be extremely useful for easy and efficient recoding applications. The FORMATS sample job contains the source code for a new-style SAS macro called GENFMATS that some shops might want to copy to their SAS macro library. The sample setup shows how you can use GENFMATS and STF3C to generate format codes to label all 1980 counties, large cities and SMSA's.