What value does the variable idnum contain when the name of the employee is "Ruth"?

Given the raw data file EMPLOYEE.TXT:

The following SAS program is submitted:

What value does the variable idnum contain when the name of the employee is "Ruth"?
A. 33
B. 22
C. 39
D. 44

Download Printable PDF. VALID exam to help you PASS.

One thought on “What value does the variable idnum contain when the name of the employee is "Ruth"?

  1. correct answer is A – 33 because the second line will be loaded into input buffer as there is a second input statement and no line holder indicator @ after the the 1st input statement (that normally should be if we want to read data correctly and avoid unexpected results).
    First input statement – input employee_name $ 1-4, second input statement- if employee_name=’Ruth’=>as there is implicit output at the end of the data step, the values of the pdv will be read into data set and for the 1st line where name =Ruth, the values of idnum will be those of the 2nd line from 10th to 11th position: 33

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.