Question-156: What all is created during the compilation phased?

Answer: During the compilation phase following things are created.

  • Program Data vector
  • Two automatic variables in the PDV _N_ and _ERROR_
  • The descriptor portions of the new SAS data set is created at the end of the compilation phase. Which include
    • Name of the Dataset
    • Number of observations and variables.
    • Name and attributes of the variables.
  • Observations are only written after the execution steps.

 

Question-157: Wrong data values are considered Syntax errors?

Answer: No, wrong data values are data error and any program statement which does not follow the SAS programming rule are considered Syntax error like invalid options, variable names, missing or invalid punctuations, missing or misspelled keywords.

 

Question-158: If there are 3 errors in your data steps, then what would be value of automatic variable _ERROR_?

Answer: It would be 1. It does not matter how many times error occurs; it is set to 1. And if there is no error then automatic variable _ERROR_ would have 0 value.

 

Question-159: What happens if SAS can not determine the syntax error?

Answer: When SAS can not determine the syntax error, it would compile the code but not execute it.

 

Question-160: What happens when SAS variable type is not defined correctly?

Answer: When SAS variable is not defined correctly then SAS would try to automatically convert that variable type. If it can not do that SAS continues processing and produces the output with missing values.