BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Tjohn
Calcite | Level 5

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
Kurt_Bremser
Super User

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
Tjohn
Calcite | Level 5

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.

Kurt_Bremser
Super User

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

Tjohn
Calcite | Level 5

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

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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
  • 954 views
  • 0 likes
  • 2 in conversation