Behind the Scenes Logic on Data Reading

Connie Kelly Tang · Auerbach Publications eBooks · 2020

A good understanding of how Statistical Analysis System (SAS) reads the data will help to code the program more efficiently. When SAS reads the data in the DATA step, there are two steps involved. The first is the compilation, and the second is the execution. During compilation, SAS scans all statements contained in the DATA procedure for syntactical/grammatical errors. During this process, SAS also establishes the Program Data Vector (PDV) and additional descriptor information. The compilation process first checks the correctness of all statements contained between the DATA and RUN statements. During the execution stage, the DATA step statements are executed one observation (one row) at a time. The actual observation is read from the original file to a buffer and then to the PDV. From the PDV, a dataset is created.

Read the paper · More papers on PaperTik