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

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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