/***************************************************格式过程************************************************/
PROC FORMAT ;
EXCLUDE entry(s);
INVALUE name value-range-set(s);
PICTURE
name value-range-set-1 ;
SELECT
entry(s);
VALUE
name value-range-set(s);
主要功能:使用输出格式重编码变量
PROC FORMAT Statement:Define formats and informats for variables
VALUE name :names the format that you are creating(给自己的格式起一个名字)
名字的限制:A numeric format name can be up to 32 characters in length. A character format name can be up to 31 characters in length. If you are creating a character format, then use a dollar sign ($) as the first character.
value-range-set(s):specifies the assignment of a value or a range of values to a formatted value
格式为:value-or-range-1= | [existing-format]
The variable values on the left side of the equal sign prints as the character string on the right side of the equal sign(等式右边的格式将作为等式左边的格式的替换输出)
几个特殊关键字
You can use the keyword OTHER= as a single value. OTHER matches all values that do not match any other value or range
You can use LOW or HIGH as one value in a range, and you can use the range LOW-HIGH to encompass all values.(high,low指定数据集中的最大值和最小值,不包括缺失值)
0 |