For example: data work.calculus set p end=last If last run Where Calculus is a new data set to be created and Comp is the existing data set last is the temporary variable (initialized to 0) which is set to 1 when the set statement reads the last observation. Question: Given an unsorted dataset, how to read the last observation to a new d ata set? Answer: using end= data set option. Whereas If want to process certain variables and do not want them to appear in t he new data set, then specify drop= data set option in the data statement. Question : What is the difference between using drop= data set option in data st atement and set statement? Answer: If you don't want to process certain variables and you do not want them to appear in the new data set, then specify drop= data set option in the set state ment. Question: What is the function of Stop statement? Answer: Stop statement causes SAS to stop processing the current data step immed iately and resume processing statement after the end of current data step. Placing an explicit OUTPUT statement in a DATA step overrides the automatic output, so that observat ions are added to a data set only when the explicit OUTPUT statement is executed. Base SAS Interview Questions Answers Question: What is the function of output statement? Answer: To override the default way in which the DATA step writes observations t o output, you can use an OUTPUT statement in the DATA step.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |