Phase 2: Execution Phase
The execution phase is the second phase of the data step processing.
During the execution phase, the data is read into the input buffer and subsequently the PDV and the data set, one observation at a time.
Let's take a look at our example.
Data Profile;
Input Name $ Age;
Datalines;
Khan 28
Natalia 32
Tommy 29
Lee 34
;
Run;
In the execution phase, the first line of data is read into the input buffer:
Input Pointer
Once the data is in the input buffer, SAS uses the input pointer to read the data into the PDV.
The input pointer is placed at the beginning of the input buffer:
The input pointer then reads the data into the PDV:
The data read into the PDV becomes the variable values. They are then written to the data set.
Note: the _n_ and _error_ variables exist only in the PDV. They are not written to the data set.
Once the current record is written to the data set, SAS resets the values in the PDV prior to reading in the second record.
The variables created by the INPUT statement, such as the NAME and AGE variables, are reset to missing.
The value of _n_ goes up by 1. This indicates the start of the second data step iteration.
The _error_ variable is reset to 0 if changed.
This concludes the first iteration of the execution phase.
Cookie | Duration | Description |
---|---|---|
cookielawinfo-checkbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
cookielawinfo-checkbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
cookielawinfo-checkbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |