SAS Informats
Informats are used to read in data that does not conform to the default SAS length restrictions. Informats are available for character, numeric, and other data forms. Example:
input name :$15. age income;
Here the informat of the form :$w. (trailing period required) tells SAS to read characters up to the first blank and assign the first w of these characters as the value of the variable. Here the first 15 characters will be assigned to the variable name. The default informat is equivalent to :$8. and w must be between 1 and 200.
The informat &$w. reads characters up to the first occurance of 2 successive blanks and assigns the first w of these characters as the value of the variable. This informat is useful values of character variables have single embedded blanks. The width w must be between 1 and 200.
The informat w. is used to read in numeric data with w digits. This informat is most often used with column input.
The informat date7. reads dates of the form 02MAR93. The informat mmddyy8. reads dates of the form 03-02-93.
There are many other SAS informats available which are useful for processing dates and other specialized situations. See the SAS Language Reference for additional information 公卫家园
input name :$15. age income;
Here the informat of the form :$w. (trailing period required) tells SAS to read characters up to the first blank and assign the first w of these characters as the value of the variable. Here the first 15 characters will be assigned to the variable name. The default informat is equivalent to :$8. and w must be between 1 and 200.
公卫论坛
The informat &$w. reads characters up to the first occurance of 2 successive blanks and assigns the first w of these characters as the value of the variable. This informat is useful values of character variables have single embedded blanks. The width w must be between 1 and 200.
公卫人
The informat w. is used to read in numeric data with w digits. This informat is most often used with column input.
The informat date7. reads dates of the form 02MAR93. The informat mmddyy8. reads dates of the form 03-02-93.
There are many other SAS informats available which are useful for processing dates and other specialized situations. See the SAS Language Reference for additional information 公卫家园
附件列表
词条内容仅供参考,如果您需要解决具体问题
(尤其在法律、医学等领域),建议您咨询相关领域专业人士。
如果您认为本词条还有待完善,请 编辑