What is the program data vector in SAS.Is it the temporary buffer in which data is stored before being stored in the dataset.??
During compilation phase of DATA step, it goes through following stages:
Input Buffer: In case of reading a data from raw file an input buffer is created to a hold a record of external file whereas while reading data from SAS data set, it is not. Input buffer refers to a logical concept not a physical storage area.
PDV: It is area of memory where SAS builds a data set, one observation at a time. It is also a logical concept and created after input offer. It also has two automatic and temporary variables that is used for manipulation but which are not written to the data set as part of an observation. N counts the number of times that the DATA step begins to execute. ERROR signals the occurrence of an error that is caused by the data during execution. The default value is 0, which means there is no error. All the manipulation done at this stage only not at input buffer i.e. calculated variable is created at this stage only. After this, SAS copy the observation to output data set.
After each iteration PDV, gets initialized with missing values, character variable with blank and numeric with (.) period.
- Syntax Check: SAS also checks the syntax at this compilation stage only.
Hope this helps!
thank you so much imran