Hi,
According to the exam content guide of "SAS 9.4 Base Programming – Performance Based Exam", under objective "Control which observations and variables in a SAS data set are processed and output", it has 2 sub-objectives saying "Subset variables to be output by using the DROP and KEEP statements" and "Use the DROP= and KEEP= data set options to specify columns to be processed and/or output".
Is there any difference between these 2 sub-objectives? For me, subset variables are columns, aren't they? Could someone explain this and probably give some examples regarding these two objectives?
Many thanks!
Jane
Yes there is a difference. The key word in the first is "statement" compared with "data set options".
I would suggest that you use the same data set for a source of variables. Then see the difference if you attempt to use a variable that is on a Drop data set option and a Drop statement in the body of a data step.
There is a timing element involved.
Another difference is that data set options can be used with any data set used as input or output with a "date= " or "out= " in a procedure. Most procedures do not support Keep or Drop statements.
Yes there is a difference. The key word in the first is "statement" compared with "data set options".
I would suggest that you use the same data set for a source of variables. Then see the difference if you attempt to use a variable that is on a Drop data set option and a Drop statement in the body of a data step.
There is a timing element involved.
Another difference is that data set options can be used with any data set used as input or output with a "date= " or "out= " in a procedure. Most procedures do not support Keep or Drop statements.
This is a knowledge-sharing community for SAS Certified Professionals and anyone who wants to learn more about becoming SAS Certified. Ask questions and get answers fast. Share with others who are interested in certification and who are studying for certifications.To get the most from your community experience, use these getting-started resources:
Community Do's and Don'ts
How to add SAS syntax to your post
How to get fast, helpful answers
Ready to level-up your skills? Choose your own adventure.