BookmarkSubscribeRSS Feed
deleted_user
Not applicable
How can a SAS formats catalog be converted to a SAS data set of variable and value labels?
7 REPLIES 7
abdullala
Calcite | Level 5
check these functions:

proc format cntlin=

and

proc format cntlout=

for input and output of formats.
deleted_user
Not applicable
This does appear to be the correct function.
Could you specify a little further for me please?

I have a formats catalog file "formats.sas7bcat" in the path "c:\"
To obtain the formats in data set "newfile.sas7bdat, would the program be something like the following?

LIBNAME PATH "C:\"
PROC FORMAT LIB = PATH CNTLOUT=NEWFILE;
RUN;

The PROC FORMAT in this case not valid, so perhaps you could advise further?
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Your code appears to be correct in its current format. You will find the SAS file WORK.NEWFILE contains your unloaded formats.

The SAS documentation on PROC FORMAT has detailed information about the CNTLOUT= file contents - documentation starts here (with focus on CNTLOUT= parameter and the Output Control Data Set discussion):

http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/a002473464.htm


Scott Barry
SBBWorks, Inc.
deleted_user
Not applicable
You are very kind to reply. The program results in an error message on the PROC FORMAT line that the PROC option is not valid. I think it must probably something basic, but any advice is appreciated.
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Post a reply and PASTE the SAS log with the code and the associated error message(s). Also, provide info about your SAS version, OS where SAS is running, and whether SAS is running local on your machine or on a remote server.

Scott Barry
SBBWorks, Inc.
Cynthia_sas
SAS Super FREQ
Every SAS statement ends with a semi-colon, including the LIBNAME statement. I thought I would check that your lack of a semi-colon on the LIBNAME statement was a cut and paste error.

cynthia
deleted_user
Not applicable
This was the problem. Thank you.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 7 replies
  • 1392 views
  • 0 likes
  • 4 in conversation