Published on :
Data Management INTERNAL_CREATION

Creation of format for US states

This code is also available in: Deutsch Español Français
This script uses the FORMAT procedure to create a format named 'state_f'. It establishes a correspondence between the numeric codes 12, 25, and 27 and their respective labels: Florida, Massachusetts, and Minnesota. This format can be used to improve the readability of reports or data outputs.
Data Analysis

Type : INTERNAL_CREATION


No data is read. The code generates an internal format catalog.

1 Code Block
PROC FORMAT
Explanation :
Defines the mapping rules for the 'state_f' format, associating specific integers with character strings representing states.
Copied!
1PROC FORMAT;
2 value state_f
3 12 = "Florida"
4 25 = "Massachusetts"
5 27 = "Minnesota"
6 ;
7RUN;
This material is provided "as is" by We Are Cas. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. We Are Cas is not responsible for errors in this material as it now exists or will exist, nor does We Are Cas provide technical support for it.