data 步就是用于定义一种格式,proc format 令这种格式在当前会话中生效。
start就是指input值,label就是output的值。可以将这理解为一种映射。
如 fmtname start label
prob 1 抵押贷款
prob 2 个人商贷
以下我要定义一个数据集,利用上面定义的映射,将其中的产品id显示为产品name:
data test;
set tt;
format producttype $prob;
明白了吗?
run;
Those are required and reserved in their names and values for SAS to acknowledge. SAS ignores those variables in different names when reading into format. JingJu
Requirements: The data set must have three required columns– FMTNAME, START, and LABEL. The data set can have the optional column called the TYPE column with values of ‘C’ for the character variable and ‘N’ for the numeric variable.
The CNTLIN=input-control-SAS-data-set specifies a SAS data set from which PROC FORMAT builds INFORMATs. Note that CNTLIN= builds FORMATS and INFORMATS without using a VALUE, PICTURE, or INVALUE statement.