Statistical Analysis System (SAS) Programming Certification Practice Exam

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

Prepare effectively for the SAS Programming Certification Exam. Access flashcards and multiple choice questions, with hints and detailed explanations. Ace your exam confidently!

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.


What is the length of the variable Type in the DATA step provided?

  1. 5

  2. 8

  3. 10

  4. It depends on the first value of Type.

The correct answer is: 5

The length of the variable in SAS is determined by the first value assigned to it within a DATA step when the variable is being created. In this case, if the assignment of the variable Type is done by a character string that is exactly 5 characters long, such as "Alpha," SAS will allocate a length of 5 for that variable. When you do not explicitly set the length of a character variable using a LENGTH statement, SAS will automatically determine the length based on the first occurrence of that variable. Therefore, if the first value of Type is "Alpha," it will indeed have a length of 5. The other options suggest fixed lengths which do not take into account the possibility for varying lengths based on the data itself. Hence, the correct response acknowledges that the variable length could depend on the data assigned, specifically asserting that the character length aligns with the first value given.