This widget could not be displayed.
This widget could not be displayed.
BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.

Any one have any idea how to access the codebook store in SAS? Trying to format state based on codebook named state_cd but have not able to locate it anywhere. Any suggest will be appreciate! 

1 ACCEPTED SOLUTION

Accepted Solutions
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.

Oh, they want you to define a format from a dataset.

See this example:

Creating a Format from a CNTLIN= Data Set

 

You need to modify your dataset so that it contains the following variables:

fmtname  name of your format

type   C or N for character or numeric

start    values to be formatted

label    target values to be displayed

hlo   character variable set to 'O' for the observation containing the "other" value

View solution in original post

4 REPLIES 4
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.

Yes, i have the same questions. Part of a current program i am working on ask me to define a value format based on the codebook stored in the SAS data set state_cd. Where i have been stuck on here for over a day. But none of the search show up anything related to this data set that store in SAS.

This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.

Oh, they want you to define a format from a dataset.

See this example:

Creating a Format from a CNTLIN= Data Set

 

You need to modify your dataset so that it contains the following variables:

fmtname  name of your format

type   C or N for character or numeric

start    values to be formatted

label    target values to be displayed

hlo   character variable set to 'O' for the observation containing the "other" value

This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.

Thank you, i think i did not make it clear but i figure it out. It seems like i need to create a format based on a codebook, but the file need to be downloaded and then being reference during program.  

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!

Register now

This widget could not be displayed.
This widget could not be displayed.
Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 1791 views
  • 0 likes
  • 2 in conversation
This widget could not be displayed.
This widget could not be displayed.