*Copyright @ www.mycsg.in;
What is delimited data?
- In the previous lesson, SAS_READRAW_L101, we have seen that when a data component is always found in a specified set of columns, we called it column data.
- Instead, when data components on a row of raw data are separated by delimiter (separator) we call it delimited data
- So, In delimited data, we have the data components listed one after another with a separator in between
How do we read delimited data into a SAS dataset?
- For reading raw data, we use an input statement to describe the alignment of data components in raw data. When data is aligned in columns,
we used an input statement which defined the data component column alignment, so we called it column input
- When the raw data is listed, we need to list the names of the variables (of each data component) on the input statement. This style of
listing the names of the variables on the input statement is called 'list input'
- We also need to tell SAS about the character that separates each data component (delimiter)
- We are instructing SAS to create a dataset named list01 using data statement
- With the keyword datalines on infile statement, we are instructing SAS to expect instream data
- Using dlm option on infile statement we are specifying that the listed raw data components are separated by a comma
- We are specifying the names and type of each variable for each data component using input statement. As mentioned earlier, as we justing
listing the names of the variables on the input statement, we call it as list input
- With list input, SAS scans from one delimiter to next and assigns input values to each variable
Understanding the attributes of the dataset created
- We will use proc contents to check the attributes of list01 dataset
To add:
Flowover
Length greater than 8
Space as default delimiter
Modified list input as a separate lesson