Phase 1: Compilation Phase
SAS enters the compilation phase when you click the running-man icon, which submits the code.
During the compilation phase, SAS checks the syntax of the data step.
Below is an example of a data step that contains a syntax error:
Data Profile;
Input Name $ Age;
Dline;
Khan 28
Natalia 32
Tommy 29
Lee 34
;
Run;
In this example, the code DATALINES is misspelled as DLINE.
This is a syntax error that is identified in the compilation phase.
When encountering a syntax error, SAS writes an error message to the Log window:
ERROR: No DATALINES or INFILE statement.
SAS stops proceeding to the next phase. No data set is created.
✍️ Exam Tips
Two things happen when SAS encounters a syntax error:
- SAS writes an error message to the SAS log explaining the error.
- The data step stops executing. No data set is created.
? Sample Exam Question(s):
Question 1
Tips: when working on the sample exam question, move the tab to the window on the right-hand-side for better viewing.
The answer is (a).
When SAS encounters a syntax error, SAS writes an error message to the SAS log explaining the error.
SAS stops executing the code and no data set is created.
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. |