Statistical Analysis System (SAS) Programming Certification Practice Exam

Disable ads (and more) with a membership for a one time $2.99 payment

Study for the SAS Programming Certification Exam. Master multiple choice questions, check explanations, and gear up for success. Boost your knowledge and confidence with engaging content!

Each practice test/flash card set has 50 randomly selected questions from a bank of over 500. You'll get a new set of questions each time!

Practice this question and more.


Which statement should you use if you want PROC IMPORT to generate SAS variable names from the data values in the first row of an input file?

  1. getnames=no;

  2. datarow=1;

  3. guessingrows=1;

  4. getnames=yes;

The correct answer is: getnames=yes;

To generate SAS variable names from the data values in the first row of an input file using PROC IMPORT, the correct statement is to set "getnames=yes". This option instructs PROC IMPORT to interpret the first row of the input file, which typically contains the column headers, as the variable names for the dataset being created. By specifying this option, SAS will automatically assign the values in that row as the names for the variables in the resulting SAS dataset. In contrast, the other available options serve different purposes. Setting "getnames=no" would prevent SAS from using the first row as variable names, instead assigning default names like VAR1, VAR2, etc. The "datarow=1" option is used to specify the first row from which data should be read, but it does not influence how variable names are derived. Lastly, "guessingrows=1" affects how SAS identifies the data types and formats of the variables by looking at only one row; however, it does not modify how variable names are assigned. Thus, the clear choice for generating variable names based on the first row's values is to choose "getnames=yes".