

You can also use the keywords LOW and HIGH when assigning labels to a variable with continuous values. Format LIKERT7_B assigns the label "Disagree" to values 1 through 3, and assigns the label "Agree" to values 5 through 7. If a numeric variable represents ordinal codes (or has some discernable order), you can assign the same label to multiple codes in a range. RUN Setting the same label to a range of data values Format LIKERT7_A assigns the label "Disagree" to values 1, 2, 3 and assigns the label "Agree" to values 5, 6, 7. We can do this by listing all of the values (separated by commas) to assign a given label. We may want to use the same value for more than one numeric code. RUN Creating labels that apply to more than one data value Here, the format LIKERT_SEVEN assigns distinct labels to the values 1, 2, 3, 4, 5, 6, 7. The most common way of labeling data is to simply assign each unique code its own label. Typically, you will assign a unique value label to each unique data value, but it's also possible to assign the same label to a range of data values. End the PROC FORMAT with a RUN statement and a semi-colon. You can create as many labels as you want and when you are finished don’t forget the semi-colon after the last label. The next set of lines assigns labels to the values of the variable in your dataset. Note that there is no semi-colon after the format name. NOT match the name of any variables in your data set.You can name the format whatever makes sense to you, but it must:

The next line starts with a VALUE keyword, followed by the name of the format you want to create. The procedure we want to execute is PROC FORMAT. The first line is the start of the proc step. The general form of PROC FORMAT is: PROC FORMAT This is done using the PROC FORMAT procedure.

In this case, you can create your own formats. There will be some situations where SAS built-in formats do not fit your needs - for example, nominal and ordinal categorical variables. For example, if you have a numeric variable containing yearly income, you could use formats so that the values of those variables are displayed using a dollar sign (without actually modifying the data itself). Recall from the Informats and Formats tutorial that a format in SAS controls how the values of a variable should "look" when printed or displayed.
