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)

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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.

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