Posts

Showing posts with the label compress functions etc

SAS Interview Questions: Base SAS

Very Basic: What SAS statements would you code to read an external raw data file into a DATA step? You would use the INFILE statement to specify the location of the external raw data file, and the INPUT statement to read in the data into the variables in a SAS dataset. How do you read in the variables that you need? You use the INPUT statement with specific column pointers, such as @5 or 12-17 , to define where each variable is located in the raw data file. Are you familiar with special input delimiters? How are they used? Yes, special input delimiters like DLM and DSD are used to specify how fields are separated in the data. They are included in the INFILE statement. For example, the DLM option can be used to specify a comma as a delimiter for CSV files. The DSD option is used for comma-separated values (CSV) files and treats consecutive delimiters as missing values and ignores delimiters enclosed in quotation marks. If reading a variable-length file with fixed inp...