Question-51: What all are the possible ways to tell the SAS for reading data?
Answer: There are mainly three input styles in the SAS
- List input: This style is used when each field in the raw data is separated by at least one space and field value does not have embedded space in it. You have to provide the list of the variable names.
- Column Input: In this case each column has fixed width.
- Formatted input: In this case you have to specify the format of the data. For instance, numeric data can contain special symbol.
Question-52: What is informats?
Answer: While using Formatted input read style you have to provide specific instructions about the format of the data. These instructions are known as informats. For example what is the format of the date.
Question-53: What is the pointer control, while reading the RAW data?
Answer: When SAS reads the data, you can specify using the pointer control from which column it should start reading for the next item.
Question-54: What is the use “YEARCUTOFF” option in the SAS?
Answer: When SAS reads the date values and if data has two-digit year like 19, then SAS should consider it as 1919 or 2019. It can be decided using the “YEARCUTOFF” option value. Lets say you define below system option
OPTION YEARCUTOFF=1950
In this case two-digit dates would be considered between 1950 to 2049. It means if two-digit year 19 would be considered 2019, and 71 would be consider as 1971. However, it is recommended in your RAW data if possible then have 4-digit year and avoid the confusion.
Question-55: What all are the attributes for the SAS variables?
Answer: SAS variables can have following attributes
- Name of the variable
- Type of the variable
- What is the length of the variable
- Informat & format of the variable
- Label for the variable
- What is the position in an observation
- Index type