1.

RnoNameMarks1A502B493C514D525E52

Answer»

The SAS processing is in two steps

  1. COMPILATION phase  
  2. Execution phase
  •  Compilation phase
    • If there is a raw data to be read, there is a creation of input buffer a logical concept for holding the data, the input buffer is not created while reading a dataset.
    • After the input buffer, the pdv is created, it is the AREA of memory where SAS builds its dataset.
    • Creating two automatic variables 1. _n_ (takes the value of a number of iterations) and 2. _error_ (takes the value 1 or 0, 1 if errors and 0 if no errors)
    • The SAS then do the syntax checking for the data steps, that includes misspelled keywords, invalid varnames, missing punctuation, and invalid option.
    • Data set variables are created as the input statement is encountered and their length and type are determined.
    • The descriptor portion is now written and this is the FINAL step in the compilation phase, the run statement is the signal for the end of compilation phase. At this point, the data set contain the variables mentioned in the input statement, but the VALUES would only be written in the execution phase.
  • Execution phase
    • The automatic variables are initialized _n_ takes the value 1, _error_ to 0 and the remaining variables to missing (.)
    • The input pointer now reads the data values and assigns the variable values to the pdv.
    • At the end of the data step the data values from the pdv are written to the dataset and then _n_ takes the value as 2, _error_ 0 and all rest as missing(.).


Discussion

No Comment Found