sas >> Print a format from a format library

by bjohnson » Tue, 27 Jan 2004 05:12:22 GMT

Hello!

I have a SAS format library, and someone wants to see the contents of a
particular format in that library. How can I do this? I can use proc
catalog to get the list of available formats, but how do I display the
contents of a particular format in that list?

Thanks in advance.

_______________________________
Bruce A. Johnson
Senior Data Analyst
Solucient, LLC
(847) 440-9635
XXXX@XXXXX.COM
This message is a private communication. It may contain information that is confidential and legally protected from disclosure. If you are not an intended recipient, please do not read, copy or use this message or any attachments, and do not disclose them to others.
Please notify the sender of the delivery error by replying to this message, and then delete it and any attachments from your system.
Thank you,
Solucient LLC
(rev eXclaimer 2x)

sas >> Print a format from a format library

by JackHamilton » Tue, 27 Jan 2004 05:18:53 GMT


PROC FORMAT with the CNTLOUT or FMTLIB option (see docs for details).

There are some third-party solutions as well, but that's what comes
with base SAS.




Hello!

I have a SAS format library, and someone wants to see the contents of
a
particular format in that library. How can I do this? I can use proc
catalog to get the list of available formats, but how do I display the
contents of a particular format in that list?

Thanks in advance.

_______________________________
Bruce A. Johnson
Senior Data Analyst
Solucient, LLC
(847) 440-9635
XXXX@XXXXX.COM
This message is a private communication. It may contain information
that is confidential and legally protected from disclosure. If you are
not an intended recipient, please do not read, copy or use this message
or any attachments, and do not disclose them to others.
Please notify the sender of the delivery error by replying to this
message, and then delete it and any attachments from your system.
Thank you,
Solucient LLC
(rev eXclaimer 2x)

sas >> Print a format from a format library

by bjohnson » Tue, 27 Jan 2004 05:20:56 GMT

Here's my answer...someone can tell me to go to '-L :-)

Date: Wed, 19 Feb 1997 17:28:06 -0600
Reply-To: Tom Kalfas < XXXX@XXXXX.COM >
Sender: "SAS(r) Discussion" < XXXX@XXXXX.COM >
From: Tom Kalfas < XXXX@XXXXX.COM >
< http://listserv.uga.edu/cgi-bin/wa?A2=ind9702C&L=sas-l&D=0&P=11978> ;
Subject: Re: What's in a Format library?
< http://listserv.uga.edu/cgi-bin/wa?A2=ind9702C&L=sas-l&D=0&P=9906> ;
Comments: To: "Cates, Randall C" < XXXX@XXXXX.COM >
In-Reply-To: "Cates, Randall C"
< XXXX@XXXXX.COM > "What's in a Format library?" (Feb 19,
5:18pm)
Content-Type: text/plain; charset=us-ascii


Randy,


You can use PROC FORMAT with a FMTLIB option to display the contents of
the
formats for any particular library (but in this case, LIBRARY):


PROC FORMAT LIB=LIBRARY FMTLIB;
RUN;


HTH,


Tom



________________________________
Bruce A. Johnson
XXXX@XXXXX.COM

This message is a private communication. It may contain information that is confidential and legally protected from disclosure. If you are not an intended recipient, please do not read, copy or use this message or any attachments, and do not disclose them to others.
Please notify the sender of the delivery error by replying to this message, and then delete it and any attachments from your system.
Thank you,
Solucient LLC
(rev eXclaimer 2x)

sas >> Print a format from a format library

by Harry.Droogendyk » Tue, 27 Jan 2004 05:22:06 GMT

See FMTLIB option on PROC FORMAT statement, with SELECT.

Or, if the FMTLIB format doesn't appeal to you, CNTLOUT the format to a SAS
dataset and PRINT only the variables you may really want to see, e.g. START,
END, LABEL

-----Original Message-----
From: SAS(r) Discussion [mailto: XXXX@XXXXX.COM ]On Behalf Of
Bruce Johnson
Sent: January 26, 2004 4:12 PM
To: XXXX@XXXXX.COM
Subject: Print a format from a format library


Hello!

I have a SAS format library, and someone wants to see the contents of a
particular format in that library. How can I do this? I can use proc
catalog to get the list of available formats, but how do I display the
contents of a particular format in that list?

Thanks in advance.

_______________________________
Bruce A. Johnson
Senior Data Analyst
Solucient, LLC
(847) 440-9635
XXXX@XXXXX.COM
This message is a private communication. It may contain information that is
confidential and legally protected from disclosure. If you are not an
intended recipient, please do not read, copy or use this message or any
attachments, and do not disclose them to others.
Please notify the sender of the delivery error by replying to this message,
and then delete it and any attachments from your system.
Thank you,
Solucient LLC
(rev eXclaimer 2x)

sas >> Print a format from a format library

by pchoate » Tue, 27 Jan 2004 05:24:48 GMT

Bruce - something like this...

proc format library=clntdata cntlout=work.var1;
select $var1f.;
run;

proc print data=var1;

or this

proc format library=library fmtlib;
select @eval nozeros;
title 'FMTLIB Output for the NOZEROS. Format and the';
title2 'EVAL. Informat';
run;

hth

Paul Choate
DDS Data Extraction
(916) 654-2160

-----Original Message-----
From: Bruce Johnson [mailto: XXXX@XXXXX.COM ]
Sent: Monday, January 26, 2004 1:12 PM
To: XXXX@XXXXX.COM
Subject: Print a format from a format library

Hello!

I have a SAS format library, and someone wants to see the contents of a
particular format in that library. How can I do this? I can use proc
catalog to get the list of available formats, but how do I display the
contents of a particular format in that list?

Thanks in advance.

_______________________________
Bruce A. Johnson
Senior Data Analyst
Solucient, LLC
(847) 440-9635
XXXX@XXXXX.COM
This message is a private communication. It may contain information that is
confidential and legally protected from disclosure. If you are not an
intended recipient, please do not read, copy or use this message or any
attachments, and do not disclose them to others.
Please notify the sender of the delivery error by replying to this message,
and then delete it and any attachments from your system.
Thank you,
Solucient LLC
(rev eXclaimer 2x)

Similar Threads

1. Can I merge two format libraries

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.
>

2. attaching a format library to data

3. Understanding Format Library

<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>

4. Creating a Format Library from a external file

5. Permanent format library

How do you create a permanent format library in sas version 9? I could
find nothing in help about it.

6. double click a sas dataset with permanent format library prob lem

7. Create output dataset of format library

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

8. Creating a Format Library from data in a SQL Server Database