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

Hello, I have a dataset I want to create a format from, but then I want to add an 'other' clause to assign a value for things that are not included in the dataset. Sorry if this is a simple question but I don't know how to go about doing this. Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
3 REPLIES 3
maguiremq
SAS Super FREQ

This page should help you: https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/proc/n1e19y6lrektafn1kj6nbvhus59w.htm 

 

The `if last then do` portion takes care of the `other` clause you mentioned.

ballardw
Super User

One of the best ways I found to "learn" the options for CNTLIN data sets is to create small example formats or informats and create an output data set with the CNTLOUT option. Then look at the values set for the variables.

 

HLO is variable that you set values for to indicate the key words "High", "Low" and "Other" for the format/informat value range (hence HLO)

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 3 replies
  • 923 views
  • 8 likes
  • 4 in conversation