- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Is there any option available, which allow to read the .sas file for syntax check and will not execute it.
SAS code contains both Data step and proc step.
Thank you!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
SAS is processed as a set by submit, from compilation to execution.Basically, it is not possible to compile only.It may be possible to do something similar by using an empty data set.
However, syntax errors are detected in the compile phase, but any problems with the dataset or variables are detected as errors in the execution phase, so it is not very useful unless the data is actual data.
Therefore, I sometimes test run the program with "obs= system options" or "obs= dataset options" to limit the number of observations before a time-consuming process.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Add this statement to the top of your program:
options obs = 0 syntaxcheck;
When you run the program, no data will be processed but your code will be syntax checked.