Question 1
Topic: Access and Create Data Structures
Skill tested: Select PROC IMPORT options and row-scanning behavior for delimited files.
A reporting team receives a comma-delimited file whose character columns contain occasional values longer than the first few records suggest. The file has a header row, and an identifier contains leading zeros that must remain part of the imported value. The team uses SAS 9.4 and needs the file imported into a permanent library. Which approach best addresses the row-scanning and output requirements while avoiding an incorrect assumption that PROC IMPORT will infer the identifier as character?
For a delimited source, DBMS=CSV and OUT= identify the import format and destination, while REPLACE permits an existing output data set to be overwritten. GUESSINGROWS=MAX makes PROC IMPORT examine all available rows when inferring attributes, reducing the risk that early short values determine an inadequate length. Type inference is not a guarantee that a digit-only identifier will retain leading zeros; verify the resulting type and use an explicit, controlled import method when that representation is essential. GUESSINGROWS=1 does the opposite, and DBMS=XLSX is for Excel workbooks.