comp.soft-sys.sas - The SAS statistics package.
I think you can using Proc Catalog ( I have seen that somewhere but not sure how to do it myself) but there is other way around make the two format catalogs as dataset set together and make them catalog and it should do what you want /*Syntax to make Catalog to dataset */ Proc Format lib = work cntrlout = test_catalog ; and you can read using cntrlin = ; hope this answers your question On Mon, Jul 14, 2008 at 3:09 PM, A.B. < XXXX@XXXXX.COM > wrote: > Is there a way to merge two format libraries instead of using "fmtsearch" > option? > > Usually when using the fmtsearch option, the two formats need to be in > different directories, I just wonder, If the merging is not possible, can I > put the two formats in the same directory with different names and use > them? > > Thanks, > -- > A.B. >
<html> <body> As indicated in a previous e-mail, I received a sas format library and<br> a sas data set.<br><br> Thanks to <font size=2>Sridhar, Nagakumar, for the suggested code, shown below. It worked great!<br> </font><font size=2 color="#000080"> <br><br> </font><font size=2 color="#800080">Libname aaa_yyyy 'path to format library'; options fmtsearch=(aaa_yyyy);<br><br> <br> </font><font size=2>Now, of course, I want more.<br><br> A proc contents has provided me with a link between the variable and the label, but does <br> not explicitly show the relationship between variable values and the value formats.<br><br> When I create the value labels, I can go back and look at the code:<br><br> For example, from<br><br> Proc Format library=library;<br> value sexfm 0='Male '<br> 1='Female';<br><br> I know that 0 is coded as Male and 1 as Female. <br><br> <br> I wonder how I can get from the format library a summary of what the value labels are relative<br> to the actual data points. Is there a simple way to do this or has somewhat constructed a <br> macro that makes this simple to do?<br><br> </font><x-sigsep><p></x-sigsep> <font size=3> <br> ______________________________________________________________________<br> <br> </font><font face="Eras Bold ITC" size=3>Kevin F. Spratt, Ph.D. <br> Department of Orthopaedic Surgery<br> Dartmouth Medical School<br> One Medical Center Drive<br> DHMC<br> Lebanon, NH USA 03756<br> (603) 653-6012 <x-tab> </x-tab><x-tab> </x-tab><x-tab> </x-tab>(voice)<br> (603) 653-6013 <x-tab> </x-tab><x-tab> </x-tab><x-tab> </x-tab>(fax)<br> XXXX@XXXXX.COM <x-tab> </x-tab><x-tab> </x-tab>(e-mail)<br> </font> _______________________________________________________________________<br> </body> </html>
How do you create a permanent format library in sas version 9? I could find nothing in help about it.
Hello. I have many datasets that I use for analysis. Reciently I used the below code to create an output Excel spreadsheet that I imported into ACCESS so that I can search all datasets for variables by name,label, etc. proc sql; create table content as select memname, name, type, label from dictionary.columns where libname in ("ORIGINAL", "DERIVED", "DIETSYS", "REPORTED", "VERIFIED", "MASTER", "MORT", "PYEAR"); quit; Now, I want to create another output Excel spreadsheet from all the format libraries that are associated with these files so that I can link it by name in my database and therefore allow me to obtain format values for each variable when I search the database. This code will allow me to view the format library: LIBNAME LIBRARY 'D:\DATASETS\MASTER\'; run; proc format LIBRARY=LIBRARY.FORMATS FMTLIB;run; I know I must be close to getting all this together. What I need to know is how to pull all format libraries without listing them by name and how to output only the name, dataset file, and values for the formats to the Excel spreadsheet. Thanks in advance! Alex